fix: 解决所有icon的引入路径问题

This commit is contained in:
MTrun
2021-12-20 16:39:19 +08:00
parent 45884a2918
commit 07eabd8869
11 changed files with 88 additions and 40 deletions
+3 -4
View File
@@ -125,10 +125,9 @@ import { LangSelect } from '@/components/LangSelect'
import { Header } from '@/layout/components/Header'
import { Footer } from '@/layout/components/Footer'
import { PageEnum } from '@/enums/pageEnum'
import {
PersonOutline as PersonOutlineIcon,
LockClosedOutline as LockClosedOutlineIcon
} from '@vicons/ionicons5'
import { icon } from '@/plugins'
const { ChatboxEllipsesIcon, LockClosedOutlineIcon } = icon.ionicons5
interface FormState {
username: string
@@ -18,10 +18,9 @@
import { reactive, ref } from 'vue'
import { Card } from '../Card/index'
import { ModalCard } from '../ModalCard/index'
import {
EllipsisHorizontalSharp as EllipsisHorizontalCircleSharpIcon,
CopyOutline as CopyIcon
} from '@vicons/ionicons5'
import { icon } from '@/plugins'
const { CopyIcon, EllipsisHorizontalCircleSharpIcon } = icon.ionicons5
const list = reactive([
{
@@ -56,10 +56,8 @@
<script setup lang="ts">
import { openDoc, openGiteeSourceCode } from '@/utils'
import {
HelpCircleOutline as HelpOutlineIcon,
CodeSlash as CodeSlashIcon
} from '@vicons/ionicons5'
import { icon } from '@/plugins'
const { HelpOutlineIcon, CodeSlashIcon} = icon.ionicons5
const props = defineProps({
collapsed: Boolean
@@ -4,28 +4,36 @@
<n-button ghost type="primary" size="small">
<template #icon>
<n-icon>
<DuplicateIcon />
<DuplicateOutlineIcon v-show="designStore.getDarkTheme" />
<DuplicateIcon v-show="!designStore.getDarkTheme" />
</n-icon>
</template>
</n-button>
</template>
<n-text>
<span>
新建
</n-text>
</span>
</n-tooltip>
<n-button v-else ghost type="primary" size="large">
<template #icon>
<n-icon>
<DuplicateIcon />
<DuplicateOutlineIcon v-show="designStore.getDarkTheme" />
<DuplicateIcon v-show="!designStore.getDarkTheme" />
</n-icon>
</template>
<n-text>
<span>
新建
</n-text>
</span>
</n-button>
</template>
<script setup lang="ts">
import { Duplicate as DuplicateIcon } from '@vicons/ionicons5'
import { icon } from '@/plugins'
import { computed } from 'node_modules/vue/dist/vue'
import { useDesignStore } from '@/store/modules/designStore/designStore'
const { DuplicateIcon, DuplicateOutlineIcon } = icon.ionicons5
const designStore = useDesignStore()
const props = defineProps({
collapsed: Boolean
})
@@ -3,13 +3,9 @@ import { renderIcon } from '@/utils'
import { RouterLink } from 'vue-router'
import { PageEnum } from '@/enums/pageEnum'
import { MenuOption, MenuGroupOption } from 'naive-ui'
import {
Grid as GridIcon,
LogoAppleAppstore as LogoAppleAppstoreIcon,
TvOutline as DesktopIcon,
LaptopOutline as LaptopOutlineIcon,
} from '@vicons/ionicons5'
import { icon } from '@/plugins'
const { GridIcon, BeerIcon, DesktopIcon, LaptopOutlineIcon } = icon.ionicons5
export const renderMenuLabel = (option: MenuOption | MenuGroupOption) => {
return option.label
}
@@ -81,7 +77,7 @@ export const menuOptionsInit = () => {
{ default: () => '物料市场' }
),
key: PageEnum.BASE_HOME_TEMPLATE_MARKET_NAME,
icon: renderIcon(LogoAppleAppstoreIcon)
icon: renderIcon(BeerIcon)
}
])
}