File tree Expand file tree Collapse file tree 2 files changed +10
-14
lines changed Expand file tree Collapse file tree 2 files changed +10
-14
lines changed Original file line number Diff line number Diff line change 317
317
}
318
318
},
319
319
props: {
320
- getIcon : {
320
+ icon : {
321
321
default : function () {
322
322
return {}
323
323
},
324
- type: Function
325
- }
324
+ type: Object
325
+ },
326
+ },
327
+ created () {
328
+ this .value = this .icon .icon
326
329
},
327
330
methods: {
328
- propIcon (icon ){
329
- this .getIcon (icon)
330
- }
331
331
}
332
332
}
333
333
</script >
Original file line number Diff line number Diff line change 70
70
<el-input autocomplete =" off" v-model =" form.meta.title" ></el-input >
71
71
</el-form-item >
72
72
<el-form-item label =" 图标" prop =" meta.icon" style =" width :30% " >
73
- <icon :getIcon = " getIcon " >
73
+ <icon :icon = " icon " >
74
74
<template slot="prepend" >el-icon-</template >
75
75
</icon >
76
76
</el-form-item >
@@ -142,19 +142,14 @@ export default {
142
142
{ required: true , message: " 请输入菜单展示名称" , trigger: " blur" }
143
143
]
144
144
},
145
- isEdit: false
145
+ isEdit: false ,
146
+ test: ' '
146
147
};
147
148
},
148
149
components: {
149
150
icon
150
151
},
151
- props: [
152
- ' getIcon'
153
- ],
154
152
methods: {
155
- getIcon (icon ){
156
- this .form .meta .icon = icon
157
- },
158
153
setOptions () {
159
154
this .menuOption = [
160
155
{
@@ -294,6 +289,7 @@ export default {
294
289
this .dialogTitle = " 编辑菜单" ;
295
290
const res = await getBaseMenuById ({ id });
296
291
this .form = res .data .menu ;
292
+ this .icon = this .form .meta ;
297
293
this .isEdit = true ;
298
294
this .setOptions ();
299
295
this .dialogFormVisible = true ;
You can’t perform that action at this time.
0 commit comments