菜单图标
This commit is contained in:
parent
8094378605
commit
a23fe978a2
|
|
@ -70,7 +70,7 @@
|
||||||
</template>
|
</template>
|
||||||
</el-input> -->
|
</el-input> -->
|
||||||
|
|
||||||
<select-icon></select-icon>
|
<select-icon :icon="formData.menuIcon"></select-icon>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -228,7 +228,6 @@ const getMenuDetail = async (id: number) => {
|
||||||
const getFatherMenu = async () => {
|
const getFatherMenu = async () => {
|
||||||
const menus = (await apiConfigGetMenu()) || []
|
const menus = (await apiConfigGetMenu()) || []
|
||||||
menuList.value = [{ id: 0, menuName: '顶级' }, ...menus]
|
menuList.value = [{ id: 0, menuName: '顶级' }, ...menus]
|
||||||
console.log(menuList.value, '---------------menuaList.value')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 添加菜单
|
// 添加菜单
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="select-icon">
|
<div class="select-icon">
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<div class="show-icon">
|
<div class="show-icon">
|
||||||
<i class="iconfont"></i>
|
<i class="iconfont" :class="iconItemValue"></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-popover placement="bottom" :width="400" trigger="click">
|
<el-popover placement="bottom" :width="400" trigger="click">
|
||||||
|
|
@ -117,9 +117,33 @@ const selectIcon = ref<any>([
|
||||||
'icon_gongyingshang'
|
'icon_gongyingshang'
|
||||||
])
|
])
|
||||||
|
|
||||||
|
const iconItemValue = ref<any>([])
|
||||||
|
|
||||||
const selectIconItem = (item: string) => {
|
const selectIconItem = (item: string) => {
|
||||||
console.log(item, 'item')
|
console.log(item, 'item____')
|
||||||
|
iconItemValue.value = item
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const emit = defineEmits(['update:icon'])
|
||||||
|
|
||||||
|
const props = withDefaults(
|
||||||
|
defineProps<{
|
||||||
|
icon: any
|
||||||
|
}>(),
|
||||||
|
{
|
||||||
|
icon: ''
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
const iconValue = computed({
|
||||||
|
get: () => {
|
||||||
|
return [props.icon]
|
||||||
|
},
|
||||||
|
set: (value: any) => {
|
||||||
|
emit('update:icon', selectIconItem)
|
||||||
|
console.log(selectIconItem, 'selectIconItem______')
|
||||||
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
@ -128,6 +152,12 @@ const selectIconItem = (item: string) => {
|
||||||
height: 32px;
|
height: 32px;
|
||||||
border: 1px solid #dcdfe6;
|
border: 1px solid #dcdfe6;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
.iconfont {
|
||||||
|
font-size: 30px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.select-icon-item {
|
.select-icon-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue