diff --git a/package.json b/package.json index 565f7aa..ece0c2a 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/hooks/web/useIntro.ts b/src/hooks/web/useIntro.ts deleted file mode 100644 index 85604df..0000000 --- a/src/hooks/web/useIntro.ts +++ /dev/null @@ -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 - } -} diff --git a/src/locales/en.ts b/src/locales/en.ts index 5a0042e..4129526 100644 --- a/src/locales/en.ts +++ b/src/locales/en.ts @@ -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', diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 305f2ca..d2f0e6d 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -313,7 +313,7 @@ export default { guide: '引导页', start: '开始', message: - '引导页对于一些第一次进入项目的人很有用,你可以简单介绍下项目的功能。引导页基于 intro.js' + '引导页对于一些第一次进入项目的人很有用,你可以简单介绍下项目的功能。引导页基于 driver.js' }, iconDemo: { icon: '图标', diff --git a/src/store/modules/tagsView.ts b/src/store/modules/tagsView.ts index 039ee53..599bde5 100644 --- a/src/store/modules/tagsView.ts +++ b/src/store/modules/tagsView.ts @@ -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( diff --git a/src/views/Guide/Guide.vue b/src/views/Guide/Guide.vue index 38a710a..ca0a4f5 100644 --- a/src/views/Guide/Guide.vue +++ b/src/views/Guide/Guide.vue @@ -1,15 +1,50 @@ diff --git a/tsconfig.json b/tsconfig.json index 04de651..a53c906 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -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"] diff --git a/vite.config.ts b/vite.config.ts index 86dbbcc..0f89012 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -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 }),