File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed
src/views/dashboard/common Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff 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' ]
Original file line number Diff line number Diff line change @@ -40,10 +40,12 @@ const getResourceNewName = (cmd: string) => {
4040}
4141
4242const 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)
5254const pid = ref ()
5355const id = ref ()
5456const cmd = ref (' ' )
55- const treeRef = ref ()
56- const filterText = ref (' ' )
5757const resourceForm = reactive ({
5858 pid: ' ' ,
5959 pName: ' ' ,
@@ -105,6 +105,7 @@ const editeInit = (param: SQTreeNode) => {
105105const 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
Original file line number Diff line number Diff 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"
You can’t perform that action at this time.
0 commit comments