mirror of
https://gitee.com/dromara/go-view.git
synced 2025-02-23 15:52:49 +08:00
fix: 解决所有icon的引入路径问题
This commit is contained in:
parent
45884a2918
commit
07eabd8869
@ -18,8 +18,6 @@ import { useDesignStore } from '@/store/modules/designStore/designStore'
|
|||||||
|
|
||||||
import { getDarkThemeHook, getThemeOverridesHook } from '@/hooks'
|
import { getDarkThemeHook, getThemeOverridesHook } from '@/hooks'
|
||||||
|
|
||||||
const designStore = useDesignStore()
|
|
||||||
|
|
||||||
// 返回暗黑主题
|
// 返回暗黑主题
|
||||||
const getDarkTheme = getDarkThemeHook()
|
const getDarkTheme = getDarkThemeHook()
|
||||||
|
|
||||||
|
@ -8,7 +8,8 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { openDoc } from '@/utils'
|
import { openDoc } from '@/utils'
|
||||||
import { DocumentText as DocumentTextIcon } from '@vicons/ionicons5'
|
import { icon } from '@/plugins'
|
||||||
|
const { DocumentTextIcon } = icon.ionicons5
|
||||||
|
|
||||||
const handleClick = () => {
|
const handleClick = () => {
|
||||||
openDoc()
|
openDoc()
|
||||||
|
@ -15,10 +15,11 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useLangStore } from '@/store/modules/langStore/langStore'
|
import { useLangStore } from '@/store/modules/langStore/langStore'
|
||||||
import { Language as LanguageIcon } from '@vicons/ionicons5'
|
|
||||||
import { langList } from '@/settings/designSetting'
|
import { langList } from '@/settings/designSetting'
|
||||||
import { LangEnum } from '@/enums/styleEnum'
|
import { LangEnum } from '@/enums/styleEnum'
|
||||||
|
import { icon } from '@/plugins'
|
||||||
|
|
||||||
|
const { LanguageIcon } = icon.ionicons5
|
||||||
const langStore = useLangStore()
|
const langStore = useLangStore()
|
||||||
const options = langList
|
const options = langList
|
||||||
|
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useDesignStore } from '@/store/modules/designStore/designStore'
|
import { useDesignStore } from '@/store/modules/designStore/designStore'
|
||||||
import { setHtmlTheme } from '@/utils'
|
import { setHtmlTheme } from '@/utils'
|
||||||
import { Moon as MoonIcon, Sunny as SunnyIcon } from '@vicons/ionicons5'
|
import { icon } from '@/plugins'
|
||||||
|
const { MoonIcon, SunnyIcon } = icon.ionicons5
|
||||||
const designStore = useDesignStore()
|
const designStore = useDesignStore()
|
||||||
|
|
||||||
// 改变样式
|
// 改变样式
|
||||||
|
@ -24,12 +24,9 @@ import { h, ref } from 'vue'
|
|||||||
import { NAvatar, NText } from 'naive-ui'
|
import { NAvatar, NText } from 'naive-ui'
|
||||||
import { renderIcon } from '@/utils'
|
import { renderIcon } from '@/utils'
|
||||||
import { openDoc, logout } from '@/utils'
|
import { openDoc, logout } from '@/utils'
|
||||||
import {
|
|
||||||
Person as PersonIcon,
|
import { icon } from '@/plugins'
|
||||||
LogOutOutline as LogOutOutlineIcon,
|
const { DocumentTextIcon, ChatboxEllipsesIcon, PersonIcon, LogOutOutlineIcon } = icon.ionicons5
|
||||||
DocumentText as DocumentTextIcon,
|
|
||||||
ChatboxEllipses as ChatboxEllipsesIcon
|
|
||||||
} from '@vicons/ionicons5'
|
|
||||||
|
|
||||||
const imageUrl = 'https://www.naiveui.com/assets/naivelogo.93278402.svg'
|
const imageUrl = 'https://www.naiveui.com/assets/naivelogo.93278402.svg'
|
||||||
|
|
||||||
|
@ -11,11 +11,50 @@ import {
|
|||||||
DownloadOutline as DownloadIcon,
|
DownloadOutline as DownloadIcon,
|
||||||
Open as OpenIcon,
|
Open as OpenIcon,
|
||||||
Send as SendIcon,
|
Send as SendIcon,
|
||||||
InformationCircleOutline as InformationCircleIcon
|
InformationCircleOutline as InformationCircleIcon,
|
||||||
|
Beer as BeerIcon,
|
||||||
|
Grid as GridIcon,
|
||||||
|
TvOutline as DesktopIcon,
|
||||||
|
LaptopOutline as LaptopOutlineIcon,
|
||||||
|
DocumentText as DocumentTextIcon,
|
||||||
|
Language as LanguageIcon,
|
||||||
|
Moon as MoonIcon,
|
||||||
|
Sunny as SunnyIcon,
|
||||||
|
Person as PersonIcon,
|
||||||
|
PersonOutline as PersonOutlineIcon,
|
||||||
|
LogOutOutline as LogOutOutlineIcon,
|
||||||
|
ChatboxEllipses as ChatboxEllipsesIcon,
|
||||||
|
LockClosedOutline as LockClosedOutlineIcon,
|
||||||
|
HelpCircleOutline as HelpOutlineIcon,
|
||||||
|
CodeSlash as CodeSlashIcon,
|
||||||
|
Duplicate as DuplicateIcon,
|
||||||
|
DuplicateOutline as DuplicateOutlineIcon
|
||||||
} from '@vicons/ionicons5'
|
} from '@vicons/ionicons5'
|
||||||
|
|
||||||
// ionicons5 在这里
|
// ionicons5 在这里
|
||||||
const ionicons5 = {
|
const ionicons5 = {
|
||||||
|
// 帮助
|
||||||
|
HelpOutlineIcon,
|
||||||
|
// 添加
|
||||||
|
DuplicateIcon,
|
||||||
|
// 添加 Outline
|
||||||
|
DuplicateOutlineIcon,
|
||||||
|
// 代码
|
||||||
|
CodeSlashIcon,
|
||||||
|
// 退出
|
||||||
|
LogOutOutlineIcon,
|
||||||
|
// 锁
|
||||||
|
LockClosedOutlineIcon,
|
||||||
|
// 人
|
||||||
|
PersonIcon,
|
||||||
|
// 人2
|
||||||
|
PersonOutlineIcon,
|
||||||
|
// 更多(省略号)
|
||||||
|
ChatboxEllipsesIcon,
|
||||||
|
// 月亮
|
||||||
|
MoonIcon,
|
||||||
|
// 太阳
|
||||||
|
SunnyIcon,
|
||||||
// 关闭
|
// 关闭
|
||||||
CloseIcon,
|
CloseIcon,
|
||||||
// 移除(最小化)
|
// 移除(最小化)
|
||||||
@ -41,7 +80,19 @@ const ionicons5 = {
|
|||||||
// 导出
|
// 导出
|
||||||
SendIcon,
|
SendIcon,
|
||||||
// 信息
|
// 信息
|
||||||
InformationCircleIcon
|
InformationCircleIcon,
|
||||||
|
// 物料(颜色混合)
|
||||||
|
BeerIcon,
|
||||||
|
// 项目
|
||||||
|
GridIcon,
|
||||||
|
// 电脑1
|
||||||
|
DesktopIcon,
|
||||||
|
// 电脑2
|
||||||
|
LaptopOutlineIcon,
|
||||||
|
// 文档
|
||||||
|
DocumentTextIcon,
|
||||||
|
// 语言
|
||||||
|
LanguageIcon
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://www.xicons.org/#/ 还有很多
|
// https://www.xicons.org/#/ 还有很多
|
||||||
|
@ -125,10 +125,9 @@ import { LangSelect } from '@/components/LangSelect'
|
|||||||
import { Header } from '@/layout/components/Header'
|
import { Header } from '@/layout/components/Header'
|
||||||
import { Footer } from '@/layout/components/Footer'
|
import { Footer } from '@/layout/components/Footer'
|
||||||
import { PageEnum } from '@/enums/pageEnum'
|
import { PageEnum } from '@/enums/pageEnum'
|
||||||
import {
|
import { icon } from '@/plugins'
|
||||||
PersonOutline as PersonOutlineIcon,
|
|
||||||
LockClosedOutline as LockClosedOutlineIcon
|
const { ChatboxEllipsesIcon, LockClosedOutlineIcon } = icon.ionicons5
|
||||||
} from '@vicons/ionicons5'
|
|
||||||
|
|
||||||
interface FormState {
|
interface FormState {
|
||||||
username: string
|
username: string
|
||||||
|
@ -18,10 +18,9 @@
|
|||||||
import { reactive, ref } from 'vue'
|
import { reactive, ref } from 'vue'
|
||||||
import { Card } from '../Card/index'
|
import { Card } from '../Card/index'
|
||||||
import { ModalCard } from '../ModalCard/index'
|
import { ModalCard } from '../ModalCard/index'
|
||||||
import {
|
|
||||||
EllipsisHorizontalSharp as EllipsisHorizontalCircleSharpIcon,
|
import { icon } from '@/plugins'
|
||||||
CopyOutline as CopyIcon
|
const { CopyIcon, EllipsisHorizontalCircleSharpIcon } = icon.ionicons5
|
||||||
} from '@vicons/ionicons5'
|
|
||||||
|
|
||||||
const list = reactive([
|
const list = reactive([
|
||||||
{
|
{
|
||||||
|
@ -56,10 +56,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { openDoc, openGiteeSourceCode } from '@/utils'
|
import { openDoc, openGiteeSourceCode } from '@/utils'
|
||||||
|
|
||||||
import {
|
import { icon } from '@/plugins'
|
||||||
HelpCircleOutline as HelpOutlineIcon,
|
const { HelpOutlineIcon, CodeSlashIcon} = icon.ionicons5
|
||||||
CodeSlash as CodeSlashIcon
|
|
||||||
} from '@vicons/ionicons5'
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
collapsed: Boolean
|
collapsed: Boolean
|
||||||
|
@ -4,28 +4,36 @@
|
|||||||
<n-button ghost type="primary" size="small">
|
<n-button ghost type="primary" size="small">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<n-icon>
|
<n-icon>
|
||||||
<DuplicateIcon />
|
<DuplicateOutlineIcon v-show="designStore.getDarkTheme" />
|
||||||
|
<DuplicateIcon v-show="!designStore.getDarkTheme" />
|
||||||
</n-icon>
|
</n-icon>
|
||||||
</template>
|
</template>
|
||||||
</n-button>
|
</n-button>
|
||||||
</template>
|
</template>
|
||||||
<n-text>
|
<span>
|
||||||
新建
|
新建
|
||||||
</n-text>
|
</span>
|
||||||
</n-tooltip>
|
</n-tooltip>
|
||||||
<n-button v-else ghost type="primary" size="large">
|
<n-button v-else ghost type="primary" size="large">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<n-icon>
|
<n-icon>
|
||||||
<DuplicateIcon />
|
<DuplicateOutlineIcon v-show="designStore.getDarkTheme" />
|
||||||
|
<DuplicateIcon v-show="!designStore.getDarkTheme" />
|
||||||
</n-icon>
|
</n-icon>
|
||||||
</template>
|
</template>
|
||||||
<n-text>
|
<span>
|
||||||
新建
|
新建
|
||||||
</n-text>
|
</span>
|
||||||
</n-button>
|
</n-button>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<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({
|
const props = defineProps({
|
||||||
collapsed: Boolean
|
collapsed: Boolean
|
||||||
})
|
})
|
||||||
|
@ -3,13 +3,9 @@ import { renderIcon } from '@/utils'
|
|||||||
import { RouterLink } from 'vue-router'
|
import { RouterLink } from 'vue-router'
|
||||||
import { PageEnum } from '@/enums/pageEnum'
|
import { PageEnum } from '@/enums/pageEnum'
|
||||||
import { MenuOption, MenuGroupOption } from 'naive-ui'
|
import { MenuOption, MenuGroupOption } from 'naive-ui'
|
||||||
import {
|
import { icon } from '@/plugins'
|
||||||
Grid as GridIcon,
|
|
||||||
LogoAppleAppstore as LogoAppleAppstoreIcon,
|
|
||||||
TvOutline as DesktopIcon,
|
|
||||||
LaptopOutline as LaptopOutlineIcon,
|
|
||||||
} from '@vicons/ionicons5'
|
|
||||||
|
|
||||||
|
const { GridIcon, BeerIcon, DesktopIcon, LaptopOutlineIcon } = icon.ionicons5
|
||||||
export const renderMenuLabel = (option: MenuOption | MenuGroupOption) => {
|
export const renderMenuLabel = (option: MenuOption | MenuGroupOption) => {
|
||||||
return option.label
|
return option.label
|
||||||
}
|
}
|
||||||
@ -81,7 +77,7 @@ export const menuOptionsInit = () => {
|
|||||||
{ default: () => '物料市场' }
|
{ default: () => '物料市场' }
|
||||||
),
|
),
|
||||||
key: PageEnum.BASE_HOME_TEMPLATE_MARKET_NAME,
|
key: PageEnum.BASE_HOME_TEMPLATE_MARKET_NAME,
|
||||||
icon: renderIcon(LogoAppleAppstoreIcon)
|
icon: renderIcon(BeerIcon)
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user