|
|
|
@ -704,6 +704,22 @@
|
|
|
|
|
<el-form-item label="背景颜色" v-if="Object.keys(nodeAttrForm).includes('backgroundColor')">
|
|
|
|
|
<el-color-picker v-model="nodeAttrForm.backgroundColor" show-alpha />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="背景图" v-if="Object.keys(nodeAttrForm).includes('backgroundImage')">
|
|
|
|
|
<el-upload
|
|
|
|
|
class="avatar-uploader"
|
|
|
|
|
:action="uploadFileUrl"
|
|
|
|
|
:show-file-list="false"
|
|
|
|
|
:limit="1"
|
|
|
|
|
accept=".jpg,.png"
|
|
|
|
|
:headers="headers"
|
|
|
|
|
:on-success="(res)=>nodeAttrForm.backgroundImage = res.data.url"
|
|
|
|
|
>
|
|
|
|
|
<img v-if="nodeAttrForm.backgroundImage" :src="nodeAttrForm.backgroundImage" class="avatar" />
|
|
|
|
|
<el-icon v-else class="avatar-uploader-icon">
|
|
|
|
|
<Plus />
|
|
|
|
|
</el-icon>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="是否显示边框" v-if="Object.keys(nodeAttrForm).includes('isBorder')">
|
|
|
|
|
<el-switch v-model="nodeAttrForm.isBorder" />
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -1400,17 +1416,6 @@ const clear = () => {
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
const pageBgUploadSuccess = (res) => {
|
|
|
|
|
// const getFileText = (file) => {
|
|
|
|
|
// const reader = new FileReader();
|
|
|
|
|
// reader.onload = function(e) {
|
|
|
|
|
// const fileContent = e.target.result;
|
|
|
|
|
// console.log(fileContent);
|
|
|
|
|
// pageSettingForm.value.bg = fileContent;
|
|
|
|
|
// };
|
|
|
|
|
// reader.readAsDataURL(file);
|
|
|
|
|
// };
|
|
|
|
|
// getFileText(file);
|
|
|
|
|
// return false;
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
pageSettingForm.value.bg = res.data.url;
|
|
|
|
|
}
|
|
|
|
|