chore: 同步完整版代码

This commit is contained in:
xiaoxian521 2022-11-11 11:53:54 +08:00
parent 1bafbeaab7
commit d53496e495
16 changed files with 1090 additions and 784 deletions

View File

@ -1,6 +1,7 @@
public public
dist dist
*.d.ts *.d.ts
/src/assets
package.json package.json
.eslintrc.js .eslintrc.js
.prettierrc.js .prettierrc.js

View File

@ -4,13 +4,13 @@ import { viteBuildInfo } from "./info";
import svgLoader from "vite-svg-loader"; import svgLoader from "vite-svg-loader";
import legacy from "@vitejs/plugin-legacy"; import legacy from "@vitejs/plugin-legacy";
import vueJsx from "@vitejs/plugin-vue-jsx"; import vueJsx from "@vitejs/plugin-vue-jsx";
import VueMacros from "unplugin-vue-macros/vite";
import { viteMockServe } from "vite-plugin-mock"; import { viteMockServe } from "vite-plugin-mock";
import { configCompressPlugin } from "./compress"; import { configCompressPlugin } from "./compress";
// import ElementPlus from "unplugin-element-plus/vite"; // import ElementPlus from "unplugin-element-plus/vite";
import { visualizer } from "rollup-plugin-visualizer"; import { visualizer } from "rollup-plugin-visualizer";
import removeConsole from "vite-plugin-remove-console"; import removeConsole from "vite-plugin-remove-console";
import themePreprocessorPlugin from "@pureadmin/theme"; import themePreprocessorPlugin from "@pureadmin/theme";
import DefineOptions from "unplugin-vue-define-options/vite";
import { genScssMultipleScopeVars } from "../src/layout/theme"; import { genScssMultipleScopeVars } from "../src/layout/theme";
export function getPluginsList( export function getPluginsList(
@ -27,7 +27,7 @@ export function getPluginsList(
vueJsx(), vueJsx(),
VITE_CDN ? cdn : null, VITE_CDN ? cdn : null,
configCompressPlugin(VITE_COMPRESSION), configCompressPlugin(VITE_COMPRESSION),
DefineOptions(), VueMacros(),
// 线上环境删除console // 线上环境删除console
removeConsole({ external: ["src/assets/iconfont/iconfont.js"] }), removeConsole({ external: ["src/assets/iconfont/iconfont.js"] }),
viteBuildInfo(), viteBuildInfo(),

View File

@ -1,6 +1,6 @@
{ {
"name": "pure-admin-thin", "name": "pure-admin-thin",
"version": "3.6.3", "version": "3.6.4",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "NODE_OPTIONS=--max-old-space-size=4096 vite", "dev": "NODE_OPTIONS=--max-old-space-size=4096 vite",
@ -40,8 +40,8 @@
"axios": "^1.1.3", "axios": "^1.1.3",
"dayjs": "^1.11.4", "dayjs": "^1.11.4",
"echarts": "^5.3.3", "echarts": "^5.3.3",
"element-plus": "^2.2.16", "element-plus": "^2.2.20",
"element-resize-detector": "^1.2.3", "element-resize-detector": "^1.2.4",
"js-cookie": "^3.0.1", "js-cookie": "^3.0.1",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"lodash-es": "^4.17.21", "lodash-es": "^4.17.21",
@ -54,7 +54,7 @@
"qs": "^6.11.0", "qs": "^6.11.0",
"resize-observer-polyfill": "^1.5.1", "resize-observer-polyfill": "^1.5.1",
"responsive-storage": "^2.1.0", "responsive-storage": "^2.1.0",
"vue": "^3.2.40", "vue": "^3.2.44",
"vue-router": "^4.1.6", "vue-router": "^4.1.6",
"vue-types": "^4.2.1", "vue-types": "^4.2.1",
"vxe-table": "^4.3.2", "vxe-table": "^4.3.2",
@ -65,30 +65,30 @@
"@commitlint/config-conventional": "13.1.0", "@commitlint/config-conventional": "13.1.0",
"@iconify-icons/ep": "^1.2.7", "@iconify-icons/ep": "^1.2.7",
"@iconify-icons/ri": "^1.2.3", "@iconify-icons/ri": "^1.2.3",
"@iconify/vue": "^3.2.1", "@iconify/vue": "^4.0.0",
"@pureadmin/theme": "^2.4.0", "@pureadmin/theme": "^2.4.0",
"@types/element-resize-detector": "1.1.3", "@types/element-resize-detector": "1.1.3",
"@types/js-cookie": "^3.0.1", "@types/js-cookie": "^3.0.1",
"@types/lodash": "^4.14.180", "@types/lodash": "^4.14.180",
"@types/lodash-es": "^4.17.6", "@types/lodash-es": "^4.17.6",
"@types/mockjs": "1.0.3", "@types/mockjs": "^1.0.7",
"@types/node": "14.14.14", "@types/node": "^18.11.9",
"@types/nprogress": "0.2.0", "@types/nprogress": "0.2.0",
"@types/qs": "^6.9.7", "@types/qs": "^6.9.7",
"@typescript-eslint/eslint-plugin": "^5.10.2", "@typescript-eslint/eslint-plugin": "^5.42.1",
"@typescript-eslint/parser": "^5.10.2", "@typescript-eslint/parser": "^5.42.1",
"@vitejs/plugin-legacy": "^2.2.0", "@vitejs/plugin-legacy": "^2.3.1",
"@vitejs/plugin-vue": "^3.1.2", "@vitejs/plugin-vue": "^3.2.0",
"@vitejs/plugin-vue-jsx": "^2.0.1", "@vitejs/plugin-vue-jsx": "^2.1.1",
"@vue/eslint-config-prettier": "^7.0.0", "@vue/eslint-config-prettier": "^7.0.0",
"@vue/eslint-config-typescript": "^10.0.0", "@vue/eslint-config-typescript": "^11.0.2",
"@vue/runtime-core": "^3.2.40", "@vue/runtime-core": "^3.2.44",
"autoprefixer": "^10.4.13", "autoprefixer": "^10.4.13",
"cloc": "^2.10.0", "cloc": "^2.10.0",
"cssnano": "^5.1.14", "cssnano": "^5.1.14",
"eslint": "^8.8.0", "eslint": "^8.8.0",
"eslint-plugin-prettier": "^4.0.0", "eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-vue": "^8.4.1", "eslint-plugin-vue": "^9.7.0",
"font-awesome": "^4.7.0", "font-awesome": "^4.7.0",
"husky": "^7.0.4", "husky": "^7.0.4",
"lint-staged": "11.1.2", "lint-staged": "11.1.2",
@ -101,26 +101,26 @@
"pretty-quick": "3.1.1", "pretty-quick": "3.1.1",
"rimraf": "3.0.2", "rimraf": "3.0.2",
"rollup-plugin-visualizer": "^5.8.3", "rollup-plugin-visualizer": "^5.8.3",
"sass": "^1.53.0", "sass": "^1.56.1",
"sass-loader": "^13.0.2", "sass-loader": "^13.2.0",
"stylelint": "^14.3.0", "stylelint": "^14.3.0",
"stylelint-config-html": "^1.0.0", "stylelint-config-html": "^1.0.0",
"stylelint-config-prettier": "^9.0.3", "stylelint-config-prettier": "^9.0.3",
"stylelint-config-recommended": "^6.0.0", "stylelint-config-recommended": "^9.0.0",
"stylelint-config-standard": "^24.0.0", "stylelint-config-standard": "^29.0.0",
"stylelint-order": "^5.0.0", "stylelint-order": "^5.0.0",
"tailwindcss": "^3.2.3", "tailwindcss": "^3.2.3",
"terser": "^5.15.1", "terser": "^5.15.1",
"typescript": "^4.7.4", "typescript": "^4.8.4",
"unplugin-vue-define-options": "0.7.3", "unplugin-vue-macros": "^0.16.2",
"vite": "^3.1.8", "vite": "3.1.8",
"vite-plugin-cdn-import": "^0.3.5", "vite-plugin-cdn-import": "^0.3.5",
"vite-plugin-compression": "^0.5.1", "vite-plugin-compression": "^0.5.1",
"vite-plugin-mock": "^2.9.6", "vite-plugin-mock": "^2.9.6",
"vite-plugin-remove-console": "^1.2.0", "vite-plugin-remove-console": "^1.2.0",
"vite-svg-loader": "^3.6.0", "vite-svg-loader": "^3.6.0",
"vue-eslint-parser": "^8.2.0", "vue-eslint-parser": "^9.1.0",
"vue-tsc": "^0.40.13" "vue-tsc": "^1.0.9"
}, },
"pnpm": { "pnpm": {
"peerDependencyRules": { "peerDependencyRules": {

1775
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
{ {
"Version": "3.6.3", "Version": "3.6.4",
"Title": "PureAdmin", "Title": "PureAdmin",
"FixedHeader": true, "FixedHeader": true,
"HiddenSideBar": false, "HiddenSideBar": false,

View File

@ -9,7 +9,7 @@ const dropdownDom = templateRef<ElRef | null>("dropdownDom", null);
const activeName = ref(noticesData[0].name); const activeName = ref(noticesData[0].name);
const notices = ref(noticesData); const notices = ref(noticesData);
let noticesNum = ref(0); const noticesNum = ref(0);
notices.value.forEach(notice => { notices.value.forEach(notice => {
noticesNum.value += notice.list.length; noticesNum.value += notice.list.length;
}); });

View File

@ -24,11 +24,11 @@ function hoverTitle() {
function hoverDescription(event, description) { function hoverDescription(event, description) {
// currentWidth currentWidth , // currentWidth currentWidth ,
let tempTag = document.createElement("span"); const tempTag = document.createElement("span");
tempTag.innerText = description; tempTag.innerText = description;
tempTag.className = "getDescriptionWidth"; tempTag.className = "getDescriptionWidth";
document.querySelector("body").appendChild(tempTag); document.querySelector("body").appendChild(tempTag);
let currentWidth = ( const currentWidth = (
document.querySelector(".getDescriptionWidth") as HTMLSpanElement document.querySelector(".getDescriptionWidth") as HTMLSpanElement
).offsetWidth; ).offsetWidth;
document.querySelector(".getDescriptionWidth").remove(); document.querySelector(".getDescriptionWidth").remove();

View File

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

View File

@ -54,8 +54,8 @@ const {
/* body添加layout属性作用于src/style/sidebar.scss */ /* body添加layout属性作用于src/style/sidebar.scss */
if (unref(layoutTheme)) { if (unref(layoutTheme)) {
let layout = unref(layoutTheme).layout; const layout = unref(layoutTheme).layout;
let theme = unref(layoutTheme).theme; const theme = unref(layoutTheme).theme;
toggleTheme({ toggleTheme({
scopeName: `layout-theme-${theme}` scopeName: `layout-theme-${theme}`
}); });
@ -119,13 +119,13 @@ const weekChange = (value): void => {
}; };
const tagsChange = () => { const tagsChange = () => {
let showVal = settings.tabsVal; const showVal = settings.tabsVal;
storageConfigureChange("hideTabs", showVal); storageConfigureChange("hideTabs", showVal);
emitter.emit("tagViewsChange", showVal as unknown as string); emitter.emit("tagViewsChange", showVal as unknown as string);
}; };
const multiTagsCacheChange = () => { const multiTagsCacheChange = () => {
let multiTagsCache = settings.multiTagsCache; const multiTagsCache = settings.multiTagsCache;
storageConfigureChange("multiTagsCache", multiTagsCache); storageConfigureChange("multiTagsCache", multiTagsCache);
useMultiTagsStoreHook().multiTagsCacheChange(multiTagsCache); useMultiTagsStoreHook().multiTagsCacheChange(multiTagsCache);
}; };

View File

@ -8,7 +8,7 @@ import { getParentPaths, findRouteByPath } from "@/router/utils";
import { usePermissionStoreHook } from "@/store/modules/permission"; import { usePermissionStoreHook } from "@/store/modules/permission";
const menuRef = ref(); const menuRef = ref();
let defaultActive = ref(null); const defaultActive = ref(null);
const { const {
route, route,

View File

@ -19,7 +19,7 @@ const showLogo = ref(
const { routers, device, pureApp, isCollapse, menuSelect, toggleSideBar } = const { routers, device, pureApp, isCollapse, menuSelect, toggleSideBar } =
useNav(); useNav();
let subMenuData = ref([]); const subMenuData = ref([]);
const menuData = computed(() => { const menuData = computed(() => {
return pureApp.layout === "mix" && device.value !== "mobile" return pureApp.layout === "mix" && device.value !== "mobile"

View File

@ -40,7 +40,7 @@ const {
const tabDom = ref(); const tabDom = ref();
const containerDom = ref(); const containerDom = ref();
const scrollbarDom = ref(); const scrollbarDom = ref();
let isShowArrow = ref(false); const isShowArrow = ref(false);
const { isFullscreen, toggle } = useFullscreen(); const { isFullscreen, toggle } = useFullscreen();
const dynamicTagView = () => { const dynamicTagView = () => {
@ -127,7 +127,7 @@ function dynamicRouteTag(value: string, parentPath: string): void {
function concatPath(arr: object[], value: string, parentPath: string) { function concatPath(arr: object[], value: string, parentPath: string) {
if (!hasValue) { if (!hasValue) {
arr.forEach((arrItem: any) => { arr.forEach((arrItem: any) => {
let pathConcat = parentPath + arrItem.path; const pathConcat = parentPath + arrItem.path;
if (arrItem.path === value || pathConcat === value) { if (arrItem.path === value || pathConcat === value) {
useMultiTagsStoreHook().handleTags("push", { useMultiTagsStoreHook().handleTags("push", {
path: value, path: value,
@ -158,7 +158,7 @@ function onFresh() {
function deleteDynamicTag(obj: any, current: any, tag?: string) { function deleteDynamicTag(obj: any, current: any, tag?: string) {
// //
let delAliveRouteList = []; let delAliveRouteList = [];
let valueIndex: number = multiTags.value.findIndex((item: any) => { const valueIndex: number = multiTags.value.findIndex((item: any) => {
if (item.query) { if (item.query) {
if (item.path === obj.path) { if (item.path === obj.path) {
return item.query === obj.query; return item.query === obj.query;
@ -197,7 +197,7 @@ function deleteDynamicTag(obj: any, current: any, tag?: string) {
// //
spliceRoute(valueIndex, 1); spliceRoute(valueIndex, 1);
} }
let newRoute = useMultiTagsStoreHook().handleTags("slice"); const newRoute = useMultiTagsStoreHook().handleTags("slice");
if (current === route.path) { if (current === route.path) {
// //
tag tag
@ -337,8 +337,8 @@ function showMenuModel(
query: object = {}, query: object = {},
refresh = false refresh = false
) { ) {
let allRoute = multiTags.value; const allRoute = multiTags.value;
let routeLength = multiTags.value.length; const routeLength = multiTags.value.length;
let currentIndex = -1; let currentIndex = -1;
if (isEmpty(query)) { if (isEmpty(query)) {
currentIndex = allRoute.findIndex(v => v.path === currentPath); currentIndex = allRoute.findIndex(v => v.path === currentPath);

View File

@ -70,7 +70,7 @@ let isAutoCloseSidebar = true;
// //
emitter.on("resize", ({ detail }) => { emitter.on("resize", ({ detail }) => {
if (isMobile) return; if (isMobile) return;
let { width } = detail; const { width } = detail;
width <= 760 ? setTheme("vertical") : setTheme(useAppStoreHook().layout); width <= 760 ? setTheme("vertical") : setTheme(useAppStoreHook().layout);
/** width app-wrapper /** width app-wrapper
* 0 < width <= 760 隐藏侧边栏 * 0 < width <= 760 隐藏侧边栏

View File

@ -6,7 +6,7 @@ defineOptions({
name: "PermissionButton" name: "PermissionButton"
}); });
let elStyle = computed((): CSSProperties => { const elStyle = computed((): CSSProperties => {
return { return {
width: "85vw", width: "85vw",
justifyContent: "start" justifyContent: "start"

View File

@ -8,14 +8,14 @@ defineOptions({
name: "PermissionPage" name: "PermissionPage"
}); });
let elStyle = computed((): CSSProperties => { const elStyle = computed((): CSSProperties => {
return { return {
width: "85vw", width: "85vw",
justifyContent: "start" justifyContent: "start"
}; };
}); });
let username = ref(useUserStoreHook()?.username); const username = ref(useUserStoreHook()?.username);
const options = [ const options = [
{ {

View File

@ -29,8 +29,8 @@
"vite/client", "vite/client",
"element-plus/global", "element-plus/global",
"@pureadmin/table/volar", "@pureadmin/table/volar",
"unplugin-vue-define-options", "@pureadmin/descriptions/volar",
"@pureadmin/descriptions/volar" "unplugin-vue-macros/macros-global"
], ],
"typeRoots": ["./node_modules/@types/", "./types"] "typeRoots": ["./node_modules/@types/", "./types"]
}, },