Commit 66dd1ad9 by 叶富雄

指定字符需要base64

parent c2c9316c
......@@ -881,6 +881,14 @@ export default {
type: Object,
default: () => {},
},
fileBase64: {
type: Object,
default: () => {},
},
base64Transform: {
type: Boolean,
default: false,
},
propTitle: String,
pageBs: String,
},
......@@ -890,11 +898,9 @@ export default {
rules: {},
propFormField: this.formField,
formLabelAlign: this.formLabelAligns,
rules: {},
fileLists: {},
imageUrl: {},
shade: false,
fileBase64:''
};
},
created() {
......@@ -1405,9 +1411,12 @@ export default {
);
// debugger;
if (item.type == "photo") {
this.getBase64(file.raw).then((resBase64) => {
this.fileBase64 = resBase64.split(",")[1]; //直接拿到base64信息
});
if(this.base64Transform){
this.getBase64(file.raw).then((resBase64) => {
this.fileBase64[item.id] = resBase64.split(",")[1]; //直接拿到base64信息
this.$emit("onBase64Transform", this.fileBase64);
});
}
if (isJPG) {
this.$set(self.imageUrl, item.id, file.raw);
this.$set(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment