chore: update

This commit is contained in:
xiaoxian521 2022-07-18 16:07:03 +08:00
parent a73610672f
commit af71024f42
15 changed files with 2023 additions and 4590 deletions

View File

@ -60,6 +60,7 @@ jobs:
run: |
pnpm install
pnpm lint
pnpm typecheck
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: main

1
.gitignore vendored
View File

@ -17,3 +17,4 @@ tests/**/coverage/
*.ntvs*
*.njsproj
*.sln
tsconfig.tsbuildinfo

View File

@ -10,6 +10,7 @@
"report": "rimraf dist && cross-env vite build",
"preview": "vite preview",
"preview:build": "pnpm build && vite preview",
"typecheck": "tsc --noEmit && vue-tsc --noEmit --skipLibCheck",
"cloc": "cross-env --max_old_space_size=4096 cloc . --exclude-dir=node_modules --exclude-lang=YAML",
"clean:cache": "rm -rf node_modules && rm -rf .eslintcache && pnpm install",
"lint:eslint": "eslint --cache --max-warnings 0 \"{src,mock}/**/*.{vue,ts,tsx}\" --fix",
@ -29,17 +30,17 @@
"dependencies": {
"@amap/amap-jsapi-loader": "^1.0.1",
"@ctrl/tinycolor": "^3.4.1",
"@logicflow/core": "^1.1.16",
"@logicflow/extension": "^1.1.16",
"@logicflow/core": "^1.1.22",
"@logicflow/extension": "^1.1.22",
"@pureadmin/components": "^1.0.6",
"@pureadmin/descriptions": "^1.1.0",
"@pureadmin/table": "^1.2.0",
"@pureadmin/utils": "^0.0.31",
"@vueuse/core": "^8.7.4",
"@pureadmin/utils": "^0.0.32",
"@vueuse/core": "^8.9.4",
"@vueuse/motion": "^2.0.0-beta.12",
"@vueuse/shared": "^8.7.4",
"@wangeditor/editor": "^5.0.1",
"@wangeditor/editor-for-vue": "^5.1.10",
"@vueuse/shared": "^8.9.4",
"@wangeditor/editor": "^5.1.10",
"@wangeditor/editor-for-vue": "^5.1.12",
"animate.css": "^4.1.1",
"axios": "^0.27.2",
"china-area-data": "^5.0.1",
@ -48,7 +49,7 @@
"dayjs": "^1.11.3",
"driver.js": "^0.9.8",
"echarts": "^5.3.3",
"element-plus": "^2.2.8",
"element-plus": "^2.2.9",
"element-resize-detector": "^1.2.3",
"js-cookie": "^3.0.1",
"jsbarcode": "^3.11.5",
@ -59,7 +60,7 @@
"mockjs": "^1.1.0",
"nprogress": "^0.2.0",
"path": "^0.12.7",
"pinia": "^2.0.14",
"pinia": "^2.0.16",
"qrcode": "^1.5.0",
"qs": "^6.10.1",
"resize-observer-polyfill": "^1.5.1",
@ -69,10 +70,10 @@
"v-contextmenu": "3.0.0",
"vue": "^3.2.37",
"vue-form-create2": "^1.2.8",
"vue-i18n": "^9.2.0-beta.36",
"vue-i18n": "^9.2.0-beta.39",
"vue-json-pretty": "^2.0.2",
"vue-pdf-embed": "^1.1.4",
"vue-router": "^4.0.15",
"vue-router": "^4.1.2",
"vue-types": "^4.1.1",
"vue-virtual-scroller": "^2.0.0-alpha.1",
"vuedraggable": "4.1.0",
@ -94,7 +95,7 @@
"@iconify-icons/ri": "^1.2.1",
"@iconify-icons/uil": "^1.2.1",
"@iconify/vue": "^3.2.1",
"@intlify/vite-plugin-vue-i18n": "^3.4.0",
"@intlify/vite-plugin-vue-i18n": "^5.0.0",
"@pureadmin/theme": "^2.4.0",
"@types/element-resize-detector": "1.1.3",
"@types/js-cookie": "^3.0.1",
@ -107,14 +108,14 @@
"@types/qs": "^6.9.7",
"@typescript-eslint/eslint-plugin": "^5.10.2",
"@typescript-eslint/parser": "^5.10.2",
"@vitejs/plugin-legacy": "^1.8.2",
"@vitejs/plugin-vue": "^2.3.3",
"@vitejs/plugin-vue-jsx": "^1.3.10",
"@vitejs/plugin-legacy": "^2.0.0",
"@vitejs/plugin-vue": "^3.0.1",
"@vitejs/plugin-vue-jsx": "^2.0.0",
"@vue/eslint-config-prettier": "^7.0.0",
"@vue/eslint-config-typescript": "^10.0.0",
"@vue/runtime-core": "^3.2.37",
"autoprefixer": "^10.4.5",
"cloc": "^2.9.0",
"cloc": "^2.10.0",
"cross-env": "7.0.3",
"eslint": "^8.8.0",
"eslint-plugin-prettier": "^4.0.0",
@ -130,7 +131,6 @@
"prettier": "^2.5.1",
"pretty-quick": "3.1.1",
"rimraf": "3.0.2",
"rollup": "^2.70.1",
"rollup-plugin-visualizer": "^5.6.0",
"sass": "^1.51.0",
"stylelint": "^14.3.0",
@ -140,13 +140,22 @@
"stylelint-config-standard": "^24.0.0",
"stylelint-order": "^5.0.0",
"typescript": "^4.6.3",
"unocss": "^0.39.3",
"unocss": "^0.44.3",
"unplugin-vue-define-options": "^0.6.1",
"vite": "^2.9.13",
"vite": "^3.0.1",
"vite-plugin-mock": "^2.9.6",
"vite-plugin-remove-console": "^1.1.0",
"vite-svg-loader": "^3.3.0",
"vue-eslint-parser": "^8.2.0"
"vite-svg-loader": "^3.4.0",
"vue-eslint-parser": "^8.2.0",
"vue-tsc": "^0.38.8"
},
"pnpm": {
"peerDependencyRules": {
"ignoreMissing": [
"rollup",
"terser"
]
}
},
"repository": "git@github.com:xiaoxian521/vue-pure-admin.git",
"author": "xiaoxian521",

