Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@ dist
tmp
node_modules
coverage
public/stat_log.js
public
src/assets/fonts/iconfont.js
src/utils/wysihtml5.js
src/utils/bus.js
1 change: 1 addition & 0 deletions .eslintrc.js → .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ module.exports = {
'@typescript-eslint/indent': ['error', 2, { SwitchCase: 1 }],
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 1,
'@typescript-eslint/no-namespace': [
'off'
],
Expand Down
8 changes: 1 addition & 7 deletions .stylelintrc.js → .stylelintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,11 @@ module.exports = {
"rem",
"pt"
],
"indentation": 2,
"no-empty-source": null,
"block-no-empty": null,
'declaration-block-no-duplicate-custom-properties': null,
"font-family-no-missing-generic-family-keyword": null,

"block-closing-brace-newline-after": "always-multi-line",
"block-opening-brace-newline-before": "always-single-line",
"block-opening-brace-newline-after": "always",
"block-closing-brace-newline-before": "always",

"selector-class-pattern": "^[a-z]([a-z0-9-]+)?(__([a-z0-9]+-?)+)?(__([a-z0-9]+-?)+)?(--([a-z0-9]+-?)+){0,2}$|^Mui.*$|^([a-z][a-z0-9]*)(_[a-z0-9]+)*$",

"scss/at-mixin-pattern": "^[a-z]([a-z0-9-]+)?(__([a-z0-9]+-?)+)?(__([a-z0-9]+-?)+)?(--([a-z0-9]+-?)+){0,2}$|^Mui.*$|^([a-z][a-z0-9]*)(_[a-z0-9]+)*$",
Expand Down Expand Up @@ -56,7 +51,6 @@ module.exports = {
"except": ["after-declaration", "first-nested"]
}
],
"block-closing-brace-empty-line-before": "never",
"rule-empty-line-before": ["always-multi-line"],

