新增内容
This commit is contained in:
2408
cdTMP/package-lock.json
generated
2408
cdTMP/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "testplant",
|
||||
"private": true,
|
||||
"version": "0.1.1",
|
||||
"version": "1.0.1",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -13,53 +13,53 @@
|
||||
"dependencies": {
|
||||
"@arco-design/color": "^0.4.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",
|
||||
"@vueuse/core": "^14.2.1",
|
||||
"axios": "^1.13.5",
|
||||
"axios": "^1.13.6",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"clsx": "^2.1.1",
|
||||
"dayjs": "^1.11.19",
|
||||
"dayjs": "^1.11.20",
|
||||
"file2md5": "^1.3.0",
|
||||
"lodash-es": "^4.17.23",
|
||||
"mammoth": "^1.11.0",
|
||||
"mammoth": "^1.12.0",
|
||||
"mitt": "^3.0.1",
|
||||
"nprogress": "^0.2.0",
|
||||
"pinia": "^3.0.4",
|
||||
"pinyin-match": "^1.2.10",
|
||||
"postcss-import": "^16.1.1",
|
||||
"qs": "^6.14.2",
|
||||
"tailwind-merge": "^3.4.0",
|
||||
"qs": "^6.15.0",
|
||||
"tailwind-merge": "^3.5.0",
|
||||
"tinymce": "^7.9.1",
|
||||
"tw-animate-css": "^1.4.0",
|
||||
"vue": "^3.5.28",
|
||||
"vue": "^3.5.31",
|
||||
"vue-clipboard3": "^2.0.0",
|
||||
"vue-color-kit": "^1.0.6",
|
||||
"vue-data-ui": "^3.14.10",
|
||||
"vue-router": "^5.0.2",
|
||||
"vue-data-ui": "^3.16.5",
|
||||
"vue-router": "^5.0.4",
|
||||
"vuedraggable": "^2.24.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/postcss": "^4.1.18",
|
||||
"@tailwindcss/vite": "^4.1.18",
|
||||
"@tailwindcss/postcss": "^4.2.2",
|
||||
"@tailwindcss/vite": "^4.2.2",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"@types/node": "^25.2.3",
|
||||
"@types/node": "^25.5.0",
|
||||
"@types/nprogress": "^0.2.3",
|
||||
"@types/qs": "^6.14.0",
|
||||
"@vitejs/plugin-vue": "^6.0.4",
|
||||
"@vitejs/plugin-vue-jsx": "^5.1.4",
|
||||
"@types/qs": "^6.15.0",
|
||||
"@vitejs/plugin-vue": "^6.0.5",
|
||||
"@vitejs/plugin-vue-jsx": "^5.1.5",
|
||||
"@vue/babel-plugin-jsx": "^2.0.1",
|
||||
"browserslist": "^4.28.1",
|
||||
"eslint": "^10.0.0",
|
||||
"eslint-plugin-vue": "^10.7.0",
|
||||
"less": "^4.5.1",
|
||||
"less-loader": "^12.3.1",
|
||||
"postcss": "^8.5.6",
|
||||
"eslint": "^10.1.0",
|
||||
"eslint-plugin-vue": "^10.8.0",
|
||||
"less": "^4.6.4",
|
||||
"less-loader": "^12.3.2",
|
||||
"postcss": "^8.5.8",
|
||||
"prettier": "^3.8.1",
|
||||
"rollup-plugin-visualizer": "^6.0.5",
|
||||
"tailwindcss": "^4.1.18",
|
||||
"typescript": "^5.9.3",
|
||||
"vite": "^7.3.1",
|
||||
"vue-eslint-parser": "^10.2.0"
|
||||
"rollup-plugin-visualizer": "^7.0.1",
|
||||
"tailwindcss": "^4.2.2",
|
||||
"typescript": "^6.0.2",
|
||||
"vite": "^8.0.3",
|
||||
"vue-eslint-parser": "^10.4.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,8 @@
|
||||
import { reactive, ref, watch, computed } from "vue"
|
||||
import { useAppStore } from "@/store"
|
||||
|
||||
import Editor from "@tinymce/tinymce-vue"
|
||||
import tinymce from "tinymce/tinymce.min.js"
|
||||
|
||||
import Editor from "@tinymce/tinymce-vue"
|
||||
import "tinymce/icons/default/icons.min.js"
|
||||
import "tinymce/models/dom/model.min.js"
|
||||
import "tinymce/themes/silver/theme.min.js"
|
||||
|
||||
@@ -5,6 +5,8 @@ import setupPermissionGuard from "@/router/guard/permisstion"
|
||||
import { setRouteTitle } from "@/utils/title"
|
||||
// 为了已登录用户直接进入login
|
||||
import { useUserStore } from "@/store"
|
||||
import NProgress from "nprogress" // progress bar
|
||||
import "nprogress/nprogress.css"
|
||||
|
||||
function setupPageGuard(router) {
|
||||
router.beforeEach(async (to) => {
|
||||
@@ -14,6 +16,7 @@ function setupPageGuard(router) {
|
||||
// 设置站点document.title
|
||||
router.afterEach((to, from) => {
|
||||
setRouteTitle(to.meta.title)
|
||||
NProgress.done()
|
||||
})
|
||||
// 设置如果已登录用户进入login页面则直接进入工作台
|
||||
router.beforeEach((to) => {
|
||||
|
||||
@@ -7,7 +7,7 @@ import { appRoutes } from "../routes"
|
||||
import { WHITE_LIST, NOT_FOUND } from "../constants"
|
||||
// 权限守卫
|
||||
export default function setupPermissionGuard(router) {
|
||||
router.beforeEach(async (to, from, next) => {
|
||||
router.beforeEach(async (to, from) => {
|
||||
const appStore = useAppStore()
|
||||
const userStore = useUserStore()
|
||||
const Permission = usePermission()
|
||||
@@ -34,16 +34,18 @@ export default function setupPermissionGuard(router) {
|
||||
}
|
||||
}
|
||||
if (exist && permissionsAllow) {
|
||||
next()
|
||||
} else next(NOT_FOUND)
|
||||
return true
|
||||
} else {
|
||||
return NOT_FOUND
|
||||
}
|
||||
} else {
|
||||
// eslint-disable-next-line no-lonely-if
|
||||
if (permissionsAllow) next()
|
||||
else {
|
||||
if (permissionsAllow) {
|
||||
return true
|
||||
} else {
|
||||
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
@@ -16,7 +16,7 @@ export default ({ mode }) => {
|
||||
vueJsx(),
|
||||
visualizer({
|
||||
open: true,
|
||||
filename: "visualizer.html" // 分析图生成的文件名
|
||||
filename: "./dist/visualizer.html" // 分析图生成的文件名
|
||||
}),
|
||||
tailwindcss()
|
||||
],
|
||||
@@ -33,8 +33,25 @@ export default ({ mode }) => {
|
||||
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: false
|
||||
},
|
||||
build: {
|
||||
chunkSizeWarningLimit: 3000,
|
||||
chunkSizeWarningLimit: 3000
|
||||
// assetsPublicPath: "./"
|
||||
// v8版本又报tinymce is not defined,只有遗憾业务js大的问题
|
||||
/**
|
||||
rolldownOptions: {
|
||||
output: {
|
||||
codeSplitting: {
|
||||
groups: [
|
||||
{
|
||||
test: (id) => id.includes("tinymce"),
|
||||
name: "tinymce",
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
// vite v7版本配置:V8已经移除
|
||||
/**
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks: (id) => {
|
||||
@@ -43,6 +60,7 @@ export default ({ mode }) => {
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
},
|
||||
server: {
|
||||
host: "0.0.0.0",
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
1. tinymce 7.9.1
|
||||
2. vue-router 4.6.4
|
||||
2. vite 7.3.1 -> 8.0.0使用分块打包tinymce会找不到模块,暂时取消分块
|
||||
Reference in New Issue
Block a user