|
@@ -3,7 +3,7 @@
|
|
|
<div class="filter-container">
|
|
<div class="filter-container">
|
|
|
<el-row :gutter="20">
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="4">
|
|
<el-col :span="4">
|
|
|
- <span>测试模板 </span>
|
|
|
|
|
|
|
+ <span>测试模板 </span>
|
|
|
<el-select
|
|
<el-select
|
|
|
v-model="currentTemplateId"
|
|
v-model="currentTemplateId"
|
|
|
@change="handleChangeTemplate"
|
|
@change="handleChangeTemplate"
|
|
@@ -25,6 +25,45 @@
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
+ <el-row>
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item prop="backgroundColor" label="材料">
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="formData.backgroundColor"
|
|
|
|
|
+ filterable
|
|
|
|
|
+ placeholder="请选择"
|
|
|
|
|
+ @change="refreshPreview"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in bannerBgColorOptions"
|
|
|
|
|
+ :key="item.label"
|
|
|
|
|
+ :label="item.label"
|
|
|
|
|
+ :value="item.color"
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ <el-row>
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item prop="backgroundSize" label="尺寸">
|
|
|
|
|
+ <el-input-number
|
|
|
|
|
+ :precision="2"
|
|
|
|
|
+ :controls="false"
|
|
|
|
|
+ v-model="formData.backgroundWidth"
|
|
|
|
|
+ @change="refreshPreview"
|
|
|
|
|
+ />
|
|
|
|
|
+ <span style="margin-left: 20px; margin-right: 20px">*</span>
|
|
|
|
|
+ <el-input-number
|
|
|
|
|
+ :precision="2"
|
|
|
|
|
+ :controls="false"
|
|
|
|
|
+ v-model="formData.backgroundHeight"
|
|
|
|
|
+ @change="refreshPreview"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<iframe
|
|
<iframe
|
|
@@ -139,6 +178,29 @@ onMounted(() => {
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
|
|
+ //父页面也需要监听消息
|
|
|
|
|
+ window.addEventListener("message", function (event) {
|
|
|
|
|
+ // 确保消息来自信任的来源
|
|
|
|
|
+ // if (event.origin !== "https://www.sd2000.com") {
|
|
|
|
|
+ // return;
|
|
|
|
|
+ // }
|
|
|
|
|
+
|
|
|
|
|
+ // 处理接收到的消息
|
|
|
|
|
+ console.log("Received message:", event.data);
|
|
|
|
|
+
|
|
|
|
|
+ //消息格式
|
|
|
|
|
+ // {
|
|
|
|
|
+ // msgType: 'loadTemplate',
|
|
|
|
|
+ // data: {
|
|
|
|
|
+ // xxx
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
|
|
+ const message = JSON.parse(event.data);
|
|
|
|
|
+ if (message.msgType == "canClose") {
|
|
|
|
|
+ ElMessage.info("可以关闭子页面了");
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
const handleChangeTemplate = (templateId) => {
|
|
const handleChangeTemplate = (templateId) => {
|