feat: 新增配置文件

This commit is contained in:
wanglihui 2023-08-12 21:04:38 +08:00
parent bdfbd2bb39
commit 0ce2dfe6e8
14 changed files with 332 additions and 5169 deletions

1
.gitignore vendored
View File

@ -6,6 +6,7 @@ yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
yarn.lock
node_modules
dist

View File

@ -6,11 +6,11 @@
<link rel="icon" type="image/png" href="/logo.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title><%- title %></title>
<!-- <script src="/js/tgs-player.js"></script> -->
<%- injectScript %>
</head>
<body>
<div id="app"></div>
</body>
<script type="module" src="/src/main.ts"></script>
</html>

View File

@ -54,6 +54,7 @@
"unplugin-vue-setup-extend-plus": "^1.0.0",
"vite": "^4.4.1",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-html": "^3.2.0",
"vite-plugin-html-template": "^1.1.5",
"vite-plugin-pages": "^0.31.0",
"vite-plugin-vue-devtools": "^0.4.14",

View File

@ -130,6 +130,9 @@ devDependencies:
vite-plugin-compression:
specifier: ^0.5.1
version: 0.5.1(vite@4.4.1)
vite-plugin-html:
specifier: ^3.2.0
version: 3.2.0(vite@4.4.1)
vite-plugin-html-template:
specifier: ^1.1.5
version: 1.1.5
@ -1309,6 +1312,13 @@ packages:
engines: {node: '>=6.0.0'}
dev: true
/@jridgewell/source-map@0.3.5:
resolution: {integrity: sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==}
dependencies:
'@jridgewell/gen-mapping': 0.3.3
'@jridgewell/trace-mapping': 0.3.18
dev: true
/@jridgewell/sourcemap-codec@1.4.14:
resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==}
dev: true
@ -1373,6 +1383,14 @@ packages:
resolution: {integrity: sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==}
dev: true
/@rollup/pluginutils@4.2.1:
resolution: {integrity: sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==}
engines: {node: '>= 8.0.0'}
dependencies:
estree-walker: 2.0.2
picomatch: 2.3.1
dev: true
/@rollup/pluginutils@5.0.2:
resolution: {integrity: sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==}
engines: {node: '>=14.0.0'}
@ -2166,6 +2184,10 @@ packages:
resolution: {integrity: sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg==}
dev: false
/async@3.2.4:
resolution: {integrity: sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==}
dev: true
/asynckit@0.4.0:
resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==}
@ -2399,6 +2421,13 @@ packages:
fsevents: 2.3.2
dev: true
/clean-css@5.3.2:
resolution: {integrity: sha512-JVJbM+f3d3Q704rF4bqQ5UUyTtuJ0JRKNbTKVEeujCCBoMdkEi+V+e8oktO9qGQNSvHrFTM6JZRXrUvGR1czww==}
engines: {node: '>= 10.0'}
dependencies:
source-map: 0.6.1
dev: true
/clean-stack@2.2.0:
resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==}
engines: {node: '>=6'}
@ -2454,16 +2483,38 @@ packages:
resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==}
dev: true
/colorette@2.0.20:
resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==}
dev: true
/combined-stream@1.0.8:
resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==}
engines: {node: '>= 0.8'}
dependencies:
delayed-stream: 1.0.0
/commander@2.20.3:
resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==}
dev: true
/commander@8.3.0:
resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==}
engines: {node: '>= 12'}
dev: true
/concat-map@0.0.1:
resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=, tarball: https://registry.npmmirror.com/concat-map/download/concat-map-0.0.1.tgz}
dev: true
/connect-history-api-fallback@1.6.0:
resolution: {integrity: sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==}
engines: {node: '>=0.8'}
dev: true
/consola@2.15.3:
resolution: {integrity: sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==}
dev: true
/constant-case@3.0.4:
resolution: {integrity: sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ==}
dependencies:
@ -2497,6 +2548,16 @@ packages:
which: 2.0.2
dev: true
/css-select@4.3.0:
resolution: {integrity: sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==}
dependencies:
boolbase: 1.0.0
css-what: 6.1.0
domhandler: 4.3.1
domutils: 2.8.0
nth-check: 2.1.1
dev: true
/css-tree@2.3.1:
resolution: {integrity: sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==}
engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0}
@ -2505,6 +2566,11 @@ packages:
source-map-js: 1.0.2
dev: true
/css-what@6.1.0:
resolution: {integrity: sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==}
engines: {node: '>= 6'}
dev: true
/cssesc@3.0.0:
resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==}
engines: {node: '>=4'}
@ -2643,6 +2709,33 @@ packages:
resolution: {integrity: sha512-LLBi6pEqS6Do3EKQ3J0NqHWV5hhb78Pi8vvESYwyOy2c31ZEZVdtitdzsQsKb7878PEERhzUk0ftqGhG6Mz+pQ==}
dev: true
/dom-serializer@1.4.1:
resolution: {integrity: sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==}
dependencies:
domelementtype: 2.3.0
domhandler: 4.3.1
entities: 2.2.0
dev: true
/domelementtype@2.3.0:
resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==}
dev: true
/domhandler@4.3.1:
resolution: {integrity: sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==}
engines: {node: '>= 4'}
dependencies:
domelementtype: 2.3.0
dev: true
/domutils@2.8.0:
resolution: {integrity: sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==}
dependencies:
dom-serializer: 1.4.1
domelementtype: 2.3.0
domhandler: 4.3.1
dev: true
/dot-case@3.0.4:
resolution: {integrity: sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==}
dependencies:
@ -2650,6 +2743,16 @@ packages:
tslib: 2.6.0
dev: true
/dotenv-expand@8.0.3:
resolution: {integrity: sha512-SErOMvge0ZUyWd5B0NXMQlDkN+8r+HhVUsxgOO7IoPDOdDRD2JjExpN6y3KnFR66jsJMwSn1pqIivhU5rcJiNg==}
engines: {node: '>=12'}
dev: true
/dotenv@16.3.1:
resolution: {integrity: sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==}
engines: {node: '>=12'}
dev: true
/duplexer@0.1.2:
resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==}
dev: true
@ -2661,6 +2764,14 @@ packages:
zrender: 5.4.4
dev: false
/ejs@3.1.9:
resolution: {integrity: sha512-rC+QVNMJWv+MtPgkt0y+0rVEIdbtxVADApW9JXrUVlzHetgcyczP/E7DJmWJ4fJCZF2cPcBk0laWO9ZHMG3DmQ==}
engines: {node: '>=0.10.0'}
hasBin: true
dependencies:
jake: 10.8.7
dev: true
/electron-to-chromium@1.4.452:
resolution: {integrity: sha512-ITLyB1brjWat2oEIzbPjewgN6DnJlmW8isz4pMC54FctnaKhkZR1s9cCVgRZzrk7i1kW1n0k2G4hs3ibwFalyw==}
dev: true
@ -2700,6 +2811,10 @@ packages:
resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
dev: true
/entities@2.2.0:
resolution: {integrity: sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==}
dev: true
/es-get-iterator@1.1.3:
resolution: {integrity: sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==}
dependencies:
@ -3082,6 +3197,12 @@ packages:
flat-cache: 3.0.4
dev: true
/filelist@1.0.4:
resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==}
dependencies:
minimatch: 5.1.6
dev: true
/fill-range@7.0.1:
resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==}
engines: {node: '>=8'}
@ -3410,6 +3531,20 @@ packages:
parse-passwd: 1.0.0
dev: true
/html-minifier-terser@6.1.0:
resolution: {integrity: sha512-YXxSlJBZTP7RS3tWnQw74ooKa6L9b9i9QYXY21eUEvhZ3u9XLfv6OnFsQq6RxkhHygsaUMvYsZRV5rU/OVNZxw==}
engines: {node: '>=12'}
hasBin: true
dependencies:
camel-case: 4.1.2
clean-css: 5.3.2
commander: 8.3.0
he: 1.2.0
param-case: 3.0.4
relateurl: 0.2.7
terser: 5.19.2
dev: true
/html-tags@3.3.1:
resolution: {integrity: sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==}
engines: {node: '>=8'}
@ -3788,6 +3923,17 @@ packages:
engines: {node: '>=0.10.0'}
dev: true
/jake@10.8.7:
resolution: {integrity: sha512-ZDi3aP+fG/LchyBzUM804VjddnwfSfsdeYkwt8NcbKRvo4rFkjhs456iLFn3k2ZUWvNe4i48WACDbza8fhq2+w==}
engines: {node: '>=10'}
hasBin: true
dependencies:
async: 3.2.4
chalk: 4.1.2
filelist: 1.0.4
minimatch: 3.1.2
dev: true
/jiti@1.19.1:
resolution: {integrity: sha512-oVhqoRDaBXf7sjkll95LHVS6Myyyb1zaunVwk4Z0+WPSW4gjS0pl01zYKHScTuyEhQsFxV5L4DR5r+YqSyqyyg==}
hasBin: true
@ -4081,6 +4227,13 @@ packages:
brace-expansion: 1.1.11
dev: true
/minimatch@5.1.6:
resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==}
engines: {node: '>=10'}
dependencies:
brace-expansion: 2.0.1
dev: true
/minimatch@9.0.3:
resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==}
engines: {node: '>=16 || 14 >=14.17'}
@ -4162,6 +4315,13 @@ packages:
tslib: 2.6.0
dev: true
/node-html-parser@5.4.2:
resolution: {integrity: sha512-RaBPP3+51hPne/OolXxcz89iYvQvKOydaqoePpOgXcrOKZhjVIzmpKZz+Hd/RBO2/zN2q6CNJhQzucVz+u3Jyw==}
dependencies:
css-select: 4.3.0
he: 1.2.0
dev: true
/node-plop@0.31.1:
resolution: {integrity: sha512-qmXJJt3YETFt/e0dtMADVpvck6EvN01Jig086o+J3M6G++mWA7iJ3Pqz4m4kvlynh73Iz2/rcZzxq7xTiF+aIQ==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
@ -4464,6 +4624,10 @@ packages:
engines: {node: '>=8'}
dev: true
/pathe@0.2.0:
resolution: {integrity: sha512-sTitTPYnn23esFR3RlqYBWn4c45WGeLcsKzQiUpXJAyfcWkolvlYpV8FLo7JishK946oQwMFUCHXQ9AjGPKExw==}
dev: true
/pathe@1.1.1:
resolution: {integrity: sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==}
dev: true
@ -4707,6 +4871,11 @@ packages:
functions-have-names: 1.2.3
dev: true
/relateurl@0.2.7:
resolution: {integrity: sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog==}
engines: {node: '>= 0.10'}
dev: true
/resize-observer-polyfill@1.5.1:
resolution: {integrity: sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==}
dev: false
@ -5017,6 +5186,17 @@ packages:
resolution: {integrity: sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA==}
dev: true
/terser@5.19.2:
resolution: {integrity: sha512-qC5+dmecKJA4cpYxRa5aVkKehYsQKc+AHeKl0Oe62aYjBL8ZA33tTljktDHJSaxxMnbI5ZYw+o/S2DxxLu8OfA==}
engines: {node: '>=10'}
hasBin: true
dependencies:
'@jridgewell/source-map': 0.3.5
acorn: 8.10.0
commander: 2.20.3
source-map-support: 0.5.21
dev: true
/text-table@0.2.0:
resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==}
dev: true
@ -5337,6 +5517,26 @@ packages:
shelljs: 0.8.4
dev: true
/vite-plugin-html@3.2.0(vite@4.4.1):
resolution: {integrity: sha512-2VLCeDiHmV/BqqNn5h2V+4280KRgQzCFN47cst3WiNK848klESPQnzuC3okH5XHtgwHH/6s1Ho/YV6yIO0pgoQ==}
peerDependencies:
vite: '>=2.0.0'
dependencies:
'@rollup/pluginutils': 4.2.1
colorette: 2.0.20
connect-history-api-fallback: 1.6.0
consola: 2.15.3
dotenv: 16.3.1
dotenv-expand: 8.0.3
ejs: 3.1.9
fast-glob: 3.3.0
fs-extra: 10.1.0
html-minifier-terser: 6.1.0
node-html-parser: 5.4.2
pathe: 0.2.0
vite: 4.4.1(@types/node@18.16.19)(sass@1.62.1)
dev: true
/vite-plugin-inspect@0.7.32(vite@4.4.1):
resolution: {integrity: sha512-TqRLHwOM3FTJPOGCCHJmub4SVVogSjZ9LSDo1Q6WeN2Zvc7HB7tr7cqYlAyStXCI90KvVnb1BRwI22+HXlghXQ==}
engines: {node: '>=14'}

