This commit is contained in:
pushuo 2022-07-14 20:57:56 +08:00
parent 58d8dae892
commit 095ca44038
2 changed files with 11 additions and 2 deletions

View File

@ -119,8 +119,16 @@
watch: {}, watch: {},
// 组件方法 // 组件方法
methods: { methods: {
moduleUpdated() { moduleUpdated(module) {
console.log('moduleUpdated') const data = {
module: this.editingModuleCode,
content: this.form.modules[this.design.editingModuleIndex].content
};
$http.post('design/builder/preview', data).then((res) => {
layer.msg(res.message)
})
// console.log(module)
}, },
addModuleButtonClicked(code) { addModuleButtonClicked(code) {

View File

@ -82,6 +82,7 @@ Vue.component('module-editor-slideshow', {
removeImage(index) { removeImage(index) {
this.module.images.splice(index, 1); this.module.images.splice(index, 1);
}, },
itemShow(index) { itemShow(index) {
this.module.images.find((e, key) => {if (index != key) return e.show = false}); this.module.images.find((e, key) => {if (index != key) return e.show = false});
this.module.images[index].show = !this.module.images[index].show; this.module.images[index].show = !this.module.images[index].show;