增加自动icon功能,所有添加到web/assets/icons下的svg会自动被注册为icon组件使用【可用于menu和直接用标签加文件名使用】
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive } from 'vue'
|
||||
import config from "@/core/config";
|
||||
|
||||
defineOptions({
|
||||
name: 'Icon',
|
||||
@@ -1175,12 +1176,14 @@ const options = reactive([
|
||||
'key': 'wind-power',
|
||||
'label': 'wind-power',
|
||||
},
|
||||
...config.logs
|
||||
])
|
||||
|
||||
console.log(config.logs)
|
||||
const metaData = ref(props.meta)
|
||||
if (!metaData.value.icon) {
|
||||
metaData.value.icon = options[0].label
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
Reference in New Issue
Block a user