File diff suppressed because one or more lines are too long

5
public/tsdd-config.js Normal file
View File

@ -0,0 +1,5 @@
var TSDD_CONFIG = {
APP_URL: 'https://api.botgate.cn/v1/'
};
window.TSDD_CONFIG = TSDD_CONFIG;

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -10,10 +10,12 @@ export const DEFAULT_PRIMARY = '#5371FF';
// 路由白名单地址(必须是本地存在的路由 staticRouter.ts 中)
export const ROUTER_WHITE_LIST: string[] = ['/login'];
const TSDD_CONFIG = window.TSDD_CONFIG ? window.TSDD_CONFIG : {};
// 默认应用配置
export const BU_DOU_CONFIG = {
APP_TITLE: '唐僧叨叨后台管理',
APP_TITLE_SHORT: '唐僧',
APP_URL: 'https://api.botgate.cn/v1/'
APP_TITLE_SHORT: '唐',
APP_URL: 'https://api.botgate.cn/v1/',
...TSDD_CONFIG
// APP_URL: '/api/v1/' // 正式环境地址 (通用打包镜像,用此相对地址)
};

View File

@ -22,6 +22,8 @@ import '@icon-park/vue-next/styles/index.css';
import '@/styles/index.scss';
import 'uno.css';
import '@/utils/system-copyright';
const app = createApp(App);
install(app, 'i-bd');
// register the element Icons component

