Skip to content

Commit 523b74e

Browse files
committed
refactor: dashboard preview
1 parent 1c7a081 commit 523b74e

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

frontend/components.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ declare module '@vue/runtime-core' {
3939
ElRow: typeof import('element-plus-secondary/es')['ElRow']
4040
ElScrollbar: typeof import('element-plus-secondary/es')['ElScrollbar']
4141
ElSelect: typeof import('element-plus-secondary/es')['ElSelect']
42-
ElSlider: typeof import('element-plus-secondary/es')['ElSlider']
4342
ElStep: typeof import('element-plus-secondary/es')['ElStep']
4443
ElSteps: typeof import('element-plus-secondary/es')['ElSteps']
4544
ElSwitch: typeof import('element-plus-secondary/es')['ElSwitch']

frontend/src/views/dashboard/common/ResourceGroupOpt.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,12 @@ const getResourceNewName = (cmd: string) => {
4040
}
4141
4242
const optInit = (params: any) => {
43+
// @ts-ignore
4344
state.dialogTitle = getTitle(params.cmd)
4445
state.showParentSelected = params.parentSelect
4546
state.targetInfo = params.data
4647
resourceDialogShow.value = true
48+
// @ts-ignore
4749
resourceForm.name = getResourceNewName(params.cmd)
4850
}
4951
@@ -52,8 +54,6 @@ const loading = ref(false)
5254
const pid = ref()
5355
const id = ref()
5456
const cmd = ref('')
55-
const treeRef = ref()
56-
const filterText = ref('')
5757
const resourceForm = reactive({
5858
pid: '',
5959
pName: '',
@@ -105,6 +105,7 @@ const editeInit = (param: SQTreeNode) => {
105105
const propsTree = {
106106
label: 'name',
107107
children: 'children',
108+
// @ts-ignore
108109
isLeaf: node => !node.children?.length
109110
}
110111
@@ -118,6 +119,7 @@ const saveResource = () => {
118119
name: resourceForm.name,
119120
type: 'dashboard'
120121
}
122+
// @ts-ignore
121123
dashboardApi.addResource(params).then(res => {
122124
ElMessage({
123125
type: 'success',
@@ -133,7 +135,8 @@ const nodeClick = (data: SQTreeNode) => {
133135
resourceForm.pName = data.name as string
134136
}
135137
136-
const filterMethod = value => {
138+
const filterMethod = (value:any) => {
139+
// @ts-ignore
137140
state.tData = [...tData].filter(item => item.name.includes(value))
138141
}
139142

frontend/src/views/dashboard/common/ResourceTree.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ const addOperation = (params: any) => {
208208
const newCanvasUrl = '#/canvas?opt=create' + params.data?.id ? `&pid=${params.data?.id}` : ''
209209
window.open(newCanvasUrl, '_blank')
210210
} else {
211+
// @ts-ignore
211212
resourceGroupOptRef.value?.optInit(params)
212213
}
213214
}
@@ -309,8 +310,7 @@ defineExpose({
309310
<Icon><icon_edit_outlined class="svg-icon"/></Icon>
310311
</el-icon>
311312
<HandleMore
312-
@handle-command="
313-
cmd => addOperation(cmd, data, cmd === 'newFolder' ? 'folder' : 'leaf')
313+
@handle-command=" (cmd:string) => addOperation({cmd})
314314
"
315315
:menu-list="resourceTypeList"
316316
:icon-name="icon_add_outlined"

0 commit comments

Comments
 (0)