diff --git a/app.vue b/app.vue index f129068..05c4dc7 100644 --- a/app.vue +++ b/app.vue @@ -1,6 +1,7 @@ + - diff --git a/assets/css/Ni.css b/assets/css/Ni.css new file mode 100644 index 0000000..d302faa --- /dev/null +++ b/assets/css/Ni.css @@ -0,0 +1,114 @@ +/*宽高比*/ +.a11 { + aspect-ratio: 1; +} + +/*全居中*/ +.allCenter { + display: flex; + justify-content: center; + align-items: center; +} + +/*手指*/ +.point { + cursor: pointer; +} + +:root { + /*遮罩层背景色*/ + --Ni-maskLayer-background-color: rgba(0, 0, 0, 0.2); + /*圆角边框*/ + --Ni-border-radius-T0: 1rem; + --Ni-border-radius-T1: .5rem; + --Ni-border-radius-T2: .35rem; + --Ni-border-radius-T3: .2rem; + --Ni-border-radius: var(--Ni-border-radius-T3); + /*边框阴影*/ + --Ni-box-shadow: 0 1px 2px -2px rgba(0, 0, 0, .08), 0 3px 6px 0 rgba(0, 0, 0, .06), 0 5px 12px 4px rgba(0, 0, 0, .04); + --Ni-white: #fefefe; + /*内容背景颜色*/ + --Ni-content-bg-color: var(--Ni-white); + /*内容内边距*/ + --Ni-content-padding: .5rem .9rem; + + /*主题色*/ + --Ni-theme-color-T0: #37352f; + --Ni-theme-color-T1: #5f5e5b; + --Ni-theme-color-T2: #91918e; + --Ni-theme-color-T3: #e8e8e7; + --Ni-theme-color-T4: #EFEFED; + --Ni-theme-color-T0-10: #37352f11; + --Ni-theme-color-T0-80: #37352f88; + --Ni-theme-color-T0-a0: #37352faa; + --Ni-theme-color-T0-c0: #37352fcc; + --Ni-theme-color: var(--Ni-theme-color-T0); + + + + + + /*按钮的颜色*/ + --Ni-button-border-radius: var(--Ni-border-radius-T3); + --Ni-button-height: 2.4rem; + --Ni-button-line-height: 2rem; + --Ni-button-padding: 0 .8rem; + /*禁用加透明*/ + --Ni-button-disable-opacity: 0.5;/*设置透明度*/ + --Ni-button-color: #fefefe; + /*浅色disable*/ + --Ni-button-bg-disable-light: #2E333812; + /*半透明 default-hover-click*/ + --Ni-button-bg-halfTransparent-default: rgba(46, 51, 56, 0.05); + --Ni-button-bg-halfTransparent-hover: rgba(46, 51, 56, 0.09); + --Ni-button-bg-halfTransparent-click: rgba(46, 51, 56, 0.13); + /*default*/ + --Ni-M-A: 1rem; + /*tertiary*/ + + /*primary*/ + --Ni-button-primary-bg-default: #5f5e5b; + --Ni-button-primary-bg-hover: #91918e; + --Ni-button-primary-bg-click: #37352f; + /*浅色*/ + --Ni-button-primary-bg-default-light: #5f5e5b29;/*29-16*/ + --Ni-button-primary-bg-hover-light: #91918e38;/*38-22*/ + --Ni-button-primary-bg-click-light: #37352f47;/*47-28*/ + + /*info*/ + --Ni-button-info-bg-default: #2080f0; + --Ni-button-info-bg-hover: #4098fc; + --Ni-button-info-bg-click: #1060c9; + /*浅色*/ + --Ni-button-info-bg-default-light: rgba(32, 128, 240, 0.16);/*29-16*/ + --Ni-button-info-bg-hover-light: rgba(32, 128, 240, 0.22);/*38-22*/ + --Ni-button-info-bg-click-light: rgba(32, 128, 240, 0.28);/*47-28*/ + + /*success*/ + --Ni-button-success-bg-default: #18a058; + --Ni-button-success-bg-hover: #36ad6a; + --Ni-button-success-bg-click: #0c7a43; + /*浅色*/ + --Ni-button-success-bg-default-light: rgba(24, 160, 88, 0.16);/*29-16*/ + --Ni-button-success-bg-hover-light: rgba(24, 160, 88, 0.22);/*38-22*/ + --Ni-button-success-bg-click-light: rgba(24, 160, 88, 0.28);/*47-28*/ + + /*warning*/ + --Ni-button-warning-bg-default: #f0a020; + --Ni-button-warning-bg-hover: #fcb040; + --Ni-button-warning-bg-click: #c97c10; + /*浅色*/ + --Ni-button-warning-bg-default-light: rgba(240, 160, 32, 0.16);/*29-16*/ + --Ni-button-warning-bg-hover-light: rgba(240, 160, 32, 0.22);/*38-22*/ + --Ni-button-warning-bg-click-light: rgba(240, 160, 32, 0.28);/*47-28*/ + + /*error*/ + --Ni-button-error-bg-default: #d03050; + --Ni-button-error-bg-hover:#de576d; + --Ni-button-error-bg-click: #ab1f3f; + /*浅色*/ + --Ni-button-error-bg-default-light: rgba(208, 48, 80, 0.16);/*29-16*/ + --Ni-button-error-bg-hover-light: rgba(208, 48, 80, 0.22);/*38-22*/ + --Ni-button-error-bg-click-light: rgba(208, 48, 80, 0.28);/*47-28*/ + +} diff --git a/assets/css/font.css b/assets/css/font.css index 9b89e04..798286e 100644 --- a/assets/css/font.css +++ b/assets/css/font.css @@ -92,11 +92,4 @@ U+F900-FAFF, /* 中日韩兼容表意文字 */ U+FE30-FE4F, /* 中日韩兼容形式 */ U+FF00-FFEF; /* 半角全角形式 */ -} - -:root{ - /* 应用字体 */ - html, body{ - font-family: 'LXGW WenKai', 'Huiwen-mincho', 'nice', 'TechnicLite', 'ChineseFont','EnglishFont', sans-serif; - } } \ No newline at end of file diff --git a/assets/css/style.css b/assets/css/style.css index ac28e5c..cf5a77b 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -5,7 +5,7 @@ html, body { margin: 0; padding: 0; overflow: hidden; - font-size: 16px; + font-size: 14px; } a { /*去除默认下划线*/ @@ -51,3 +51,7 @@ a { justify-content: center; align-items: center; } +/*手指*/ +.point{ + cursor: pointer; +} \ No newline at end of file diff --git a/components/Home/Header.vue b/components/Home/Header.vue index 2073ed0..24107e8 100644 --- a/components/Home/Header.vue +++ b/components/Home/Header.vue @@ -55,7 +55,7 @@ onMounted(() => { - \ No newline at end of file diff --git a/components/Ni/Button.vue b/components/Ni/Button.vue new file mode 100644 index 0000000..3b4a51e --- /dev/null +++ b/components/Ni/Button.vue @@ -0,0 +1,243 @@ + + + + + \ No newline at end of file diff --git a/components/Ni/Logo.vue b/components/Ni/Logo.vue new file mode 100644 index 0000000..ba85307 --- /dev/null +++ b/components/Ni/Logo.vue @@ -0,0 +1,95 @@ + + + + + diff --git a/components/Ni/Popup.vue b/components/Ni/Popup.vue new file mode 100644 index 0000000..44a5a34 --- /dev/null +++ b/components/Ni/Popup.vue @@ -0,0 +1,241 @@ + + + + + \ No newline at end of file diff --git a/components/ResizeContent.vue b/components/ResizeContent.vue index 36f768c..9d3c351 100644 --- a/components/ResizeContent.vue +++ b/components/ResizeContent.vue @@ -100,7 +100,6 @@ onBeforeUnmount(() => { .dargContainer{ position: absolute; width: 6px; - //background: red; height: calc(100% - 10px); right: 0; top: 0; diff --git a/nuxt.config.ts b/nuxt.config.ts index 705ca03..59bc395 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -8,7 +8,7 @@ import type {AddressInfo} from "node:net"; export default defineNuxtConfig({ compatibilityDate: '2024-11-01', devtools: { enabled: true }, - modules: ['@nuxt/eslint', /*'@nuxtjs/tailwindcss'*/], + modules: ['@nuxt/eslint'], devServer: { host: '0.0.0.0', port: 3000, @@ -22,6 +22,7 @@ export default defineNuxtConfig({ '~/assets/css/value.css', '~/assets/css/iconfont.css', '~/assets/css/transitions.css', + '~/assets/css/Ni.css', ], app:{ head:{ @@ -143,4 +144,4 @@ async function startBroswer(address: AddressInfo | string | null) { process.env.START = String(true) } } -} +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 4f051ab..1f02ab9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,8 @@ "nuxt": "^3.16.2", "redis": "^4.7.0", "vue": "^3.5.13", - "vue-router": "^4.5.0" + "vue-router": "^4.5.0", + "vueuc": "^0.4.64" }, "devDependencies": { "@nuxtjs/tailwindcss": "^6.13.2", @@ -543,6 +544,15 @@ "node": ">=0.1.90" } }, + "node_modules/@css-render/vue3-ssr": { + "version": "0.15.14", + "resolved": "https://registry.npmjs.org/@css-render/vue3-ssr/-/vue3-ssr-0.15.14.tgz", + "integrity": "sha512-//8027GSbxE9n3QlD73xFY6z4ZbHbvrOVB7AO6hsmrEzGbg+h2A09HboUyDgu+xsmj7JnvJD39Irt+2D0+iV8g==", + "license": "MIT", + "peerDependencies": { + "vue": "^3.0.11" + } + }, "node_modules/@csstools/selector-resolve-nested": { "version": "3.0.0", "resolved": "https://registry.npmmirror.com/@csstools/selector-resolve-nested/-/selector-resolve-nested-3.0.0.tgz", @@ -651,6 +661,12 @@ "tslib": "^2.4.0" } }, + "node_modules/@emotion/hash": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.8.0.tgz", + "integrity": "sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==", + "license": "MIT" + }, "node_modules/@es-joy/jsdoccomment": { "version": "0.49.0", "resolved": "https://registry.npmmirror.com/@es-joy/jsdoccomment/-/jsdoccomment-0.49.0.tgz", @@ -1985,6 +2001,12 @@ "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==", "license": "MIT" }, + "node_modules/@juggle/resize-observer": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@juggle/resize-observer/-/resize-observer-3.4.0.tgz", + "integrity": "sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==", + "license": "Apache-2.0" + }, "node_modules/@koa/router": { "version": "12.0.2", "resolved": "https://registry.npmmirror.com/@koa/router/-/router-12.0.2.tgz", @@ -7085,6 +7107,22 @@ "postcss": "^8.0.9" } }, + "node_modules/css-render": { + "version": "0.15.14", + "resolved": "https://registry.npmjs.org/css-render/-/css-render-0.15.14.tgz", + "integrity": "sha512-9nF4PdUle+5ta4W5SyZdLCCmFd37uVimSjg1evcTqKJCyvCEEj12WKzOSBNak6r4im4J4iYXKH1OWpUV5LBYFg==", + "license": "MIT", + "dependencies": { + "@emotion/hash": "~0.8.0", + "csstype": "~3.0.5" + } + }, + "node_modules/css-render/node_modules/csstype": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.11.tgz", + "integrity": "sha512-sa6P2wJ+CAbgyy4KFssIb/JNMLxFvKF1pCYCSXS8ZMuqZnMsrxqI2E5sPyoTpxoPU/gVZMzr2zjOfg8GIZOMsw==", + "license": "MIT" + }, "node_modules/css-select": { "version": "5.1.0", "resolved": "https://registry.npmmirror.com/css-select/-/css-select-5.1.0.tgz", @@ -8783,6 +8821,12 @@ "node": ">=0.8.x" } }, + "node_modules/evtd": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/evtd/-/evtd-0.2.4.tgz", + "integrity": "sha512-qaeGN5bx63s/AXgQo8gj6fBkxge+OoLddLniox5qtLAEY5HSnuSlISXVPxnSae1dWblvTh4/HoMIB+mbMsvZzw==", + "license": "MIT" + }, "node_modules/execa": { "version": "8.0.1", "resolved": "https://registry.npmmirror.com/execa/-/execa-8.0.1.tgz", @@ -10766,6 +10810,257 @@ "node": ">= 0.8.0" } }, + "node_modules/lightningcss": { + "version": "1.29.2", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.29.2.tgz", + "integrity": "sha512-6b6gd/RUXKaw5keVdSEtqFVdzWnU5jMxTUjA2bVcMNPLwSQ08Sv/UodBVtETLCn7k4S1Ibxwh7k68IwLZPgKaA==", + "license": "MPL-2.0", + "optional": true, + "peer": true, + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-darwin-arm64": "1.29.2", + "lightningcss-darwin-x64": "1.29.2", + "lightningcss-freebsd-x64": "1.29.2", + "lightningcss-linux-arm-gnueabihf": "1.29.2", + "lightningcss-linux-arm64-gnu": "1.29.2", + "lightningcss-linux-arm64-musl": "1.29.2", + "lightningcss-linux-x64-gnu": "1.29.2", + "lightningcss-linux-x64-musl": "1.29.2", + "lightningcss-win32-arm64-msvc": "1.29.2", + "lightningcss-win32-x64-msvc": "1.29.2" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.29.2", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.29.2.tgz", + "integrity": "sha512-cK/eMabSViKn/PG8U/a7aCorpeKLMlK0bQeNHmdb7qUnBkNPnL+oV5DjJUo0kqWsJUapZsM4jCfYItbqBDvlcA==", + "cpu": [ + "arm64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.29.2", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.29.2.tgz", + "integrity": "sha512-j5qYxamyQw4kDXX5hnnCKMf3mLlHvG44f24Qyi2965/Ycz829MYqjrVg2H8BidybHBp9kom4D7DR5VqCKDXS0w==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.29.2", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.29.2.tgz", + "integrity": "sha512-wDk7M2tM78Ii8ek9YjnY8MjV5f5JN2qNVO+/0BAGZRvXKtQrBC4/cn4ssQIpKIPP44YXw6gFdpUF+Ps+RGsCwg==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "peer": true, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.29.2", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.29.2.tgz", + "integrity": "sha512-IRUrOrAF2Z+KExdExe3Rz7NSTuuJ2HvCGlMKoquK5pjvo2JY4Rybr+NrKnq0U0hZnx5AnGsuFHjGnNT14w26sg==", + "cpu": [ + "arm" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.29.2", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.29.2.tgz", + "integrity": "sha512-KKCpOlmhdjvUTX/mBuaKemp0oeDIBBLFiU5Fnqxh1/DZ4JPZi4evEH7TKoSBFOSOV3J7iEmmBaw/8dpiUvRKlQ==", + "cpu": [ + "arm64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.29.2", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.29.2.tgz", + "integrity": "sha512-Q64eM1bPlOOUgxFmoPUefqzY1yV3ctFPE6d/Vt7WzLW4rKTv7MyYNky+FWxRpLkNASTnKQUaiMJ87zNODIrrKQ==", + "cpu": [ + "arm64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.29.2", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.29.2.tgz", + "integrity": "sha512-0v6idDCPG6epLXtBH/RPkHvYx74CVziHo6TMYga8O2EiQApnUPZsbR9nFNrg2cgBzk1AYqEd95TlrsL7nYABQg==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.29.2", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.29.2.tgz", + "integrity": "sha512-rMpz2yawkgGT8RULc5S4WiZopVMOFWjiItBT7aSfDX4NQav6M44rhn5hjtkKzB+wMTRlLLqxkeYEtQ3dd9696w==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.29.2", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.29.2.tgz", + "integrity": "sha512-nL7zRW6evGQqYVu/bKGK+zShyz8OVzsCotFgc7judbt6wnB2KbiKKJwBE4SGoDBQ1O94RjW4asrCjQL4i8Fhbw==", + "cpu": [ + "arm64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.29.2", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.29.2.tgz", + "integrity": "sha512-EdIUW3B2vLuHmv7urfzMI/h2fmlnOQBk1xlsDxkN1tCWKjNFjfLhGxYk8C8mzpSfr+A6jFFIi8fU6LbQGsRWjA==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss/node_modules/detect-libc": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.4.tgz", + "integrity": "sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==", + "license": "Apache-2.0", + "optional": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, "node_modules/lilconfig": { "version": "3.1.3", "resolved": "https://registry.npmmirror.com/lilconfig/-/lilconfig-3.1.3.tgz", @@ -14073,6 +14368,12 @@ "integrity": "sha512-6FtHJEvt+pVMIB9IBY+IcCJ6Z5f1iQnytgyfKMhDKgmzYG+TeH/wx1y3l27rshSbLiSanrR9ffZDrEsmjlQF2g==", "license": "MIT" }, + "node_modules/seemly": { + "version": "0.3.10", + "resolved": "https://registry.npmjs.org/seemly/-/seemly-0.3.10.tgz", + "integrity": "sha512-2+SMxtG1PcsL0uyhkumlOU6Qo9TAQ/WyH7tthnPIOQB05/12jz9naq6GZ6iZ6ApVsO3rr2gsnTf3++OV63kE1Q==", + "license": "MIT" + }, "node_modules/semver": { "version": "7.7.1", "resolved": "https://registry.npmmirror.com/semver/-/semver-7.7.1.tgz", @@ -15934,6 +16235,18 @@ "node": ">= 0.8" } }, + "node_modules/vdirs": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/vdirs/-/vdirs-0.1.8.tgz", + "integrity": "sha512-H9V1zGRLQZg9b+GdMk8MXDN2Lva0zx72MPahDKc30v+DtwKjfyOSXWRIX4t2mhDubM1H09gPhWeth/BJWPHGUw==", + "license": "MIT", + "dependencies": { + "evtd": "^0.2.2" + }, + "peerDependencies": { + "vue": "^3.0.11" + } + }, "node_modules/vite": { "version": "6.3.2", "resolved": "https://registry.npmmirror.com/vite/-/vite-6.3.2.tgz", @@ -16198,6 +16511,18 @@ "vue": "^3.5.0" } }, + "node_modules/vooks": { + "version": "0.2.12", + "resolved": "https://registry.npmjs.org/vooks/-/vooks-0.2.12.tgz", + "integrity": "sha512-iox0I3RZzxtKlcgYaStQYKEzWWGAduMmq+jS7OrNdQo1FgGfPMubGL3uGHOU9n97NIvfFDBGnpSvkWyb/NSn/Q==", + "license": "MIT", + "dependencies": { + "evtd": "^0.2.2" + }, + "peerDependencies": { + "vue": "^3.0.0" + } + }, "node_modules/vscode-uri": { "version": "3.1.0", "resolved": "https://registry.npmmirror.com/vscode-uri/-/vscode-uri-3.1.0.tgz", @@ -16291,6 +16616,24 @@ "vue": "^3.2.0" } }, + "node_modules/vueuc": { + "version": "0.4.64", + "resolved": "https://registry.npmjs.org/vueuc/-/vueuc-0.4.64.tgz", + "integrity": "sha512-wlJQj7fIwKK2pOEoOq4Aro8JdPOGpX8aWQhV8YkTW9OgWD2uj2O8ANzvSsIGjx7LTOc7QbS7sXdxHi6XvRnHPA==", + "license": "MIT", + "dependencies": { + "@css-render/vue3-ssr": "^0.15.10", + "@juggle/resize-observer": "^3.3.1", + "css-render": "^0.15.10", + "evtd": "^0.2.4", + "seemly": "^0.3.6", + "vdirs": "^0.1.4", + "vooks": "^0.2.4" + }, + "peerDependencies": { + "vue": "^3.0.11" + } + }, "node_modules/web-streams-polyfill": { "version": "3.3.3", "resolved": "https://registry.npmmirror.com/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", diff --git a/package.json b/package.json index a65c748..88401b0 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,8 @@ "nuxt": "^3.16.2", "redis": "^4.7.0", "vue": "^3.5.13", - "vue-router": "^4.5.0" + "vue-router": "^4.5.0", + "vueuc": "^0.4.64" }, "devDependencies": { "@nuxtjs/tailwindcss": "^6.13.2", diff --git a/pages/home/blog/index.vue b/pages/home/blog/index.vue index 0ae12e8..0e97a25 100644 --- a/pages/home/blog/index.vue +++ b/pages/home/blog/index.vue @@ -6,7 +6,13 @@ definePageMeta({ mode: 'out-in', }, }) +// 菜单数据 const menuList = ref([]); +// 菜单折叠 +const menuCollapseStatus = ref(true) +// blog信息弹窗状态 +const blogInfoPopupStatus = ref(false) +const blogInfoPopupStatus2 = ref(false) const getMenuListFetch = async () => { const { data, pending, error } = await useFetch('/api/blog/blogMenu'); @@ -15,7 +21,18 @@ const getMenuListFetch = async () => { } menuList.value = data.value?.filter(i => i.pid === '0') } +const sendMessage = async () => { + // nMessage.success('??') +} +const handleCloseBefore = (s) => { + consola.info('要关闭啦', s) +} +const loading = ref(false) + +setTimeout(() => { + loading.value = true +}, 5000) // SSR运行 await getMenuListFetch() @@ -27,28 +44,129 @@ onMounted(() => { @@ -69,6 +187,38 @@ onMounted(() => { overflow: hidden; background: var(--blog-menu-background-color); border-right: 1px solid var(--bg-color-be); + transition: width .3s ease-in-out; + &.menuCollapse{ + width: 0; + } + .bar{ + position: relative; + flex-shrink: 0; + height: 100%; + font-size: 1rem; + opacity: 0; + color: var(--font-color-top3-h2); + transform: rotate(180deg); + transition: color .3s, opacity .3s, background-color .3s; + border-radius: .25rem; + &:hover{ + background-color: #00000015; + } + } + .awaitShow{ + height: 0; + width: 0; + opacity: 0; + transition: opacity .3s; + overflow: hidden; + } + &:hover{ + .awaitShow{ + height: 100%; + width: auto; + opacity: 1; + } + } .blogMenuContainer{ position: relative; width: 100%; @@ -84,43 +234,25 @@ onMounted(() => { width: 100%; } - .awaitShow{ - height: 0; - width: 0; - opacity: 0; - transition: opacity .3s; - overflow: hidden; - } - &:hover{ - .awaitShow{ - height: 100%; - width: auto; - opacity: 1; - } - } + & > header{ flex-shrink: 0; display: flex; width: 100%; + & > div.title{ position: relative; flex: 1; color: var(--font-color-top3-h1); } + & > div.bar{ - position: relative; - flex-shrink: 0; - height: 100%; - aspect-ratio: 1; - display: flex; - align-items: center; - justify-content: center; - font-size: 1.3rem; - color: var(--font-color-top3-h2); - transform: rotate(180deg); - transition: color .5s, opacity .5s; + &:last-child{ + font-size: 1.3rem; + } &:hover{ color: var(--font-color-top3-h1); + opacity: 1; } } } @@ -130,10 +262,9 @@ onMounted(() => { & > div.line{ position: relative; width: 100%; - height: 3px; + height: 1px; margin: 0.5rem auto; background-color: var(--bg-color-be); - border-radius: .25rem; } & > div.blogMenuContent{ position: relative; @@ -141,7 +272,7 @@ onMounted(() => { overflow: hidden; & > div.blogMenuItem{ position: relative; - font-size: 0.9rem; + font-size: 1rem; display: flex; & > div{ position: relative; @@ -153,32 +284,26 @@ onMounted(() => { & > div.text{ height: 100%; flex: 1; + display: flex; + align-items: center; } - & > div.bar{ + & > div.barBox{ margin-left: .2rem; - height: 100%; - //height: 0; - //width: 0; - //opacity: 0; - transition: opacity .3s; - overflow: hidden; + height: 0; + width: 0; + opacity: 0; display: flex; } - &:hover div.bar{ - height: 100%; - width: auto; - opacity: 1; + &:hover div.barBox{ + height: 100% !important; + width: auto !important; + opacity: 1 !important; + & > div.bar{ + opacity: 1; + } } } } - - .hoverBar{ - border-radius: .25rem; - transition: background-color .3s; - &:hover{ - background-color: #00000015; - } - } .contentBox{ position: relative; height: 2rem; @@ -188,6 +313,7 @@ onMounted(() => { color: var(--font-color-top3-h2); user-select: none; cursor: pointer; + transition: background-color .3s; &:hover{ background: var(--font-color-top3-hover); } @@ -195,6 +321,7 @@ onMounted(() => { color: var(--font-color-top3-h1); background: var(--font-color-top3-active); } + } } } @@ -203,6 +330,32 @@ onMounted(() => { } & > div.main{ flex: 1; + & > header{ + position: relative; + display: flex; + height: 3rem; + border-bottom: 1px solid var(--bg-color-be); + + & > div.menuCollapse{ + position: relative; + height: 100%; + transition: width .3s; + width: 3rem; + overflow: hidden; + &:hover & > div{ + color: var(--font-color-top3-h1); + } + &.hide{ + width: 0; + } + + & > div{ + font-size: 1.3rem; + color: var(--font-color-top3-h2); + transition: color .5s, opacity .5s; + } + } + } } } @media (max-width: 767px){ diff --git a/pages/index.vue b/pages/index.vue index 8015c6a..e71cbfa 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -159,6 +159,7 @@ onBeforeRouteLeave((to, from, next) => { & > a { position: relative; + box-sizing: border-box; height: 100%; border-radius: 8px; display: flex;