chore: 删除无用依赖

This commit is contained in:
kailong321200875 2023-08-16 10:24:31 +08:00
parent 5b4defa8c4
commit 71b0e4f6f6
8 changed files with 43 additions and 61 deletions

View File

@ -35,10 +35,10 @@
"animate.css": "^4.1.1",
"axios": "^1.4.0",
"dayjs": "^1.11.9",
"driver.js": "^1.2.1",
"echarts": "^5.4.3",
"echarts-wordcloud": "^2.1.0",
"element-plus": "^2.3.9",
"intro.js": "^7.0.1",
"lodash-es": "^4.17.21",
"mitt": "^3.0.1",
"mockjs": "^1.1.0",
@ -60,7 +60,6 @@
"@iconify/json": "^2.2.101",
"@intlify/unplugin-vue-i18n": "^0.12.2",
"@purge-icons/generated": "^0.9.0",
"@types/intro.js": "^5.1.1",
"@types/lodash-es": "^4.17.8",
"@types/node": "^20.4.10",
"@types/nprogress": "^0.2.0",
@ -73,7 +72,6 @@
"@vitejs/plugin-legacy": "^4.1.1",
"@vitejs/plugin-vue": "^4.2.3",
"@vitejs/plugin-vue-jsx": "^3.0.1",
"@vue-macros/volar": "^0.13.3",
"autoprefixer": "^10.4.14",
"consola": "^3.2.3",
"eslint": "^8.47.0",
@ -99,7 +97,6 @@
"terser": "^5.19.2",
"typescript": "5.1.6",
"unocss": "^0.55.0",
"unplugin-vue-define-options": "^1.3.15",
"vite": "4.4.9",
"vite-plugin-ejs": "^1.6.4",
"vite-plugin-eslint": "^1.8.1",

View File

@ -1,47 +0,0 @@
import introJs from 'intro.js'
import { IntroJs, Step, Options } from 'intro.js'
import 'intro.js/introjs.css'
import { useI18n } from '@/hooks/web/useI18n'
import { useDesign } from '@/hooks/web/useDesign'
export const useIntro = (setps?: Step[], options?: Options) => {
const { t } = useI18n()
const { variables } = useDesign()
const defaultSetps: Step[] = setps || [
{
element: `#${variables.namespace}-menu`,
title: t('common.menu'),
intro: t('common.menuDes'),
position: 'right'
},
{
element: `#${variables.namespace}-tool-header`,
title: t('common.tool'),
intro: t('common.toolDes'),
position: 'left'
},
{
element: `#${variables.namespace}-tags-view`,
title: t('common.tagsView'),
intro: t('common.tagsViewDes'),
position: 'bottom'
}
]
const defaultOptions: Options = options || {
prevLabel: t('common.prevLabel'),
nextLabel: t('common.nextLabel'),
skipLabel: t('common.skipLabel'),
doneLabel: t('common.doneLabel')
}
const introRef: IntroJs = introJs()
introRef.addSteps(defaultSetps).setOptions(defaultOptions)
return {
introRef
}
}

View File

@ -318,7 +318,7 @@ export default {
guide: 'Guide',
start: 'Start',
message:
'The guide page is very useful for some people who enter the project for the first time. You can briefly introduce the functions of the project. The boot page is based on intro js'
'The guide page is very useful for some people who enter the project for the first time. You can briefly introduce the functions of the project. The boot page is based on driver.js'
},
iconDemo: {
icon: 'Icon',

View File

@ -313,7 +313,7 @@ export default {
guide: '引导页',
start: '开始',
message:
'引导页对于一些第一次进入项目的人很有用,你可以简单介绍下项目的功能。引导页基于 intro.js'
'引导页对于一些第一次进入项目的人很有用,你可以简单介绍下项目的功能。引导页基于 driver.js'
},
iconDemo: {
icon: '图标',

View File

@ -36,6 +36,7 @@ export const useTagsViewStore = defineStore('tagsView', {
},
// 新增tag
addVisitedView(view: RouteLocationNormalizedLoaded) {
console.log(view)
if (this.visitedViews.some((v) => v.path === view.path)) return
if (view.meta?.noTagsView) return
this.visitedViews.push(

View File

@ -1,15 +1,50 @@
<script setup lang="ts">
import { ContentWrap } from '@/components/ContentWrap'
import { useI18n } from '@/hooks/web/useI18n'
import { useIntro } from '@/hooks/web/useIntro'
import { ElButton } from 'element-plus'
import { driver } from 'driver.js'
import 'driver.js/dist/driver.css'
import { useDesign } from '@/hooks/web/useDesign'
const { t } = useI18n()
const { introRef } = useIntro()
const { variables } = useDesign()
const driverObj = driver({
showProgress: true,
nextBtnText: t('common.nextLabel'),
prevBtnText: t('common.prevLabel'),
doneBtnText: t('common.doneLabel'),
steps: [
{
element: `#${variables.namespace}-menu`,
popover: {
title: t('common.menu'),
description: t('common.menuDes'),
side: 'right'
}
},
{
element: `#${variables.namespace}-tool-header`,
popover: {
title: t('common.tool'),
description: t('common.toolDes'),
side: 'left'
}
},
{
element: `#${variables.namespace}-tags-view`,
popover: {
title: t('common.tagsView'),
description: t('common.tagsViewDes'),
side: 'bottom'
}
}
]
})
const guideStart = () => {
introRef.start()
driverObj.drive()
}
</script>

View File

@ -27,10 +27,8 @@
"@intlify/unplugin-vue-i18n/types",
"vite/client",
"element-plus/global",
"@types/intro.js",
"@types/qrcode",
"vite-plugin-svg-icons/client",
"unplugin-vue-define-options/macros-global"
"vite-plugin-svg-icons/client"
]
},
"include": ["src", "types/**/*.d.ts", "mock/**/*.ts"]

View File

@ -10,7 +10,6 @@ import { viteMockServe } from 'vite-plugin-mock'
import PurgeIcons from 'vite-plugin-purge-icons'
import VueI18nPlugin from "@intlify/unplugin-vue-i18n/vite"
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
import DefineOptions from "unplugin-vue-define-options/vite"
import { createStyleImportPlugin, ElementPlusResolve } from 'vite-plugin-style-import'
import UnoCSS from 'unocss/vite'
@ -75,7 +74,6 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
setupProdMockServer()
`
}),
DefineOptions(),
ViteEjsPlugin({
title: env.VITE_APP_TITLE
}),