mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-12-26 06:40:17 +08:00
feat(projects): 引入soybean-admin-tab、去除vite-plugin-svg-icons,用unplugin-icons实现自定义svg的iconify写法、代码优化
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user