feat: 网页title根据路由动态变化

This commit is contained in:
taoran
2023-11-29 18:59:45 +08:00
parent a3f5cf6f2d
commit 7279a85274
7 changed files with 283 additions and 18 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + Vue + TS</title>
<title><%= title %></title>
</head>
<body>
<div id="app"></div>
+1
View File
@@ -41,6 +41,7 @@
"tailwindcss": "^3.3.5",
"typescript": "^5.0.2",
"vite": "^4.4.5",
"vite-plugin-html": "^3.2.0",
"vite-plugin-mock": "2.9.6",
"vite-plugin-svg-icons": "^2.0.1",
"vue-router": "^4.2.5",
+222 -6
View File
@@ -91,6 +91,9 @@ devDependencies:
vite:
specifier: ^4.4.5
version: registry.npmmirror.com/[email protected]([email protected])
vite-plugin-html:
specifier: ^3.2.0
version: registry.npmmirror.com/[email protected]([email protected])
vite-plugin-mock:
specifier: 2.9.6
version: registry.npmmirror.com/[email protected]([email protected])([email protected])([email protected])
@@ -567,7 +570,6 @@ packages:
dependencies:
'@jridgewell/gen-mapping': registry.npmmirror.com/@jridgewell/[email protected]
'@jridgewell/trace-mapping': registry.npmmirror.com/@jridgewell/[email protected]
dev: false
registry.npmmirror.com/@jridgewell/[email protected]:
resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz}
@@ -704,6 +706,16 @@ packages:
rollup: registry.npmmirror.com/[email protected]
dev: true
registry.npmmirror.com/@rollup/[email protected]:
resolution: {integrity: sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@rollup/pluginutils/-/pluginutils-4.2.1.tgz}
name: '@rollup/pluginutils'
version: 4.2.1
engines: {node: '>= 8.0.0'}
dependencies:
estree-walker: registry.npmmirror.com/[email protected]
picomatch: registry.npmmirror.com/[email protected]
dev: true
registry.npmmirror.com/@sxzz/[email protected]:
resolution: {integrity: sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz}
name: '@sxzz/popperjs-es'
@@ -1218,7 +1230,6 @@ packages:
version: 8.11.2
engines: {node: '>=0.4.0'}
hasBin: true
dev: false
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/agent-base/-/agent-base-6.0.2.tgz}
@@ -1396,6 +1407,12 @@ packages:
version: 4.2.5
dev: false
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/async/-/async-3.2.5.tgz}
name: async
version: 3.2.5
dev: true
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz}
name: asynckit
@@ -1579,7 +1596,6 @@ packages:
resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/buffer-from/-/buffer-from-1.1.2.tgz}
name: buffer-from
version: 1.1.2
dev: false
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/builtin-modules/-/builtin-modules-3.3.0.tgz}
@@ -1605,6 +1621,15 @@ packages:
unset-value: registry.npmmirror.com/[email protected]
dev: true
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/camel-case/-/camel-case-4.1.2.tgz}
name: camel-case
version: 4.1.2
dependencies:
pascal-case: registry.npmmirror.com/[email protected]
tslib: registry.npmmirror.com/[email protected]
dev: true
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/camelcase-css/-/camelcase-css-2.0.1.tgz}
name: camelcase-css
@@ -1708,6 +1733,15 @@ packages:
static-extend: registry.npmmirror.com/[email protected]
dev: true
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-JVJbM+f3d3Q704rF4bqQ5UUyTtuJ0JRKNbTKVEeujCCBoMdkEi+V+e8oktO9qGQNSvHrFTM6JZRXrUvGR1czww==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/clean-css/-/clean-css-5.3.2.tgz}
name: clean-css
version: 5.3.2
engines: {node: '>= 10.0'}
dependencies:
source-map: registry.npmmirror.com/[email protected]
dev: true
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/clipboard/-/clipboard-2.0.11.tgz}
name: clipboard
@@ -1776,6 +1810,12 @@ packages:
dev: false
optional: true
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/colorette/-/colorette-2.0.20.tgz}
name: colorette
version: 2.0.20
dev: true
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz}
name: combined-stream
@@ -1789,7 +1829,6 @@ packages:
resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz}
name: commander
version: 2.20.3
dev: false
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/commander/-/commander-4.1.1.tgz}
@@ -1805,6 +1844,13 @@ packages:
engines: {node: '>= 10'}
dev: true
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/commander/-/commander-8.3.0.tgz}
name: commander
version: 8.3.0
engines: {node: '>= 12'}
dev: true
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/component-emitter/-/component-emitter-1.3.0.tgz}
name: component-emitter
@@ -1822,6 +1868,13 @@ packages:
name: concat-map
version: 0.0.1
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz}
name: connect-history-api-fallback
version: 1.6.0
engines: {node: '>=0.8'}
dev: true
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/connect/-/connect-3.7.0.tgz}
name: connect
@@ -1836,6 +1889,12 @@ packages:
- supports-color
dev: true
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/consola/-/consola-2.15.3.tgz}
name: consola
version: 2.15.3
dev: true
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/console-control-strings/-/console-control-strings-1.1.0.tgz}
name: console-control-strings
@@ -2195,6 +2254,29 @@ packages:
domhandler: registry.npmmirror.com/[email protected]
dev: true
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/dot-case/-/dot-case-3.0.4.tgz}
name: dot-case
version: 3.0.4
dependencies:
no-case: registry.npmmirror.com/[email protected]
tslib: registry.npmmirror.com/[email protected]
dev: true
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-SErOMvge0ZUyWd5B0NXMQlDkN+8r+HhVUsxgOO7IoPDOdDRD2JjExpN6y3KnFR66jsJMwSn1pqIivhU5rcJiNg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/dotenv-expand/-/dotenv-expand-8.0.3.tgz}
name: dotenv-expand
version: 8.0.3
engines: {node: '>=12'}
dev: true
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/dotenv/-/dotenv-16.3.1.tgz}
name: dotenv
version: 16.3.1
engines: {node: '>=12'}
dev: true
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz}
name: ecc-jsbn
@@ -2212,6 +2294,16 @@ packages:
version: 1.1.1
dev: true
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-rC+QVNMJWv+MtPgkt0y+0rVEIdbtxVADApW9JXrUVlzHetgcyczP/E7DJmWJ4fJCZF2cPcBk0laWO9ZHMG3DmQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/ejs/-/ejs-3.1.9.tgz}
name: ejs
version: 3.1.9
engines: {node: '>=0.10.0'}
hasBin: true
dependencies:
jake: registry.npmmirror.com/[email protected]
dev: true
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-B4yBlX0azdA3rVMxpYwLQfDpdwOgcnLCkpvSOd68iFmeedo+WYjaBJS3/W58LVD8CB2nf+o7C4K9xz1l09RkWg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.4.585.tgz}
name: electron-to-chromium
@@ -2576,6 +2668,14 @@ packages:
reusify: registry.npmmirror.com/[email protected]
dev: true
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/filelist/-/filelist-1.0.4.tgz}
name: filelist
version: 1.0.4
dependencies:
minimatch: registry.npmmirror.com/[email protected]
dev: true
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/fill-range/-/fill-range-4.0.0.tgz}
name: fill-range
@@ -2922,6 +3022,22 @@ packages:
dev: false
optional: true
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-YXxSlJBZTP7RS3tWnQw74ooKa6L9b9i9QYXY21eUEvhZ3u9XLfv6OnFsQq6RxkhHygsaUMvYsZRV5rU/OVNZxw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz}
name: html-minifier-terser
version: 6.1.0
engines: {node: '>=12'}
hasBin: true
dependencies:
camel-case: registry.npmmirror.com/[email protected]
clean-css: registry.npmmirror.com/[email protected]
commander: registry.npmmirror.com/[email protected]
he: registry.npmmirror.com/[email protected]
param-case: registry.npmmirror.com/[email protected]
relateurl: registry.npmmirror.com/[email protected]
terser: registry.npmmirror.com/[email protected]
dev: true
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/htmlparser2/-/htmlparser2-3.10.1.tgz}
name: htmlparser2
@@ -3204,6 +3320,19 @@ packages:
dev: false
optional: true
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-ZDi3aP+fG/LchyBzUM804VjddnwfSfsdeYkwt8NcbKRvo4rFkjhs456iLFn3k2ZUWvNe4i48WACDbza8fhq2+w==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/jake/-/jake-10.8.7.tgz}
name: jake
version: 10.8.7
engines: {node: '>=10'}
hasBin: true
dependencies:
async: registry.npmmirror.com/[email protected]
chalk: registry.npmmirror.com/[email protected]
filelist: registry.npmmirror.com/[email protected]
minimatch: registry.npmmirror.com/[email protected]
dev: true
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/jest-worker/-/jest-worker-27.5.1.tgz}
name: jest-worker
@@ -3454,6 +3583,14 @@ packages:
version: 4.17.21
dev: false
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/lower-case/-/lower-case-2.0.2.tgz}
name: lower-case
version: 2.0.2
dependencies:
tslib: registry.npmmirror.com/[email protected]
dev: true
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/lru-cache/-/lru-cache-6.0.0.tgz}
name: lru-cache
@@ -3596,6 +3733,15 @@ packages:
dependencies:
brace-expansion: registry.npmmirror.com/[email protected]
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/minimatch/-/minimatch-5.1.6.tgz}
name: minimatch
version: 5.1.6
engines: {node: '>=10'}
dependencies:
brace-expansion: registry.npmmirror.com/[email protected]
dev: true
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/minimatch/-/minimatch-9.0.3.tgz}
name: minimatch
@@ -3741,6 +3887,15 @@ packages:
version: 2.6.2
dev: false
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/no-case/-/no-case-3.0.4.tgz}
name: no-case
version: 3.0.4
dependencies:
lower-case: registry.npmmirror.com/[email protected]
tslib: registry.npmmirror.com/[email protected]
dev: true
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/node-fetch/-/node-fetch-2.7.0.tgz}
name: node-fetch
@@ -3757,6 +3912,15 @@ packages:
dev: false
optional: true
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-RaBPP3+51hPne/OolXxcz89iYvQvKOydaqoePpOgXcrOKZhjVIzmpKZz+Hd/RBO2/zN2q6CNJhQzucVz+u3Jyw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/node-html-parser/-/node-html-parser-5.4.2.tgz}
name: node-html-parser
version: 5.4.2
dependencies:
css-select: registry.npmmirror.com/[email protected]
he: registry.npmmirror.com/[email protected]
dev: true
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/node-releases/-/node-releases-2.0.13.tgz}
name: node-releases
@@ -3904,6 +4068,15 @@ packages:
dev: false
optional: true
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/param-case/-/param-case-3.0.4.tgz}
name: param-case
version: 3.0.4
dependencies:
dot-case: registry.npmmirror.com/[email protected]
tslib: registry.npmmirror.com/[email protected]
dev: true
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/parse5/-/parse5-5.1.0.tgz}
name: parse5
@@ -3919,6 +4092,15 @@ packages:
engines: {node: '>= 0.8'}
dev: true
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/pascal-case/-/pascal-case-3.1.2.tgz}
name: pascal-case
version: 3.1.2
dependencies:
no-case: registry.npmmirror.com/[email protected]
tslib: registry.npmmirror.com/[email protected]
dev: true
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/pascalcase/-/pascalcase-0.1.1.tgz}
name: pascalcase
@@ -4296,6 +4478,13 @@ packages:
safe-regex: registry.npmmirror.com/[email protected]
dev: true
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/relateurl/-/relateurl-0.2.7.tgz}
name: relateurl
version: 0.2.7
engines: {node: '>= 0.10'}
dev: true
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/repeat-element/-/repeat-element-1.1.4.tgz}
name: repeat-element
@@ -4670,7 +4859,6 @@ packages:
dependencies:
buffer-from: registry.npmmirror.com/[email protected]
source-map: registry.npmmirror.com/[email protected]
dev: false
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/source-map-url/-/source-map-url-0.4.1.tgz}
@@ -5004,7 +5192,6 @@ packages:
acorn: registry.npmmirror.com/[email protected]
commander: registry.npmmirror.com/[email protected]
source-map-support: registry.npmmirror.com/[email protected]
dev: false
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/thenify-all/-/thenify-all-1.6.0.tgz}
@@ -5136,6 +5323,12 @@ packages:
engines: {node: '>=12'}
dev: false
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/tslib/-/tslib-2.6.2.tgz}
name: tslib
version: 2.6.2
dev: true
registry.npmmirror.com/[email protected]:
resolution: {integrity: sha512-5NEHTDFKillDNPy6MCgpXDNBTB7SZkHBFOF6vXfCDIFZcBdFYFXTd2xvAVvIeM3UYFRWu27xUf/Kxl5f9+RooQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/tui-code-snippet/-/tui-code-snippet-2.3.3.tgz}
name: tui-code-snippet
@@ -5326,6 +5519,29 @@ packages:
dev: false
optional: true
registry.npmmirror.com/[email protected]([email protected]):
resolution: {integrity: sha512-2VLCeDiHmV/BqqNn5h2V+4280KRgQzCFN47cst3WiNK848klESPQnzuC3okH5XHtgwHH/6s1Ho/YV6yIO0pgoQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vite-plugin-html/-/vite-plugin-html-3.2.0.tgz}
id: registry.npmmirror.com/vite-plugin-html/3.2.0
name: vite-plugin-html
version: 3.2.0
peerDependencies:
vite: '>=2.0.0'
dependencies:
'@rollup/pluginutils': registry.npmmirror.com/@rollup/[email protected]
colorette: registry.npmmirror.com/[email protected]
connect-history-api-fallback: registry.npmmirror.com/[email protected]
consola: registry.npmmirror.com/[email protected]
dotenv: registry.npmmirror.com/[email protected]
dotenv-expand: registry.npmmirror.com/[email protected]
ejs: registry.npmmirror.com/[email protected]
fast-glob: registry.npmmirror.com/[email protected]
fs-extra: registry.npmmirror.com/[email protected]
html-minifier-terser: registry.npmmirror.com/[email protected]
node-html-parser: registry.npmmirror.com/[email protected]
pathe: registry.npmmirror.com/[email protected]
vite: registry.npmmirror.com/[email protected]([email protected])
dev: true
registry.npmmirror.com/[email protected]([email protected])([email protected])([email protected]):
resolution: {integrity: sha512-/Rm59oPppe/ncbkSrUuAxIQihlI2YcBmnbR4ST1RA2VzM1C0tEQc1KlbQvnUGhXECAGTaQN2JyasiwXP6EtKgg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vite-plugin-mock/-/vite-plugin-mock-2.9.6.tgz}
id: registry.npmmirror.com/vite-plugin-mock/2.9.6
-1
View File
@@ -16,7 +16,6 @@ import 'element-plus/dist/index.css'
import pinia from './store'
const app = createApp(App)
console.log(app)
//安装仓库
app.use(pinia)
app.use(router)
+7
View File
@@ -14,4 +14,11 @@ const router = createRouter({
}
},
})
router.beforeEach((to, from, next) => {
if (to.meta.title && to.meta.title != '') {
let oldTitle = document.title
document.title = <string>to.meta.title + ' - ' + oldTitle
}
next()
})
export default router
+43 -10
View File
@@ -2,58 +2,91 @@
export const constantRoute = [
{
path: '/',
name: 'home',
component: () => import('@/components/Home/Home.vue'),
name: 'home',
meta: {
title: ""
}
},
{
path: '/timetran',
component: () => import('@/components/TimeTran/TimeTran.vue'),
name: 'timetran'
name: 'timetran',
meta: {
title: "时间戳转换"
}
},
{
path: '/MD5',
component: () => import('@/components/MD5/MD5.vue'),
name: 'MD5'
name: 'MD5',
meta: {
title: "MD5在线加密"
}
},
{
path: '/json',
component: () => import('@/components/JsonTran/JsonTran.vue'),
name: 'json'
name: 'json',
meta: {
title: "Json在线转换"
}
},
{
path: '/reg',
component: () => import('@/components/RegTest/RegTest.vue'),
name: 'reg'
name: 'reg',
meta: {
title: "正则表达式测试"
}
},
{
path: '/unicode',
component: () => import('@/components/Unicode/Unicode.vue'),
name: 'unicode'
name: 'unicode',
meta: {
title: "Unicode转中文"
}
},
{
path: '/wordcount',
component: () => import('@/components/WordCount/WordCount.vue'),
name: 'wordcount'
name: 'wordcount',
meta: {
title: "在线字数统计"
}
},
{
path: '/ip',
component: () => import('@/components/Ip/Ip.vue'),
name: 'ip'
name: 'ip',
meta: {
title: "IP查询"
}
},
{
path: '/scaletran',
component: () => import('@/components/ScaleTran/ScaleTran.vue'),
name: 'scaletran'
name: 'scaletran',
meta: {
title: "常用进制转换"
}
},
{
path: '/signimage',
component: () => import('@/components/SignImage/SignImage.vue'),
name: 'signimage'
name: 'signimage',
meta: {
title: "在线编辑图片"
}
},
{
path: '/404',
component: () => import('@/components/404/404.vue'),
name: '404',
meta: {
title: "404"
}
},
{
//重定向
+9
View File
@@ -3,6 +3,7 @@ import vue from '@vitejs/plugin-vue'
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
import {viteMockServe} from 'vite-plugin-mock'
import path from 'path'
import { createHtmlPlugin } from 'vite-plugin-html'
// https://vitejs.dev/config/
export default defineConfig(({command, mode}) => {
@@ -20,6 +21,14 @@ export default defineConfig(({command, mode}) => {
viteMockServe({
localEnabled: command === 'serve',
}),
//修改html插件
createHtmlPlugin({
inject: {
data: {
title: env.VITE_APP_TITLE
}
}
})
],
resolve: {
alias: {