Commit 6f97350d by lijiabin

【需求 17679】 perf: icon组件改成按需加载

parent ebbb6a98
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
"vue-router": "^4.6.3" "vue-router": "^4.6.3"
}, },
"devDependencies": { "devDependencies": {
"@iconify-json/ep": "^1.2.3",
"@tsconfig/node22": "^22.0.2", "@tsconfig/node22": "^22.0.2",
"@types/node": "^22.18.11", "@types/node": "^22.18.11",
"@vitejs/plugin-vue": "^6.0.1", "@vitejs/plugin-vue": "^6.0.1",
...@@ -56,6 +57,7 @@ ...@@ -56,6 +57,7 @@
"typescript": "~5.9.0", "typescript": "~5.9.0",
"unocss": "^66.5.4", "unocss": "^66.5.4",
"unplugin-auto-import": "^20.2.0", "unplugin-auto-import": "^20.2.0",
"unplugin-icons": "^22.5.0",
"unplugin-vue-components": "^30.0.0", "unplugin-vue-components": "^30.0.0",
"vite": "^7.1.11", "vite": "^7.1.11",
"vite-plugin-svg-icons": "^2.0.1", "vite-plugin-svg-icons": "^2.0.1",
......
...@@ -54,6 +54,9 @@ importers: ...@@ -54,6 +54,9 @@ importers:
specifier: ^4.6.3 specifier: ^4.6.3
version: 4.6.3(vue@3.5.22(typescript@5.9.3)) version: 4.6.3(vue@3.5.22(typescript@5.9.3))
devDependencies: devDependencies:
'@iconify-json/ep':
specifier: ^1.2.3
version: 1.2.3
'@tsconfig/node22': '@tsconfig/node22':
specifier: ^22.0.2 specifier: ^22.0.2
version: 22.0.2 version: 22.0.2
...@@ -105,6 +108,9 @@ importers: ...@@ -105,6 +108,9 @@ importers:
unplugin-auto-import: unplugin-auto-import:
specifier: ^20.2.0 specifier: ^20.2.0
version: 20.2.0(@vueuse/core@14.0.0(vue@3.5.22(typescript@5.9.3))) version: 20.2.0(@vueuse/core@14.0.0(vue@3.5.22(typescript@5.9.3)))
unplugin-icons:
specifier: ^22.5.0
version: 22.5.0(@vue/compiler-sfc@3.5.22)
unplugin-vue-components: unplugin-vue-components:
specifier: ^30.0.0 specifier: ^30.0.0
version: 30.0.0(@babel/parser@7.28.5)(vue@3.5.22(typescript@5.9.3)) version: 30.0.0(@babel/parser@7.28.5)(vue@3.5.22(typescript@5.9.3))
...@@ -513,6 +519,9 @@ packages: ...@@ -513,6 +519,9 @@ packages:
resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==}
engines: {node: '>=18.18'} engines: {node: '>=18.18'}
'@iconify-json/ep@1.2.3':
resolution: {integrity: sha512-bESiKz5aTcbT4chTVSKjR5P+Nk81ibRtWgR7Gng5JPdF1Az+91+bIOof/OCUKThFRWqWsQ9A4XmSSrakvjuJDQ==}
'@iconify/types@2.0.0': '@iconify/types@2.0.0':
resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==} resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==}
...@@ -3693,6 +3702,29 @@ packages: ...@@ -3693,6 +3702,29 @@ packages:
'@vueuse/core': '@vueuse/core':
optional: true optional: true
unplugin-icons@22.5.0:
resolution: {integrity: sha512-MBlMtT5RuMYZy4TZgqUL2OTtOdTUVsS1Mhj6G1pEzMlFJlEnq6mhUfoIt45gBWxHcsOdXJDWLg3pRZ+YmvAVWQ==}
peerDependencies:
'@svgr/core': '>=7.0.0'
'@svgx/core': ^1.0.1
'@vue/compiler-sfc': ^3.0.2 || ^2.7.0
svelte: ^3.0.0 || ^4.0.0 || ^5.0.0
vue-template-compiler: ^2.6.12
vue-template-es2015-compiler: ^1.9.0
peerDependenciesMeta:
'@svgr/core':
optional: true
'@svgx/core':
optional: true
'@vue/compiler-sfc':
optional: true
svelte:
optional: true
vue-template-compiler:
optional: true
vue-template-es2015-compiler:
optional: true
unplugin-utils@0.3.1: unplugin-utils@0.3.1:
resolution: {integrity: sha512-5lWVjgi6vuHhJ526bI4nlCOmkCIF3nnfXkCMDeMJrtdvxTs6ZFCM8oNufGTsDbKv/tJ/xj8RpvXjRuPBZJuJog==} resolution: {integrity: sha512-5lWVjgi6vuHhJ526bI4nlCOmkCIF3nnfXkCMDeMJrtdvxTs6ZFCM8oNufGTsDbKv/tJ/xj8RpvXjRuPBZJuJog==}
engines: {node: '>=20.19.0'} engines: {node: '>=20.19.0'}
...@@ -4314,6 +4346,10 @@ snapshots: ...@@ -4314,6 +4346,10 @@ snapshots:
'@humanwhocodes/retry@0.4.3': {} '@humanwhocodes/retry@0.4.3': {}
'@iconify-json/ep@1.2.3':
dependencies:
'@iconify/types': 2.0.0
'@iconify/types@2.0.0': {} '@iconify/types@2.0.0': {}
'@iconify/utils@3.0.2': '@iconify/utils@3.0.2':
...@@ -7838,6 +7874,18 @@ snapshots: ...@@ -7838,6 +7874,18 @@ snapshots:
optionalDependencies: optionalDependencies:
'@vueuse/core': 14.0.0(vue@3.5.22(typescript@5.9.3)) '@vueuse/core': 14.0.0(vue@3.5.22(typescript@5.9.3))
unplugin-icons@22.5.0(@vue/compiler-sfc@3.5.22):
dependencies:
'@antfu/install-pkg': 1.1.0
'@iconify/utils': 3.0.2
debug: 4.4.3
local-pkg: 1.1.2
unplugin: 2.3.10
optionalDependencies:
'@vue/compiler-sfc': 3.5.22
transitivePeerDependencies:
- supports-color
unplugin-utils@0.3.1: unplugin-utils@0.3.1:
dependencies: dependencies:
pathe: 2.0.3 pathe: 2.0.3
......
<template> <template>
<el-dropdown @command="handleMore" trigger="click"> <el-dropdown @command="handleMore" trigger="click">
<el-icon class="cursor-pointer"><More /></el-icon> <el-icon class="cursor-pointer"><IEpMore /></el-icon>
<template #dropdown> <template #dropdown>
<el-dropdown-menu> <el-dropdown-menu>
<el-dropdown-item command="举报">举报</el-dropdown-item> <el-dropdown-item command="举报">举报</el-dropdown-item>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
@click="() => console.log(form)" @click="() => console.log(form)"
> >
<el-icon> <el-icon>
<User /> <IEpUser />
</el-icon> </el-icon>
</el-avatar> </el-avatar>
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
@click="handleDeleteImg(img)" @click="handleDeleteImg(img)"
> >
<el-icon class="text-white text-xs"> <el-icon class="text-white text-xs">
<Close /> <IEpClose />
</el-icon> </el-icon>
</div> </div>
<el-image <el-image
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
@mouseleave="visibleTagTooltip = false" @mouseleave="visibleTagTooltip = false"
> >
<el-icon size="18"> <el-icon size="18">
<CollectionTag /> <IEpCollectionTag />
</el-icon> </el-icon>
</el-button> </el-button>
</el-tooltip> </el-tooltip>
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
@click="fileInputRef?.click()" @click="fileInputRef?.click()"
> >
<el-icon size="18"> <el-icon size="18">
<Picture /> <IEpPicture />
</el-icon> </el-icon>
</el-button> </el-button>
</el-tooltip> </el-tooltip>
...@@ -173,7 +173,6 @@ import { useResetData } from '@/hooks' ...@@ -173,7 +173,6 @@ import { useResetData } from '@/hooks'
import { ArticleTypeEnum, ReleaseStatusTypeEnum, SendTypeEnum } from '@/constants' import { ArticleTypeEnum, ReleaseStatusTypeEnum, SendTypeEnum } from '@/constants'
import { useTagsStore } from '@/stores' import { useTagsStore } from '@/stores'
import { uploadFile } from '@/api' import { uploadFile } from '@/api'
import { Close } from '@element-plus/icons-vue'
import { addOrUpdatePractice, addOrUpdateArticle } from '@/api' import { addOrUpdatePractice, addOrUpdateArticle } from '@/api'
import type { AddOrUpdatePracticeDto } from '@/api' import type { AddOrUpdatePracticeDto } from '@/api'
import type { BooleanFlag } from '@/constants' import type { BooleanFlag } from '@/constants'
......
...@@ -10,7 +10,6 @@ import 'virtual:uno.css' ...@@ -10,7 +10,6 @@ import 'virtual:uno.css'
// 注册svg // 注册svg
import 'virtual:svg-icons-register' import 'virtual:svg-icons-register'
import SvgIcon from '@/components/common/SvgIcon/svgIcon.vue' import SvgIcon from '@/components/common/SvgIcon/svgIcon.vue'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
if (import.meta.env.MODE === 'production') { if (import.meta.env.MODE === 'production') {
import('@/utils/version').then(({ loopGetVersion }) => loopGetVersion()) import('@/utils/version').then(({ loopGetVersion }) => loopGetVersion())
...@@ -19,9 +18,7 @@ if (import.meta.env.MODE === 'production') { ...@@ -19,9 +18,7 @@ if (import.meta.env.MODE === 'production') {
const app = createApp(App) const app = createApp(App)
app.use(createPinia()) app.use(createPinia())
app.use(router) app.use(router)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
app.component(key, component)
}
// 全局组件挂载 // 全局组件挂载
app.component('SvgIcon', SvgIcon) app.component('SvgIcon', SvgIcon)
app.mount('#app') app.mount('#app')
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<div class="flex items-center gap-2 justify-between"> <div class="flex items-center gap-2 justify-between">
<el-button link @click="router.back()" class="text-gray-600 hover:text-primary"> <el-button link @click="router.back()" class="text-gray-600 hover:text-primary">
<el-icon class="mr-1"> <el-icon class="mr-1">
<ArrowLeft /> <IEpArrowLeft />
</el-icon> </el-icon>
返回 返回
</el-button> </el-button>
...@@ -104,19 +104,19 @@ ...@@ -104,19 +104,19 @@
<span>{{ dayjs(item.createTime * 1000).format('YYYY-MM-DD HH:mm:ss') }}</span> <span>{{ dayjs(item.createTime * 1000).format('YYYY-MM-DD HH:mm:ss') }}</span>
<div class="flex items-center gap-1"> <div class="flex items-center gap-1">
<el-icon class="text-sm"> <el-icon class="text-sm">
<View /> <IEpView />
</el-icon> </el-icon>
<span class="font-medium text-gray-500">{{ item.viewCount }}</span> <span class="font-medium text-gray-500">{{ item.viewCount }}</span>
</div> </div>
<div class="flex items-center gap-1"> <div class="flex items-center gap-1">
<el-icon class="text-sm"> <el-icon class="text-sm">
<ChatDotRound /> <IEpChatDotRound />
</el-icon> </el-icon>
<span class="font-medium">{{ item.replyCount }}</span> <span class="font-medium">{{ item.replyCount }}</span>
</div> </div>
<div class="flex items-center gap-1"> <div class="flex items-center gap-1">
<el-icon class="text-sm"> <el-icon class="text-sm">
<Star /> <IEpStar />
</el-icon> </el-icon>
<span class="font-medium">{{ item.praiseCount }}</span> <span class="font-medium">{{ item.praiseCount }}</span>
</div> </div>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
size="15" size="15"
class="cursor-pointer hover:rotate-180 transition-all duration-300" class="cursor-pointer hover:rotate-180 transition-all duration-300"
@click="handleRefresh" @click="handleRefresh"
><Refresh ><IEpRefresh
/></el-icon> /></el-icon>
</div> </div>
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
> >
{{ item.isExpand ? '收起' : '阅读全文' }} {{ item.isExpand ? '收起' : '阅读全文' }}
<el-icon class="ml-1" :class="{ 'rotate-180': item.isExpand }"> <el-icon class="ml-1" :class="{ 'rotate-180': item.isExpand }">
<ArrowDown /> <IEpArrowDown />
</el-icon> </el-icon>
</el-button> </el-button>
</div> </div>
...@@ -98,7 +98,8 @@ ...@@ -98,7 +98,8 @@
@click.stop="handleAddQuestion(item)" @click.stop="handleAddQuestion(item)"
> >
<el-icon> <el-icon>
<component :is="item.hasAddQuestion ? 'CircleCheckFilled' : 'Plus'" /> <IEpCircleCheckFilled v-show="item.hasAddQuestion" />
<IEpPlus v-show="!item.hasAddQuestion" />
</el-icon> </el-icon>
{{ item.hasAddQuestion ? '已添加' : '添加' }} {{ item.hasAddQuestion ? '已添加' : '添加' }}
</el-button> </el-button>
...@@ -110,7 +111,8 @@ ...@@ -110,7 +111,8 @@
@click.stop="handleCollect(item)" @click.stop="handleCollect(item)"
> >
<el-icon> <el-icon>
<component :is="item.hasCollect ? 'StarFilled' : 'Star'" /> <IEpStarFilled v-show="item.hasCollect" />
<IEpStar v-show="!item.hasCollect" />
</el-icon> </el-icon>
{{ item.hasCollect ? '已关注' : '关注' }} {{ item.hasCollect ? '已关注' : '关注' }}
</el-button> </el-button>
...@@ -118,7 +120,7 @@ ...@@ -118,7 +120,7 @@
<!-- 回答按钮保持不变 --> <!-- 回答按钮保持不变 -->
<!-- 当前最热评论的评论有几条 --> <!-- 当前最热评论的评论有几条 -->
<el-button size="small" plain @click.stop="handleComment(item, index)"> <el-button size="small" plain @click.stop="handleComment(item, index)">
<el-icon><Edit /></el-icon> <el-icon><IEpEdit /></el-icon>
<template v-if="item.cultureCommentListVo?.childNum"> <template v-if="item.cultureCommentListVo?.childNum">
{{ item.cultureCommentListVo?.childNum }}条评论 {{ item.cultureCommentListVo?.childNum }}条评论
</template> </template>
...@@ -135,7 +137,7 @@ ...@@ -135,7 +137,7 @@
<div class="flex items-center"> <div class="flex items-center">
<!-- 浏览量 --> <!-- 浏览量 -->
<!-- <el-button text class="flex items-center gap-2 text-gray-500"> <!-- <el-button text class="flex items-center gap-2 text-gray-500">
<el-icon><View /></el-icon> <el-icon><IEpView /></el-icon>
<span class="text-sm">{{ item.viewCount || 0 }}</span> <span class="text-sm">{{ item.viewCount || 0 }}</span>
</el-button> --> </el-button> -->
...@@ -145,7 +147,7 @@ ...@@ -145,7 +147,7 @@
class="flex items-center gap-2 text-gray-500 transition-colors" class="flex items-center gap-2 text-gray-500 transition-colors"
@click.stop="handleCollect(item)" @click.stop="handleCollect(item)"
> >
<el-icon :color="item.hasCollect ? '#409EFF' : '#999'"><Star /></el-icon> <el-icon :color="item.hasCollect ? '#409EFF' : '#999'"><IEpStar /></el-icon>
<span class="text-sm" :class="{ 'text-blue-500': item.hasCollect }">{{ <span class="text-sm" :class="{ 'text-blue-500': item.hasCollect }">{{
item.collectionCount || 0 item.collectionCount || 0
}}</span> }}</span>
...@@ -157,7 +159,7 @@ ...@@ -157,7 +159,7 @@
class="flex items-center gap-2 text-gray-500 transition-colors" class="flex items-center gap-2 text-gray-500 transition-colors"
@click.stop="handleComment(item, index)" @click.stop="handleComment(item, index)"
> >
<el-icon><ChatDotRound /></el-icon> <el-icon><IEpChatDotRound /></el-icon>
<span class="text-sm">{{ item.cultureCommentListVo?.childNum || 0 }}</span> <span class="text-sm">{{ item.cultureCommentListVo?.childNum || 0 }}</span>
</el-button> --> </el-button> -->
</div> </div>
...@@ -232,7 +234,6 @@ ...@@ -232,7 +234,6 @@
<script setup lang="ts"> <script setup lang="ts">
import Tabs from '@/components/common/Tabs' import Tabs from '@/components/common/Tabs'
import { Refresh } from '@element-plus/icons-vue'
import Comment from '@/components/common/Comment/index.vue' import Comment from '@/components/common/Comment/index.vue'
import { useScrollTop, usePageSearch } from '@/hooks' import { useScrollTop, usePageSearch } from '@/hooks'
import { TABS_REF_KEY } from '@/constants' import { TABS_REF_KEY } from '@/constants'
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<!-- 分隔符 --> <!-- 分隔符 -->
<div class="hidden sm:block w-1 h-1 bg-gray-300 rounded-full"></div> <div class="hidden sm:block w-1 h-1 bg-gray-300 rounded-full"></div>
<div class="flex items-center gap-1 hover:text-blue-500 transition-colors"> <div class="flex items-center gap-1 hover:text-blue-500 transition-colors">
<el-icon class="text-sm"><View /></el-icon> <el-icon class="text-sm"><IEpView /></el-icon>
<span class="font-medium">{{ <span class="font-medium">{{
item.type === ArticleTypeEnum.VIDEO item.type === ArticleTypeEnum.VIDEO
? Math.max(item.playCount, item.viewCount) ? Math.max(item.playCount, item.viewCount)
...@@ -60,11 +60,11 @@ ...@@ -60,11 +60,11 @@
}}</span> }}</span>
</div> </div>
<div class="flex items-center gap-1 hover:text-red-500 transition-colors"> <div class="flex items-center gap-1 hover:text-red-500 transition-colors">
<el-icon class="text-sm"><ChatDotRound /></el-icon> <el-icon class="text-sm"> <IEpChatDotRound /></el-icon>
<span class="font-medium">{{ item.replyCount }}</span> <span class="font-medium">{{ item.replyCount }}</span>
</div> </div>
<div class="flex items-center gap-1 hover:text-yellow-500 transition-colors"> <div class="flex items-center gap-1 hover:text-yellow-500 transition-colors">
<el-icon class="text-sm"><Star /></el-icon> <el-icon class="text-sm"><IEpStar /></el-icon>
<span class="font-medium">{{ item.collectionCount }}</span> <span class="font-medium">{{ item.collectionCount }}</span>
</div> </div>
</div> </div>
......
...@@ -65,19 +65,19 @@ ...@@ -65,19 +65,19 @@
<div <div
class="flex items-center gap-1 bg-black/50 backdrop-blur-sm px-3 py-1.5 rounded-lg" class="flex items-center gap-1 bg-black/50 backdrop-blur-sm px-3 py-1.5 rounded-lg"
> >
<el-icon class="text-sm"><View /></el-icon> <el-icon class="text-sm"><IEpView /></el-icon>
<span>{{ Math.max(list[0]?.playCount ?? 0, list[0]?.viewCount ?? 0) }}</span> <span>{{ Math.max(list[0]?.playCount ?? 0, list[0]?.viewCount ?? 0) }}</span>
</div> </div>
<div <div
class="flex items-center gap-1 bg-black/50 backdrop-blur-sm px-3 py-1.5 rounded-lg" class="flex items-center gap-1 bg-black/50 backdrop-blur-sm px-3 py-1.5 rounded-lg"
> >
<el-icon class="text-sm"><ChatDotRound /></el-icon> <el-icon class="text-sm"><IEpChatDotRound /></el-icon>
<span>{{ list[0]?.replyCount }}</span> <span>{{ list[0]?.replyCount }}</span>
</div> </div>
<div <div
class="flex items-center gap-1 bg-black/50 backdrop-blur-sm px-3 py-1.5 rounded-lg" class="flex items-center gap-1 bg-black/50 backdrop-blur-sm px-3 py-1.5 rounded-lg"
> >
<el-icon class="text-sm"><Star /></el-icon> <el-icon class="text-sm"><IEpStar /></el-icon>
<span>{{ list[0]?.replyCount }}</span> <span>{{ list[0]?.replyCount }}</span>
</div> </div>
</div> </div>
...@@ -147,19 +147,19 @@ ...@@ -147,19 +147,19 @@
<div <div
class="flex items-center gap-1 bg-black/50 backdrop-blur-sm px-2 py-1 rounded-lg" class="flex items-center gap-1 bg-black/50 backdrop-blur-sm px-2 py-1 rounded-lg"
> >
<el-icon class="text-sm"><View /></el-icon> <el-icon class="text-sm"><IEpView /></el-icon>
<span>{{ Math.max(item?.playCount, item?.viewCount) }}</span> <span>{{ Math.max(item?.playCount, item?.viewCount) }}</span>
</div> </div>
<div <div
class="flex items-center gap-1 bg-black/50 backdrop-blur-sm px-2 py-1 rounded-lg" class="flex items-center gap-1 bg-black/50 backdrop-blur-sm px-2 py-1 rounded-lg"
> >
<el-icon class="text-sm"><ChatDotRound /></el-icon> <el-icon class="text-sm"><IEpChatDotRound /></el-icon>
<span>{{ item?.replyCount }}</span> <span>{{ item?.replyCount }}</span>
</div> </div>
<div <div
class="flex items-center gap-1 bg-black/50 backdrop-blur-sm px-2 py-1 rounded-lg" class="flex items-center gap-1 bg-black/50 backdrop-blur-sm px-2 py-1 rounded-lg"
> >
<el-icon class="text-sm"><Star /></el-icon> <el-icon class="text-sm"><IEpStar /></el-icon>
<span>{{ item?.replyCount }}</span> <span>{{ item?.replyCount }}</span>
</div> </div>
</div> </div>
...@@ -228,7 +228,7 @@ ...@@ -228,7 +228,7 @@
class="flex items-center gap-1 bg-black/50 backdrop-blur-sm px-2 py-1 rounded-lg" class="flex items-center gap-1 bg-black/50 backdrop-blur-sm px-2 py-1 rounded-lg"
> >
<el-icon class="text-sm"> <el-icon class="text-sm">
<View /> <IEpView />
</el-icon> </el-icon>
<span>{{ Math.max(item.playCount, item.viewCount) }}</span> <span>{{ Math.max(item.playCount, item.viewCount) }}</span>
</div> </div>
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
class="flex items-center gap-1 bg-black/50 backdrop-blur-sm px-2 py-1 rounded-lg" class="flex items-center gap-1 bg-black/50 backdrop-blur-sm px-2 py-1 rounded-lg"
> >
<el-icon class="text-sm"> <el-icon class="text-sm">
<ChatDotRound /> <IEpChatDotRound />
</el-icon> </el-icon>
<span>{{ item.replyCount }}</span> <span>{{ item.replyCount }}</span>
</div> </div>
...@@ -244,7 +244,7 @@ ...@@ -244,7 +244,7 @@
class="flex items-center gap-1 bg-black/50 backdrop-blur-sm px-2 py-1 rounded-lg" class="flex items-center gap-1 bg-black/50 backdrop-blur-sm px-2 py-1 rounded-lg"
> >
<el-icon class="text-sm"> <el-icon class="text-sm">
<Star /> <IEpStar />
</el-icon> </el-icon>
<span>{{ item.replyCount }}</span> <span>{{ item.replyCount }}</span>
</div> </div>
...@@ -324,7 +324,7 @@ ...@@ -324,7 +324,7 @@
class="flex items-center gap-1 bg-black/50 backdrop-blur-sm px-2 py-1 rounded-lg" class="flex items-center gap-1 bg-black/50 backdrop-blur-sm px-2 py-1 rounded-lg"
> >
<el-icon class="text-sm"> <el-icon class="text-sm">
<View /> <IEpView />
</el-icon> </el-icon>
<span>{{ Math.max(item.playCount, item.viewCount) }}</span> <span>{{ Math.max(item.playCount, item.viewCount) }}</span>
</div> </div>
...@@ -332,7 +332,7 @@ ...@@ -332,7 +332,7 @@
class="flex items-center gap-1 bg-black/50 backdrop-blur-sm px-2 py-1 rounded-lg" class="flex items-center gap-1 bg-black/50 backdrop-blur-sm px-2 py-1 rounded-lg"
> >
<el-icon class="text-sm"> <el-icon class="text-sm">
<ChatDotRound /> <IEpChatDotRound />
</el-icon> </el-icon>
<span>{{ item.replyCount }}</span> <span>{{ item.replyCount }}</span>
</div> </div>
...@@ -340,7 +340,7 @@ ...@@ -340,7 +340,7 @@
class="flex items-center gap-1 bg-black/50 backdrop-blur-sm px-2 py-1 rounded-lg" class="flex items-center gap-1 bg-black/50 backdrop-blur-sm px-2 py-1 rounded-lg"
> >
<el-icon class="text-sm"> <el-icon class="text-sm">
<Star /> <IEpStar />
</el-icon> </el-icon>
<span>{{ item.replyCount }}</span> <span>{{ item.replyCount }}</span>
</div> </div>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
class="cursor-pointer hover:rotate-180 transition-all duration-300" class="cursor-pointer hover:rotate-180 transition-all duration-300"
@click="handleRefresh" @click="handleRefresh"
> >
<Refresh /> <IEpRefresh />
</el-icon> </el-icon>
</div> </div>
</div> </div>
......
...@@ -63,19 +63,19 @@ ...@@ -63,19 +63,19 @@
<div class="flex items-center space-x-4"> <div class="flex items-center space-x-4">
<span class="flex items-center"> <span class="flex items-center">
<el-icon class="mr-1"> <el-icon class="mr-1">
<View /> <IEpView />
</el-icon> </el-icon>
{{ i.viewCount }} {{ i.viewCount }}
</span> </span>
<span class="flex items-center"> <span class="flex items-center">
<el-icon class="mr-1"> <el-icon class="mr-1">
<ChatDotRound /> <IEpChatDotRound />
</el-icon> </el-icon>
{{ i.replyCount }} {{ i.replyCount }}
</span> </span>
<span class="flex items-center"> <span class="flex items-center">
<el-icon class="mr-1"> <el-icon class="mr-1">
<Star /> <IEpStar />
</el-icon> </el-icon>
{{ i.collectCount }} {{ i.collectCount }}
</span> </span>
...@@ -131,7 +131,6 @@ ...@@ -131,7 +131,6 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { View, ChatDotRound, Star } from '@element-plus/icons-vue'
import { getColumnList } from '@/api' import { getColumnList } from '@/api'
import { usePageSearch, useScrollTop } from '@/hooks' import { usePageSearch, useScrollTop } from '@/hooks'
import { TABS_REF_KEY } from '@/constants' import { TABS_REF_KEY } from '@/constants'
......
...@@ -61,19 +61,19 @@ ...@@ -61,19 +61,19 @@
<div class="flex items-center space-x-4"> <div class="flex items-center space-x-4">
<span class="flex items-center"> <span class="flex items-center">
<el-icon class="mr-1"> <el-icon class="mr-1">
<View /> <IEpView />
</el-icon> </el-icon>
{{ i.viewCount }} {{ i.viewCount }}
</span> </span>
<span class="flex items-center"> <span class="flex items-center">
<el-icon class="mr-1"> <el-icon class="mr-1">
<ChatDotRound /> <IEpChatDotRound />
</el-icon> </el-icon>
{{ i.replyCount }} {{ i.replyCount }}
</span> </span>
<span class="flex items-center"> <span class="flex items-center">
<el-icon class="mr-1"> <el-icon class="mr-1">
<Star /> <IEpStar />
</el-icon> </el-icon>
{{ i.collectCount }} {{ i.collectCount }}
</span> </span>
...@@ -130,7 +130,6 @@ ...@@ -130,7 +130,6 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { View, ChatDotRound, Star } from '@element-plus/icons-vue'
import { getInterviewList } from '@/api' import { getInterviewList } from '@/api'
import { usePageSearch, useScrollTop } from '@/hooks' import { usePageSearch, useScrollTop } from '@/hooks'
import { TABS_REF_KEY, ArticleTypeEnum } from '@/constants' import { TABS_REF_KEY, ArticleTypeEnum } from '@/constants'
......
...@@ -159,19 +159,19 @@ ...@@ -159,19 +159,19 @@
<div class="flex items-center gap-5 text-gray-400 text-sm mb-2"> <div class="flex items-center gap-5 text-gray-400 text-sm mb-2">
<div class="flex items-center gap-1"> <div class="flex items-center gap-1">
<el-icon class="text-sm"> <el-icon class="text-sm">
<View /> <IEpView />
</el-icon> </el-icon>
<span>{{ item.viewCount }}</span> <span>{{ item.viewCount }}</span>
</div> </div>
<div class="flex items-center gap-1"> <div class="flex items-center gap-1">
<el-icon class="text-sm"> <el-icon class="text-sm">
<ChatDotRound /> <IEpChatDotRound />
</el-icon> </el-icon>
<span>{{ item.replyCount }}</span> <span>{{ item.replyCount }}</span>
</div> </div>
<div class="flex items-center gap-1 mr-2"> <div class="flex items-center gap-1 mr-2">
<el-icon class="text-sm"> <el-icon class="text-sm">
<Star /> <IEpStar />
</el-icon> </el-icon>
<span>{{ item.praiseCount }}</span> <span>{{ item.praiseCount }}</span>
</div> </div>
......
...@@ -67,15 +67,15 @@ ...@@ -67,15 +67,15 @@
<!-- 数据 --> <!-- 数据 -->
<div class="absolute bottom-3 left-3 flex gap-3 text-white text-xs"> <div class="absolute bottom-3 left-3 flex gap-3 text-white text-xs">
<div class="flex items-center gap-1 bg-black/50 backdrop-blur-sm px-2 py-1 rounded-lg"> <div class="flex items-center gap-1 bg-black/50 backdrop-blur-sm px-2 py-1 rounded-lg">
<el-icon class="text-sm"><View /></el-icon> <el-icon class="text-sm"><IEpView /></el-icon>
<span>{{ Math.max(item.playCount, item.viewCount) }}</span> <span>{{ Math.max(item.playCount, item.viewCount) }}</span>
</div> </div>
<div class="flex items-center gap-1 bg-black/50 backdrop-blur-sm px-2 py-1 rounded-lg"> <div class="flex items-center gap-1 bg-black/50 backdrop-blur-sm px-2 py-1 rounded-lg">
<el-icon class="text-sm"><ChatDotRound /></el-icon> <el-icon class="text-sm"><IEpChatDotRound /></el-icon>
<span>{{ item.replyCount }}</span> <span>{{ item.replyCount }}</span>
</div> </div>
<div class="flex items-center gap-1 bg-black/50 backdrop-blur-sm px-2 py-1 rounded-lg"> <div class="flex items-center gap-1 bg-black/50 backdrop-blur-sm px-2 py-1 rounded-lg">
<el-icon class="text-sm"><Star /></el-icon> <el-icon class="text-sm"><IEpStar /></el-icon>
<span>{{ item.replyCount }}</span> <span>{{ item.replyCount }}</span>
</div> </div>
</div> </div>
...@@ -171,19 +171,19 @@ ...@@ -171,19 +171,19 @@
<div <div
class="flex items-center gap-1 bg-black/50 backdrop-blur-sm px-2 py-1 rounded-lg" class="flex items-center gap-1 bg-black/50 backdrop-blur-sm px-2 py-1 rounded-lg"
> >
<el-icon class="text-sm"><View /></el-icon> <el-icon class="text-sm"><IEpView /></el-icon>
<span>{{ Math.max(i.playCount, i.viewCount) }}</span> <span>{{ Math.max(i.playCount, i.viewCount) }}</span>
</div> </div>
<div <div
class="flex items-center gap-1 bg-black/50 backdrop-blur-sm px-2 py-1 rounded-lg" class="flex items-center gap-1 bg-black/50 backdrop-blur-sm px-2 py-1 rounded-lg"
> >
<el-icon class="text-sm"><ChatDotRound /></el-icon> <el-icon class="text-sm"><IEpChatDotRound /></el-icon>
<span>{{ i.replyCount }}</span> <span>{{ i.replyCount }}</span>
</div> </div>
<div <div
class="flex items-center gap-1 bg-black/50 backdrop-blur-sm px-2 py-1 rounded-lg" class="flex items-center gap-1 bg-black/50 backdrop-blur-sm px-2 py-1 rounded-lg"
> >
<el-icon class="text-sm"><Star /></el-icon> <el-icon class="text-sm"><IEpStar /></el-icon>
<span>{{ i.replyCount }}</span> <span>{{ i.replyCount }}</span>
</div> </div>
</div> </div>
...@@ -297,7 +297,6 @@ ...@@ -297,7 +297,6 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { View, ChatDotRound, Star } from '@element-plus/icons-vue'
import { getVideoList, getVideoListViewMore } from '@/api' import { getVideoList, getVideoListViewMore } from '@/api'
import { usePageSearch, useScrollTop } from '@/hooks' import { usePageSearch, useScrollTop } from '@/hooks'
import { TABS_REF_KEY, ArticleTypeEnum } from '@/constants' import { TABS_REF_KEY, ArticleTypeEnum } from '@/constants'
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
class="cursor-pointer hover:rotate-180 transition-all duration-300" class="cursor-pointer hover:rotate-180 transition-all duration-300"
@click="handleRefresh" @click="handleRefresh"
> >
<Refresh /> <IEpRefresh />
</el-icon> </el-icon>
</div> </div>
</div> </div>
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
<script setup lang="ts"> <script setup lang="ts">
import Tabs from '@/components/common/Tabs' import Tabs from '@/components/common/Tabs'
import { Refresh } from '@element-plus/icons-vue'
import ColumnList from './components/columnList.vue' import ColumnList from './components/columnList.vue'
import InterviewList from './components/interviewList.vue' import InterviewList from './components/interviewList.vue'
import PracticeList from './components/practiceList.vue' import PracticeList from './components/practiceList.vue'
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
</p> </p>
<!-- <el-button type="warning" size="small" plain @click="handleEdit"> <!-- <el-button type="warning" size="small" plain @click="handleEdit">
<el-icon> <el-icon>
<Edit /> <IEpEdit />
</el-icon> </el-icon>
修改资料 修改资料
</el-button> --> </el-button> -->
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<div v-if="!list.length" class="flex flex-col items-center justify-center h-64"> <div v-if="!list.length" class="flex flex-col items-center justify-center h-64">
<div class="w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mb-4"> <div class="w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mb-4">
<el-icon class="text-2xl text-gray-300"> <el-icon class="text-2xl text-gray-300">
<Document /> <IEpDocument />
</el-icon> </el-icon>
</div> </div>
<div class="text-gray-500 text-lg mb-2">暂无内容</div> <div class="text-gray-500 text-lg mb-2">暂无内容</div>
...@@ -93,7 +93,6 @@ ...@@ -93,7 +93,6 @@
</template> </template>
<script lang="tsx" setup> <script lang="tsx" setup>
import { Document } from '@element-plus/icons-vue'
import { useUserStore } from '@/stores/user' import { useUserStore } from '@/stores/user'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<div class="flex items-center gap-2 justify-between"> <div class="flex items-center gap-2 justify-between">
<el-button link @click="router.back()" class="text-gray-600 hover:text-primary"> <el-button link @click="router.back()" class="text-gray-600 hover:text-primary">
<el-icon class="mr-1"> <el-icon class="mr-1">
<ArrowLeft /> <IEpArrowLeft />
</el-icon> </el-icon>
返回 返回
</el-button> </el-button>
...@@ -166,19 +166,19 @@ ...@@ -166,19 +166,19 @@
<span>{{ dayjs(item.createTime * 1000).format('YYYY-MM-DD HH:mm:ss') }}</span> <span>{{ dayjs(item.createTime * 1000).format('YYYY-MM-DD HH:mm:ss') }}</span>
<div class="flex items-center gap-1"> <div class="flex items-center gap-1">
<el-icon class="text-sm"> <el-icon class="text-sm">
<View /> <IEpView />
</el-icon> </el-icon>
<span class="font-medium text-gray-500">{{ item.viewCount }}</span> <span class="font-medium text-gray-500">{{ item.viewCount }}</span>
</div> </div>
<div class="flex items-center gap-1"> <div class="flex items-center gap-1">
<el-icon class="text-sm"> <el-icon class="text-sm">
<ChatDotRound /> <IEpChatDotRound />
</el-icon> </el-icon>
<span class="font-medium">{{ item.replyCount }}</span> <span class="font-medium">{{ item.replyCount }}</span>
</div> </div>
<div class="flex items-center gap-1"> <div class="flex items-center gap-1">
<el-icon class="text-sm"> <el-icon class="text-sm">
<Star /> <IEpStar />
</el-icon> </el-icon>
<span class="font-medium">{{ item.praiseCount }}</span> <span class="font-medium">{{ item.praiseCount }}</span>
</div> </div>
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
class="w-full h-full flex items-center justify-center text-gray-400" class="w-full h-full flex items-center justify-center text-gray-400"
> >
<el-icon :size="32"> <el-icon :size="32">
<Picture /> <IEpPicture />
</el-icon> </el-icon>
</div> </div>
<div <div
...@@ -318,7 +318,7 @@ ...@@ -318,7 +318,7 @@
<img v-if="form.faceUrl" :src="form.faceUrl" class="w-full h-full object-cover" /> <img v-if="form.faceUrl" :src="form.faceUrl" class="w-full h-full object-cover" />
<div v-else class="w-full h-full flex items-center justify-center text-gray-400"> <div v-else class="w-full h-full flex items-center justify-center text-gray-400">
<el-icon :size="40"> <el-icon :size="40">
<Picture /> <IEpPicture />
</el-icon> </el-icon>
</div> </div>
<canvas ref="canvasRef" class="hidden" /> <canvas ref="canvasRef" class="hidden" />
...@@ -346,7 +346,6 @@ import { ArticleTypeEnum, ReleaseStatusTypeEnum, SendTypeEnum } from '@/constant ...@@ -346,7 +346,6 @@ import { ArticleTypeEnum, ReleaseStatusTypeEnum, SendTypeEnum } from '@/constant
import { addOrUpdateArticle, uploadFile } from '@/api' import { addOrUpdateArticle, uploadFile } from '@/api'
import SelectTags from '@/components/common/SelectTags/index.vue' import SelectTags from '@/components/common/SelectTags/index.vue'
import type { TagItemDto, AddOrUpdateVideoDto } from '@/api' import type { TagItemDto, AddOrUpdateVideoDto } from '@/api'
import { Camera, Picture } from '@element-plus/icons-vue'
import { useVideoStore, useUserStore } from '@/stores' import { useVideoStore, useUserStore } from '@/stores'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
import { selectDepOrUser } from '@/utils' import { selectDepOrUser } from '@/utils'
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
> >
{{ isExpand ? '收起' : '显示全部' }} {{ isExpand ? '收起' : '显示全部' }}
<el-icon :class="{ 'rotate-180': isExpand }" class="transition-transform" <el-icon :class="{ 'rotate-180': isExpand }" class="transition-transform"
><CaretBottom ><IEpCaretBottom
/></el-icon> /></el-icon>
</button> </button>
</div> </div>
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
class="px-5 py-1.5 border !bg-blue-500 !text-white rounded-[4px] text-sm font-medium transition-colors flex items-center gap-1 cursor-pointer" class="px-5 py-1.5 border !bg-blue-500 !text-white rounded-[4px] text-sm font-medium transition-colors flex items-center gap-1 cursor-pointer"
@click="openCommentDialog" @click="openCommentDialog"
> >
<el-icon><EditPen /></el-icon> <el-icon><IEpEditPen /></el-icon>
写回答 写回答
</button> </button>
</div> </div>
...@@ -217,7 +217,7 @@ ...@@ -217,7 +217,7 @@
:class="{ '!bg-blue-500 !text-white': answer.hasPraise }" :class="{ '!bg-blue-500 !text-white': answer.hasPraise }"
@click="handleLikeAnswer(answer)" @click="handleLikeAnswer(answer)"
> >
<el-icon><CaretTop /></el-icon> <el-icon><IEpCaretTop /></el-icon>
<span <span
>{{ answer.hasPraise ? '已赞同' : '赞同' }} >{{ answer.hasPraise ? '已赞同' : '赞同' }}
{{ answer.postPriseCount || '' }}</span {{ answer.postPriseCount || '' }}</span
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
class="flex items-center gap-1.5 text-slate-500 hover:text-slate-800 transition-colors text-sm cursor-pointer" class="flex items-center gap-1.5 text-slate-500 hover:text-slate-800 transition-colors text-sm cursor-pointer"
@click="handleComment(answer, index)" @click="handleComment(answer, index)"
> >
<el-icon class="text-base"><ChatRound /></el-icon> <el-icon class="text-base"><IEpChatRound /></el-icon>
<span> <span>
{{ answer.childrenNum ? `${answer.childrenNum} 条评论` : '添加评论' }} {{ answer.childrenNum ? `${answer.childrenNum} 条评论` : '添加评论' }}
</span> </span>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<div class="flex items-center gap-2 justify-between"> <div class="flex items-center gap-2 justify-between">
<el-button link @click="router.back()" class="text-gray-600 hover:text-primary"> <el-button link @click="router.back()" class="text-gray-600 hover:text-primary">
<el-icon class="mr-1"> <el-icon class="mr-1">
<ArrowLeft /> <IEpArrowLeft />
</el-icon> </el-icon>
返回 返回
</el-button> </el-button>
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
<span>{{ dayjs(item.createTime * 1000).format('YYYY-MM-DD HH:mm:ss') }}</span> <span>{{ dayjs(item.createTime * 1000).format('YYYY-MM-DD HH:mm:ss') }}</span>
<div class="flex items-center gap-1"> <div class="flex items-center gap-1">
<el-icon class="text-sm"> <el-icon class="text-sm">
<View /> <IEpView />
</el-icon> </el-icon>
<span class="font-medium text-gray-500">{{ <span class="font-medium text-gray-500">{{
item.type === ArticleTypeEnum.VIDEO item.type === ArticleTypeEnum.VIDEO
...@@ -140,13 +140,13 @@ ...@@ -140,13 +140,13 @@
</div> </div>
<div class="flex items-center gap-1"> <div class="flex items-center gap-1">
<el-icon class="text-sm"> <el-icon class="text-sm">
<ChatDotRound /> <IEpChatDotRound />
</el-icon> </el-icon>
<span class="font-medium">{{ item.replyCount }}</span> <span class="font-medium">{{ item.replyCount }}</span>
</div> </div>
<div class="flex items-center gap-1"> <div class="flex items-center gap-1">
<el-icon class="text-sm"> <el-icon class="text-sm">
<Star /> <IEpStar />
</el-icon> </el-icon>
<span class="font-medium">{{ item.praiseCount }}</span> <span class="font-medium">{{ item.praiseCount }}</span>
</div> </div>
......
...@@ -16,13 +16,13 @@ ...@@ -16,13 +16,13 @@
size="15" size="15"
class="cursor-pointer hover:rotate-180 transition-all duration-300" class="cursor-pointer hover:rotate-180 transition-all duration-300"
@click="refresh" @click="refresh"
><Refresh ><IEpRefresh
/></el-icon> /></el-icon>
</div> </div>
</div> </div>
<div v-if="!list.length" class="flex flex-col items-center justify-center h-64"> <div v-if="!list.length" class="flex flex-col items-center justify-center h-64">
<div class="w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mb-4"> <div class="w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mb-4">
<el-icon class="text-2xl text-gray-300"><Document /></el-icon> <el-icon class="text-2xl text-gray-300"><IEpDocument /></el-icon>
</div> </div>
<div class="text-gray-500 text-lg mb-2">暂无内容</div> <div class="text-gray-500 text-lg mb-2">暂无内容</div>
</div> </div>
...@@ -119,7 +119,6 @@ ...@@ -119,7 +119,6 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { Document } from '@element-plus/icons-vue'
import { getComplaintList, auditComplaint } from '@/api' import { getComplaintList, auditComplaint } from '@/api'
import { usePageSearch } from '@/hooks' import { usePageSearch } from '@/hooks'
import { auditTypeListOptions } from '@/constants/options' import { auditTypeListOptions } from '@/constants/options'
......
...@@ -16,13 +16,13 @@ ...@@ -16,13 +16,13 @@
size="15" size="15"
class="cursor-pointer hover:rotate-180 transition-all duration-300" class="cursor-pointer hover:rotate-180 transition-all duration-300"
@click="refresh" @click="refresh"
><Refresh ><IEpRefresh
/></el-icon> /></el-icon>
</div> </div>
</div> </div>
<div v-if="!list.length" class="flex flex-col items-center justify-center h-64"> <div v-if="!list.length" class="flex flex-col items-center justify-center h-64">
<div class="w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mb-4"> <div class="w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mb-4">
<el-icon class="text-2xl text-gray-300"><Document /></el-icon> <el-icon class="text-2xl text-gray-300"><IEpDocument /></el-icon>
</div> </div>
<div class="text-gray-500 text-lg mb-2">暂无内容</div> <div class="text-gray-500 text-lg mb-2">暂无内容</div>
</div> </div>
...@@ -118,7 +118,6 @@ ...@@ -118,7 +118,6 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { Document } from '@element-plus/icons-vue'
import { getAuditList, auditArticle } from '@/api' import { getAuditList, auditArticle } from '@/api'
import { usePageSearch } from '@/hooks' import { usePageSearch } from '@/hooks'
import { auditTypeListOptions, articleTypeListOptions } from '@/constants/options' import { auditTypeListOptions, articleTypeListOptions } from '@/constants/options'
......
...@@ -16,13 +16,13 @@ ...@@ -16,13 +16,13 @@
size="15" size="15"
class="cursor-pointer hover:rotate-180 transition-all duration-300" class="cursor-pointer hover:rotate-180 transition-all duration-300"
@click="refresh" @click="refresh"
><Refresh ><IEpRefresh
/></el-icon> /></el-icon>
</div> </div>
</div> </div>
<div v-if="!list.length" class="flex flex-col items-center justify-center h-64"> <div v-if="!list.length" class="flex flex-col items-center justify-center h-64">
<div class="w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mb-4"> <div class="w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mb-4">
<el-icon class="text-2xl text-gray-300"><Document /></el-icon> <el-icon class="text-2xl text-gray-300"><IEpDocument /></el-icon>
</div> </div>
<div class="text-gray-500 text-lg mb-2">暂无内容</div> <div class="text-gray-500 text-lg mb-2">暂无内容</div>
</div> </div>
...@@ -111,8 +111,6 @@ ...@@ -111,8 +111,6 @@
</template> </template>
<script lang="tsx" setup> <script lang="tsx" setup>
import { Document } from '@element-plus/icons-vue'
import { getSelfCaseList, deleteCase, getCaseDetail } from '@/api' import { getSelfCaseList, deleteCase, getCaseDetail } from '@/api'
import { usePageSearch } from '@/hooks' import { usePageSearch } from '@/hooks'
import dayjs from 'dayjs' import dayjs from 'dayjs'
......
...@@ -15,14 +15,14 @@ ...@@ -15,14 +15,14 @@
size="15" size="15"
class="cursor-pointer hover:rotate-180 transition-all duration-300" class="cursor-pointer hover:rotate-180 transition-all duration-300"
@click="refresh" @click="refresh"
><Refresh ><IEpRefresh
/></el-icon> /></el-icon>
</div> </div>
</div> </div>
<div v-if="!list.length" class="flex flex-col items-center justify-center h-64"> <div v-if="!list.length" class="flex flex-col items-center justify-center h-64">
<div class="w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mb-4"> <div class="w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mb-4">
<el-icon class="text-2xl text-gray-300"><Document /></el-icon> <el-icon class="text-2xl text-gray-300"><IEpDocument /></el-icon>
</div> </div>
<div class="text-gray-500 text-lg mb-2">暂无内容</div> <div class="text-gray-500 text-lg mb-2">暂无内容</div>
</div> </div>
...@@ -79,8 +79,6 @@ ...@@ -79,8 +79,6 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { Document, Refresh } from '@element-plus/icons-vue'
import { getSelfCollectList } from '@/api' import { getSelfCollectList } from '@/api'
import { usePageSearch } from '@/hooks' import { usePageSearch } from '@/hooks'
import { import {
......
...@@ -30,14 +30,14 @@ ...@@ -30,14 +30,14 @@
size="15" size="15"
class="cursor-pointer hover:rotate-180 transition-all duration-300" class="cursor-pointer hover:rotate-180 transition-all duration-300"
@click="refresh" @click="refresh"
><Refresh ><IEpRefresh
/></el-icon> /></el-icon>
</div> </div>
</div> </div>
<div v-if="!list.length" class="flex flex-col items-center justify-center h-64"> <div v-if="!list.length" class="flex flex-col items-center justify-center h-64">
<div class="w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mb-4"> <div class="w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mb-4">
<el-icon class="text-2xl text-gray-300"><Document /></el-icon> <el-icon class="text-2xl text-gray-300"><IEpDocument /></el-icon>
</div> </div>
<div class="text-gray-500 text-lg mb-2">暂无内容</div> <div class="text-gray-500 text-lg mb-2">暂无内容</div>
</div> </div>
...@@ -94,7 +94,6 @@ ...@@ -94,7 +94,6 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { Document, Refresh } from '@element-plus/icons-vue'
import { getSelfCommentList, deleteComment } from '@/api' import { getSelfCommentList, deleteComment } from '@/api'
import { usePageSearch } from '@/hooks' import { usePageSearch } from '@/hooks'
import { import {
......
...@@ -16,14 +16,14 @@ ...@@ -16,14 +16,14 @@
size="15" size="15"
class="cursor-pointer hover:rotate-180 transition-all duration-300" class="cursor-pointer hover:rotate-180 transition-all duration-300"
@click="refresh" @click="refresh"
><Refresh ><IEpRefresh
/></el-icon> /></el-icon>
</div> </div>
</div> </div>
<div v-if="!list.length" class="flex flex-col items-center justify-center h-64"> <div v-if="!list.length" class="flex flex-col items-center justify-center h-64">
<div class="w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mb-4"> <div class="w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mb-4">
<el-icon class="text-2xl text-gray-300"><Document /></el-icon> <el-icon class="text-2xl text-gray-300"><IEpDocument /></el-icon>
</div> </div>
<div class="text-gray-500 text-lg mb-2">暂无内容</div> <div class="text-gray-500 text-lg mb-2">暂无内容</div>
</div> </div>
...@@ -78,8 +78,6 @@ ...@@ -78,8 +78,6 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { Document, Refresh } from '@element-plus/icons-vue'
import { deleteArticle, getSelfDraftList } from '@/api' import { deleteArticle, getSelfDraftList } from '@/api'
import { usePageSearch } from '@/hooks' import { usePageSearch } from '@/hooks'
import { import {
......
...@@ -15,13 +15,13 @@ ...@@ -15,13 +15,13 @@
size="15" size="15"
class="cursor-pointer hover:rotate-180 transition-all duration-300" class="cursor-pointer hover:rotate-180 transition-all duration-300"
@click="refresh" @click="refresh"
><Refresh ><IEpRefresh
/></el-icon> /></el-icon>
</div> </div>
</div> </div>
<div v-if="!list.length" class="flex flex-col items-center justify-center h-64"> <div v-if="!list.length" class="flex flex-col items-center justify-center h-64">
<div class="w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mb-4"> <div class="w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mb-4">
<el-icon class="text-2xl text-gray-300"><Document /></el-icon> <el-icon class="text-2xl text-gray-300"><IEpDocument /></el-icon>
</div> </div>
<div class="text-gray-500 text-lg mb-2">暂无内容</div> <div class="text-gray-500 text-lg mb-2">暂无内容</div>
</div> </div>
...@@ -78,7 +78,6 @@ ...@@ -78,7 +78,6 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { Document } from '@element-plus/icons-vue'
import type { TabPaneName } from 'element-plus' import type { TabPaneName } from 'element-plus'
import { getSelfPraiseList } from '@/api' import { getSelfPraiseList } from '@/api'
import { usePageSearch } from '@/hooks' import { usePageSearch } from '@/hooks'
......
...@@ -15,14 +15,14 @@ ...@@ -15,14 +15,14 @@
size="15" size="15"
class="cursor-pointer hover:rotate-180 transition-all duration-300" class="cursor-pointer hover:rotate-180 transition-all duration-300"
@click="refresh" @click="refresh"
><Refresh ><IEpRefresh
/></el-icon> /></el-icon>
</div> </div>
</div> </div>
<div v-if="!list.length" class="flex flex-col items-center justify-center h-64"> <div v-if="!list.length" class="flex flex-col items-center justify-center h-64">
<div class="w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mb-4"> <div class="w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mb-4">
<el-icon class="text-2xl text-gray-300"><Document /></el-icon> <el-icon class="text-2xl text-gray-300"><IEpDocument /></el-icon>
</div> </div>
<div class="text-gray-500 text-lg mb-2">暂无内容</div> <div class="text-gray-500 text-lg mb-2">暂无内容</div>
</div> </div>
...@@ -84,7 +84,6 @@ ...@@ -84,7 +84,6 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { Document, Refresh } from '@element-plus/icons-vue'
import { getSelfPublishList, deleteArticle } from '@/api' import { getSelfPublishList, deleteArticle } from '@/api'
import { usePageSearch } from '@/hooks' import { usePageSearch } from '@/hooks'
import { import {
......
...@@ -16,14 +16,14 @@ ...@@ -16,14 +16,14 @@
size="15" size="15"
class="cursor-pointer hover:rotate-180 transition-all duration-300" class="cursor-pointer hover:rotate-180 transition-all duration-300"
@click="refresh" @click="refresh"
><Refresh ><IEpRefresh
/></el-icon> /></el-icon>
</div> </div>
</div> </div>
<div v-if="!list.length" class="flex flex-col items-center justify-center h-64"> <div v-if="!list.length" class="flex flex-col items-center justify-center h-64">
<div class="w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mb-4"> <div class="w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mb-4">
<el-icon class="text-2xl text-gray-300"><Document /></el-icon> <el-icon class="text-2xl text-gray-300"><IEpDocument /></el-icon>
</div> </div>
<div class="text-gray-500 text-lg mb-2">暂无内容</div> <div class="text-gray-500 text-lg mb-2">暂无内容</div>
</div> </div>
...@@ -82,8 +82,6 @@ ...@@ -82,8 +82,6 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { Document, Refresh } from '@element-plus/icons-vue'
import { getSelfTaskList } from '@/api' import { getSelfTaskList } from '@/api'
import { usePageSearch } from '@/hooks' import { usePageSearch } from '@/hooks'
import { taskTypeListOptions } from '@/constants/options' import { taskTypeListOptions } from '@/constants/options'
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</el-tooltip> </el-tooltip>
<el-button v-if="!isReal" type="warning" size="small" plain @click="handleEdit"> <el-button v-if="!isReal" type="warning" size="small" plain @click="handleEdit">
<el-icon><Edit /></el-icon> <el-icon><IEpEdit /></el-icon>
修改资料 修改资料
</el-button> </el-button>
</div> </div>
...@@ -153,17 +153,6 @@ ...@@ -153,17 +153,6 @@
</template> </template>
<script lang="tsx" setup> <script lang="tsx" setup>
import {
User,
Document,
Star,
ChatDotRound,
Pointer,
Collection,
Finished,
ChatLineSquare,
Warning,
} from '@element-plus/icons-vue'
import { useUserStore } from '@/stores/user' import { useUserStore } from '@/stores/user'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
import EditUserInfo from './components/editUserInfo.vue' import EditUserInfo from './components/editUserInfo.vue'
...@@ -207,23 +196,59 @@ const { userInfo } = storeToRefs(userStore) ...@@ -207,23 +196,59 @@ const { userInfo } = storeToRefs(userStore)
// 左侧普通用户菜单 // 左侧普通用户菜单
const menuUserItems = [ const menuUserItems = [
{ path: 'selfPublish', label: '我的帖子', icon: User, component: SelfPublish, tab: '发布' }, {
{ path: 'selfDraft', label: '我的草稿', icon: Document, component: SelfDraft, tab: '草稿' }, path: 'selfPublish',
{ path: 'selfCollect', label: '我的收藏', icon: Star, component: SelfCollect, tab: '收藏' }, label: '我的帖子',
{ path: 'selfPraise', label: '我的点赞', icon: Pointer, component: SelfPraise, tab: '点赞' }, icon: () => <IEpUser />,
{ path: 'selfCase', label: '我的案例库', icon: Collection, component: SelfCase, tab: '案例库' }, component: SelfPublish,
{ path: 'selfTask', label: '我的任务', icon: Finished, component: SelfTask, tab: '任务' }, tab: '发布',
},
{
path: 'selfDraft',
label: '我的草稿',
icon: () => <IEpDocument />,
component: SelfDraft,
tab: '草稿',
},
{
path: 'selfCollect',
label: '我的收藏',
icon: () => <IEpStar />,
component: SelfCollect,
tab: '收藏',
},
{
path: 'selfPraise',
label: '我的点赞',
icon: () => <IEpPointer />,
component: SelfPraise,
tab: '点赞',
},
{
path: 'selfCase',
label: '我的案例库',
icon: () => <IEpCollection />,
component: SelfCase,
tab: '案例库',
},
{
path: 'selfTask',
label: '我的任务',
icon: () => <IEpFinished />,
component: SelfTask,
tab: '任务',
},
{ {
path: 'selfComment', path: 'selfComment',
label: '评论回复', label: '评论回复',
icon: ChatDotRound, icon: () => <IEpChatDotRound />,
component: SelfComment, component: SelfComment,
tab: '评论回复', tab: '评论回复',
}, },
{ {
path: 'selfAnswer', path: 'selfAnswer',
label: '回答问题(问吧)', label: '回答问题(问吧)',
icon: ChatLineSquare, icon: () => <IEpChatLineSquare />,
component: SelfAnswer, component: SelfAnswer,
tab: '回答问题', tab: '回答问题',
}, },
...@@ -231,11 +256,17 @@ const menuUserItems = [ ...@@ -231,11 +256,17 @@ const menuUserItems = [
// 左侧官方账号菜单 // 左侧官方账号菜单
const menuOfficialItems = [ const menuOfficialItems = [
{ path: 'selfAudit', label: '审核列表', icon: User, component: SelfAudit, tab: '审核列表' }, {
path: 'selfAudit',
label: '审核列表',
icon: () => <IEpUser />,
component: SelfAudit,
tab: '审核列表',
},
{ {
path: 'selfComplaint', path: 'selfComplaint',
label: '举报列表', label: '举报列表',
icon: Warning, icon: () => <IEpWarning />,
component: SelfComplaint, component: SelfComplaint,
tab: '举报列表', tab: '举报列表',
}, },
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<div class="flex items-center gap-2 justify-between"> <div class="flex items-center gap-2 justify-between">
<el-button link @click="router.back()" class="text-gray-600 hover:text-primary"> <el-button link @click="router.back()" class="text-gray-600 hover:text-primary">
<el-icon class="mr-1"> <el-icon class="mr-1">
<ArrowLeft /> <IEpArrowLeft />
</el-icon> </el-icon>
返回 返回
</el-button> </el-button>
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
<span>{{ dayjs(item.createTime * 1000).format('YYYY-MM-DD HH:mm:ss') }}</span> <span>{{ dayjs(item.createTime * 1000).format('YYYY-MM-DD HH:mm:ss') }}</span>
<div class="flex items-center gap-1"> <div class="flex items-center gap-1">
<el-icon class="text-sm"> <el-icon class="text-sm">
<View /> <IEpView />
</el-icon> </el-icon>
<span class="font-medium text-gray-500">{{ <span class="font-medium text-gray-500">{{
Math.max(item.playCount, item.viewCount) Math.max(item.playCount, item.viewCount)
...@@ -111,13 +111,13 @@ ...@@ -111,13 +111,13 @@
</div> </div>
<div class="flex items-center gap-1"> <div class="flex items-center gap-1">
<el-icon class="text-sm"> <el-icon class="text-sm">
<ChatDotRound /> <IEpChatDotRound />
</el-icon> </el-icon>
<span class="font-medium">{{ item.replyCount }}</span> <span class="font-medium">{{ item.replyCount }}</span>
</div> </div>
<div class="flex items-center gap-1"> <div class="flex items-center gap-1">
<el-icon class="text-sm"> <el-icon class="text-sm">
<Star /> <IEpStar />
</el-icon> </el-icon>
<span class="font-medium">{{ item.praiseCount }}</span> <span class="font-medium">{{ item.praiseCount }}</span>
</div> </div>
......
...@@ -10,7 +10,8 @@ import { createSvgIconsPlugin } from 'vite-plugin-svg-icons' ...@@ -10,7 +10,8 @@ import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
import { visualizer } from 'rollup-plugin-visualizer' import { visualizer } from 'rollup-plugin-visualizer'
import UnoCSS from 'unocss/vite' import UnoCSS from 'unocss/vite'
import pushUpdatePlugin from './src/plugins/pushUpdatePlugin' import pushUpdatePlugin from './src/plugins/pushUpdatePlugin'
import IconsResolver from 'unplugin-icons/resolver'
import Icons from 'unplugin-icons/vite'
import path from 'node:path' import path from 'node:path'
// https://vite.dev/config/ // https://vite.dev/config/
...@@ -35,10 +36,19 @@ export default defineConfig(({ mode }) => { ...@@ -35,10 +36,19 @@ export default defineConfig(({ mode }) => {
}, },
}), }),
Components({ Components({
resolvers: [ElementPlusResolver()], resolvers: [
// 自动注册图标组件
IconsResolver({
enabledCollections: ['ep'], // 自动引入的icon 前缀要写成 <i-ep-xx/>
}),
ElementPlusResolver(),
],
include: [/\.vue$/, /\.vue\?vue/, /\.vue\.[tj]sx?\?vue/, /\.[tj]sx$/], // 支持tsx jsx vue文件 无script 和有script 编译后不一样 一个直接是sfc里面只有render 一个是 sfc 里面有render 和setup include: [/\.vue$/, /\.vue\?vue/, /\.vue\.[tj]sx?\?vue/, /\.[tj]sx$/], // 支持tsx jsx vue文件 无script 和有script 编译后不一样 一个直接是sfc里面只有render 一个是 sfc 里面有render 和setup
dts: true, dts: true,
}), }),
Icons({
autoInstall: true,
}),
UnoCSS(), UnoCSS(),
createSvgIconsPlugin({ createSvgIconsPlugin({
// 指定需要缓存的图标文件夹(路径为存放所有svg图标的文件夹不单个svg图标) // 指定需要缓存的图标文件夹(路径为存放所有svg图标的文件夹不单个svg图标)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment