新增内容

This commit is contained in:
2026-03-26 21:58:14 +08:00
parent 089b8e3943
commit 96bd1bdf9a
8 changed files with 1099 additions and 6356 deletions

2408
cdTMP/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
{ {
"name": "testplant", "name": "testplant",
"private": true, "private": true,
"version": "0.1.1", "version": "1.0.1",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
@@ -13,53 +13,53 @@
"dependencies": { "dependencies": {
"@arco-design/color": "^0.4.0", "@arco-design/color": "^0.4.0",
"@arco-design/web-vue": "^2.57.0", "@arco-design/web-vue": "^2.57.0",
"@tanstack/vue-query": "^5.92.9", "@tanstack/vue-query": "^5.95.2",
"@tinymce/tinymce-vue": "^6.3.0", "@tinymce/tinymce-vue": "^6.3.0",
"@vueuse/core": "^14.2.1", "@vueuse/core": "^14.2.1",
"axios": "^1.13.5", "axios": "^1.13.6",
"class-variance-authority": "^0.7.1", "class-variance-authority": "^0.7.1",
"clsx": "^2.1.1", "clsx": "^2.1.1",
"dayjs": "^1.11.19", "dayjs": "^1.11.20",
"file2md5": "^1.3.0", "file2md5": "^1.3.0",
"lodash-es": "^4.17.23", "lodash-es": "^4.17.23",
"mammoth": "^1.11.0", "mammoth": "^1.12.0",
"mitt": "^3.0.1", "mitt": "^3.0.1",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"pinia": "^3.0.4", "pinia": "^3.0.4",
"pinyin-match": "^1.2.10", "pinyin-match": "^1.2.10",
"postcss-import": "^16.1.1", "postcss-import": "^16.1.1",
"qs": "^6.14.2", "qs": "^6.15.0",
"tailwind-merge": "^3.4.0", "tailwind-merge": "^3.5.0",
"tinymce": "^7.9.1", "tinymce": "^7.9.1",
"tw-animate-css": "^1.4.0", "tw-animate-css": "^1.4.0",
"vue": "^3.5.28", "vue": "^3.5.31",
"vue-clipboard3": "^2.0.0", "vue-clipboard3": "^2.0.0",
"vue-color-kit": "^1.0.6", "vue-color-kit": "^1.0.6",
"vue-data-ui": "^3.14.10", "vue-data-ui": "^3.16.5",
"vue-router": "^5.0.2", "vue-router": "^5.0.4",
"vuedraggable": "^2.24.3" "vuedraggable": "^2.24.3"
}, },
"devDependencies": { "devDependencies": {
"@tailwindcss/postcss": "^4.1.18", "@tailwindcss/postcss": "^4.2.2",
"@tailwindcss/vite": "^4.1.18", "@tailwindcss/vite": "^4.2.2",
"@types/lodash-es": "^4.17.12", "@types/lodash-es": "^4.17.12",
"@types/node": "^25.2.3", "@types/node": "^25.5.0",
"@types/nprogress": "^0.2.3", "@types/nprogress": "^0.2.3",
"@types/qs": "^6.14.0", "@types/qs": "^6.15.0",
"@vitejs/plugin-vue": "^6.0.4", "@vitejs/plugin-vue": "^6.0.5",
"@vitejs/plugin-vue-jsx": "^5.1.4", "@vitejs/plugin-vue-jsx": "^5.1.5",
"@vue/babel-plugin-jsx": "^2.0.1", "@vue/babel-plugin-jsx": "^2.0.1",
"browserslist": "^4.28.1", "browserslist": "^4.28.1",
"eslint": "^10.0.0", "eslint": "^10.1.0",
"eslint-plugin-vue": "^10.7.0", "eslint-plugin-vue": "^10.8.0",
"less": "^4.5.1", "less": "^4.6.4",
"less-loader": "^12.3.1", "less-loader": "^12.3.2",
"postcss": "^8.5.6", "postcss": "^8.5.8",
"prettier": "^3.8.1", "prettier": "^3.8.1",
"rollup-plugin-visualizer": "^6.0.5", "rollup-plugin-visualizer": "^7.0.1",
"tailwindcss": "^4.1.18", "tailwindcss": "^4.2.2",
"typescript": "^5.9.3", "typescript": "^6.0.2",
"vite": "^7.3.1", "vite": "^8.0.3",
"vue-eslint-parser": "^10.2.0" "vue-eslint-parser": "^10.4.0"
} }
} }

View File

@@ -8,9 +8,8 @@
import { reactive, ref, watch, computed } from "vue" import { reactive, ref, watch, computed } from "vue"
import { useAppStore } from "@/store" import { useAppStore } from "@/store"
import Editor from "@tinymce/tinymce-vue"
import tinymce from "tinymce/tinymce.min.js" import tinymce from "tinymce/tinymce.min.js"
import Editor from "@tinymce/tinymce-vue"
import "tinymce/icons/default/icons.min.js" import "tinymce/icons/default/icons.min.js"
import "tinymce/models/dom/model.min.js" import "tinymce/models/dom/model.min.js"
import "tinymce/themes/silver/theme.min.js" import "tinymce/themes/silver/theme.min.js"

View File

@@ -5,6 +5,8 @@ import setupPermissionGuard from "@/router/guard/permisstion"
import { setRouteTitle } from "@/utils/title" import { setRouteTitle } from "@/utils/title"
// 为了已登录用户直接进入login // 为了已登录用户直接进入login
import { useUserStore } from "@/store" import { useUserStore } from "@/store"
import NProgress from "nprogress" // progress bar
import "nprogress/nprogress.css"
function setupPageGuard(router) { function setupPageGuard(router) {
router.beforeEach(async (to) => { router.beforeEach(async (to) => {
@@ -14,6 +16,7 @@ function setupPageGuard(router) {
// 设置站点document.title // 设置站点document.title
router.afterEach((to, from) => { router.afterEach((to, from) => {
setRouteTitle(to.meta.title) setRouteTitle(to.meta.title)
NProgress.done()
}) })
// 设置如果已登录用户进入login页面则直接进入工作台 // 设置如果已登录用户进入login页面则直接进入工作台
router.beforeEach((to) => { router.beforeEach((to) => {

View File

@@ -7,7 +7,7 @@ import { appRoutes } from "../routes"
import { WHITE_LIST, NOT_FOUND } from "../constants" import { WHITE_LIST, NOT_FOUND } from "../constants"
// 权限守卫 // 权限守卫
export default function setupPermissionGuard(router) { export default function setupPermissionGuard(router) {
router.beforeEach(async (to, from, next) => { router.beforeEach(async (to, from) => {
const appStore = useAppStore() const appStore = useAppStore()
const userStore = useUserStore() const userStore = useUserStore()
const Permission = usePermission() const Permission = usePermission()
@@ -34,16 +34,18 @@ export default function setupPermissionGuard(router) {
} }
} }
if (exist && permissionsAllow) { if (exist && permissionsAllow) {
next() return true
} else next(NOT_FOUND) } else {
return NOT_FOUND
}
} else { } else {
// eslint-disable-next-line no-lonely-if // eslint-disable-next-line no-lonely-if
if (permissionsAllow) next() if (permissionsAllow) {
else { return true
} else {
const destination = Permission.findFirstPermissionRoute(appRoutes, userStore.role) || NOT_FOUND const destination = Permission.findFirstPermissionRoute(appRoutes, userStore.role) || NOT_FOUND
next(destination) return destination
} }
} }
NProgress.done()
}) })
} }

File diff suppressed because one or more lines are too long

View File

@@ -16,7 +16,7 @@ export default ({ mode }) => {
vueJsx(), vueJsx(),
visualizer({ visualizer({
open: true, open: true,
filename: "visualizer.html" // 分析图生成的文件名 filename: "./dist/visualizer.html" // 分析图生成的文件名
}), }),
tailwindcss() tailwindcss()
], ],
@@ -33,8 +33,25 @@ export default ({ mode }) => {
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: false __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: false
}, },
build: { build: {
chunkSizeWarningLimit: 3000, chunkSizeWarningLimit: 3000
// assetsPublicPath: "./" // assetsPublicPath: "./"
// v8版本又报tinymce is not defined只有遗憾业务js大的问题
/**
rolldownOptions: {
output: {
codeSplitting: {
groups: [
{
test: (id) => id.includes("tinymce"),
name: "tinymce",
}
]
}
}
}
*/
// vite v7版本配置V8已经移除
/**
rollupOptions: { rollupOptions: {
output: { output: {
manualChunks: (id) => { manualChunks: (id) => {
@@ -43,6 +60,7 @@ export default ({ mode }) => {
} }
} }
} }
*/
}, },
server: { server: {
host: "0.0.0.0", host: "0.0.0.0",

View File

@@ -1,2 +1,2 @@
1. tinymce 7.9.1 1. tinymce 7.9.1
2. vue-router 4.6.4 2. vite 7.3.1 -> 8.0.0使用分块打包tinymce会找不到模块暂时取消分块