提交 9b0c5cde 编写于 作者: Mr.奇淼('s avatar Mr.奇淼(

Merge branch 'gin-vue-admin_v2_dev' of...

Merge branch 'gin-vue-admin_v2_dev' of https://github.com/flipped-aurora/gin-vue-admin into gin-vue-admin_v2_dev
...@@ -317,17 +317,17 @@ ...@@ -317,17 +317,17 @@
} }
}, },
props:{ props:{
getIcon:{ icon:{
default: function() { default: function() {
return {} return {}
}, },
type: Function type: Object
} },
},
created() {
this.value = this.icon.icon
}, },
methods:{ methods:{
propIcon(icon){
this.getIcon(icon)
}
} }
} }
</script> </script>
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
<el-input autocomplete="off" v-model="form.meta.title"></el-input> <el-input autocomplete="off" v-model="form.meta.title"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="图标" prop="meta.icon" style="width:30%"> <el-form-item label="图标" prop="meta.icon" style="width:30%">
<icon :getIcon="getIcon"> <icon :icon="icon">
<template slot="prepend" >el-icon-</template> <template slot="prepend" >el-icon-</template>
</icon> </icon>
</el-form-item> </el-form-item>
...@@ -143,19 +143,14 @@ export default { ...@@ -143,19 +143,14 @@ export default {
{ required: true, message: "请输入菜单展示名称", trigger: "blur" } { required: true, message: "请输入菜单展示名称", trigger: "blur" }
] ]
}, },
isEdit: false isEdit: false,
test:''
}; };
}, },
components:{ components:{
icon icon
}, },
props:[
'getIcon'
],
methods: { methods: {
getIcon(icon){
this.form.meta.icon = icon
},
setOptions() { setOptions() {
this.menuOption = [ this.menuOption = [
{ {
...@@ -295,6 +290,7 @@ export default { ...@@ -295,6 +290,7 @@ export default {
this.dialogTitle = "编辑菜单"; this.dialogTitle = "编辑菜单";
const res = await getBaseMenuById({ id }); const res = await getBaseMenuById({ id });
this.form = res.data.menu; this.form = res.data.menu;
this.icon = this.form.meta;
this.isEdit = true; this.isEdit = true;
this.setOptions(); this.setOptions();
this.dialogFormVisible = true; this.dialogFormVisible = true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册