Skip to content

Commit e58cf25

Browse files
author
QM303176530
committed
Merge branch 'gin-vue-admin_v2_dev' of https://github.com/flipped-aurora/gin-vue-admin into gin-vue-admin_v2_dev
2 parents b81ea1a + 6ac8fe8 commit e58cf25

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

web/src/view/superAdmin/menu/icon.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -317,17 +317,17 @@
317317
}
318318
},
319319
props:{
320-
getIcon:{
320+
icon:{
321321
default: function() {
322322
return {}
323323
},
324-
type: Function
325-
}
324+
type: Object
325+
},
326+
},
327+
created() {
328+
this.value = this.icon.icon
326329
},
327330
methods:{
328-
propIcon(icon){
329-
this.getIcon(icon)
330-
}
331331
}
332332
}
333333
</script>

web/src/view/superAdmin/menu/menu.vue

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
<el-input autocomplete="off" v-model="form.meta.title"></el-input>
7272
</el-form-item>
7373
<el-form-item label="图标" prop="meta.icon" style="width:30%">
74-
<icon :getIcon="getIcon">
74+
<icon :icon="icon">
7575
<template slot="prepend" >el-icon-</template>
7676
</icon>
7777
</el-form-item>
@@ -143,19 +143,14 @@ export default {
143143
{ required: true, message: "请输入菜单展示名称", trigger: "blur" }
144144
]
145145
},
146-
isEdit: false
146+
isEdit: false,
147+
test:''
147148
};
148149
},
149150
components:{
150151
icon
151152
},
152-
props:[
153-
'getIcon'
154-
],
155153
methods: {
156-
getIcon(icon){
157-
this.form.meta.icon = icon
158-
},
159154
setOptions() {
160155
this.menuOption = [
161156
{
@@ -295,6 +290,7 @@ export default {
295290
this.dialogTitle = "编辑菜单";
296291
const res = await getBaseMenuById({ id });
297292
this.form = res.data.menu;
293+
this.icon = this.form.meta;
298294
this.isEdit = true;
299295
this.setOptions();
300296
this.dialogFormVisible = true;

0 commit comments

Comments
 (0)