// 忽视 -webkit-xxxx 等兼容写法
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ __[🌈 Live Demo 在线体验](https://pdsuwwz.github.io/vue3-tab-demo)__
## 🌱 技术栈

* Naive UI 2.x
* Vue 3.3.x
* Vue 3.4.x
* Vite 5.x
* Pinia 2.x
* TypeScript 5.x
Expand Down Expand Up @@ -108,7 +108,7 @@ router.pushMultiple(

## 前置条件

* Vue 3.3.x
* Vue 3.4.x
* Node >= 16.15.x
* Pnpm 8.x

Expand Down Expand Up @@ -230,23 +230,23 @@ export interface WorkTab {
## 💡 注意事项

* Vue 组件名称需要与对应路由名称保持一致,否则 Keep Alive 将会失效
* 由于 Tab 组件自身解耦了所有的业务逻辑,所以涉及到路由一级动态 ID 这种跟业务路有强耦合的地方都需要再自行传入,嫌麻烦的可以直接修改源码中的所有 `dynamicCacheSpacePrefixKey` 字段或将相关 hook 二次封装一下。具体参考这两个位置:[源码1](src/widgets/WorkTabs/store.ts#L142) 和 [源码2](src/hooks/useTabRouter.ts#L50)
* 由于 Tab 组件自身解耦了所有的业务逻辑,所以涉及到路由一级动态 ID 这种跟业务路由强耦合的地方都需要再自行传入,嫌麻烦的可以直接修改源码中的所有 `dynamicCacheSpacePrefixKey` 字段或将相关 hook 二次封装一下。具体参考这两个位置:[源码1](src/widgets/WorkTabs/store.ts#L142) 和 [源码2](src/hooks/useTabRouter.ts#L50)
* 推荐使用本项目进行二次改造和开发实际的业务项目


## 说明

* 如果此开源对您有帮助,您可以点右上角 "Star" 支持一下 谢谢! ^_^ 🌹

* 或者您可以 "follow" 一下, 我会不断开源更多的有趣的项目
* 或者您可以 "follow" 一下, 我会不断开源更多有趣和实用的项目

* 开发环境 macOS Ventura, VSCode
* 开发环境 MacOS Ventura, VSCode

* 如有问题请直接在 Issues 中提, 或者您发现问题并有非常好的解决方案, 欢迎 PR 👍

* 推荐一个 Vue3 + TS + Element Plus 开源入门项目, 对 Element Plus UI 库感兴趣的朋友可以去看看。[地址在这里](https://github.com/pdsuwwz/vite-ts-starter)

* 另外一个 Vue3 + Naive UI + TS 的入门项目, 比当前项目简洁很多, 非常适合入门练习和二次开发。[地址在这里](https://github.com/pdsuwwz/naive-ts-starter)
* 另外一个 Vue3 + Naive UI + TS 的入门项目, 比当前项目简洁很多, 非常适合入门练习和二次开发。[地址在这里](https://github.com/pdsuwwz/vite-naive-template)


## License
Expand Down
File renamed without changes.
44 changes: 0 additions & 44 deletions jest.config.js

This file was deleted.

54 changes: 27 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"pinia",
"vite",
"jest",
"vue3-jest",
"vitest",
"typescript",
"admin",
"example",
Expand Down Expand Up @@ -62,56 +62,56 @@
"@vicons/material": "^0.12.0",
"@vicons/tabler": "^0.12.0",
"@vicons/utils": "^0.1.4",
"@vueuse/core": "^10.7.0",
"axios": "1.6.2",
"@vueuse/core": "^10.7.1",
"axios": "1.6.3",
"echarts": "^5.4.3",
"js-cookie": "^3.0.5",
"lodash-es": "^4.17.21",
"naive-ui": "^2.35.0",
"naive-ui": "^2.36.0",
"nprogress": "^0.2.0",
"pinia": "^2.1.7",
"uuid": "^9.0.1",
"vue": "^3.3.10",
"vue": "^3.4.0",
"vue-router": "^4.2.5"
},
"devDependencies": {
"@babel/core": "^7.23.5",
"@babel/preset-env": "^7.23.5",
"@babel/core": "^7.23.6",
"@babel/preset-env": "^7.23.6",
"@types/js-cookie": "^3.0.6",
"@types/lodash-es": "^4.17.12",
"@types/node": "^20.10.3",
"@types/node": "^20.10.5",
"@types/nprogress": "^0.2.3",
"@typescript-eslint/eslint-plugin": "^6.13.2",
"@typescript-eslint/parser": "^6.13.2",
"@vitejs/plugin-vue": "^4.5.1",
"@vitest/coverage-v8": "^1.0.1",
"@vue/compiler-sfc": "^3.3.10",
"@typescript-eslint/eslint-plugin": "^6.16.0",
"@typescript-eslint/parser": "^6.16.0",
"@vitejs/plugin-vue": "^5.0.0",
"@vitest/coverage-v8": "^1.1.0",
"@vue/compiler-sfc": "^3.4.0",
"@vue/test-utils": "2.4.3",
"babel-plugin-transform-vite-meta-env": "^1.0.3",
"cross-env": "^7.0.3",
"eslint": "^8.55.0",
"eslint": "^8.56.0",
"eslint-plugin-html": "7.1.0",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-vue": "^9.19.2",
"identity-obj-proxy": "^3.0.0",
"jsdom": "^23.0.1",
"postcss": "^8.4.32",
"postcss-html": "^1.5.0",
"postcss-scss": "^4.0.9",
"rollup": "^4.6.1",
"sass": "^1.69.5",
"stylelint": "^15.11.0",
"stylelint-config-recommended-scss": "13.1.0",
"rollup": "^4.9.1",
"sass": "^1.69.6",
"stylelint": "^16.1.0",
"stylelint-config-recommended-scss": "14.0.0",
"stylelint-config-recommended-vue": "^1.5.0",
"stylelint-config-standard": "^34.0.0",
"stylelint-config-standard-scss": "11.1.0",
"sucrase": "^3.34.0",
"typescript": "^5.3.2",
"unocss": "^0.58.0",
"unplugin-auto-import": "^0.17.2",
"stylelint-config-standard": "^36.0.0",
"stylelint-config-standard-scss": "12.0.0",
"sucrase": "^3.35.0",
"typescript": "^5.3.3",
"unocss": "^0.58.2",
"unplugin-auto-import": "^0.17.3",
"unplugin-vue-components": "^0.26.0",
"vite": "^5.0.5",
"vite": "^5.0.10",
"vite-svg-loader": "^5.1.0",
"vitest": "^1.0.1"
"vitest": "^1.1.0"
}
}
Loading