diff --git a/vue-admin-wonderful-next/.env b/vue-admin-wonderful-next/.env index 4e22a92c..5bd9290d 100644 --- a/vue-admin-wonderful-next/.env +++ b/vue-admin-wonderful-next/.env @@ -1,5 +1,5 @@ # port 端口号 -VITE_PORT = 8080 +VITE_PORT = 9000 # open 运行 npm run dev 时自动打开浏览器 VITE_OPEN = false diff --git a/vue-admin-wonderful-next/build/utils.ts b/vue-admin-wonderful-next/build/utils.ts index 0e590bf5..be3bdd42 100644 --- a/vue-admin-wonderful-next/build/utils.ts +++ b/vue-admin-wonderful-next/build/utils.ts @@ -1,22 +1,23 @@ -import dotenv from 'dotenv'; +// vite 打包相关 +import dotenv from 'dotenv' export interface ViteEnv { - VITE_PORT: number; - VITE_OPEN: boolean; - VITE_PUBLIC_PATH: string; + VITE_PORT: number + VITE_OPEN: boolean + VITE_PUBLIC_PATH: string } export function loadEnv(): ViteEnv { - const env = process.env.NODE_ENV; - const ret: any = {}; + const env = process.env.NODE_ENV + const ret: any = {} const envList = [`.env.${env}.local`, `.env.${env}`, '.env.local', '.env', ,] - envList.forEach((e) => { dotenv.config({ path: e }) }); + envList.forEach((e) => { dotenv.config({ path: e }) }) for (const envName of Object.keys(process.env)) { - let realName = (process.env as any)[envName].replace(/\\n/g, '\n'); - realName = realName === 'true' ? true : realName === 'false' ? false : realName; - if (envName === 'VITE_PORT') realName = Number(realName); - if (envName === 'VITE_OPEN') realName = Boolean(realName); - ret[envName] = realName; - process.env[envName] = realName; + let realName = (process.env as any)[envName].replace(/\\n/g, '\n') + realName = realName === 'true' ? true : realName === 'false' ? false : realName + if (envName === 'VITE_PORT') realName = Number(realName) + if (envName === 'VITE_OPEN') realName = Boolean(realName) + ret[envName] = realName + process.env[envName] = realName } - return ret; + return ret } \ No newline at end of file diff --git a/vue-admin-wonderful-next/package.json b/vue-admin-wonderful-next/package.json index b85261d5..dbe136a1 100644 --- a/vue-admin-wonderful-next/package.json +++ b/vue-admin-wonderful-next/package.json @@ -6,15 +6,17 @@ "build": "vite build" }, "dependencies": { - "element-plus": "^v1.0.1-beta.14", + "element-plus": "^v1.0.1-beta.17", + "sortablejs": "^1.10.2", "vue": "^3.0.4", "vue-router": "^4.0.1" }, "devDependencies": { + "@types/sortablejs": "^1.10.6", "@vue/compiler-sfc": "^3.0.4", "sass": "^1.30.0", "sass-loader": "^10.1.0", "typescript": "^4.1.2", "vite": "^1.0.0-rc.13" } -} +} \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/App.vue b/vue-admin-wonderful-next/src/App.vue index 98240aef..de035a90 100644 --- a/vue-admin-wonderful-next/src/App.vue +++ b/vue-admin-wonderful-next/src/App.vue @@ -1,3 +1,16 @@ + + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/components/index.vue b/vue-admin-wonderful-next/src/components/index.vue deleted file mode 100644 index 3a0986e6..00000000 --- a/vue-admin-wonderful-next/src/components/index.vue +++ /dev/null @@ -1,3 +0,0 @@ - \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/router/index.ts b/vue-admin-wonderful-next/src/router/index.ts index 184de5b2..0d241923 100644 --- a/vue-admin-wonderful-next/src/router/index.ts +++ b/vue-admin-wonderful-next/src/router/index.ts @@ -7,14 +7,169 @@ const staticRoutes: Array = [ component: () => import('/@/views/layout/index.vue'), redirect: '/home', meta: { - title: '首页' + title: '首页', + index: 0 }, children: [{ path: '/home', name: 'home', component: () => import('/@/views/home/index.vue'), meta: { - title: '首页' + title: '首页', + index: 0 + } + }, + { + path: '/docs', + name: 'docs', + component: () => import('/@/views/docs/index.vue'), + meta: { + title: '文档', + index: 1 + } + }, + { + path: '/docs1', + name: 'docs1', + component: () => import('/@/views/docs copy 1/index.vue'), + meta: { + title: '文档1', + index: 2 + } + }, + { + path: '/docs2', + name: 'docs2', + component: () => import('/@/views/docs copy 2/index.vue'), + meta: { + title: '文档2', + index: 3 + } + }, + { + path: '/docs3', + name: 'docs3', + component: () => import('/@/views/docs copy 3/index.vue'), + meta: { + title: '文档3', + index: 4 + } + }, + { + path: '/docs4', + name: 'docs4', + component: () => import('/@/views/docs copy 4/index.vue'), + meta: { + title: '文档4', + index: 5 + } + }, + { + path: '/docs5', + name: 'docs5', + component: () => import('/@/views/docs copy 5/index.vue'), + meta: { + title: '文档5', + index: 6 + } + }, + { + path: '/docs6', + name: 'docs6', + component: () => import('/@/views/docs copy 6/index.vue'), + meta: { + title: '文档6', + index: 7 + } + }, + { + path: '/docs7', + name: 'docs7', + component: () => import('/@/views/docs copy 7/index.vue'), + meta: { + title: '文档7', + index: 8 + } + }, + { + path: '/docs8', + name: 'docs8', + component: () => import('/@/views/docs copy 8/index.vue'), + meta: { + title: '文档8', + index: 9 + } + }, + { + path: '/docs9', + name: 'docs9', + component: () => import('/@/views/docs copy 9/index.vue'), + meta: { + title: '文档9', + index: 10 + } + }, + { + path: '/docs10', + name: 'docs10', + component: () => import('/@/views/docs copy 10/index.vue'), + meta: { + title: '文档10', + index: 11 + } + }, + { + path: '/docs11', + name: 'docs11', + component: () => import('/@/views/docs copy 11/index.vue'), + meta: { + title: '文档11', + index: 12 + } + }, + { + path: '/docs12', + name: 'docs12', + component: () => import('/@/views/docs copy 12/index.vue'), + meta: { + title: '文档12', + index: 13 + } + }, + { + path: '/docs13', + name: 'docs13', + component: () => import('/@/views/docs copy 13/index.vue'), + meta: { + title: '文档13', + index: 14 + } + }, + { + path: '/docs14', + name: 'docs14', + component: () => import('/@/views/docs copy 14/index.vue'), + meta: { + title: '文档14', + index: 15 + } + }, + { + path: '/docs15', + name: 'docs15', + component: () => import('/@/views/docs copy 15/index.vue'), + meta: { + title: '文档15', + index: 16 + } + }, + { + path: '/docs16', + name: 'docs16', + component: () => import('/@/views/docs copy 16/index.vue'), + meta: { + title: '文档16', + index: 17 } }] }, @@ -26,9 +181,25 @@ const staticRoutes: Array = [ title: '登陆' } }, + { + path: '/404', + name: '404', + component: () => import('/@/views/error/404.vue'), + meta: { + title: '找不到此页面' + } + }, + { + path: '/401', + name: '401', + component: () => import('/@/views/error/401.vue'), + meta: { + title: '没有权限' + } + }, { path: '/:pathMatch(.*)', - redirect: '/' + redirect: '/404' } ] @@ -37,4 +208,8 @@ const router = createRouter({ routes: staticRoutes }) +// router.afterEach((to, from) => { + +// }) + export default router \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/theme/app.scss b/vue-admin-wonderful-next/src/theme/app.scss index 7df2cbe9..35d44d92 100644 --- a/vue-admin-wonderful-next/src/theme/app.scss +++ b/vue-admin-wonderful-next/src/theme/app.scss @@ -1,3 +1,5 @@ +/* 初始化样式 +------------------------------- */ * { margin: 0; padding: 0; @@ -9,20 +11,68 @@ body, #app { margin: 0; padding: 0; + width: 100%; height: 100%; font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, SimSun, sans-serif; font-weight: 400; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; + background-color: #f8f8f8; + font-size: 14px; } +/* 主布局样式 +------------------------------- */ +.layout-container { + width: 100%; + height: 100%; + .el-aside { + background: #29384d; + border-right: 1px solid rgb(230, 230, 230); + height: inherit; + } + .el-header { + box-shadow: 0 1px 4px rgb(0 21 41 / 8%); + padding: 0 !important; + } + .el-main { + padding: 0 !important; + overflow: unset !important; + } + .el-scrollbar { + width: 100%; + } + .layout-scrollbar { + @extend .el-scrollbar; + padding: 15px; + } + .el-scrollbar__view { + height: 100%; + display: flex; + flex-direction: column; + } +} + +/* 宽高 100% +------------------------------- */ +.w100 { + width: 100% !important; +} +.h100 { + height: 100% !important; +} + +/* 字体大小全局样式 +------------------------------- */ @for $i from 10 through 32 { .font#{$i} { font-size: #{$i}px !important; } } +/* 外边距、内边距全局样式 +------------------------------- */ @for $i from 5 through 20 { .mt#{$i} { margin-top: #{$i}px !important; diff --git a/vue-admin-wonderful-next/src/theme/common/transition.scss b/vue-admin-wonderful-next/src/theme/common/transition.scss index 12e07126..c62dba72 100644 --- a/vue-admin-wonderful-next/src/theme/common/transition.scss +++ b/vue-admin-wonderful-next/src/theme/common/transition.scss @@ -1,41 +1,37 @@ -/* 定义重用混入指令 -------------------------------- */ -@mixin transition($second: 0.3) { - transition: all #{$second}s; -} - -@mixin translateX($opacity: 0, $offsetX: 0) { - opacity: $opacity; - transform: translateX(#{$offsetX}px); -} - /* 页面切换动画 ------------------------------- */ -.fade-transform-enter-active, -.fade-transform-leave-active { +.slide-right-enter-active, +.slide-right-leave-active, +.slide-left-enter-active, +.slide-left-leave-active { will-change: transform; - @include transition(); + transition: all 0.3s ease; + position: absolute; } -.fade-transform-enter { - @include translateX(-30); +.slide-right-enter-from { + opacity: 0; + transform: translateX(-30px); } -.fade-transform-leave-active { - @include translateX(30); +.slide-right-leave-to { + opacity: 0; + transform: translateX(30px); +} +.slide-left-enter-from { + @extend .slide-right-leave-to; +} +.slide-left-leave-to { + @extend .slide-right-enter-from; } /* Breadcrumb 面包屑过渡动画 ------------------------------- */ .breadcrumb-enter-active, .breadcrumb-leave-active { - @include transition(); -} -.breadcrumb-enter, -.breadcrumb-leave-active { - @include translateX(20); -} -.breadcrumb-move { - @include transition(); -} -.breadcrumb-leave-active { + transition: all 0.3s ease; position: absolute; } +.breadcrumb-enter-from, +.breadcrumb-leave-to { + opacity: 0; + transform: translateX(20px); +} diff --git a/vue-admin-wonderful-next/src/theme/element.scss b/vue-admin-wonderful-next/src/theme/element.scss index 16f1ed62..9dc0361b 100644 --- a/vue-admin-wonderful-next/src/theme/element.scss +++ b/vue-admin-wonderful-next/src/theme/element.scss @@ -666,23 +666,31 @@ /* NavMenu 导航菜单 ------------------------------- */ -// horizontal -.el-menu--horizontal > .el-menu-item.is-active, -.el-menu--horizontal > .el-submenu.is-active .el-submenu__title { +.el-menu { + border-right: none !important; +} +.el-menu-item.is-active, +.el-submenu.is-active .el-submenu__title { border-bottom-color: set-color(primary); color: set-color(primary); } -.el-menu--horizontal .el-menu-item:not(.is-disabled):focus, -.el-menu--horizontal .el-menu-item:not(.is-disabled):hover, -.el-menu--horizontal > .el-submenu:focus .el-submenu__title, -.el-menu--horizontal > .el-submenu:hover .el-submenu__title, -.el-menu--horizontal .el-menu .el-menu-item.is-active, -.el-menu--horizontal .el-menu .el-submenu.is-active > .el-submenu__title { +.el-menu-item:not(.is-disabled):focus, +.el-menu-item:not(.is-disabled):hover, +.el-submenu:focus .el-submenu__title, +.el-submenu:hover .el-submenu__title, +.el-menu .el-menu-item.is-active, +.el-menu .el-submenu.is-active > .el-submenu__title { color: set-color(primary); } +.el-menu-item a, +.el-menu-item a:hover { + color: inherit; + text-decoration: none; +} // default .el-menu-item.is-active { color: set-color(primary); + background-color: set-color(primary-light-9); } .el-menu-item:focus, .el-menu-item:hover, @@ -711,6 +719,11 @@ .el-breadcrumb__inner.is-link:hover { color: set-color(primary); } +.el-breadcrumb__inner a, +.el-breadcrumb__inner.is-link { + color: #303133; + font-weight: normal; +} /* Dropdown 下拉菜单 ------------------------------- */ @@ -797,3 +810,13 @@ background-color: set-color(primary-light-9); } } + +/* scrollbar +------------------------------- */ +.el-scrollbar__wrap { + overflow-x: hidden !important; + max-height: 100%; /*防止页面切换时,滚动条高度不变的问题(滚动条高度非滚动条滚动高度)*/ +} +.el-select-dropdown .el-scrollbar__wrap { + overflow-x: scroll !important; +} diff --git a/vue-admin-wonderful-next/src/theme/index.scss b/vue-admin-wonderful-next/src/theme/index.scss index 66fb6267..e2a860d3 100644 --- a/vue-admin-wonderful-next/src/theme/index.scss +++ b/vue-admin-wonderful-next/src/theme/index.scss @@ -1,4 +1,4 @@ @import './app.scss'; @import './base.scss'; @import './element.scss'; -@import './media.scss'; +@import './media/media.scss'; diff --git a/vue-admin-wonderful-next/src/theme/media.scss b/vue-admin-wonderful-next/src/theme/media.scss deleted file mode 100644 index b41428bd..00000000 --- a/vue-admin-wonderful-next/src/theme/media.scss +++ /dev/null @@ -1 +0,0 @@ -// 540/720/960/1140 \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/theme/media/error.scss b/vue-admin-wonderful-next/src/theme/media/error.scss new file mode 100644 index 00000000..b0b32bba --- /dev/null +++ b/vue-admin-wonderful-next/src/theme/media/error.scss @@ -0,0 +1,35 @@ +@import './index.scss'; + +/* 页面宽度小于768px +------------------------------- */ +@media screen and (max-width: $sm) { + .error { + .error-flex { + flex-direction: column-reverse !important; + height: auto !important; + width: 100% !important; + } + .right, + .left { + flex: unset !important; + display: flex !important; + } + .left-item { + margin: auto !important; + } + .right img { + max-width: 450px !important; + @extend .left-item; + } + } +} + +/* 页面宽度大于768px小于992px +------------------------------- */ +@media screen and (min-width: $sm) and (max-width: $md) { + .error { + .error-flex { + padding-left: 30px !important; + } + } +} diff --git a/vue-admin-wonderful-next/src/theme/media/index.scss b/vue-admin-wonderful-next/src/theme/media/index.scss new file mode 100644 index 00000000..320affb5 --- /dev/null +++ b/vue-admin-wonderful-next/src/theme/media/index.scss @@ -0,0 +1,12 @@ +/* 栅格布局(媒体查询变量) +* $xs <768px 响应式栅格 +* $sm ≥768px 响应式栅格 +* $md ≥992px 响应式栅格 +* $lg ≥1200px 响应式栅格 +* $xl ≥1920px 响应式栅格 +------------------------------- */ +$xs: 576px; +$sm: 768px; +$md: 992px; +$lg: 1200px; +$xl: 1920px; diff --git a/vue-admin-wonderful-next/src/theme/media/login.scss b/vue-admin-wonderful-next/src/theme/media/login.scss new file mode 100644 index 00000000..68cdcc76 --- /dev/null +++ b/vue-admin-wonderful-next/src/theme/media/login.scss @@ -0,0 +1,21 @@ +@import './index.scss'; + +/* 页面宽度小于576px +------------------------------- */ +@media screen and (max-width: $xs) { + .login-container { + .login-content { + width: 90% !important; + padding: 20px 0 !important; + } + .login-content-form-btn { + width: 100% !important; + padding: 12px 0 !important; + } + .login-copyright { + .login-copyright-msg { + white-space: unset !important; + } + } + } +} diff --git a/vue-admin-wonderful-next/src/theme/media/media.scss b/vue-admin-wonderful-next/src/theme/media/media.scss new file mode 100644 index 00000000..72bc17b1 --- /dev/null +++ b/vue-admin-wonderful-next/src/theme/media/media.scss @@ -0,0 +1,2 @@ +@import './login.scss'; +@import './error.scss'; diff --git a/vue-admin-wonderful-next/src/theme/media/template.scss b/vue-admin-wonderful-next/src/theme/media/template.scss new file mode 100644 index 00000000..492737bc --- /dev/null +++ b/vue-admin-wonderful-next/src/theme/media/template.scss @@ -0,0 +1,26 @@ +@import './index.scss'; + +/* 页面宽度小于576px +------------------------------- */ +@media screen and (max-width: $xs) { +} + +/* 页面宽度小于768px +------------------------------- */ +@media screen and (max-width: $sm) { +} + +/* 页面宽度大于768px小于992px +------------------------------- */ +@media screen and (min-width: $sm) and (max-width: $md) { +} + +/* 页面宽度大于992px小于1200px +------------------------------- */ +@media screen and (min-width: $md) and (max-width: $lg) { +} + +/* 页面宽度大于1920px +------------------------------- */ +@media screen and (min-width: $xl) { +} diff --git a/vue-admin-wonderful-next/src/utils/formatTime.ts b/vue-admin-wonderful-next/src/utils/formatTime.ts index 6e59fa07..34ce91c7 100644 --- a/vue-admin-wonderful-next/src/utils/formatTime.ts +++ b/vue-admin-wonderful-next/src/utils/formatTime.ts @@ -78,26 +78,26 @@ export function formatPast(param: any, format: string = "YYYY-mm-dd") { time = Number.parseInt(`${time - t}`) if (time < 10000) { // 10秒内 - return "刚刚"; + return "刚刚" } else if (time < 60000 && time >= 10000) { // 超过10秒少于1分钟内 - s = Math.floor(time / 1000); - return `${s}秒前`; + s = Math.floor(time / 1000) + return `${s}秒前` } else if (time < 3600000 && time >= 60000) { // 超过1分钟少于1小时 - s = Math.floor(time / 60000); - return `${s}分钟前`; + s = Math.floor(time / 60000) + return `${s}分钟前` } else if (time < 86400000 && time >= 3600000) { // 超过1小时少于24小时 - s = Math.floor(time / 3600000); - return `${s}小时前`; + s = Math.floor(time / 3600000) + return `${s}小时前` } else if (time < 259200000 && time >= 86400000) { // 超过1天少于3天内 - s = Math.floor(time / 86400000); - return `${s}天前`; + s = Math.floor(time / 86400000) + return `${s}天前` } else { // 超过3天 - let date = typeof param === "string" || "object" ? new Date(param) : param; + let date = typeof param === "string" || "object" ? new Date(param) : param return formatDate(date, format); } } diff --git a/vue-admin-wonderful-next/src/utils/setIconfont.ts b/vue-admin-wonderful-next/src/utils/setIconfont.ts new file mode 100644 index 00000000..e90234ec --- /dev/null +++ b/vue-admin-wonderful-next/src/utils/setIconfont.ts @@ -0,0 +1,10 @@ +// 动态设置字体图标 +export function setIconfont(url: Array = []) { + if (url.length <= 0) return false + url.map(v => { + let link = document.createElement('link') + link.rel = 'stylesheet' + link.href = v + document.getElementsByTagName('head')[0].appendChild(link) + }) +} \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/utils/storage.ts b/vue-admin-wonderful-next/src/utils/storage.ts new file mode 100644 index 00000000..cb76c811 --- /dev/null +++ b/vue-admin-wonderful-next/src/utils/storage.ts @@ -0,0 +1,37 @@ +// 1. localStorage +// 设置永久缓存 +export function setLocal(key: string, val: any) { + window.localStorage.setItem(key, JSON.stringify(val)) +} +// 获取永久缓存 +export function getLocal(key: string) { + let json: any = window.localStorage.getItem(key) + return JSON.parse(json) +} +// 移除永久缓存 +export function removeLocal(key: string) { + window.localStorage.removeItem(key) +} +// 移除全部永久缓存 +export function clearLocal() { + window.localStorage.clear() +} + +// 2. sessionStorage +// 设置临时缓存 +export function setSession(key: string, val: any) { + window.sessionStorage.setItem(key, JSON.stringify(val)) +} +// 获取临时缓存 +export function getSession(key: string) { + let json: any = window.sessionStorage.getItem(key) + return JSON.parse(json) +} +// 移除临时缓存 +export function removeSession(key: string) { + window.sessionStorage.removeItem(key) +} +// 移除全部临时缓存 +export function clearSession() { + window.sessionStorage.clear() +} diff --git a/vue-admin-wonderful-next/src/utils/theme.ts b/vue-admin-wonderful-next/src/utils/theme.ts index 89e544a8..24a4b22e 100644 --- a/vue-admin-wonderful-next/src/utils/theme.ts +++ b/vue-admin-wonderful-next/src/utils/theme.ts @@ -1,39 +1,39 @@ -import { ElMessage } from 'element-plus'; +import { ElMessage } from 'element-plus' // hex颜色转rgb颜色 export function hexToRgb(str: any) { - let hexs: any = ''; - let reg = /^\#?[0-9A-F]{6}$/; - if (!reg.test(str)) return ElMessage({ type: 'warning', message: "输入错误的hex" }); - str = str.replace("#", ""); - hexs = str.match(/../g); - for (let i = 0; i < 3; i++) hexs[i] = parseInt(hexs[i], 16); - return hexs; + let hexs: any = '' + let reg = /^\#?[0-9A-F]{6}$/ + if (!reg.test(str)) return ElMessage({ type: 'warning', message: "输入错误的hex" }) + str = str.replace("#", "") + hexs = str.match(/../g) + for (let i = 0; i < 3; i++) hexs[i] = parseInt(hexs[i], 16) + return hexs } // rgb颜色转Hex颜色 export function rgbToHex(r: any, g: any, b: any) { - let reg = /^\d{1,3}$/; - if (!reg.test(r) || !reg.test(g) || !reg.test(b)) return ElMessage({ type: 'warning', message: "输入错误的rgb颜色值" }); - let hexs = [r.toString(16), g.toString(16), b.toString(16)]; - for (let i = 0; i < 3; i++) if (hexs[i].length == 1) hexs[i] = `0${hexs[i]}`; - return `#${hexs.join("")}`; + let reg = /^\d{1,3}$/ + if (!reg.test(r) || !reg.test(g) || !reg.test(b)) return ElMessage({ type: 'warning', message: "输入错误的rgb颜色值" }) + let hexs = [r.toString(16), g.toString(16), b.toString(16)] + for (let i = 0; i < 3; i++) if (hexs[i].length == 1) hexs[i] = `0${hexs[i]}` + return `#${hexs.join("")}` } // 加深颜色值,level为加深的程度,限0-1之间 export function getDarkColor(color: any, level: number) { - let reg = /^\#?[0-9A-F]{6}$/; - if (!reg.test(color)) return ElMessage({ type: 'warning', message: "输入错误的hex颜色值" }); - let rgb = hexToRgb(color); - for (let i = 0; i < 3; i++) rgb[i] = Math.floor(rgb[i] * (1 - level)); - return rgbToHex(rgb[0], rgb[1], rgb[2]); + let reg = /^\#?[0-9A-F]{6}$/ + if (!reg.test(color)) return ElMessage({ type: 'warning', message: "输入错误的hex颜色值" }) + let rgb = hexToRgb(color) + for (let i = 0; i < 3; i++) rgb[i] = Math.floor(rgb[i] * (1 - level)) + return rgbToHex(rgb[0], rgb[1], rgb[2]) } // 变浅颜色值,level为加深的程度,限0-1之间 export function getLightColor(color: any, level: number) { - let reg = /^\#?[0-9A-F]{6}$/; - if (!reg.test(color)) return ElMessage({ type: 'warning', message: "输入错误的hex颜色值" }); - let rgb = hexToRgb(color); - for (let i = 0; i < 3; i++) rgb[i] = Math.floor((255 - rgb[i]) * level + rgb[i]); - return rgbToHex(rgb[0], rgb[1], rgb[2]); + let reg = /^\#?[0-9A-F]{6}$/ + if (!reg.test(color)) return ElMessage({ type: 'warning', message: "输入错误的hex颜色值" }) + let rgb = hexToRgb(color) + for (let i = 0; i < 3; i++) rgb[i] = Math.floor((255 - rgb[i]) * level + rgb[i]) + return rgbToHex(rgb[0], rgb[1], rgb[2]) } \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/utils/themeConfig.ts b/vue-admin-wonderful-next/src/utils/themeConfig.ts new file mode 100644 index 00000000..e69de29b diff --git a/vue-admin-wonderful-next/src/utils/wartermark.ts b/vue-admin-wonderful-next/src/utils/wartermark.ts index 5b5ec77c..d7cc762c 100644 --- a/vue-admin-wonderful-next/src/utils/wartermark.ts +++ b/vue-admin-wonderful-next/src/utils/wartermark.ts @@ -1,43 +1,43 @@ // 页面添加水印效果 const setWatermark = (str: any) => { - const id = "1.23452384164.123412416"; - if (document.getElementById(id) !== null) document.body.removeChild(document.getElementById(id) as any); - const can = document.createElement("canvas"); - can.width = 250; - can.height = 180; - const cans: any = can.getContext("2d"); - cans.rotate((-20 * Math.PI) / 180); - cans.font = "12px Vedana"; - cans.fillStyle = "rgba(200, 200, 200, 0.30)"; - cans.textAlign = "center"; - cans.textBaseline = "Middle"; - cans.fillText(str, can.width / 10, can.height / 2); - const div = document.createElement("div"); - div.id = id; - div.style.pointerEvents = "none"; - div.style.top = "35px"; - div.style.left = "0px"; - div.style.position = "fixed"; - div.style.zIndex = "100000"; - div.style.width = document.documentElement.clientWidth + "px"; - div.style.height = document.documentElement.clientHeight + "px"; - div.style.background = `url(${can.toDataURL("image/png")}) left top repeat`; - document.body.appendChild(div); - return id; + const id = "1.23452384164.123412416" + if (document.getElementById(id) !== null) document.body.removeChild(document.getElementById(id) as any) + const can = document.createElement("canvas") + can.width = 250 + can.height = 180 + const cans: any = can.getContext("2d") + cans.rotate((-20 * Math.PI) / 180) + cans.font = "12px Vedana" + cans.fillStyle = "rgba(200, 200, 200, 0.30)" + cans.textAlign = "center" + cans.textBaseline = "Middle" + cans.fillText(str, can.width / 10, can.height / 2) + const div = document.createElement("div") + div.id = id + div.style.pointerEvents = "none" + div.style.top = "35px" + div.style.left = "0px" + div.style.position = "fixed" + div.style.zIndex = "100000" + div.style.width = document.documentElement.clientWidth + "px" + div.style.height = document.documentElement.clientHeight + "px" + div.style.background = `url(${can.toDataURL("image/png")}) left top repeat` + document.body.appendChild(div) + return id }; const watermark = { // 设置水印 set: (str: any) => { - let id = setWatermark(str); - if (document.getElementById(id) === null) id = setWatermark(str); - window.onresize = () => { setWatermark(str) }; + let id = setWatermark(str) + if (document.getElementById(id) === null) id = setWatermark(str) + window.onresize = () => { setWatermark(str) } }, // 删除水印 del: () => { - let id = '1.23452384164.123412416'; - if (document.getElementById(id) !== null) document.body.removeChild(document.getElementById(id) as any); + let id = '1.23452384164.123412416' + if (document.getElementById(id) !== null) document.body.removeChild(document.getElementById(id) as any) } } -export default watermark; \ No newline at end of file +export default watermark \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/docs copy 1/index.vue b/vue-admin-wonderful-next/src/views/docs copy 1/index.vue new file mode 100644 index 00000000..822eeafe --- /dev/null +++ b/vue-admin-wonderful-next/src/views/docs copy 1/index.vue @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/docs copy 10/index.vue b/vue-admin-wonderful-next/src/views/docs copy 10/index.vue new file mode 100644 index 00000000..822eeafe --- /dev/null +++ b/vue-admin-wonderful-next/src/views/docs copy 10/index.vue @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/docs copy 11/index.vue b/vue-admin-wonderful-next/src/views/docs copy 11/index.vue new file mode 100644 index 00000000..822eeafe --- /dev/null +++ b/vue-admin-wonderful-next/src/views/docs copy 11/index.vue @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/docs copy 12/index.vue b/vue-admin-wonderful-next/src/views/docs copy 12/index.vue new file mode 100644 index 00000000..822eeafe --- /dev/null +++ b/vue-admin-wonderful-next/src/views/docs copy 12/index.vue @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/docs copy 13/index.vue b/vue-admin-wonderful-next/src/views/docs copy 13/index.vue new file mode 100644 index 00000000..822eeafe --- /dev/null +++ b/vue-admin-wonderful-next/src/views/docs copy 13/index.vue @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/docs copy 14/index.vue b/vue-admin-wonderful-next/src/views/docs copy 14/index.vue new file mode 100644 index 00000000..822eeafe --- /dev/null +++ b/vue-admin-wonderful-next/src/views/docs copy 14/index.vue @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/docs copy 15/index.vue b/vue-admin-wonderful-next/src/views/docs copy 15/index.vue new file mode 100644 index 00000000..822eeafe --- /dev/null +++ b/vue-admin-wonderful-next/src/views/docs copy 15/index.vue @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/docs copy 16/index.vue b/vue-admin-wonderful-next/src/views/docs copy 16/index.vue new file mode 100644 index 00000000..822eeafe --- /dev/null +++ b/vue-admin-wonderful-next/src/views/docs copy 16/index.vue @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/docs copy 2/index.vue b/vue-admin-wonderful-next/src/views/docs copy 2/index.vue new file mode 100644 index 00000000..822eeafe --- /dev/null +++ b/vue-admin-wonderful-next/src/views/docs copy 2/index.vue @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/docs copy 3/index.vue b/vue-admin-wonderful-next/src/views/docs copy 3/index.vue new file mode 100644 index 00000000..822eeafe --- /dev/null +++ b/vue-admin-wonderful-next/src/views/docs copy 3/index.vue @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/docs copy 4/index.vue b/vue-admin-wonderful-next/src/views/docs copy 4/index.vue new file mode 100644 index 00000000..822eeafe --- /dev/null +++ b/vue-admin-wonderful-next/src/views/docs copy 4/index.vue @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/docs copy 5/index.vue b/vue-admin-wonderful-next/src/views/docs copy 5/index.vue new file mode 100644 index 00000000..822eeafe --- /dev/null +++ b/vue-admin-wonderful-next/src/views/docs copy 5/index.vue @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/docs copy 6/index.vue b/vue-admin-wonderful-next/src/views/docs copy 6/index.vue new file mode 100644 index 00000000..822eeafe --- /dev/null +++ b/vue-admin-wonderful-next/src/views/docs copy 6/index.vue @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/docs copy 7/index.vue b/vue-admin-wonderful-next/src/views/docs copy 7/index.vue new file mode 100644 index 00000000..822eeafe --- /dev/null +++ b/vue-admin-wonderful-next/src/views/docs copy 7/index.vue @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/docs copy 8/index.vue b/vue-admin-wonderful-next/src/views/docs copy 8/index.vue new file mode 100644 index 00000000..822eeafe --- /dev/null +++ b/vue-admin-wonderful-next/src/views/docs copy 8/index.vue @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/docs copy 9/index.vue b/vue-admin-wonderful-next/src/views/docs copy 9/index.vue new file mode 100644 index 00000000..822eeafe --- /dev/null +++ b/vue-admin-wonderful-next/src/views/docs copy 9/index.vue @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/docs/index.vue b/vue-admin-wonderful-next/src/views/docs/index.vue new file mode 100644 index 00000000..822eeafe --- /dev/null +++ b/vue-admin-wonderful-next/src/views/docs/index.vue @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/error/401.vue b/vue-admin-wonderful-next/src/views/error/401.vue new file mode 100644 index 00000000..5d526294 --- /dev/null +++ b/vue-admin-wonderful-next/src/views/error/401.vue @@ -0,0 +1,113 @@ + + + + + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/error/404.vue b/vue-admin-wonderful-next/src/views/error/404.vue new file mode 100644 index 00000000..3ca4efa3 --- /dev/null +++ b/vue-admin-wonderful-next/src/views/error/404.vue @@ -0,0 +1,111 @@ + + + + + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/home/index.vue b/vue-admin-wonderful-next/src/views/home/index.vue index 1843eded..6fb071de 100644 --- a/vue-admin-wonderful-next/src/views/home/index.vue +++ b/vue-admin-wonderful-next/src/views/home/index.vue @@ -1,5 +1,85 @@ \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/layout/component/header.vue b/vue-admin-wonderful-next/src/views/layout/component/header.vue new file mode 100644 index 00000000..370f58fe --- /dev/null +++ b/vue-admin-wonderful-next/src/views/layout/component/header.vue @@ -0,0 +1,13 @@ + + + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/layout/component/main.vue b/vue-admin-wonderful-next/src/views/layout/component/main.vue new file mode 100644 index 00000000..9993bb33 --- /dev/null +++ b/vue-admin-wonderful-next/src/views/layout/component/main.vue @@ -0,0 +1,35 @@ + + + diff --git a/vue-admin-wonderful-next/src/views/layout/fashion.vue b/vue-admin-wonderful-next/src/views/layout/fashion.vue new file mode 100644 index 00000000..38812163 --- /dev/null +++ b/vue-admin-wonderful-next/src/views/layout/fashion.vue @@ -0,0 +1,21 @@ + + + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/layout/index.vue b/vue-admin-wonderful-next/src/views/layout/index.vue index 7337be95..2ddcb5af 100644 --- a/vue-admin-wonderful-next/src/views/layout/index.vue +++ b/vue-admin-wonderful-next/src/views/layout/index.vue @@ -1,10 +1,11 @@ \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/layout/logo/index.vue b/vue-admin-wonderful-next/src/views/layout/logo/index.vue new file mode 100644 index 00000000..8130e472 --- /dev/null +++ b/vue-admin-wonderful-next/src/views/layout/logo/index.vue @@ -0,0 +1,9 @@ + + + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/layout/navBars/breadcrumb/breadcrumb.vue b/vue-admin-wonderful-next/src/views/layout/navBars/breadcrumb/breadcrumb.vue new file mode 100644 index 00000000..325912a4 --- /dev/null +++ b/vue-admin-wonderful-next/src/views/layout/navBars/breadcrumb/breadcrumb.vue @@ -0,0 +1,63 @@ + + + + + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/layout/navBars/breadcrumb/index.vue b/vue-admin-wonderful-next/src/views/layout/navBars/breadcrumb/index.vue new file mode 100644 index 00000000..31af29fd --- /dev/null +++ b/vue-admin-wonderful-next/src/views/layout/navBars/breadcrumb/index.vue @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/layout/navBars/breadcrumb/seting.vue b/vue-admin-wonderful-next/src/views/layout/navBars/breadcrumb/seting.vue new file mode 100644 index 00000000..88596f70 --- /dev/null +++ b/vue-admin-wonderful-next/src/views/layout/navBars/breadcrumb/seting.vue @@ -0,0 +1,9 @@ + + + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/layout/navBars/breadcrumb/user.vue b/vue-admin-wonderful-next/src/views/layout/navBars/breadcrumb/user.vue new file mode 100644 index 00000000..5599d214 --- /dev/null +++ b/vue-admin-wonderful-next/src/views/layout/navBars/breadcrumb/user.vue @@ -0,0 +1,60 @@ + + + + + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/layout/navBars/index.vue b/vue-admin-wonderful-next/src/views/layout/navBars/index.vue new file mode 100644 index 00000000..76942b8f --- /dev/null +++ b/vue-admin-wonderful-next/src/views/layout/navBars/index.vue @@ -0,0 +1,24 @@ + + + + + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/layout/navBars/tagsView/contextmenu.vue b/vue-admin-wonderful-next/src/views/layout/navBars/tagsView/contextmenu.vue new file mode 100644 index 00000000..bb287104 --- /dev/null +++ b/vue-admin-wonderful-next/src/views/layout/navBars/tagsView/contextmenu.vue @@ -0,0 +1,79 @@ + + + + + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/layout/navBars/tagsView/scroll.vue b/vue-admin-wonderful-next/src/views/layout/navBars/tagsView/scroll.vue new file mode 100644 index 00000000..4388ca89 --- /dev/null +++ b/vue-admin-wonderful-next/src/views/layout/navBars/tagsView/scroll.vue @@ -0,0 +1,70 @@ + + + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/layout/navBars/tagsView/tagsView.vue b/vue-admin-wonderful-next/src/views/layout/navBars/tagsView/tagsView.vue new file mode 100644 index 00000000..a83ad647 --- /dev/null +++ b/vue-admin-wonderful-next/src/views/layout/navBars/tagsView/tagsView.vue @@ -0,0 +1,180 @@ + + + + + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/layout/navMenu/subItem.vue b/vue-admin-wonderful-next/src/views/layout/navMenu/subItem.vue new file mode 100644 index 00000000..7497a85a --- /dev/null +++ b/vue-admin-wonderful-next/src/views/layout/navMenu/subItem.vue @@ -0,0 +1,41 @@ + + + diff --git a/vue-admin-wonderful-next/src/views/layout/navMenu/vertical.vue b/vue-admin-wonderful-next/src/views/layout/navMenu/vertical.vue new file mode 100644 index 00000000..67151e29 --- /dev/null +++ b/vue-admin-wonderful-next/src/views/layout/navMenu/vertical.vue @@ -0,0 +1,52 @@ + + + diff --git a/vue-admin-wonderful-next/src/views/login/component/mobile.vue b/vue-admin-wonderful-next/src/views/login/component/mobile.vue index 50051e9f..ea3c1b92 100644 --- a/vue-admin-wonderful-next/src/views/login/component/mobile.vue +++ b/vue-admin-wonderful-next/src/views/login/component/mobile.vue @@ -12,7 +12,7 @@ v-model="ruleForm.code" clearable autocomplete="off"> - 获取验证码 + diff --git a/vue-admin-wonderful-next/src/views/login/index.vue b/vue-admin-wonderful-next/src/views/login/index.vue index f3b14e52..6f787d25 100644 --- a/vue-admin-wonderful-next/src/views/login/index.vue +++ b/vue-admin-wonderful-next/src/views/login/index.vue @@ -23,8 +23,8 @@ @@ -32,12 +32,11 @@