feat(projects): 引入soybean-admin-tab、去除vite-plugin-svg-icons,用unplugin-icons实现自定义svg的iconify写法、代码优化

This commit is contained in:
Soybean
2022-03-05 01:55:21 +08:00
parent b298af1ddb
commit a1a57a185c
93 changed files with 266 additions and 6700 deletions

View File

@@ -13,7 +13,7 @@
>
<Icon :icon="item.meta?.icon ?? 'mdi:bookmark-minus-outline'" />
<span class="flex-1 ml-5px">{{ item.meta?.title }}</span>
<icon-ant-design:enter-outlined class="icon text-20px p-2px mr-3px" />
<icon-ant-design-enter-outlined class="icon text-20px p-2px mr-3px" />
</div>
</template>
</div>
@@ -24,11 +24,11 @@
import { computed } from 'vue';
import { Icon } from '@iconify/vue';
import { useThemeStore } from '@/store';
import type { RouteList } from './types';
import type { SearchMenu } from '@/interface';
interface Props {
value: string;
options: RouteList[];
options: SearchMenu[];
}
interface Emits {
@@ -36,9 +36,12 @@ interface Emits {
(e: 'enter'): void;
}
const props = withDefaults(defineProps<Props>(), {});
const props = defineProps<Props>();
const emit = defineEmits<Emits>();
const theme = useThemeStore();
const active = computed({
get() {
return props.value;
@@ -47,10 +50,9 @@ const active = computed({
emit('update:value', val);
}
});
const theme = useThemeStore();
/** 鼠标移入 */
async function handleMouse(item: RouteList) {
async function handleMouse(item: SearchMenu) {
active.value = item.path;
}