View File

@ -7,24 +7,14 @@ export {}
declare module 'vue' {
export interface GlobalComponents {
AddNode: typeof import('./../components/bdWorkflow/nodes/addNode.vue')['default']
Approver: typeof import('./../components/bdWorkflow/nodes/approver.vue')['default']
BdAppVersion: typeof import('./../components/BdAppVersion/index.vue')['default']
BdMsg: typeof import('./../components/BdMsg/index.vue')['default']
BdPage: typeof import('./../components/BdPage/index.vue')['default']
BdProhitWords: typeof import('./../components/BdProhitWords/index.vue')['default']
BdSandAllMsg: typeof import('./../components/BdSandAllMsg/index.vue')['default']
BdSendMsg: typeof import('./../components/BdSendMsg/index.vue')['default']
BdStatistic: typeof import('./../components/BdStatistic/index.vue')['default']
BdWorkflow: typeof import('./../components/bdWorkflow/index.vue')['default']
Branch: typeof import('./../components/bdWorkflow/nodes/branch.vue')['default']
HelloWorld: typeof import('./../components/HelloWorld.vue')['default']
NodeWrap: typeof import('./../components/bdWorkflow/nodeWrap.vue')['default']
Promoter: typeof import('./../components/bdWorkflow/nodes/promoter.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
Select: typeof import('./../components/bdWorkflow/select.vue')['default']
Send: typeof import('./../components/bdWorkflow/nodes/send.vue')['default']
SwitchDark: typeof import('./../components/SwitchDark/index.vue')['default']
}
}

View File

@ -91,3 +91,12 @@ declare namespace Column {
render?: (scope?: any) => void;
}
}
interface Window {
TSDD_CONFIG: {
APP_TITLE: string;
APP_URL: string;
};
}
declare const windos: Window & typeof globalThis;