6518
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -167,6 +167,7 @@ let autoPlay = computed(() => {
let scrollSwitch = computed(() => {
// props .
// @ts-expect-error
return props.data.length >= unref(options).limitMoveNum;
});

View File

@ -5,7 +5,7 @@ import { emitter } from "/@/utils/mitt";
let show = ref<Boolean>(false);
const target = ref(null);
onClickOutside(target, event => {
onClickOutside(target, (event: any) => {
if (event.clientX > target.value.offsetLeft) return;
show.value = false;
});

View File

@ -9,8 +9,8 @@ import { useRoute, useRouter, RouteLocationMatched } from "vue-router";
const route = useRoute();
const levelList = ref([]);
const router = useRouter();
const routes = router.options.routes;
const multiTags = useMultiTagsStoreHook().multiTags;
const routes: any = router.options.routes;
const multiTags: any = useMultiTagsStoreHook().multiTags;
const isDashboard = (route: RouteLocationMatched): boolean | string => {
const name = route && (route.name as string);

View File

@ -289,6 +289,7 @@ function dynamicRouteTag(value: string, parentPath: string): void {
});
}
}
// @ts-expect-error
concatPath(router.options.routes, value, parentPath);
}

View File

@ -1,6 +1,8 @@
import { createProdMockServer } from "vite-plugin-mock/es/createProdMockServer";
const modules = import.meta.globEager("../mock/*.ts");
const modules: Record<string, any> = import.meta.glob("../mock/*.ts", {
eager: true
});
const mockModules = [];
Object.keys(modules).forEach(key => {

View File

@ -10,12 +10,12 @@ import zhLocale from "element-plus/lib/locale/lang/zh-cn";
function siphonI18n(prefix = "zh-CN") {
return Object.fromEntries(
Object.entries(import.meta.globEager("../../locales/*.y(a)?ml")).map(
([key, value]) => {
const matched = key.match(/([A-Za-z0-9-_]+)\./i)[1];
return [matched, value.default];
}
)
Object.entries(
import.meta.glob("../../locales/*.y(a)?ml", { eager: true })
).map(([key, value]: any) => {
const matched = key.match(/([A-Za-z0-9-_]+)\./i)[1];
return [matched, value.default];
})
)[prefix];
}

View File

@ -81,6 +81,7 @@ export const remainingPaths = Object.keys(remainingRouter).map(v => {
// 创建路由实例
export const router: Router = createRouter({
history: getHistoryMode(),
// @ts-expect-error
routes: constantRoutes.concat(...remainingRouter),
strict: true,
scrollBehavior(to, from, savedPosition) {
@ -150,7 +151,7 @@ router.beforeEach((to: toRouteType, _from, next) => {
};
// 未开启标签页缓存,刷新页面重定向到顶级路由(参考标签页操作例子,只针对静态路由)
if (to.meta?.refreshRedirect) {
const routes = router.options.routes;
const routes: any = router.options.routes;
const { refreshRedirect } = to.meta;
const { name, meta } = findRouteByPath(refreshRedirect, routes);
handTag(
@ -165,7 +166,7 @@ router.beforeEach((to: toRouteType, _from, next) => {
const index = findIndex(remainingRouter, v => {
return v.path == path;
});
const routes =
const routes: any =
index === -1
? router.options.routes[0].children
: router.options.routes;

View File

@ -172,9 +172,9 @@ function onEdit(row?: onEditNRow) {
}
//
const { clipboardRef } = useCopyToClipboard();
const { clipboardValue } = useCopyToClipboard();
const cellDBLClickEvent: VxeTableEvents.CellDblclick = ({ row }) => {
clipboardRef.value = unref(row).model;
clipboardValue.value = unref(row).model;
};
const xTable = ref({} as VxeTableInstance);

View File

@ -38,9 +38,8 @@ function onCloseTags() {
getNodeByUniqueId(treeData.value, uniqueId).path;
useMultiTagsStoreHook().handleTags("splice", currentPath);
if (currentPath === "/tabs/index")
router.push({
path: multiTags.value[multiTags.value.length - 1].path
});
// @ts-expect-error
router.push({ path: multiTags.value[multiTags.value.length - 1].path });
});
}
</script>

View File

@ -12,6 +12,7 @@ setOptions(
},
legend: {
orient: "vertical",
// @ts-expect-error
right: true
},
series: [

View File

@ -61,12 +61,11 @@ export default ({ command, mode }: ConfigEnv): UserConfigExport => {
},
plugins: getPluginsList(command, VITE_LEGACY),
optimizeDeps: {
include: ["pinia", "vue-i18n", "lodash-es", "@vueuse/core"],
include: ["pinia", "vue-i18n", "lodash-es", "@vueuse/core", "dayjs"],
exclude: ["@pureadmin/theme/dist/browser-utils"]
},
build: {
sourcemap: false,
brotliSize: false,
// 消除打包大小超过500kb警告
chunkSizeWarningLimit: 4000
},