|
@@ -63,6 +63,7 @@
|
|
index + '-' + i
|
|
index + '-' + i
|
|
)
|
|
)
|
|
"
|
|
"
|
|
|
|
+ @addComponent="addComponent"
|
|
></h5-van-field>
|
|
></h5-van-field>
|
|
<h5-van-buttom
|
|
<h5-van-buttom
|
|
v-if="v.type === 'van-buttom'"
|
|
v-if="v.type === 'van-buttom'"
|
|
@@ -75,6 +76,7 @@
|
|
index + '-' + i
|
|
index + '-' + i
|
|
)
|
|
)
|
|
"
|
|
"
|
|
|
|
+ @addComponent="addComponent"
|
|
></h5-van-buttom>
|
|
></h5-van-buttom>
|
|
</template>
|
|
</template>
|
|
</h5-from-component>
|
|
</h5-from-component>
|
|
@@ -101,6 +103,17 @@
|
|
</span>
|
|
</span>
|
|
</template>
|
|
</template>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
+
|
|
|
|
+ <el-dialog v-model="dialogVisible" :title="'请选择向' + (visbileData.type == 'bottom' ? '下': '上') + '方添加的组件'" width="50vw">
|
|
|
|
+ <span>This is a message</span>
|
|
|
|
+ <template #footer>
|
|
|
|
+ <span class="dialog-footer">
|
|
|
|
+ <el-button type="primary" @click="dialogVisible = false">
|
|
|
|
+ 新 增
|
|
|
|
+ </el-button>
|
|
|
|
+ </span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
<div class="H5Editor_right">
|
|
<div class="H5Editor_right">
|
|
<div v-for="(item, index) in hoversList" :key="item.url">
|
|
<div v-for="(item, index) in hoversList" :key="item.url">
|
|
@@ -149,6 +162,8 @@ const H5EditorObjEle = {
|
|
fromComponent: 'H5ParagraphLeft',
|
|
fromComponent: 'H5ParagraphLeft',
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+const dialogVisible = ref(false);
|
|
|
|
+const visbileData = ref({});
|
|
const H5Editor = ref({});
|
|
const H5Editor = ref({});
|
|
const leftEle = ref(false);
|
|
const leftEle = ref(false);
|
|
const route = useRoute();
|
|
const route = useRoute();
|
|
@@ -168,6 +183,15 @@ const selectComponent = (v, i) => {
|
|
leftEle.value = v.leftEle || false;
|
|
leftEle.value = v.leftEle || false;
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+const addComponent = (type, index) => {
|
|
|
|
+ dialogVisible.value = true;
|
|
|
|
+ visbileData.value = {
|
|
|
|
+ type,
|
|
|
|
+ index,
|
|
|
|
+ }
|
|
|
|
+ console.log(type, index);
|
|
|
|
+};
|
|
|
|
+
|
|
// 查看页面大小,
|
|
// 查看页面大小,
|
|
const img = new Image();
|
|
const img = new Image();
|
|
img.src = hoversList.value[selectPage.value].background_url || '';
|
|
img.src = hoversList.value[selectPage.value].background_url || '';
|
|
@@ -218,6 +242,11 @@ const savePage = () => {
|
|
h5Conf: JSON.stringify(hoversList.value),
|
|
h5Conf: JSON.stringify(hoversList.value),
|
|
id: item.id,
|
|
id: item.id,
|
|
},
|
|
},
|
|
|
|
+ }).then(() => {
|
|
|
|
+ showpage.value = false;
|
|
|
|
+ pageconfig.value.name = '';
|
|
|
|
+ pageconfig.value.desc = '';
|
|
|
|
+ ElMessage.success('保存成功');
|
|
});
|
|
});
|
|
} else
|
|
} else
|
|
createTemplateList({
|
|
createTemplateList({
|
|
@@ -227,8 +256,7 @@ const savePage = () => {
|
|
h5Conf: JSON.stringify(hoversList.value),
|
|
h5Conf: JSON.stringify(hoversList.value),
|
|
templateId: item.templateId,
|
|
templateId: item.templateId,
|
|
},
|
|
},
|
|
- }).then(r => {
|
|
|
|
- console.log(r);
|
|
|
|
|
|
+ }).then(() => {
|
|
showpage.value = false;
|
|
showpage.value = false;
|
|
pageconfig.value.name = '';
|
|
pageconfig.value.name = '';
|
|
pageconfig.value.desc = '';
|
|
pageconfig.value.desc = '';
|