Commit 6d1f54ff by 胡悦

修改

1 parent 1da4c804
......@@ -37,58 +37,15 @@ export default {
data() {
return {
previewList: [],
// previewList: [
// {
// id: 1,
// type: 'text',
// content: 'fasf'
// },
// {
// id: 2,
// type: 'link',
// url: 'https://baidu.comdfasdfasdfa'
// },
// {
// id: 3,
// type: 'img',
// url: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fhbimg.b0.upaiyun.com%2F945cad7c7105d352aa3c513c94846bb0c2f1a61342067-OWFZcE_fw658&refer=http%3A%2F%2Fhbimg.b0.upaiyun.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1639018450&t=a60f5defc48c980674edcf9a8d5981df'
// },
// {
// id: 4,
// type: 'applet',
// appleIcon: '../../../assets/logo.png',
// title: '我的智慧门店',
// content: '我的智慧门店'
// },
// {
// id: 5,
// type: 'text',
// content: 'fasf'
// },
// {
// id: 6,
// type: 'text',
// content: 'fasf'
// },
// {
// id: 7,
// type: 'text',
// content: 'fasf'
// },
// {
// id: 8,
// type: 'text',
// content: 'fasf'
// },
// {
// id: 9,
// type: 'text',
// content: 'fasf'
// }
// ],
currentTime: ''
}
},
created() {
this.eventBus.$on('update', val => {
console.log(val)
this.previewList = val
})
},
mounted() {
const date = new Date()
let hours = date.getHours()
......@@ -96,10 +53,6 @@ export default {
let minutes = date.getMinutes()
minutes = minutes < 10 ? `0${minutes}` : minutes
this.currentTime = `${date.getFullYear()}年${date.getMonth() + 1}月${date.getDate()}日 ${hours}:${minutes}`
this.eventBus.$on('update', val => {
console.log(val)
this.previewList = val
})
}
}
</script>
......
......@@ -17,7 +17,7 @@
<img src="../../../assets/guestCustom/icon-applet.png" alt="" />
<span>{{ itm.title }}</span>
</template>
<i class="el-icon-circle-close"></i>
<i class="el-icon-circle-close" @click="close(index)"></i>
</div>
</div>
<div class="btn-group">
......@@ -239,6 +239,10 @@ export default {
default:
console.log(dialogTitle)
}
},
close(index) {
this.previewList.splice(index, 1)
this.eventBus.$emit('update', this.previewList)
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!