mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
refactor: dashboard view
This commit is contained in:
@@ -67,7 +67,27 @@ export const dashboardStore = defineStore('dashboard', {
|
||||
// @ts-expect-error eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
this.canvasViewInfo[params.id] = params
|
||||
},
|
||||
canvasDataInit() {},
|
||||
canvasDataInit() {
|
||||
this.curComponent = null
|
||||
this.curComponentId = null
|
||||
this.canvasStyleData = {}
|
||||
this.componentData = []
|
||||
this.canvasViewInfo = {}
|
||||
this.dashboardInfo = {
|
||||
id: null,
|
||||
name: null,
|
||||
pid: null,
|
||||
workspaceId: null,
|
||||
status: null,
|
||||
dataState: null,
|
||||
createName: null,
|
||||
updateName: null,
|
||||
createTime: null,
|
||||
updateTime: null,
|
||||
contentId: null,
|
||||
type: null,
|
||||
}
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
@@ -213,6 +213,7 @@ const addOperation = (params: any) => {
|
||||
if (params.opt === 'newLeaf') {
|
||||
const newCanvasUrl = '#/canvas?opt=create' + (params?.id ? `&pid=${params?.id}` : '')
|
||||
window.open(newCanvasUrl, '_self')
|
||||
dashboardStore.canvasDataInit()
|
||||
} else {
|
||||
// @ts-expect-error eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
resourceGroupOptRef.value?.optInit(params)
|
||||
|
||||
Reference in New Issue
Block a user