feat: app交互

This commit is contained in:
chenjinsong
2022-07-26 13:54:09 +08:00
parent 4648af7f90
commit ef2ac4915c
5 changed files with 137 additions and 179 deletions

View File

@@ -57,6 +57,15 @@ export default {
},
async mounted () {
await this.init()
const vm = this
this.emitter.on('reloadChartList', async function () {
vm.chartList = (await getChartList({ panelId: vm.panel.id, pageSize: -1 })).map(chart => {
chart.i = chart.id
// 递归初始化各属性
vm.initChartAttr(chart)
return chart
})
})
},
setup (props, ctx) {
const panel = ref({})