View File

@ -0,0 +1,12 @@
if (import.meta.env.PROD) {
const copyright_common_style = 'font-size: 14px; margin-bottom: 2px; padding: 6px 8px; color: #fff;';
const copyright_main_style = `${copyright_common_style} background: #e24329;`;
const copyright_sub_style = `${copyright_common_style} background: #707070;`;
console.info(
'%c由%c唐僧叨叨%c驱动',
copyright_sub_style,
copyright_main_style,
copyright_sub_style,
'\nhttps://tangsengdaodao.com/'
);
}

View File

@ -1,11 +1,11 @@
import { defineConfig } from 'vite';
import { defineConfig, ConfigEnv, UserConfig } from 'vite';
import { resolve } from 'path';
// vite插件
import VueDevTools from 'vite-plugin-vue-devtools';
import vue from '@vitejs/plugin-vue';
import vueJsx from '@vitejs/plugin-vue-jsx';
import unocss from '@unocss/vite';
import htmlTemplate from 'vite-plugin-html-template';
import { createHtmlPlugin } from 'vite-plugin-html';
import AutoImport from 'unplugin-auto-import/vite';
import Components from 'unplugin-vue-components/vite';
import setupExtend from 'unplugin-vue-setup-extend-plus/vite';
@ -13,98 +13,108 @@ import Layouts from 'vite-plugin-vue-meta-layouts';
import Pages from 'vite-plugin-pages';
import compression from 'vite-plugin-compression';
const plugins = [
AutoImport({
include: [/\.[tj]sx?$/, /\.vue\?vue/, /\.md$/],
imports: ['vue', 'vue-router', 'pinia'],
resolvers: [],
dts: 'src/types/auto-imports.d.ts'
}),
Components({
include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
resolvers: [],
dts: 'src/types/components.d.ts'
}),
VueDevTools(),
vue({
template: {
compilerOptions: {
isCustomElement: tag => /^tgs-player/.test(tag)
const getPlugins = (command: string) => {
return [
AutoImport({
include: [/\.[tj]sx?$/, /\.vue\?vue/, /\.md$/],
imports: ['vue', 'vue-router', 'pinia'],
resolvers: [],
dts: 'src/types/auto-imports.d.ts'
}),
Components({
include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
resolvers: [],
dts: 'src/types/components.d.ts'
}),
VueDevTools(),
vue({
template: {
compilerOptions: {
isCustomElement: tag => /^tgs-player/.test(tag)
}
}
}
}),
vueJsx(),
htmlTemplate({
data: {
title: '唐僧叨叨后台管理'
}
}),
unocss(),
setupExtend({}),
Layouts({
defaultLayout: 'index'
}),
Pages({
dirs: 'src/pages',
exclude: ['**/components/*.vue']
}),
compression({
ext: '.gz',
deleteOriginFile: false
})
];
}),
vueJsx(),
createHtmlPlugin({
inject: {
data: {
title: '唐僧叨叨后台管理',
injectScript: command === 'build' ? `<script src="/tsdd-config.js"></script>` : null
}
}
}),
unocss(),
setupExtend({}),
Layouts({
defaultLayout: 'index'
}),
Pages({
dirs: 'src/pages',
exclude: ['**/components/*.vue']
}),
compression({
ext: '.gz',
deleteOriginFile: false
})
];
};
export default defineConfig({
resolve: {
alias: {
'@': resolve(__dirname, 'src'),
'vue-i18n': 'vue-i18n/dist/vue-i18n.cjs.js'
}
},
define: {
'process.env': {
APP_ENV: process.env.APP_ENV
}
},
plugins,
css: {
postcss: {
plugins: [
{
postcssPlugin: 'internal:charset-removal',
AtRule: {
charset: atRule => {
if (atRule.name === 'charset') {
atRule.remove();
export default defineConfig(({ command }: ConfigEnv): UserConfig => {
return {
resolve: {
alias: {
'@': resolve(__dirname, 'src'),
'vue-i18n': 'vue-i18n/dist/vue-i18n.cjs.js'
}
},
define: {
'process.env': {
APP_ENV: process.env.APP_ENV
}
},
plugins: getPlugins(command),
css: {
postcss: {
plugins: [
{
postcssPlugin: 'internal:charset-removal',
AtRule: {
charset: atRule => {
if (atRule.name === 'charset') {
atRule.remove();
}
}
}
}
]
},
preprocessorOptions: {
scss: {
additionalData: `@import "@/styles/var.scss";`
}
]
}
},
preprocessorOptions: {
scss: {
additionalData: `@import "@/styles/var.scss";`
}
}
},
server: {
host: '0.0.0.0'
},
build: {
cssCodeSplit: false,
sourcemap: false,
emptyOutDir: true,
chunkSizeWarningLimit: 1500,
rollupOptions: {
output: {
manualChunks: {
// 分包配置,配置完成自动按需加载
vue: ['vue', 'vue-router', 'pinia', 'vue-i18n', 'element-plus'],
echarts: ['echarts'],
'tgs-player': ['@lottiefiles/lottie-player/dist/tgs-player']
server: {
host: '0.0.0.0'
},
build: {
cssCodeSplit: false,
sourcemap: false,
emptyOutDir: true,
chunkSizeWarningLimit: 1500,
rollupOptions: {
output: {
chunkFileNames: 'static/js/[name]-[hash].js',
entryFileNames: 'static/js/[name]-[hash].js',
assetFileNames: 'static/[ext]/[name]-[hash].[ext]',
manualChunks: {
// 分包配置,配置完成自动按需加载
vue: ['vue', 'vue-router', 'pinia', 'vue-i18n', 'element-plus'],
echarts: ['echarts'],
'tgs-player': ['@lottiefiles/lottie-player/dist/tgs-player']
}
}
}
}
}
};
});

5014
yarn.lock

File diff suppressed because it is too large Load Diff