feat: 调整icon功能的绑定形式 升级vue和svg插件
This commit is contained in:
parent
9b26d6c504
commit
6386034c65
|
@ -36,8 +36,8 @@
|
||||||
"sortablejs": "^1.15.3",
|
"sortablejs": "^1.15.3",
|
||||||
"spark-md5": "^3.0.2",
|
"spark-md5": "^3.0.2",
|
||||||
"tailwindcss": "^3.4.10",
|
"tailwindcss": "^3.4.10",
|
||||||
"vite-auto-import-svg": "^1.0.0",
|
"vite-auto-import-svg": "^1.1.0",
|
||||||
"vue": "^3.5.1",
|
"vue": "^3.5.7",
|
||||||
"vue-echarts": "^7.0.3",
|
"vue-echarts": "^7.0.3",
|
||||||
"vue-router": "^4.4.3",
|
"vue-router": "^4.4.3",
|
||||||
"vuedraggable": "^4.1.0"
|
"vuedraggable": "^4.1.0"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="w-full">
|
<div class="w-full">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="metaData.icon"
|
v-model="value"
|
||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
>
|
>
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<component :is="metaData.icon" />
|
<component :is="value" />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</template>
|
</template>
|
||||||
<el-option
|
<el-option
|
||||||
|
@ -42,14 +42,7 @@ defineOptions({
|
||||||
name: 'Icon',
|
name: 'Icon',
|
||||||
})
|
})
|
||||||
|
|
||||||
const props = defineProps({
|
const value = defineModel()
|
||||||
meta: {
|
|
||||||
default: function() {
|
|
||||||
return {}
|
|
||||||
},
|
|
||||||
type: Object,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
const options = reactive([
|
const options = reactive([
|
||||||
{
|
{
|
||||||
|
@ -1171,15 +1164,9 @@ const options = reactive([
|
||||||
{
|
{
|
||||||
'key': 'wind-power',
|
'key': 'wind-power',
|
||||||
'label': 'wind-power',
|
'label': 'wind-power',
|
||||||
},
|
}
|
||||||
...config.logs
|
|
||||||
])
|
])
|
||||||
const metaData = ref(props.meta)
|
|
||||||
if (!metaData.value.icon) {
|
|
||||||
// metaData.value.icon = options[0].label
|
|
||||||
// 传参无icon则显示空即可,否则默认会加一个aim的icon
|
|
||||||
metaData.value.icon = ''
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -287,7 +287,7 @@
|
||||||
prop="meta.icon"
|
prop="meta.icon"
|
||||||
>
|
>
|
||||||
<icon
|
<icon
|
||||||
:meta="form.meta"
|
v-model="form.meta.icon"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
Loading…
Reference in New Issue