fix: 🐛 移除unplugin-icon插件,避免vue-template-compiler编译器在某些机器引发的报错

This commit is contained in:
ray
2024-10-08 14:42:49 +08:00
parent 57bca54848
commit 20dc49df6c
28 changed files with 229 additions and 130 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "vue3-element-admin", "name": "vue3-element-admin",
"version": "2.16.1", "version": "2.16.2",
"private": true, "private": true,
"type": "module", "type": "module",
"scripts": { "scripts": {
@@ -51,21 +51,21 @@
"@wangeditor/editor-for-vue": "5.1.10", "@wangeditor/editor-for-vue": "5.1.10",
"animate.css": "^4.1.1", "animate.css": "^4.1.1",
"axios": "^1.7.7", "axios": "^1.7.7",
"codemirror": "^5.65.17", "codemirror": "^5.65.18",
"codemirror-editor-vue3": "^2.7.1", "codemirror-editor-vue3": "^2.8.0",
"echarts": "^5.5.1", "echarts": "^5.5.1",
"element-plus": "^2.8.1", "element-plus": "^2.8.4",
"exceljs": "^4.4.0", "exceljs": "^4.4.0",
"lodash-es": "^4.17.21", "lodash-es": "^4.17.21",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"path-browserify": "^1.0.1", "path-browserify": "^1.0.1",
"path-to-regexp": "^6.2.2", "path-to-regexp": "^6.3.0",
"pinia": "^2.2.2", "pinia": "^2.2.4",
"qs": "^6.13.0", "qs": "^6.13.0",
"sortablejs": "^1.15.3", "sortablejs": "^1.15.3",
"vue": "^3.5.1", "vue": "^3.5.11",
"vue-i18n": "9.9.1", "vue-i18n": "9.9.1",
"vue-router": "^4.4.3" "vue-router": "^4.4.5"
}, },
"devDependencies": { "devDependencies": {
"@commitlint/cli": "^18.6.1", "@commitlint/cli": "^18.6.1",
@@ -84,7 +84,7 @@
"@vitejs/plugin-vue-jsx": "^3.1.0", "@vitejs/plugin-vue-jsx": "^3.1.0",
"autoprefixer": "^10.4.20", "autoprefixer": "^10.4.20",
"commitizen": "^4.3.0", "commitizen": "^4.3.0",
"cz-git": "^1.9.4", "cz-git": "1.9.4",
"eslint": "^8.57.0", "eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0", "eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.30.0", "eslint-plugin-import": "^2.30.0",
@@ -108,7 +108,6 @@
"typescript": "^5.5.4", "typescript": "^5.5.4",
"unocss": "^0.58.9", "unocss": "^0.58.9",
"unplugin-auto-import": "^0.17.8", "unplugin-auto-import": "^0.17.8",
"unplugin-icons": "^0.18.5",
"unplugin-vue-components": "^0.26.0", "unplugin-vue-components": "^0.26.0",
"vite": "^5.4.3", "vite": "^5.4.3",
"vite-plugin-mock-dev-server": "^1.7.1", "vite-plugin-mock-dev-server": "^1.7.1",

View File

@@ -9,8 +9,9 @@
item.redirect === 'noredirect' || index === breadcrumbs.length - 1 item.redirect === 'noredirect' || index === breadcrumbs.length - 1
" "
class="color-gray-400" class="color-gray-400"
>{{ translateRouteTitle(item.meta.title) }}</span
> >
{{ translateRouteTitle(item.meta.title) }}
</span>
<a v-else @click.prevent="handleLink(item)"> <a v-else @click.prevent="handleLink(item)">
{{ translateRouteTitle(item.meta.title) }} {{ translateRouteTitle(item.meta.title) }}
</a> </a>

View File

@@ -109,11 +109,15 @@
> >
<template v-if="isExpand"> <template v-if="isExpand">
收起 收起
<i-ep-arrow-up /> <el-icon>
<ArrowUp />
</el-icon>
</template> </template>
<template v-else> <template v-else>
展开 展开
<i-ep-arrow-down /> <el-icon>
<ArrowDown />
</el-icon>
</template> </template>
</el-link> </el-link>
</el-form-item> </el-form-item>

View File

@@ -9,10 +9,14 @@
:max="99" :max="99"
class="wh-full" class="wh-full"
> >
<i-ep-bell class="notification-icon h-full" /> <el-icon class="notification-icon h-full">
<Bell />
</el-icon>
</el-badge> </el-badge>
<el-badge :offset="[-10, 15]" v-else> <el-badge v-else class="wh-full">
<i-ep-bell class="notification-icon h-full" /> <el-icon class="notification-icon h-full">
<Bell />
</el-icon>
</el-badge> </el-badge>
</div> </div>

View File

@@ -145,8 +145,8 @@
<el-button type="primary" size="small" @click="handleConfirm"> <el-button type="primary" size="small" @click="handleConfirm">
{{ confirmText }} {{ confirmText }}
</el-button> </el-button>
<el-button size="small" @click="handleClear"> </el-button> <el-button size="small" @click="handleClear"> </el-button>
<el-button size="small" @click="handleClose"> </el-button> <el-button size="small" @click="handleClose"> </el-button>
</div> </div>
</div> </div>
</el-popover> </el-popover>

View File

@@ -16,7 +16,7 @@
:accept="props.accept" :accept="props.accept"
:limit="props.limit" :limit="props.limit"
> >
<i-ep-plus /> <el-icon><Plus /></el-icon>
<template #file="{ file }"> <template #file="{ file }">
<div style="width: 100%"> <div style="width: 100%">
<img class="el-upload-list__item-thumbnail" :src="file.url" alt="" /> <img class="el-upload-list__item-thumbnail" :src="file.url" alt="" />

View File

@@ -15,12 +15,13 @@
@contextmenu.prevent="openContentMenu(tag, $event)" @contextmenu.prevent="openContentMenu(tag, $event)"
> >
{{ translateRouteTitle(tag.title) }} {{ translateRouteTitle(tag.title) }}
<i-ep-close <el-icon
class="close-icon" class="tag-close-icon"
size="12px"
v-if="!isAffix(tag)" v-if="!isAffix(tag)"
@click.prevent.stop="closeSelectedTag(tag)" @click.prevent.stop="closeSelectedTag(tag)"
/> >
<Close />
</el-icon>
</router-link> </router-link>
</el-scrollbar> </el-scrollbar>
@@ -382,7 +383,9 @@ onMounted(() => {
margin-right: 15px; margin-right: 15px;
} }
.close-icon { .tag-close-icon {
vertical-align: -0.15em;
cursor: pointer;
border-radius: 50%; border-radius: 50%;
&:hover { &:hover {
@@ -405,7 +408,7 @@ onMounted(() => {
border-radius: 50%; border-radius: 50%;
} }
.close-icon:hover { .tag-close-icon:hover {
color: var(--el-color-primary); color: var(--el-color-primary);
background-color: var(--el-fill-color-light); background-color: var(--el-fill-color-light);
} }

View File

@@ -13,11 +13,15 @@
<el-form-item> <el-form-item>
<el-button type="primary" @click="handleQuery"> <el-button type="primary" @click="handleQuery">
<i-ep-search /> <template #icon>
<Search />
</template>
搜索 搜索
</el-button> </el-button>
<el-button @click="handleResetQuery"> <el-button @click="handleResetQuery">
<i-ep-refresh /> <template #icon>
<Refresh />
</template>
重置 重置
</el-button> </el-button>
</el-form-item> </el-form-item>
@@ -53,7 +57,9 @@
link link
@click="handleOpenDialog(scope.row.tableName)" @click="handleOpenDialog(scope.row.tableName)"
> >
<i-ep-MagicStick /> <template #icon>
<MagicStick />
</template>
生成代码 生成代码
</el-button> </el-button>
@@ -64,7 +70,9 @@
link link
@click="handleResetConfig(scope.row.tableName)" @click="handleResetConfig(scope.row.tableName)"
> >
<i-ep-RefreshLeft /> <template #icon>
<RefreshLeft />
</template>
重置配置 重置配置
</el-button> </el-button>
</template> </template>
@@ -167,7 +175,9 @@
<br /> <br />
注意2演示环境默认不生成菜单如需生成请在本地部署数据库 注意2演示环境默认不生成菜单如需生成请在本地部署数据库
</template> </template>
<i-ep-QuestionFilled class="cursor-pointer" /> <el-icon class="cursor-pointer">
<QuestionFilled />
</el-icon>
</el-tooltip> </el-tooltip>
</div> </div>
</template> </template>
@@ -195,7 +205,9 @@
:data="genConfigFormData.fieldConfigs" :data="genConfigFormData.fieldConfigs"
> >
<el-table-column width="55" align="center"> <el-table-column width="55" align="center">
<i-ep-Rank class="cursor-move sortable-handle" /> <el-icon class="cursor-move sortable-handle">
<Rank />
</el-icon>
</el-table-column> </el-table-column>
<el-table-column label="列名" width="110"> <el-table-column label="列名" width="110">

View File

@@ -6,10 +6,13 @@
<div class="flex-y-center"> <div class="flex-y-center">
访问趋势 访问趋势
<el-tooltip effect="dark" content="点击试试下载" placement="bottom"> <el-tooltip effect="dark" content="点击试试下载" placement="bottom">
<i-ep-download <el-icon
class="cursor-pointer hover:color-#4080FF ml-1" class="cursor-pointer hover:color-#4080FF ml-1"
name="el-icon-download"
@click="handleDownloadChart" @click="handleDownloadChart"
/> >
<Download />
</el-icon>
</el-tooltip> </el-tooltip>
</div> </div>

View File

@@ -121,8 +121,10 @@
getGrowthRateClass(item.growthRate), getGrowthRateClass(item.growthRate),
]" ]"
> >
<i-ep-top v-if="item.growthRate > 0" /> <el-icon>
<i-ep-bottom v-else-if="item.growthRate < 0" /> <Top v-if="item.growthRate > 0" />
<Bottom v-else-if="item.growthRate < 0" />
</el-icon>
{{ formatGrowthRate(item.growthRate) }} {{ formatGrowthRate(item.growthRate) }}
</span> </span>
</div> </div>

View File

@@ -10,8 +10,9 @@ const iconName = ref("edit");
type="primary" type="primary"
target="_blank" target="_blank"
class="mb-10" class="mb-10"
>示例源码 请点击>>>></el-link
> >
示例源码 请点击>>>>
</el-link>
<icon-select v-model="iconName" /> <icon-select v-model="iconName" />
</div> </div>
</template> </template>

View File

@@ -5,8 +5,9 @@
type="primary" type="primary"
target="_blank" target="_blank"
class="mb-10" class="mb-10"
>示例源码 请点击>>>></el-link
> >
示例源码 请点击>>>>
</el-link>
<el-alert :closable="false" title="菜单一级"> <el-alert :closable="false" title="菜单一级">
<router-view /> <router-view />

View File

@@ -138,8 +138,8 @@ function paint(
<h3>基于canvas实现的签名组件</h3> <h3>基于canvas实现的签名组件</h3>
<header> <header>
<el-button type="primary" @click="handleSaveImg">保存为图片</el-button> <el-button type="primary" @click="handleSaveImg">保存为图片</el-button>
<el-button @click="handleToFile"> 保存到后端 </el-button> <el-button @click="handleToFile">保存到后端</el-button>
<el-button @click="handleClearSign"> 清空签名 </el-button> <el-button @click="handleClearSign">清空签名</el-button>
</header> </header>
<canvas <canvas
ref="canvas" ref="canvas"
@@ -151,8 +151,7 @@ function paint(
@touchstart="onEventStart" @touchstart="onEventStart"
@touchmove.stop.prevent="onEventMove" @touchmove.stop.prevent="onEventMove"
@touchend="onEventEnd" @touchend="onEventEnd"
> ></canvas>
</canvas>
<img v-if="imgUrl" :src="imgUrl" alt="签名" /> <img v-if="imgUrl" :src="imgUrl" alt="签名" />
</div> </div>
</template> </template>

View File

@@ -17,7 +17,7 @@ const value = ref("初始内容");
</el-link> </el-link>
<editor <editor
v-model="value" v-model="value"
style=" z-index: 99999;height: calc(100vh - 180px)" style="z-index: 99999; height: calc(100vh - 180px)"
/> />
</div> </div>
</template> </template>

View File

@@ -70,7 +70,9 @@
<!-- 用户名 --> <!-- 用户名 -->
<el-form-item prop="username"> <el-form-item prop="username">
<div class="input-wrapper"> <div class="input-wrapper">
<i-ep-user class="mx-2" /> <el-icon class="mx-2">
<User />
</el-icon>
<el-input <el-input
ref="username" ref="username"
v-model="loginData.username" v-model="loginData.username"
@@ -90,7 +92,9 @@
> >
<el-form-item prop="password"> <el-form-item prop="password">
<div class="input-wrapper"> <div class="input-wrapper">
<i-ep-lock class="mx-2" /> <el-icon class="mx-2">
<Lock />
</el-icon>
<el-input <el-input
v-model="loginData.password" v-model="loginData.password"
:placeholder="$t('login.password')" :placeholder="$t('login.password')"

View File

@@ -13,11 +13,15 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="handleQuery"> <el-button type="primary" @click="handleQuery">
<i-ep-search /> <template #icon>
<Search />
</template>
搜索 搜索
</el-button> </el-button>
<el-button @click="handleResetQuery"> <el-button @click="handleResetQuery">
<i-ep-refresh /> <template #icon>
<Refresh />
</template>
重置 重置
</el-button> </el-button>
</el-form-item> </el-form-item>
@@ -31,7 +35,9 @@
v-hasPerm="['sys:config:add']" v-hasPerm="['sys:config:add']"
@click="handleOpenDialog()" @click="handleOpenDialog()"
> >
<i-ep-plus /> <template #icon>
<Plus />
</template>
新增 新增
</el-button> </el-button>
<el-button <el-button
@@ -85,7 +91,9 @@
v-hasPerm="['sys:config:update']" v-hasPerm="['sys:config:update']"
@click="handleOpenDialog(scope.row.id)" @click="handleOpenDialog(scope.row.id)"
> >
<i-ep-edit /> <template #icon>
<Edit />
</template>
编辑 编辑
</el-button> </el-button>
<el-button <el-button
@@ -95,7 +103,9 @@
v-hasPerm="['sys:config:delete']" v-hasPerm="['sys:config:delete']"
@click="handleDelete(scope.row.id)" @click="handleDelete(scope.row.id)"
> >
<i-ep-delete /> <template #icon>
<Delete />
</template>
删除 删除
</el-button> </el-button>
</template> </template>

View File

@@ -23,11 +23,15 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button class="filter-item" type="primary" @click="handleQuery"> <el-button class="filter-item" type="primary" @click="handleQuery">
<i-ep-search /> <template #icon>
<Search />
</template>
搜索 搜索
</el-button> </el-button>
<el-button @click="handleResetQuery"> <el-button @click="handleResetQuery">
<i-ep-refresh /> <template #icon>
<Refresh />
</template>
重置 重置
</el-button> </el-button>
</el-form-item> </el-form-item>
@@ -41,7 +45,9 @@
type="success" type="success"
@click="handleOpenDialog(0, undefined)" @click="handleOpenDialog(0, undefined)"
> >
<i-ep-plus /> <template #icon>
<Plus />
</template>
新增 新增
</el-button> </el-button>
<el-button <el-button
@@ -50,7 +56,9 @@
:disabled="ids.length === 0" :disabled="ids.length === 0"
@click="handleDelete()" @click="handleDelete()"
> >
<i-ep-delete /> <template #icon>
<Delete />
</template>
删除 删除
</el-button> </el-button>
</template> </template>
@@ -84,7 +92,9 @@
size="small" size="small"
@click.stop="handleOpenDialog(scope.row.id, undefined)" @click.stop="handleOpenDialog(scope.row.id, undefined)"
> >
<i-ep-plus /> <template #icon>
<Plus />
</template>
新增 新增
</el-button> </el-button>
<el-button <el-button
@@ -94,7 +104,9 @@
size="small" size="small"
@click.stop="handleOpenDialog(scope.row.parentId, scope.row.id)" @click.stop="handleOpenDialog(scope.row.parentId, scope.row.id)"
> >
<i-ep-edit /> <template #icon>
<Edit />
</template>
编辑 编辑
</el-button> </el-button>
<el-button <el-button
@@ -104,7 +116,9 @@
size="small" size="small"
@click.stop="handleDelete(scope.row.id)" @click.stop="handleDelete(scope.row.id)"
> >
<i-ep-delete /> <template #icon>
<Delete />
</template>
删除 删除
</el-button> </el-button>
</template> </template>

View File

@@ -19,11 +19,15 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="handleQuery()"> <el-button type="primary" @click="handleQuery()">
<i-ep-search /> <template #icon>
<Search />
</template>
搜索 搜索
</el-button> </el-button>
<el-button @click="handleResetQuery()"> <el-button @click="handleResetQuery()">
<i-ep-refresh /> <template #icon>
<Refresh />
</template>
重置 重置
</el-button> </el-button>
</el-form-item> </el-form-item>
@@ -33,7 +37,9 @@
<el-card shadow="never"> <el-card shadow="never">
<div class="mb-[10px]"> <div class="mb-[10px]">
<el-button type="success" @click="handleOpenDialog()"> <el-button type="success" @click="handleOpenDialog()">
<i-ep-plus /> <template #icon>
<Plus />
</template>
新增 新增
</el-button> </el-button>
<el-button <el-button
@@ -41,7 +47,9 @@
:disabled="ids.length === 0" :disabled="ids.length === 0"
@click="handleDelete()" @click="handleDelete()"
> >
<i-ep-delete /> <template #icon>
<Delete />
</template>
删除 删除
</el-button> </el-button>
</div> </div>
@@ -73,7 +81,9 @@
size="small" size="small"
@click.stop="handleOpenDialog(scope.row)" @click.stop="handleOpenDialog(scope.row)"
> >
<i-ep-edit /> <template #icon>
<Edit />
</template>
编辑 编辑
</el-button> </el-button>
<el-button <el-button
@@ -82,7 +92,9 @@
size="small" size="small"
@click.stop="handleDelete(scope.row.id)" @click.stop="handleDelete(scope.row.id)"
> >
<i-ep-delete /> <template #icon>
<Delete />
</template>
删除 删除
</el-button> </el-button>
</template> </template>

View File

@@ -13,12 +13,16 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="handleQuery()"> <el-button type="primary" @click="handleQuery()">
<i-ep-search /> <template #icon>
<Search />
</template>
搜索 搜索
</el-button> </el-button>
<el-button @click="handleResetQuery()"> <el-button @click="handleResetQuery()">
<i-ep-refresh /> <template #icon>
<Refresh />
重置 重置
</template>
</el-button> </el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@@ -27,7 +31,9 @@
<el-card shadow="never"> <el-card shadow="never">
<div class="mb-[10px]"> <div class="mb-[10px]">
<el-button type="success" @click="handleAddClick()"> <el-button type="success" @click="handleAddClick()">
<i-ep-plus /> <template #icon>
<Plus />
</template>
新增 新增
</el-button> </el-button>
<el-button <el-button
@@ -35,7 +41,9 @@
:disabled="ids.length === 0" :disabled="ids.length === 0"
@click="handleDelete()" @click="handleDelete()"
> >
<i-ep-delete /> <template #icon>
<Delete />
</template>
删除 删除
</el-button> </el-button>
</div> </div>
@@ -65,7 +73,9 @@
size="small" size="small"
@click.stop="handleOpenDictData(scope.row)" @click.stop="handleOpenDictData(scope.row)"
> >
<i-ep-Collection /> <template #icon>
<Collection />
</template>
字典数据 字典数据
</el-button> </el-button>
@@ -75,7 +85,9 @@
size="small" size="small"
@click.stop="handleEditClick(scope.row.id, scope.row.name)" @click.stop="handleEditClick(scope.row.id, scope.row.name)"
> >
<i-ep-edit /> <template #icon>
<Edit />
</template>
编辑 编辑
</el-button> </el-button>
<el-button <el-button
@@ -84,7 +96,9 @@
size="small" size="small"
@click.stop="handleDelete(scope.row.id)" @click.stop="handleDelete(scope.row.id)"
> >
<i-ep-delete /> <template #icon>
<Delete />
</template>
删除 删除
</el-button> </el-button>
</template> </template>

View File

@@ -25,11 +25,15 @@
<el-form-item> <el-form-item>
<el-button type="primary" @click="handleQuery"> <el-button type="primary" @click="handleQuery">
<i-ep-search /> <template #icon>
<Search />
</template>
搜索 搜索
</el-button> </el-button>
<el-button @click="handleResetQuery"> <el-button @click="handleResetQuery">
<i-ep-refresh /> <template #icon>
<Refresh />
</template>
重置 重置
</el-button> </el-button>
</el-form-item> </el-form-item>

View File

@@ -12,11 +12,11 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="handleQuery"> <el-button type="primary" @click="handleQuery">
<template #icon><i-ep-search /></template> <template #icon><Search /></template>
搜索 搜索
</el-button> </el-button>
<el-button @click="handleResetQuery"> <el-button @click="handleResetQuery">
<template #icon><i-ep-refresh /></template> <template #icon><Refresh /></template>
重置 重置
</el-button> </el-button>
</el-form-item> </el-form-item>
@@ -30,7 +30,7 @@
type="success" type="success"
@click="handleOpenDialog(0)" @click="handleOpenDialog(0)"
> >
<template #icon><i-ep-plus /></template> <template #icon><Plus /></template>
新增 新增
</el-button> </el-button>
</template> </template>
@@ -133,7 +133,7 @@
size="small" size="small"
@click.stop="handleOpenDialog(scope.row.id)" @click.stop="handleOpenDialog(scope.row.id)"
> >
<i-ep-plus /> <template #icon><Plus /></template>
新增 新增
</el-button> </el-button>
@@ -144,7 +144,7 @@
size="small" size="small"
@click.stop="handleOpenDialog(undefined, scope.row.id)" @click.stop="handleOpenDialog(undefined, scope.row.id)"
> >
<i-ep-edit /> <template #icon><Edit /></template>
编辑 编辑
</el-button> </el-button>
<el-button <el-button
@@ -154,7 +154,7 @@
size="small" size="small"
@click.stop="handleDelete(scope.row.id)" @click.stop="handleDelete(scope.row.id)"
> >
<i-ep-delete /> <template #icon><Delete /></template>
删除 删除
</el-button> </el-button>
</template> </template>
@@ -217,14 +217,17 @@
prop="routeName" prop="routeName"
> >
<template #label> <template #label>
<div> <div class="flex-y-center">
路由名称 路由名称
<el-tooltip placement="bottom" effect="light"> <el-tooltip placement="bottom" effect="light">
<template #content> <template #content>
如果需要开启缓存需保证页面 defineOptions 中的 name 如果需要开启缓存需保证页面 defineOptions 中的 name
与此处一致建议使用驼峰 与此处一致建议使用驼峰
</template> </template>
<i-ep-QuestionFilled class="inline-block" />
<el-icon class="ml-1 cursor-pointer">
<QuestionFilled />
</el-icon>
</el-tooltip> </el-tooltip>
</div> </div>
</template> </template>
@@ -239,7 +242,7 @@
prop="routePath" prop="routePath"
> >
<template #label> <template #label>
<div> <div class="flex-y-center">
路由路径 路由路径
<el-tooltip placement="bottom" effect="light"> <el-tooltip placement="bottom" effect="light">
<template #content> <template #content>
@@ -247,7 +250,9 @@
开头,菜单项不用。例如:系统管理目录 开头,菜单项不用。例如:系统管理目录
/system系统管理下的用户管理菜单 user。 /system系统管理下的用户管理菜单 user。
</template> </template>
<i-ep-QuestionFilled class="inline-block" /> <el-icon class="ml-1 cursor-pointer">
<QuestionFilled />
</el-icon>
</el-tooltip> </el-tooltip>
</div> </div>
</template> </template>
@@ -264,14 +269,16 @@
prop="component" prop="component"
> >
<template #label> <template #label>
<div> <div class="flex-y-center">
组件路径 组件路径
<el-tooltip placement="bottom" effect="light"> <el-tooltip placement="bottom" effect="light">
<template #content> <template #content>
组件页面完整路径,相对于 src/views/,如 组件页面完整路径,相对于 src/views/,如
system/user/index缺省后缀 .vue system/user/index缺省后缀 .vue
</template> </template>
<i-ep-QuestionFilled class="inline-block" /> <el-icon class="ml-1 cursor-pointer">
<QuestionFilled />
</el-icon>
</el-tooltip> </el-tooltip>
</div> </div>
</template> </template>
@@ -292,13 +299,15 @@
<el-form-item v-if="formData.type == MenuTypeEnum.MENU"> <el-form-item v-if="formData.type == MenuTypeEnum.MENU">
<template #label> <template #label>
<div> <div class="flex-y-center">
路由参数 路由参数
<el-tooltip placement="bottom" effect="light"> <el-tooltip placement="bottom" effect="light">
<template #content> <template #content>
组件页面使用 `useRoute().query.参数名` 获取路由参数值。 组件页面使用 `useRoute().query.参数名` 获取路由参数值。
</template> </template>
<i-ep-QuestionFilled class="inline-block" /> <el-icon class="ml-1 cursor-pointer">
<QuestionFilled />
</el-icon>
</el-tooltip> </el-tooltip>
</div> </div>
</template> </template>
@@ -370,7 +379,7 @@
" "
> >
<template #label> <template #label>
<div> <div class="flex-y-center">
始终显示 始终显示
<el-tooltip placement="bottom" effect="light"> <el-tooltip placement="bottom" effect="light">
<template #content> <template #content>
@@ -380,7 +389,9 @@
<br /> <br />
如果是叶子节点,请选择“否”。 如果是叶子节点,请选择“否”。
</template> </template>
<i-ep-QuestionFilled class="inline-block" /> <el-icon class="ml-1 cursor-pointer">
<QuestionFilled />
</el-icon>
</el-tooltip> </el-tooltip>
</div> </div>
</template> </template>
@@ -393,7 +404,7 @@
<el-form-item <el-form-item
v-if="formData.type === MenuTypeEnum.MENU" v-if="formData.type === MenuTypeEnum.MENU"
label="页面缓存" label="缓存页面"
> >
<el-radio-group v-model="formData.keepAlive"> <el-radio-group v-model="formData.keepAlive">
<el-radio :value="1">开启</el-radio> <el-radio :value="1">开启</el-radio>

View File

@@ -18,7 +18,9 @@
</el-button> </el-button>
<!-- 关闭按钮 --> <!-- 关闭按钮 -->
<el-button @click="handleClose" circle> <el-button @click="handleClose" circle>
<i-ep-Close /> <template #icon>
<Close />
</template>
</el-button> </el-button>
</div> </div>
</div> </div>

View File

@@ -29,11 +29,11 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="handleQuery()"> <el-button type="primary" @click="handleQuery()">
<i-ep-search /> <Search />
搜索 搜索
</el-button> </el-button>
<el-button @click="handleResetQuery()"> <el-button @click="handleResetQuery()">
<i-ep-refresh /> <Refresh />
重置 重置
</el-button> </el-button>
</el-form-item> </el-form-item>
@@ -47,7 +47,7 @@
type="success" type="success"
@click="handleOpenDialog()" @click="handleOpenDialog()"
> >
<i-ep-plus /> <Plus />
新增通知 新增通知
</el-button> </el-button>
<el-button <el-button
@@ -56,7 +56,7 @@
:disabled="ids.length === 0" :disabled="ids.length === 0"
@click="handleDelete()" @click="handleDelete()"
> >
<i-ep-delete /> <Delete />
删除 删除
</el-button> </el-button>
</template> </template>

View File

@@ -12,11 +12,15 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="handleQuery()"> <el-button type="primary" @click="handleQuery()">
<i-ep-search /> <template #icon>
<Search />
</template>
搜索 搜索
</el-button> </el-button>
<el-button @click="handleResetQuery()"> <el-button @click="handleResetQuery()">
<i-ep-refresh /> <template #icon>
<Refresh />
</template>
重置 重置
</el-button> </el-button>
</el-form-item> </el-form-item>

View File

@@ -13,11 +13,11 @@
<el-form-item> <el-form-item>
<el-button type="primary" @click="handleQuery"> <el-button type="primary" @click="handleQuery">
<i-ep-search /> <Search />
搜索 搜索
</el-button> </el-button>
<el-button @click="handleResetQuery"> <el-button @click="handleResetQuery">
<i-ep-refresh /> <Refresh />
重置 重置
</el-button> </el-button>
</el-form-item> </el-form-item>
@@ -27,7 +27,9 @@
<el-card shadow="never" class="table-container"> <el-card shadow="never" class="table-container">
<template #header> <template #header>
<el-button type="success" @click="handleOpenDialog()"> <el-button type="success" @click="handleOpenDialog()">
<i-ep-plus /> <el-icon>
<Plus />
</el-icon>
新增 新增
</el-button> </el-button>
<el-button <el-button
@@ -35,7 +37,9 @@
:disabled="ids.length === 0" :disabled="ids.length === 0"
@click="handleDelete()" @click="handleDelete()"
> >
<i-ep-delete /> <el-icon>
<Delete />
</el-icon>
删除 删除
</el-button> </el-button>
</template> </template>
@@ -69,7 +73,7 @@
link link
@click="handleOpenAssignPermDialog(scope.row)" @click="handleOpenAssignPermDialog(scope.row)"
> >
<i-ep-position /> <template #icon><Position /></template>
分配权限 分配权限
</el-button> </el-button>
<el-button <el-button
@@ -78,7 +82,7 @@
link link
@click="handleOpenDialog(scope.row.id)" @click="handleOpenDialog(scope.row.id)"
> >
<i-ep-edit /> <template #icon><Edit /></template>
编辑 编辑
</el-button> </el-button>
<el-button <el-button
@@ -87,7 +91,7 @@
link link
@click="handleDelete(scope.row.id)" @click="handleDelete(scope.row.id)"
> >
<i-ep-delete /> <template #icon><Delete /></template>
删除 删除
</el-button> </el-button>
</template> </template>
@@ -172,13 +176,15 @@
placeholder="菜单权限名称" placeholder="菜单权限名称"
> >
<template #prefix> <template #prefix>
<i-ep-search /> <Search />
</template> </template>
</el-input> </el-input>
<div class="flex-center ml-5"> <div class="flex-center ml-5">
<el-button type="primary" size="small" plain @click="togglePermTree"> <el-button type="primary" size="small" plain @click="togglePermTree">
<i-ep-switch /> <template #icon>
<Switch />
</template>
{{ isExpanded ? "收缩" : "展开" }} {{ isExpanded ? "收缩" : "展开" }}
</el-button> </el-button>
<el-checkbox <el-checkbox
@@ -193,9 +199,11 @@
<template #content> <template #content>
如果只需勾选菜单权限不需要勾选子菜单或者按钮权限请关闭父子联动 如果只需勾选菜单权限不需要勾选子菜单或者按钮权限请关闭父子联动
</template> </template>
<i-ep-QuestionFilled <el-icon
class="ml-1 color-[--el-color-primary] inline-block cursor-pointer" class="ml-1 color-[--el-color-primary] inline-block cursor-pointer"
/> >
<QuestionFilled />
</el-icon>
</el-tooltip> </el-tooltip>
</div> </div>
</div> </div>

View File

@@ -3,7 +3,7 @@
<el-card shadow="never"> <el-card shadow="never">
<el-input v-model="deptName" placeholder="部门名称" clearable> <el-input v-model="deptName" placeholder="部门名称" clearable>
<template #prefix> <template #prefix>
<i-ep-search /> <Search />
</template> </template>
</el-input> </el-input>

View File

@@ -48,11 +48,11 @@
<el-form-item> <el-form-item>
<el-button type="primary" @click="handleQuery"> <el-button type="primary" @click="handleQuery">
<i-ep-search /> <Search />
搜索 搜索
</el-button> </el-button>
<el-button @click="handleResetQuery"> <el-button @click="handleResetQuery">
<i-ep-refresh /> <Refresh />
重置 重置
</el-button> </el-button>
</el-form-item> </el-form-item>
@@ -68,7 +68,7 @@
type="success" type="success"
@click="handleOpenDialog()" @click="handleOpenDialog()"
> >
<i-ep-plus /> <template #icon><Plus /></template>
新增 新增
</el-button> </el-button>
<el-button <el-button
@@ -77,18 +77,18 @@
:disabled="removeIds.length === 0" :disabled="removeIds.length === 0"
@click="handleDelete()" @click="handleDelete()"
> >
<i-ep-delete /> <template #icon><Delete /></template>
删除 删除
</el-button> </el-button>
</div> </div>
<div> <div>
<el-button class="ml-3" @click="handleOpenImportDialog"> <el-button class="ml-3" @click="handleOpenImportDialog">
<template #icon><i-ep-upload /></template> <template #icon><Upload /></template>
导入 导入
</el-button> </el-button>
<el-button class="ml-3" @click="handleExport"> <el-button class="ml-3" @click="handleExport">
<template #icon><i-ep-download /></template> <template #icon><Download /></template>
导出 导出
</el-button> </el-button>
</div> </div>
@@ -163,7 +163,7 @@
link link
@click="hancleResetPassword(scope.row)" @click="hancleResetPassword(scope.row)"
> >
<i-ep-refresh-left /> <template #icon><RefreshLeft /></template>
重置密码 重置密码
</el-button> </el-button>
<el-button <el-button
@@ -173,7 +173,7 @@
size="small" size="small"
@click="handleOpenDialog(scope.row.id)" @click="handleOpenDialog(scope.row.id)"
> >
<i-ep-edit /> <template #icon><Edit /></template>
编辑 编辑
</el-button> </el-button>
<el-button <el-button
@@ -183,7 +183,7 @@
size="small" size="small"
@click="handleDelete(scope.row.id)" @click="handleDelete(scope.row.id)"
> >
<i-ep-delete /> <template #icon><Delete /></template>
删除 删除
</el-button> </el-button>
</template> </template>

View File

@@ -5,8 +5,6 @@ import { UserConfig, ConfigEnv, loadEnv, defineConfig } from "vite";
import AutoImport from "unplugin-auto-import/vite"; import AutoImport from "unplugin-auto-import/vite";
import Components from "unplugin-vue-components/vite"; import Components from "unplugin-vue-components/vite";
import { ElementPlusResolver } from "unplugin-vue-components/resolvers"; import { ElementPlusResolver } from "unplugin-vue-components/resolvers";
import Icons from "unplugin-icons/vite";
import IconsResolver from "unplugin-icons/resolver";
import { createSvgIconsPlugin } from "vite-plugin-svg-icons"; import { createSvgIconsPlugin } from "vite-plugin-svg-icons";
import mockDevServerPlugin from "vite-plugin-mock-dev-server"; import mockDevServerPlugin from "vite-plugin-mock-dev-server";
@@ -88,8 +86,6 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
ElementPlusResolver({ ElementPlusResolver({
importStyle: "sass", importStyle: "sass",
}), }),
// 自动导入图标组件
IconsResolver({}),
], ],
eslintrc: { eslintrc: {
// 是否自动生成 eslint 规则,建议生成之后设置 false // 是否自动生成 eslint 规则,建议生成之后设置 false
@@ -110,11 +106,6 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
ElementPlusResolver({ ElementPlusResolver({
importStyle: "sass", importStyle: "sass",
}), }),
// 自动注册图标组件
IconsResolver({
// element-plus图标库其他图标库 https://icon-sets.iconify.design/
enabledCollections: ["ep"],
}),
], ],
// 指定自定义组件位置(默认:src/components) // 指定自定义组件位置(默认:src/components)
dirs: ["src/components", "src/**/components"], dirs: ["src/components", "src/**/components"],
@@ -122,10 +113,6 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
dts: false, dts: false,
// dts: "src/types/components.d.ts", // dts: "src/types/components.d.ts",
}), }),
Icons({
// 自动安装图标库
autoInstall: true,
}),
createSvgIconsPlugin({ createSvgIconsPlugin({
// 指定需要缓存的图标文件夹 // 指定需要缓存的图标文件夹
iconDirs: [resolve(pathSrc, "assets/icons")], iconDirs: [resolve(pathSrc, "assets/icons")],