代码格式修改
This commit is contained in:
@@ -16,35 +16,35 @@ keys.forEach(key => {
|
||||
|
||||
function vModel(dataObject, defaultValue, config) {
|
||||
// 获取上传表单元素组件上传的文件
|
||||
if (config.tag === "el-upload") {
|
||||
if (config.tag === 'el-upload') {
|
||||
// 上传表单元素组件的成功和移除事件
|
||||
dataObject.attrs["on-success"] = (response, file, fileList) => {
|
||||
this.$emit("upload", response, file, fileList);
|
||||
};
|
||||
dataObject.attrs['on-success'] = (response, file, fileList) => {
|
||||
this.$emit('upload', response, file, fileList)
|
||||
}
|
||||
|
||||
dataObject.attrs["on-remove"] = (file, fileList) => {
|
||||
this.$emit("deleteUpload", file, fileList);
|
||||
};
|
||||
dataObject.attrs['on-remove'] = (file, fileList) => {
|
||||
this.$emit('deleteUpload', file, fileList)
|
||||
}
|
||||
|
||||
dataObject.attrs["on-preview"] = (file, fileList) => {
|
||||
this.$emit("previewUpload", file, fileList);
|
||||
};
|
||||
dataObject.attrs['on-preview'] = (file, fileList) => {
|
||||
this.$emit('previewUpload', file, fileList)
|
||||
}
|
||||
|
||||
// 获取上传表单元素的默认值
|
||||
try {
|
||||
dataObject.props["file-list"] = JSON.parse(defaultValue);
|
||||
dataObject.props['file-list'] = JSON.parse(defaultValue)
|
||||
} catch (err) {
|
||||
console.warn(err);
|
||||
console.warn(err)
|
||||
}
|
||||
|
||||
return;
|
||||
return
|
||||
}
|
||||
|
||||
// 获取普通表单元素的值
|
||||
dataObject.props.value = defaultValue;
|
||||
dataObject.props.value = defaultValue
|
||||
dataObject.on.input = (val) => {
|
||||
this.$emit("input", val);
|
||||
};
|
||||
this.$emit('input', val)
|
||||
}
|
||||
}
|
||||
|
||||
function mountSlotFiles(h, confClone, children) {
|
||||
|
||||
Reference in New Issue
Block a user