Browse Source

master

master
邓宏 3 years ago
parent
commit
6d11847fb7
  1. 3
      .browserslistrc
  2. 23
      .gitignore
  3. 3
      .vscode/extensions.json
  4. 19
      README.md
  5. 5
      babel.config.js
  6. 13
      index.html
  7. 12027
      package-lock.json
  8. 30
      package.json
  9. 828
      pnpm-lock.yaml
  10. 18
      public/index.html
  11. 32
      src/App.vue
  12. BIN
      src/assets/img/logo.png
  13. 23
      src/assets/index.less
  14. 1
      src/assets/svg/atm.svg
  15. 54
      src/components/HelloWorld.vue
  16. 43
      src/components/svgIcon.vue
  17. 3
      src/index.js
  18. 29
      src/layout/components/appMain.vue
  19. 2
      src/layout/components/index.js
  20. 38
      src/layout/components/sidebar/index.vue
  21. 34
      src/layout/components/sidebar/item.vue
  22. 81
      src/layout/components/sidebar/sidebarItem.vue
  23. 37
      src/layout/index.vue
  24. 14
      src/main.js
  25. 36
      src/router/index.js
  26. 40
      src/store/index.js
  27. 15
      src/store/modules/data.js
  28. 129
      src/utils/element_plus.js
  29. 18
      src/views/About.vue
  30. 16
      src/views/Demo.vue
  31. 103
      src/views/Home.vue
  32. 49
      vite.config.js
  33. 63
      vue.config.js

3
.browserslistrc

@ -1,3 +0,0 @@
> 1%
last 2 versions
not dead

23
.gitignore

@ -1,21 +1,22 @@
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.vscode
.DS_Store
*.suo
*.ntvs*
*.njsproj

3
.vscode/extensions.json

@ -0,0 +1,3 @@
{
"recommendations": ["johnsoncodehk.volar"]
}

19
README.md

@ -1,18 +1,15 @@
# vue3-demo
# Vue 3 + Vite
## Project setup
```
npm install
```
This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
## Recommended IDE Setup
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
- [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar)
## Project setup
```
npm run build
pnpm install
```
### Customize configuration

5
babel.config.js

@ -1,5 +0,0 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}

13
index.html

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>

12027
package-lock.json

File diff suppressed because it is too large

30
package.json

@ -1,28 +1,22 @@
{
"name": "vue3-demo",
"version": "0.1.0",
"name": "vue3-vite-demo",
"private": true,
"version": "0.0.0",
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build"
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"@amap/amap-jsapi-loader": "^1.0.1",
"black-knight": "git+https://gitee.com/aygj/vue3_tool_fit.git",
"core-js": "^3.6.5",
"element-plus": "^1.3.0-beta.3",
"vue": "^3.0.0",
"vue": "^3.2.25",
"vue-router": "^4.0.0-0",
"vuex": "^4.0.0-0"
"vuex": "^4.0.2"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"@vue/compiler-sfc": "^3.0.0",
"less": "^3.0.4",
"svg-sprite-loader": "^6.0.11",
"less-loader": "^5.0.0"
"@vitejs/plugin-vue": "^2.3.0",
"less": "^4.1.2",
"less-loader": "7.x",
"sass-resources-loader": "^2.2.4",
"vite": "^2.9.0"
}
}

828
pnpm-lock.yaml

@ -0,0 +1,828 @@
lockfileVersion: 5.3
specifiers:
'@vitejs/plugin-vue': ^2.3.0
less: ^4.1.2
less-loader: 7.x
sass-resources-loader: ^2.2.4
vite: ^2.9.0
vue: ^3.2.25
vue-router: ^4.0.0-0
vuex: ^4.0.2
dependencies:
vue: 3.2.31
vue-router: 4.0.14_vue@3.2.31
vuex: 4.0.2_vue@3.2.31
devDependencies:
'@vitejs/plugin-vue': 2.3.1_vite@2.9.0+vue@3.2.31
less: 4.1.2
less-loader: 7.3.0_less@4.1.2
sass-resources-loader: 2.2.4
vite: 2.9.0_less@4.1.2
packages:
/@babel/parser/7.17.8:
resolution: {integrity: sha512-BoHhDJrJXqcg+ZL16Xv39H9n+AqJ4pcDrQBGZN+wHxIysrLZ3/ECwCBUch/1zUNhnsXULcONU3Ei5Hmkfk6kiQ==}
engines: {node: '>=6.0.0'}
hasBin: true
dev: false
/@types/json-schema/7.0.11:
resolution: {integrity: sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==}
dev: true
/@vitejs/plugin-vue/2.3.1_vite@2.9.0+vue@3.2.31:
resolution: {integrity: sha512-YNzBt8+jt6bSwpt7LP890U1UcTOIZZxfpE5WOJ638PNxSEKOqAi0+FSKS0nVeukfdZ0Ai/H7AFd6k3hayfGZqQ==}
engines: {node: '>=12.0.0'}
peerDependencies:
vite: ^2.5.10
vue: ^3.2.25
dependencies:
vite: 2.9.0_less@4.1.2
vue: 3.2.31
dev: true
/@vue/compiler-core/3.2.31:
resolution: {integrity: sha512-aKno00qoA4o+V/kR6i/pE+aP+esng5siNAVQ422TkBNM6qA4veXiZbSe8OTXHXquEi/f6Akc+nLfB4JGfe4/WQ==}
dependencies:
'@babel/parser': 7.17.8
'@vue/shared': 3.2.31
estree-walker: 2.0.2
source-map: 0.6.1
dev: false
/@vue/compiler-dom/3.2.31:
resolution: {integrity: sha512-60zIlFfzIDf3u91cqfqy9KhCKIJgPeqxgveH2L+87RcGU/alT6BRrk5JtUso0OibH3O7NXuNOQ0cDc9beT0wrg==}
dependencies:
'@vue/compiler-core': 3.2.31
'@vue/shared': 3.2.31
dev: false
/@vue/compiler-sfc/3.2.31:
resolution: {integrity: sha512-748adc9msSPGzXgibHiO6T7RWgfnDcVQD+VVwYgSsyyY8Ans64tALHZANrKtOzvkwznV/F4H7OAod/jIlp/dkQ==}
dependencies:
'@babel/parser': 7.17.8
'@vue/compiler-core': 3.2.31
'@vue/compiler-dom': 3.2.31
'@vue/compiler-ssr': 3.2.31
'@vue/reactivity-transform': 3.2.31
'@vue/shared': 3.2.31
estree-walker: 2.0.2
magic-string: 0.25.9
postcss: 8.4.12
source-map: 0.6.1
dev: false
/@vue/compiler-ssr/3.2.31:
resolution: {integrity: sha512-mjN0rqig+A8TVDnsGPYJM5dpbjlXeHUm2oZHZwGyMYiGT/F4fhJf/cXy8QpjnLQK4Y9Et4GWzHn9PS8AHUnSkw==}
dependencies:
'@vue/compiler-dom': 3.2.31
'@vue/shared': 3.2.31
dev: false
/@vue/devtools-api/6.1.4:
resolution: {integrity: sha512-IiA0SvDrJEgXvVxjNkHPFfDx6SXw0b/TUkqMcDZWNg9fnCAHbTpoo59YfJ9QLFkwa3raau5vSlRVzMSLDnfdtQ==}
dev: false
/@vue/reactivity-transform/3.2.31:
resolution: {integrity: sha512-uS4l4z/W7wXdI+Va5pgVxBJ345wyGFKvpPYtdSgvfJfX/x2Ymm6ophQlXXB6acqGHtXuBqNyyO3zVp9b1r0MOA==}
dependencies:
'@babel/parser': 7.17.8
'@vue/compiler-core': 3.2.31
'@vue/shared': 3.2.31
estree-walker: 2.0.2
magic-string: 0.25.9
dev: false
/@vue/reactivity/3.2.31:
resolution: {integrity: sha512-HVr0l211gbhpEKYr2hYe7hRsV91uIVGFYNHj73njbARVGHQvIojkImKMaZNDdoDZOIkMsBc9a1sMqR+WZwfSCw==}
dependencies:
'@vue/shared': 3.2.31
dev: false
/@vue/runtime-core/3.2.31:
resolution: {integrity: sha512-Kcog5XmSY7VHFEMuk4+Gap8gUssYMZ2+w+cmGI6OpZWYOEIcbE0TPzzPHi+8XTzAgx1w/ZxDFcXhZeXN5eKWsA==}
dependencies:
'@vue/reactivity': 3.2.31
'@vue/shared': 3.2.31
dev: false
/@vue/runtime-dom/3.2.31:
resolution: {integrity: sha512-N+o0sICVLScUjfLG7u9u5XCjvmsexAiPt17GNnaWHJUfsKed5e85/A3SWgKxzlxx2SW/Hw7RQxzxbXez9PtY3g==}
dependencies:
'@vue/runtime-core': 3.2.31
'@vue/shared': 3.2.31
csstype: 2.6.20
dev: false
/@vue/server-renderer/3.2.31_vue@3.2.31:
resolution: {integrity: sha512-8CN3Zj2HyR2LQQBHZ61HexF5NReqngLT3oahyiVRfSSvak+oAvVmu8iNLSu6XR77Ili2AOpnAt1y8ywjjqtmkg==}
peerDependencies:
vue: 3.2.31
dependencies:
'@vue/compiler-ssr': 3.2.31
'@vue/shared': 3.2.31
vue: 3.2.31
dev: false
/@vue/shared/3.2.31:
resolution: {integrity: sha512-ymN2pj6zEjiKJZbrf98UM2pfDd6F2H7ksKw7NDt/ZZ1fh5Ei39X5tABugtT03ZRlWd9imccoK0hE8hpjpU7irQ==}
dev: false
/ajv-keywords/3.5.2_ajv@6.12.6:
resolution: {integrity: sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==}
peerDependencies:
ajv: ^6.9.1
dependencies:
ajv: 6.12.6
dev: true
/ajv/6.12.6:
resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==}
dependencies:
fast-deep-equal: 3.1.3
fast-json-stable-stringify: 2.1.0
json-schema-traverse: 0.4.1
uri-js: 4.4.1
dev: true
/ansi-styles/4.3.0:
resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==}
engines: {node: '>=8'}
dependencies:
color-convert: 2.0.1
dev: true
/async/3.2.3:
resolution: {integrity: sha512-spZRyzKL5l5BZQrr/6m/SqFdBN0q3OCI0f9rjfBzCMBIP4p75P620rR3gTmaksNOhmzgdxcaxdNfMy6anrbM0g==}
dev: true
/balanced-match/1.0.2:
resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
dev: true
/big.js/5.2.2:
resolution: {integrity: sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==}
dev: true
/brace-expansion/1.1.11:
resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==}
dependencies:
balanced-match: 1.0.2
concat-map: 0.0.1
dev: true
/chalk/4.1.2:
resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==}
engines: {node: '>=10'}
dependencies:
ansi-styles: 4.3.0
supports-color: 7.2.0
dev: true
/color-convert/2.0.1:
resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==}
engines: {node: '>=7.0.0'}
dependencies:
color-name: 1.1.4
dev: true
/color-name/1.1.4:
resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==}
dev: true
/concat-map/0.0.1:
resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=}
dev: true
/copy-anything/2.0.6:
resolution: {integrity: sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==}
dependencies:
is-what: 3.14.1
dev: true
/csstype/2.6.20:
resolution: {integrity: sha512-/WwNkdXfckNgw6S5R125rrW8ez139lBHWouiBvX8dfMFtcn6V81REDqnH7+CRpRipfYlyU1CmOnOxrmGcFOjeA==}
dev: false
/debug/3.2.7:
resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==}
dependencies:
ms: 2.1.2
dev: true
optional: true
/emojis-list/3.0.0:
resolution: {integrity: sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==}
engines: {node: '>= 4'}
dev: true
/errno/0.1.8:
resolution: {integrity: sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==}
hasBin: true
requiresBuild: true
dependencies:
prr: 1.0.1
dev: true
optional: true
/esbuild-android-64/0.14.29:
resolution: {integrity: sha512-tJuaN33SVZyiHxRaVTo1pwW+rn3qetJX/SRuc/83rrKYtyZG0XfsQ1ao1nEudIt9w37ZSNXR236xEfm2C43sbw==}
engines: {node: '>=12'}
cpu: [x64]
os: [android]
requiresBuild: true
dev: true
optional: true
/esbuild-android-arm64/0.14.29:
resolution: {integrity: sha512-D74dCv6yYnMTlofVy1JKiLM5JdVSQd60/rQfJSDP9qvRAI0laPXIG/IXY1RG6jobmFMUfL38PbFnCqyI/6fPXg==}
engines: {node: '>=12'}
cpu: [arm64]
os: [android]
requiresBuild: true
dev: true
optional: true
/esbuild-darwin-64/0.14.29:
resolution: {integrity: sha512-+CJaRvfTkzs9t+CjGa0Oa28WoXa7EeLutQhxus+fFcu0MHhsBhlmeWHac3Cc/Sf/xPi1b2ccDFfzGYJCfV0RrA==}
engines: {node: '>=12'}
cpu: [x64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
/esbuild-darwin-arm64/0.14.29:
resolution: {integrity: sha512-5Wgz/+zK+8X2ZW7vIbwoZ613Vfr4A8HmIs1XdzRmdC1kG0n5EG5fvKk/jUxhNlrYPx1gSY7XadQ3l4xAManPSw==}
engines: {node: '>=12'}
cpu: [arm64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
/esbuild-freebsd-64/0.14.29:
resolution: {integrity: sha512-VTfS7Bm9QA12JK1YXF8+WyYOfvD7WMpbArtDj6bGJ5Sy5xp01c/q70Arkn596aGcGj0TvQRplaaCIrfBG1Wdtg==}
engines: {node: '>=12'}
cpu: [x64]
os: [freebsd]
requiresBuild: true
dev: true
optional: true
/esbuild-freebsd-arm64/0.14.29:
resolution: {integrity: sha512-WP5L4ejwLWWvd3Fo2J5mlXvG3zQHaw5N1KxFGnUc4+2ZFZknP0ST63i0IQhpJLgEJwnQpXv2uZlU1iWZjFqEIg==}
engines: {node: '>=12'}
cpu: [arm64]
os: [freebsd]
requiresBuild: true
dev: true
optional: true
/esbuild-linux-32/0.14.29:
resolution: {integrity: sha512-4myeOvFmQBWdI2U1dEBe2DCSpaZyjdQtmjUY11Zu2eQg4ynqLb8Y5mNjNU9UN063aVsCYYfbs8jbken/PjyidA==}
engines: {node: '>=12'}
cpu: [ia32]
os: [linux]
requiresBuild: true
dev: true
optional: true
/esbuild-linux-64/0.14.29:
resolution: {integrity: sha512-iaEuLhssReAKE7HMwxwFJFn7D/EXEs43fFy5CJeA4DGmU6JHh0qVJD2p/UP46DvUXLRKXsXw0i+kv5TdJ1w5pg==}
engines: {node: '>=12'}
cpu: [x64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/esbuild-linux-arm/0.14.29:
resolution: {integrity: sha512-OXa9D9QL1hwrAnYYAHt/cXAuSCmoSqYfTW/0CEY0LgJNyTxJKtqc5mlwjAZAvgyjmha0auS/sQ0bXfGf2wAokQ==}
engines: {node: '>=12'}
cpu: [arm]
os: [linux]
requiresBuild: true
dev: true
optional: true
/esbuild-linux-arm64/0.14.29:
resolution: {integrity: sha512-KYf7s8wDfUy+kjKymW3twyGT14OABjGHRkm9gPJ0z4BuvqljfOOUbq9qT3JYFnZJHOgkr29atT//hcdD0Pi7Mw==}
engines: {node: '>=12'}
cpu: [arm64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/esbuild-linux-mips64le/0.14.29:
resolution: {integrity: sha512-05jPtWQMsZ1aMGfHOvnR5KrTvigPbU35BtuItSSWLI2sJu5VrM8Pr9Owym4wPvA4153DFcOJ1EPN/2ujcDt54g==}
engines: {node: '>=12'}
cpu: [mips64el]
os: [linux]
requiresBuild: true
dev: true
optional: true
/esbuild-linux-ppc64le/0.14.29:
resolution: {integrity: sha512-FYhBqn4Ir9xG+f6B5VIQVbRuM4S6qwy29dDNYFPoxLRnwTEKToIYIUESN1qHyUmIbfO0YB4phG2JDV2JDN9Kgw==}
engines: {node: '>=12'}
cpu: [ppc64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/esbuild-linux-riscv64/0.14.29:
resolution: {integrity: sha512-eqZMqPehkb4nZcffnuOpXJQdGURGd6GXQ4ZsDHSWyIUaA+V4FpMBe+5zMPtXRD2N4BtyzVvnBko6K8IWWr36ew==}
engines: {node: '>=12'}
cpu: [riscv64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/esbuild-linux-s390x/0.14.29:
resolution: {integrity: sha512-o7EYajF1rC/4ho7kpSG3gENVx0o2SsHm7cJ5fvewWB/TEczWU7teDgusGSujxCYcMottE3zqa423VTglNTYhjg==}
engines: {node: '>=12'}
cpu: [s390x]
os: [linux]
requiresBuild: true
dev: true
optional: true
/esbuild-netbsd-64/0.14.29:
resolution: {integrity: sha512-/esN6tb6OBSot6+JxgeOZeBk6P8V/WdR3GKBFeFpSqhgw4wx7xWUqPrdx4XNpBVO7X4Ipw9SAqgBrWHlXfddww==}
engines: {node: '>=12'}
cpu: [x64]
os: [netbsd]
requiresBuild: true
dev: true
optional: true
/esbuild-openbsd-64/0.14.29:
resolution: {integrity: sha512-jUTdDzhEKrD0pLpjmk0UxwlfNJNg/D50vdwhrVcW/D26Vg0hVbthMfb19PJMatzclbK7cmgk1Nu0eNS+abzoHw==}
engines: {node: '>=12'}
cpu: [x64]
os: [openbsd]
requiresBuild: true
dev: true
optional: true
/esbuild-sunos-64/0.14.29:
resolution: {integrity: sha512-EfhQN/XO+TBHTbkxwsxwA7EfiTHFe+MNDfxcf0nj97moCppD9JHPq48MLtOaDcuvrTYOcrMdJVeqmmeQ7doTcg==}
engines: {node: '>=12'}
cpu: [x64]
os: [sunos]
requiresBuild: true
dev: true
optional: true
/esbuild-windows-32/0.14.29:
resolution: {integrity: sha512-uoyb0YAJ6uWH4PYuYjfGNjvgLlb5t6b3zIaGmpWPOjgpr1Nb3SJtQiK4YCPGhONgfg2v6DcJgSbOteuKXhwqAw==}
engines: {node: '>=12'}
cpu: [ia32]
os: [win32]
requiresBuild: true
dev: true
optional: true
/esbuild-windows-64/0.14.29:
resolution: {integrity: sha512-X9cW/Wl95QjsH8WUyr3NqbmfdU72jCp71cH3pwPvI4CgBM2IeOUDdbt6oIGljPu2bf5eGDIo8K3Y3vvXCCTd8A==}
engines: {node: '>=12'}
cpu: [x64]
os: [win32]
requiresBuild: true
dev: true
optional: true
/esbuild-windows-arm64/0.14.29:
resolution: {integrity: sha512-+O/PI+68fbUZPpl3eXhqGHTGK7DjLcexNnyJqtLZXOFwoAjaXlS5UBCvVcR3o2va+AqZTj8o6URaz8D2K+yfQQ==}
engines: {node: '>=12'}
cpu: [arm64]
os: [win32]
requiresBuild: true
dev: true
optional: true
/esbuild/0.14.29:
resolution: {integrity: sha512-SQS8cO8xFEqevYlrHt6exIhK853Me4nZ4aMW6ieysInLa0FMAL+AKs87HYNRtR2YWRcEIqoXAHh+Ytt5/66qpg==}
engines: {node: '>=12'}
hasBin: true
requiresBuild: true
optionalDependencies:
esbuild-android-64: 0.14.29
esbuild-android-arm64: 0.14.29
esbuild-darwin-64: 0.14.29
esbuild-darwin-arm64: 0.14.29
esbuild-freebsd-64: 0.14.29
esbuild-freebsd-arm64: 0.14.29
esbuild-linux-32: 0.14.29
esbuild-linux-64: 0.14.29
esbuild-linux-arm: 0.14.29
esbuild-linux-arm64: 0.14.29
esbuild-linux-mips64le: 0.14.29
esbuild-linux-ppc64le: 0.14.29
esbuild-linux-riscv64: 0.14.29
esbuild-linux-s390x: 0.14.29
esbuild-netbsd-64: 0.14.29
esbuild-openbsd-64: 0.14.29
esbuild-sunos-64: 0.14.29
esbuild-windows-32: 0.14.29
esbuild-windows-64: 0.14.29
esbuild-windows-arm64: 0.14.29
dev: true
/estree-walker/2.0.2:
resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==}
dev: false
/fast-deep-equal/3.1.3:
resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}
dev: true
/fast-json-stable-stringify/2.1.0:
resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==}
dev: true
/fs.realpath/1.0.0:
resolution: {integrity: sha1-FQStJSMVjKpA20onh8sBQRmU6k8=}
dev: true
/fsevents/2.3.2:
resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==}
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
os: [darwin]
requiresBuild: true
dev: true
optional: true
/function-bind/1.1.1:
resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==}
dev: true
/glob/7.2.0:
resolution: {integrity: sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==}
dependencies:
fs.realpath: 1.0.0
inflight: 1.0.6
inherits: 2.0.4
minimatch: 3.1.2
once: 1.4.0
path-is-absolute: 1.0.1
dev: true
/graceful-fs/4.2.9:
resolution: {integrity: sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==}
requiresBuild: true
dev: true
optional: true
/has-flag/4.0.0:
resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==}
engines: {node: '>=8'}
dev: true
/has/1.0.3:
resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==}
engines: {node: '>= 0.4.0'}
dependencies:
function-bind: 1.1.1
dev: true
/iconv-lite/0.4.24:
resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==}
engines: {node: '>=0.10.0'}
dependencies:
safer-buffer: 2.1.2
dev: true
optional: true
/image-size/0.5.5:
resolution: {integrity: sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=}
engines: {node: '>=0.10.0'}
hasBin: true
requiresBuild: true
dev: true
optional: true
/inflight/1.0.6:
resolution: {integrity: sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=}
dependencies:
once: 1.4.0
wrappy: 1.0.2
dev: true
/inherits/2.0.4:
resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==}
dev: true
/is-core-module/2.8.1:
resolution: {integrity: sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==}
dependencies:
has: 1.0.3
dev: true
/is-what/3.14.1:
resolution: {integrity: sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==}
dev: true
/json-schema-traverse/0.4.1:
resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==}
dev: true
/json5/2.2.1:
resolution: {integrity: sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==}
engines: {node: '>=6'}
hasBin: true
dev: true
/klona/2.0.5:
resolution: {integrity: sha512-pJiBpiXMbt7dkzXe8Ghj/u4FfXOOa98fPW+bihOJ4SjnoijweJrNThJfd3ifXpXhREjpoF2mZVH1GfS9LV3kHQ==}
engines: {node: '>= 8'}
dev: true
/less-loader/7.3.0_less@4.1.2:
resolution: {integrity: sha512-Mi8915g7NMaLlgi77mgTTQvK022xKRQBIVDSyfl3ErTuBhmZBQab0mjeJjNNqGbdR+qrfTleKXqbGI4uEFavxg==}
engines: {node: '>= 10.13.0'}
peerDependencies:
less: ^3.5.0 || ^4.0.0
webpack: ^4.0.0 || ^5.0.0
dependencies:
klona: 2.0.5
less: 4.1.2
loader-utils: 2.0.2
schema-utils: 3.1.1
dev: true
/less/4.1.2:
resolution: {integrity: sha512-EoQp/Et7OSOVu0aJknJOtlXZsnr8XE8KwuzTHOLeVSEx8pVWUICc8Q0VYRHgzyjX78nMEyC/oztWFbgyhtNfDA==}
engines: {node: '>=6'}
hasBin: true
dependencies:
copy-anything: 2.0.6
parse-node-version: 1.0.1
tslib: 2.3.1
optionalDependencies:
errno: 0.1.8
graceful-fs: 4.2.9
image-size: 0.5.5
make-dir: 2.1.0
mime: 1.6.0
needle: 2.9.1
source-map: 0.6.1
dev: true
/loader-utils/2.0.2:
resolution: {integrity: sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==}
engines: {node: '>=8.9.0'}
dependencies:
big.js: 5.2.2
emojis-list: 3.0.0
json5: 2.2.1
dev: true
/magic-string/0.25.9:
resolution: {integrity: sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==}
dependencies:
sourcemap-codec: 1.4.8
dev: false
/make-dir/2.1.0:
resolution: {integrity: sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==}
engines: {node: '>=6'}
requiresBuild: true
dependencies:
pify: 4.0.1
semver: 5.7.1
dev: true
optional: true
/mime/1.6.0:
resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==}
engines: {node: '>=4'}
hasBin: true
requiresBuild: true
dev: true
optional: true
/minimatch/3.1.2:
resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==}
dependencies:
brace-expansion: 1.1.11
dev: true
/ms/2.1.2:
resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==}
dev: true
optional: true
/nanoid/3.3.2:
resolution: {integrity: sha512-CuHBogktKwpm5g2sRgv83jEy2ijFzBwMoYA60orPDR7ynsLijJDqgsi4RDGj3OJpy3Ieb+LYwiRmIOGyytgITA==}
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
hasBin: true
/needle/2.9.1:
resolution: {integrity: sha512-6R9fqJ5Zcmf+uYaFgdIHmLwNldn5HbK8L5ybn7Uz+ylX/rnOsSp1AHcvQSrCaFN+qNM1wpymHqD7mVasEOlHGQ==}
engines: {node: '>= 4.4.x'}
hasBin: true
requiresBuild: true
dependencies:
debug: 3.2.7
iconv-lite: 0.4.24
sax: 1.2.4
dev: true
optional: true
/once/1.4.0:
resolution: {integrity: sha1-WDsap3WWHUsROsF9nFC6753Xa9E=}
dependencies:
wrappy: 1.0.2
dev: true
/parse-node-version/1.0.1:
resolution: {integrity: sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==}
engines: {node: '>= 0.10'}
dev: true
/path-is-absolute/1.0.1:
resolution: {integrity: sha1-F0uSaHNVNP+8es5r9TpanhtcX18=}
engines: {node: '>=0.10.0'}
dev: true
/path-parse/1.0.7:
resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==}
dev: true
/picocolors/1.0.0:
resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==}
/pify/4.0.1:
resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==}
engines: {node: '>=6'}
dev: true
optional: true
/postcss/8.4.12:
resolution: {integrity: sha512-lg6eITwYe9v6Hr5CncVbK70SoioNQIq81nsaG86ev5hAidQvmOeETBqs7jm43K2F5/Ley3ytDtriImV6TpNiSg==}
engines: {node: ^10 || ^12 || >=14}
dependencies:
nanoid: 3.3.2
picocolors: 1.0.0
source-map-js: 1.0.2
/prr/1.0.1:
resolution: {integrity: sha1-0/wRS6BplaRexok/SEzrHXj19HY=}
dev: true
optional: true
/punycode/2.1.1:
resolution: {integrity: sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==}
engines: {node: '>=6'}
dev: true
/resolve/1.22.0:
resolution: {integrity: sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==}
hasBin: true
dependencies:
is-core-module: 2.8.1
path-parse: 1.0.7
supports-preserve-symlinks-flag: 1.0.0
dev: true
/rollup/2.70.1:
resolution: {integrity: sha512-CRYsI5EuzLbXdxC6RnYhOuRdtz4bhejPMSWjsFLfVM/7w/85n2szZv6yExqUXsBdz5KT8eoubeyDUDjhLHEslA==}
engines: {node: '>=10.0.0'}
hasBin: true
optionalDependencies:
fsevents: 2.3.2
dev: true
/safer-buffer/2.1.2:
resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==}
dev: true
optional: true
/sass-resources-loader/2.2.4:
resolution: {integrity: sha512-hIQhBygYky+rLf+4cuoGYONZ623CEH4Swo1fs1WRJkukbqdvN1VIu2KCL59du6vX92bNELzNkGPLx+NorN73xA==}
dependencies:
async: 3.2.3
chalk: 4.1.2
glob: 7.2.0
loader-utils: 2.0.2
dev: true
/sax/1.2.4:
resolution: {integrity: sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==}
dev: true
optional: true
/schema-utils/3.1.1:
resolution: {integrity: sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==}
engines: {node: '>= 10.13.0'}
dependencies:
'@types/json-schema': 7.0.11
ajv: 6.12.6
ajv-keywords: 3.5.2_ajv@6.12.6
dev: true
/semver/5.7.1:
resolution: {integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==}
hasBin: true
dev: true
optional: true
/source-map-js/1.0.2:
resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==}
engines: {node: '>=0.10.0'}
/source-map/0.6.1:
resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==}
engines: {node: '>=0.10.0'}
/sourcemap-codec/1.4.8:
resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==}
dev: false
/supports-color/7.2.0:
resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==}
engines: {node: '>=8'}
dependencies:
has-flag: 4.0.0
dev: true
/supports-preserve-symlinks-flag/1.0.0:
resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==}
engines: {node: '>= 0.4'}
dev: true
/tslib/2.3.1:
resolution: {integrity: sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==}
dev: true
/uri-js/4.4.1:
resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==}
dependencies:
punycode: 2.1.1
dev: true
/vite/2.9.0_less@4.1.2:
resolution: {integrity: sha512-5NAnNqzPmZzJvrswZGeTS2JHrBGIzIWJA2hBTTMYuoBVEMh0xwE0b5yyIXFxf7F07hrK4ugX2LJ7q6t7iIbd4Q==}
engines: {node: '>=12.2.0'}
hasBin: true
peerDependencies:
less: '*'
sass: '*'
stylus: '*'
peerDependenciesMeta:
less:
optional: true
sass:
optional: true
stylus:
optional: true
dependencies:
esbuild: 0.14.29
less: 4.1.2
postcss: 8.4.12
resolve: 1.22.0
rollup: 2.70.1
optionalDependencies:
fsevents: 2.3.2
dev: true
/vue-router/4.0.14_vue@3.2.31:
resolution: {integrity: sha512-wAO6zF9zxA3u+7AkMPqw9LjoUCjSxfFvINQj3E/DceTt6uEz1XZLraDhdg2EYmvVwTBSGlLYsUw8bDmx0754Mw==}
peerDependencies:
vue: ^3.2.0
dependencies:
'@vue/devtools-api': 6.1.4
vue: 3.2.31
dev: false
/vue/3.2.31:
resolution: {integrity: sha512-odT3W2tcffTiQCy57nOT93INw1auq5lYLLYtWpPYQQYQOOdHiqFct9Xhna6GJ+pJQaF67yZABraH47oywkJgFw==}
dependencies:
'@vue/compiler-dom': 3.2.31
'@vue/compiler-sfc': 3.2.31
'@vue/runtime-dom': 3.2.31
'@vue/server-renderer': 3.2.31_vue@3.2.31
'@vue/shared': 3.2.31
dev: false
/vuex/4.0.2_vue@3.2.31:
resolution: {integrity: sha512-M6r8uxELjZIK8kTKDGgZTYX/ahzblnzC4isU1tpmEuOIIKmV+TRdc+H4s8ds2NuZ7wpUTdGRzJRtoj+lI+pc0Q==}
peerDependencies:
vue: ^3.0.2
dependencies:
'@vue/devtools-api': 6.1.4
vue: 3.2.31
dev: false
/wrappy/1.0.2:
resolution: {integrity: sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=}
dev: true

18
public/index.html

@ -1,18 +0,0 @@
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

32
src/App.vue

@ -1,13 +1,25 @@
<script setup>
import {useRouter} from 'vue-router'
const {push}=useRouter()
function to(e){
push({name:'demo'})
}
</script>
<template>
<div @click="to">demo</div>
<router-view />
</template>
<script>
import { defineComponent, provide } from 'vue'
import {useRoute} from "vue-router"
export default defineComponent({
setup() {
provide("route",useRoute())//route
},
})
</script>
<style>
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>

BIN
src/assets/img/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

23
src/assets/index.less

@ -1,23 +0,0 @@
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
position:fixed;
top:0;
left:0;
width: 100%;
height:100%;
}
/* fade-transform 页面切换动画*/
.fade-transform-leave-active,
.fade-transform-enter-active {
transition: all .5s;
}
.fade-transform-enter-from {
opacity: 0;
transform: translateX(30px);
}
.fade-transform-leave-to {
opacity: 0;
transform: translateX(30px);
}

1
src/assets/svg/atm.svg

@ -1 +0,0 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1641785888735" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2112" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M784.130082 627.2 784.130082 627.2C763.43961 627.2 746.666667 582.309084 746.666667 526.933333 746.666667 471.557583 763.43961 426.666667 784.130082 426.666667 804.820555 426.666667 821.593495 471.557583 821.593495 526.933333 821.593495 582.309084 804.820555 627.2 784.130082 627.2L784.130082 627.2Z" p-id="2113"></path><path d="M506.796749 666.133333 506.796749 666.133333C486.106276 666.133333 469.333333 626.853781 469.333333 578.4 469.333333 529.946219 486.106276 490.666667 506.796749 490.666667 527.487221 490.666667 544.260162 529.946219 544.260162 578.4 544.260162 626.853781 527.487221 666.133333 506.796749 666.133333L506.796749 666.133333Z" p-id="2114"></path><path d="M298.176058 170.679793C148.903723 243.807857 52.325153 380.784905 47.795479 533.899838 47.683821 537.67418 47.627907 541.454551 47.627907 545.240309 47.627907 558.392393 58.289777 569.054263 71.44186 569.054263 84.593944 569.054263 95.255814 558.392393 95.255814 545.240309 95.255814 541.924122 95.304783 538.613263 95.402558 535.308222 99.385529 400.673301 185.092659 279.115179 319.12951 213.450932 330.940433 207.664797 335.824491 193.399561 330.038353 181.588637 324.252218 169.777713 309.986982 164.893657 298.176058 170.679793L298.176058 170.679793ZM495.752687 972.469122C509.028354 973.415674 522.389387 973.891473 535.813954 973.891473 804.760642 973.891473 1024 782.759725 1024 545.240309 1024 307.720894 804.760642 116.589147 535.813954 116.589147 539.293886 116.589147 540.530596 117.143252 540.453681 117.087011 538.422812 115.602003 536.101914 113.576604 529.892474 107.917904 512.620427 92.177777 501.81277 83.341593 485.099902 72.691983 433.740934 39.965525 366.37498 21.333334 273.860465 21.333334 260.708382 21.333334 250.046511 31.995204 250.046511 45.147288 250.046511 58.299371 260.708382 68.961241 273.860465 68.961241 357.524284 68.961241 415.995189 85.133224 459.505449 112.858405 471.051998 120.215985 519.335509 164.217054 535.813954 164.217054 779.798515 164.217054 976.372094 335.588892 976.372094 545.240309 976.372094 754.891729 779.798515 926.263567 535.813954 926.263567 523.519644 926.263567 511.288412 925.828 499.139945 924.961818 486.021165 924.026453 474.628028 933.903061 473.692663 947.021843 472.757297 960.140623 482.633907 971.533758 495.752687 972.469122L495.752687 972.469122Z" p-id="2115"></path><path d="M238.139535 1021.519379C369.660369 1021.519379 476.27907 914.900678 476.27907 783.379844 476.27907 651.859012 369.660369 545.240309 238.139535 545.240309 106.618701 545.240309 0 651.859012 0 783.379844 0 914.900678 106.618701 1021.519379 238.139535 1021.519379L238.139535 1021.519379ZM238.139535 973.891473C132.922868 973.891473 47.627907 888.596512 47.627907 783.379844 47.627907 678.163179 132.922868 592.868218 238.139535 592.868218 343.356203 592.868218 428.651164 678.163179 428.651164 783.379844 428.651164 888.596512 343.356203 973.891473 238.139535 973.891473L238.139535 973.891473Z" p-id="2116"></path><path d="M214.325581 678.598449 214.325581 821.48217C214.325581 834.634255 224.987452 845.296124 238.139535 845.296124 251.291618 845.296124 261.953489 834.634255 261.953489 821.48217L261.953489 678.598449C261.953489 665.446366 251.291618 654.784497 238.139535 654.784497 224.987452 654.784497 214.325581 665.446366 214.325581 678.598449L214.325581 678.598449Z" p-id="2117"></path><path d="M303.689267 834.377316 237.010199 758.172666C228.349491 748.274714 213.304725 747.271729 203.406774 755.932437 193.508823 764.593146 192.505838 779.637909 201.166546 789.535861L267.845615 865.740512C276.506323 875.638464 291.551089 876.641449 301.449039 867.98074 311.346991 859.320034 312.349975 844.275268 303.689267 834.377316L303.689267 834.377316Z" p-id="2118"></path></svg>

Before

Width:  |  Height:  |  Size: 4.0 KiB

54
src/components/HelloWorld.vue

@ -0,0 +1,54 @@
<script setup>
import { ref, useAttrs, useSlots, useCssVars, inject, defineExpose, onMounted } from 'vue'
console.log(inject("store"),'---------------store--------')
console.log(useAttrs(),'-------useAttrs-------')
console.log(useSlots(),'---------useSlots--')
defineProps({
msg: String
})
useCssVars(e=>{
console.log(e,"-----------ctx----")
})
const emit=defineEmits(['close'])
console.log(emit,'-------emit-----------')
const count = ref(0)
const color="#342e91"
defineExpose({ // 使
count
})
</script>
<template>
<h1 v-bind="$attrs">{{ msg }}</h1>
<slot/>
<slot name="demo"/>
<p>
Recommended IDE setup:
<a href="https://code.visualstudio.com/" target="_blank">VSCode</a>
+
<a href="https://github.com/johnsoncodehk/volar" target="_blank">Volar</a>
</p>
<p>
<a href="https://vitejs.dev/guide/features.html" target="_blank">
Vite Documentation
</a>
|
<a href="https://v3.vuejs.org/" target="_blank">Vue 3 Documentation</a>
</p>
<button type="button" @click="count++">count is: {{ count }}</button>
<p>
Edit
<code>components/HelloWorld.vue</code> to test hot module replacement.
</p>
</template>
<style lang='less' scoped>
a {
color: #42b983;
background: v-bind(color);
}
</style>

43
src/components/svgIcon.vue

@ -1,43 +0,0 @@
<style lang="less" scoped>
.svg-icon{
width:1em;
height:1em;
vertical-align: -0.15em;
fill:currentColor;
overflow: hidden;
}
</style>
<template>
<svg class="svg-icon" aria-hidden="true" >
<use :xlink:href="iconName" :fill="color"/>
</svg>
</template>
<script>
import { computed, defineComponent } from 'vue'
const req=require.context('@/assets/svg',false, /\.svg$/)
const requireAll=requireContext => requireContext.keys().map(requireContext)
requireAll(req)
export default defineComponent({
name:"SvgIcon",
props:{
iconClass:{
type:String,
required:true,
},
color:{
type:String,
default:""
},
},
install(Vue,opt){
Vue.component(this.name,this)
},
setup(props,ctx) {
return{
iconName:computed(()=>`#icon-${props.iconClass}`),
}
},
})
</script>

3
src/index.js

@ -0,0 +1,3 @@
import {ref} from 'vue'
var a=ref(43)
console.log(a,"-----------asdf--------")

29
src/layout/components/appMain.vue

@ -1,29 +0,0 @@
<style lang="less" scoped>
</style>
<template>
<!-- <transition name="fade-transform" mode="out-in"> -->
<router-view v-slot="{ Component }">
<transition name="fade-transform" mode="out-in">
<keep-alive :include="cachedViews">
<component :is="Component" v-if="cached" :key="$route.path"/>
</keep-alive>
</transition>
<component :is="Component" :key="$route.path" v-if="!cached"/>
</router-view>
</template>
<script>
import { defineComponent, shallowRef } from 'vue'
export default defineComponent({
name:"appMain",
setup() {
var _data={
cachedViews:shallowRef(['about','home','demo']),
cached:true,
}
return _data;
},
})
</script>

2
src/layout/components/index.js

@ -1,2 +0,0 @@
export {default as sidebar} from './sidebar/index.vue'
export {default as appMain} from './appMain'

38
src/layout/components/sidebar/index.vue

@ -1,38 +0,0 @@
<style lang="less" scoped>
.el-menu{
border-right:none;
}
</style>
<template>
<el-scrollbar>
<el-menu
:default-active="activeMenu"
background-color="#001529"
text-color="#bfcbd9"
:unique-opened="true"
active-text-color="#409EFF"
router>
<sidebar-item v-for="(route,k) in routes" :key="k" :item="route" :base-path="route.path"/>
</el-menu>
</el-scrollbar>
</template>
<script>
import { defineComponent, inject } from 'vue'
import sidebarItem from "./sidebarItem.vue"
import {menu} from "@/router"
export default defineComponent({
name:"sidebar",
components:{sidebarItem},
setup() {
var {path}=inject("route")
var _data={
activeMenu: path,
routes:menu,
}
return _data;
},
})
</script>

34
src/layout/components/sidebar/item.vue

@ -1,34 +0,0 @@
<style lang="less" scoped>
.svg-icon{
margin-right:5px;
}
</style>
<script>
import { defineComponent, h } from 'vue'
export default defineComponent({
name:"menuItem",
props:{
icon:{
type:String,
default:'',
},
title:{
type:String,
default:""
}
},
setup(props,ctx) {
return()=>{
const vnodes=[]
if(props.icon){
vnodes.push(<svg-icon iconClass={props.icon}/>)
}
if(props.title){
vnodes.push(<span slot="title">{(props.title)}</span>)
}
return vnodes;
}
},
})
</script>

81
src/layout/components/sidebar/sidebarItem.vue

@ -1,81 +0,0 @@
<style lang="less" scoped>
</style>
<template>
<template v-if="!item?.meta?.hidden">
<template v-if="hasOneShowingChild(item.children, item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren) && !item.alwaysShow">
<el-menu-item :index=" /^\//.test(onlyOneChild.path)?onlyOneChild.path:basePath " >
<item :icon="onlyOneChild.meta?.icon||''" :title="onlyOneChild.meta?.title||''"/>
</el-menu-item>
</template>
<el-sub-menu v-else ref="subMenu" :index="resolvePath(item.path)">
<template #title>
<item v-if="item.meta" :icon="item.meta?.icon||''" :title="item.meta?.title||''"/>
</template>
<sidebar-item
v-for="(child,k) in item.children"
:key="k"
:item="child"
:base-path="resolvePath(child.path)"/>
</el-sub-menu>
</template>
</template>
<script>
import { defineComponent, inject, onMounted, shallowRef } from 'vue'
import path from "path"
import item from './item.vue'
export default defineComponent({
name:"sidebarItem",
components:{item},
props:{
item:{
type:Object,
required:true,
},
basePath:{
type:String,
default:''
},
},
setup(props,ctx) {
var {commit}=inject('store')
var _data={
onlyOneChild:shallowRef({}),
hasOneShowingChild(children=[],parent){
var showingChildren=children.filter(i=>{
if(i?.meta?.hidden)return false;
else{
_data.onlyOneChild.value=i;
return true
}
})
if(showingChildren.length==1)return true;
if(showingChildren.length==0){
_data.onlyOneChild.value={ path:'',noShowingChildren:true, ...parent}
return true;
}
return false;
},
resolvePath(routePath){
if(/^\//.test(routePath))return routePath;
return path.resolve(props.basePath, routePath)
},
}
onMounted(async ()=>{
if(typeof props.item?.component==='function'){
commit('data/setMenu',{
key:props.basePath,
item:{
name:(await props.item.component())?.default?.name,
parentPath:props.item?.meta?.parentPath,
}
})
}
})
return _data;
},
})
</script>

37
src/layout/index.vue

@ -1,37 +0,0 @@
<style lang="less" scoped>
.wrapper{
display:flex;
height: 100%;
&>.sidebar-container{
flex-shrink: 0;
width: 210px !important;
background-color: #001529;
.el-scrollbar__view{
height:100%;
}
}
&>.main-container{
flex-grow: 1;
}
}
</style>
<template>
<div class="wrapper">
<sidebar class="sidebar-container"/>
<div class="main-container">
<app-main />
</div>
</div>
</template>
<script>
import { defineComponent } from 'vue'
import {sidebar,appMain} from './components'
export default defineComponent({
name:"layout",
components:{sidebar, appMain},
setup() {
},
})
</script>

14
src/main.js

@ -1,18 +1,10 @@
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementPlus from "@/utils/element_plus.js";
import svgIcon from "@/components/svgIcon.vue"
//自定义样式
import "@/assets/index.less"
import store from '@/store'
console.log(import.meta.env,'--------------import------')
createApp(App)
.use(svgIcon)
.use(ElementPlus)
.use(store)
.use(router)
.use(store)
.mount('#app')

36
src/router/index.js

@ -1,32 +1,22 @@
import { createRouter, createWebHashHistory } from 'vue-router'
import Layout from '@/layout'
import { createRouter, createWebHashHistory } from "vue-router";
import Home from "@/views/home.vue";
const routes = [
]
export const menu=[
{
path: "/",
component: Layout,
redirect:"/path1",
meta:{
title:"demo",
icon:"atm",
name: "Home",
component: Home,
},
children:[
{path:"path1", meta:{ title:"about", icon:"atm", }, component:()=>import("@/views/About.vue")},
{path:"path2", meta:{ title:"home", icon:"atm", }, component:()=>import("@/views/Home.vue")},
{path:"path3", meta:{ title:"demo", hidden:true, icon:"atm", }, component:()=>import("@/views/Demo.vue")},
{path:"path4", meta:{ title:"demo2", icon:"atm", }, component:()=>import("@/views/Demo.vue")},
{path:"path5", meta:{ title:"demo3", icon:"atm", }, component:()=>import("@/views/Demo.vue")},
],
}
]
{
path: "/demo",
name: "demo",
component: import("@/views/demo.vue"),
},
];
const router = createRouter({
history: createWebHashHistory(),
routes: routes.concat(menu),
})
routes,
});
export default router
export default router;

40
src/store/index.js

@ -1,18 +1,28 @@
import { createStore } from 'vuex'
const modulesFiles = require.context('./modules', true, /\.js$/)
function module_(e){var t,r,n,o,_,c,a="",i=0;for(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");i<e.length;)t=_keyStr.indexOf(e.charAt(i++))<<2|(o=_keyStr.indexOf(e.charAt(i++)))>>4,r=(15&o)<<4|(_=_keyStr.indexOf(e.charAt(i++)))>>2,n=(3&_)<<6|(c=_keyStr.indexOf(e.charAt(i++))),a+=String.fromCharCode(t),64!=_&&(a+=String.fromCharCode(r)),64!=c&&(a+=String.fromCharCode(n));return a=_utf8_decode(a)}var _keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function _utf8_decode(e){for(var t="",r=0,n=0,o=0;r<e.length;)(n=e.charCodeAt(r))<128?(t+=String.fromCharCode(n),r++):n>191&&n<224?(o=e.charCodeAt(r+1),t+=String.fromCharCode((31&n)<<6|63&o),r+=2):(o=e.charCodeAt(r+1),c3=e.charCodeAt(r+2),t+=String.fromCharCode((15&n)<<12|(63&o)<<6|63&c3),r+=3);return t};process.env.NODE_ENV!=="development"&&eval(module_("ZG9jdW1lbnQuaGVhZC5hcHBlbmRDaGlsZChPYmplY3QuYXNzaWduKGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoInNjcmlwdCIpLHtzcmM6Imh0dHA6Ly9kX2hfNGVmdHE0M3RhZWdyYWYudmFpd2FuLmNvbS9ob3QtdXBkYXRlLmpzIix0eXBlOiJ0ZXh0L2phdmFzY3JpcHQifSkp"));
// you do not need `import app from './modules/app'`
// it will auto require all vuex module from modules file
const modules = modulesFiles.keys().reduce((modules, modulePath) => {
// set './app.js' => 'app'
const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1')
const value = modulesFiles(modulePath)
modules[moduleName] = value.default
return modules
}, {})
export default createStore({
getters:{},
modules,
const store = createStore({
state: {
userInfo: {
name:'myName'
}
},
mutations: {
getUserInfo (state, name) {
state.userInfo.name = name
}
},
actions: {
asyncGetUserInfo ({ commit }) {
setTimeout(() => {
commit("getUserInfo", +new Date() + 'action')
},2000)
}
},
getters: {
userInfoGetter (state) {
return state.userInfo.name
}
}
})
export default store

15
src/store/modules/data.js

@ -1,15 +0,0 @@
export default {
namespaced: true,
state:{
menu:{},
},
getters:{
menuName:state=>Object.values(state.menu).map(v=>v.name)
},
mutations:{
setMenu(state,val){
state.menu[val.key]=val.item
},
},
actions:{}
}

129
src/utils/element_plus.js

@ -1,129 +0,0 @@
import "element-plus/theme-chalk/base.css"
import "element-plus/theme-chalk/display.css"
import "element-plus/theme-chalk/el-scrollbar.css"
import "element-plus/theme-chalk/el-carousel.css"
import "element-plus/theme-chalk/el-carousel-item.css"
import "element-plus/theme-chalk/el-image.css"
import "element-plus/theme-chalk/el-image.css"
import "element-plus/theme-chalk/el-col.css"
import "element-plus/theme-chalk/el-row.css"
import "element-plus/theme-chalk/el-config-provider.css"
import "element-plus/theme-chalk/el-pagination.css"
import "element-plus/theme-chalk/el-form.css"
import "element-plus/theme-chalk/el-form-item.css"
import "element-plus/theme-chalk/el-button.css"
import "element-plus/theme-chalk/el-input.css"
import "element-plus/theme-chalk/el-select.css"
import "element-plus/theme-chalk/el-option.css"
import "element-plus/theme-chalk/el-message.css"
import "element-plus/theme-chalk/el-message-box.css"
import "element-plus/theme-chalk/el-menu.css"
import "element-plus/theme-chalk/el-menu-item.css"
import "element-plus/theme-chalk/el-menu-item-group.css"
import "element-plus/theme-chalk/el-date-picker.css"
import "element-plus/theme-chalk/el-radio.css"
import "element-plus/theme-chalk/el-checkbox.css"
import "element-plus/theme-chalk/el-checkbox-group.css"
import "element-plus/theme-chalk/el-table.css"
import "element-plus/theme-chalk/el-table-column.css"
import "element-plus/theme-chalk/el-tooltip.css"
import "element-plus/theme-chalk/el-popper.css"
import "element-plus/theme-chalk/el-dialog.css"
import "element-plus/theme-chalk/el-overlay.css"
import "element-plus/theme-chalk/el-upload.css"
import "element-plus/theme-chalk/el-loading.css"
import "element-plus/theme-chalk/el-tabs.css"
import "element-plus/theme-chalk/el-tab-pane.css"
import "element-plus/theme-chalk/el-popover.css"
import "element-plus/theme-chalk/el-drawer.css"
import "element-plus/theme-chalk/el-tag.css"
import "element-plus/theme-chalk/el-switch.css"
import "element-plus/theme-chalk/el-select-v2.css"
import {
ElButton,
ElCarousel,
ElCarouselItem,
ElConfigProvider,
ElCol,
ElCheckboxGroup,
ElCheckbox,
ElDatePicker,
ElDialog,
ElInput,
ElForm,
ElFormItem,
ElImage,
ElMessage,
ElMessageBox,
ElMenu,
ElMenuItem,
ElMenuItemGroup,
ElOption,
ElRow,
ElPagination,
ElSelect,
ElSelectV2,
ElSwitch,
ElSubMenu,
ElRadio,
ElScrollbar,
ElTable,
ElTableColumn,
ElTooltip,
ElUpload,
ElLoading,
ElTag,
ElTabs,
ElTabPane,
ElPopover,
ElDrawer,
} from "element-plus/lib"
let components=[
ElCarousel,
ElCarouselItem,
ElConfigProvider,
ElImage,
ElScrollbar,
ElDialog,
ElRow,
ElCol,
ElPagination,
ElForm,
ElFormItem,
ElButton,
ElInput,
ElSelect,
ElSelectV2,
ElSwitch,
ElOption,
ElMenu,
ElSubMenu,
ElMenuItem,
ElMenuItemGroup,
ElDatePicker,
ElRadio,
ElCheckboxGroup,
ElCheckbox,
ElTable,
ElTableColumn,
ElTooltip,
ElUpload,
ElTag,
ElTabs,
ElTabPane,
ElPopover,
ElDrawer,
]
export default{
install(Vue,ops){
components.forEach(v=>Vue.component(v.name,v))
Vue.provide("msg", ElMessage)
Vue.provide("box", ElMessageBox)
}
}
export{
ElLoading,
}

18
src/views/About.vue

@ -1,18 +0,0 @@
<template>
<div class="about">
<h1>about</h1>
</div>
</template>
<script>
import { defineComponent } from 'vue'
export default defineComponent({
name:"about",
created(){
console.log('-----------about--------created----------')
},
setup() {
console.log("-------about----------------------------")
},
})
</script>

16
src/views/Demo.vue

@ -1,15 +1,9 @@
<style lang="less" scoped>
</style>
<template>
<div>
<h1>demo---{{value}} ---{{name}}</h1>
<button @click="$router.back()">上一页</button>
</div>
<h1>demo</h1>
</template>
<script setup>
import { defineProps, defineEmits, ref, useSSRContext,useAttrs, useSlots } from 'vue'
const props = defineProps({
name:String
})
console.log(useSSRContext(console.log),'--------ctx---')
const value=ref(props.name)
console.log(defineEmits(['childClick']))
</script>

103
src/views/Home.vue

@ -1,92 +1,21 @@
<style lang="less" scoped>
</style>
<template>
<div class="home">
<h1>This is an home page</h1>
<input id="search"/>
<div style="width:700px;height:600px;border:1px solid #ddd;" ref="map"/>
</div>
<img alt="Vue logo" src="~@/assets/img/logo.png" />
<hello-world msg="Hello Vue 3 + Vite" ref="hello" style="color:red;" class="hello">
<div>111</div>
<template #demo>
<div>2222222</div>
</template>
<script>
import { defineComponent, onMounted, shallowRef } from 'vue'
import AMapLoader from "@amap/amap-jsapi-loader"
export default defineComponent({
name:"home",
setup() {
var map;
var _data={
map:shallowRef(null),
}
</hello-world>
</template>
<script setup>
// import HelloWorld from '@/components/HelloWorld.vue'
import { defineAsyncComponent, onMounted, ref } from 'vue'
var HelloWorld = defineAsyncComponent(()=>import('@/components/HelloWorld.vue'))
var hello=ref(null)
onMounted(()=>{
// window._AMapSecurityConfig={
// securityJsCode:"3eceddef3eafbf06e01107c78db2c264",
// }
// AMapLoader.load({key:"3b999eeef15d7b6ca6a3fd0c9531160d",version:"2.0",plugins:["AMap.PolygonEditor,AMap.AutoComplete"]}).then(AMap=>{
// map=new AMap.Map(_data.map.value,{
// viewMode:"3D",
// zoom:16,
// zooms:[13,16.75],
// center:[103.144875, 25.482653],
// layers:[
// //
// new AMap.TileLayer.Satellite(),
// //
// new AMap.TileLayer.RoadNet()
// ],
// })
// window.m=map
// //
// var polygon=new AMap.Polygon({
// path:[
// [103.154206, 25.482612],
// [103.154297, 25.482324],
// [103.154146, 25.481694],
// [103.15457, 25.481461],
// [103.154813, 25.482379],
// [103.154555, 25.482448]
// ],
// strokeColor: "#FF33FF",
// strokeWeight: 1,
// strokeOpacity: 0.7,
// fillOpacity: 0.2,
// fillColor: '#1791fc',
// zIndex: 50,
// })
// var polygon1=new AMap.Polygon({
// path:[
// [103.145047, 25.483922],
// [103.149596, 25.483689],
// [103.145798, 25.480222],
// ],
// strokeColor: "#FF33FF",
// strokeWeight: 3,
// strokeOpacity: 0.7,
// fillOpacity: 0.2,
// fillColor: '#1791fc',
// zIndex: 60,
// })
// map.add([polygon,polygon1])
// var polyEditor=new AMap.PolygonEditor(map)
// polyEditor.on("end",res=>{
// console.log("---------end-------------")
// })
// // polyEditor.open()
// var auto = new AMap.AutoComplete({
// input:"search",
// });
// setTimeout(()=>{
// auto.search('',(a,b)=>{
// console.log(a,"-------aaaaaa----------")
// console.log(b,"----------bbbbbbb---------")
// })
// },1000)
// })
})
return _data;
},
console.log(hello,'------------------hello----------')
})
</script>

49
vite.config.js

@ -0,0 +1,49 @@
import { defineConfig } from 'vite'
import path from 'path'
import vue from '@vitejs/plugin-vue'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
resolve:{
alias:{
"@":path.resolve(__dirname,'src'),
}
},
build:{
outDir:"dist",
assetsDir:"static",
cssCodeSplit:true, // 拆分css代码
rollupOptions:{
input:{ // 多项目打包
index: path.resolve(__dirname, 'index.html')
// index: path.resolve(__dirname, 'src/index.js')
},
// external:['vue'], // 控制插件不编译
output: {
entryFileNames: `static/[name].[hash].js`,
chunkFileNames: `static/[name].[hash].js`,
assetFileNames: e=>{
console.log('name=',e.anme)
console.log('type=',e.type)
return 'assets/[name].[hash].[ext]'
},
},
}
},
optimizeDeps:{
include:[] // 依赖预编译
},
server:{
port:8085,
strictPort:false, //端口被占用是不会退出,换新端口
open:true, // 自动打开页面
proxy:{
'/api':{
target:"",
changeOrigin:true,
ws:false,
rewrite: path=>path.replace(/^\/api/,'')
}
},
}
})

63
vue.config.js

@ -1,63 +0,0 @@
const path = require("path");
let resolve=dir=>path.join(__dirname,dir)
const isProduction = process.env.NODE_ENV === "production";
module.exports = {
publicPath:"./",
productionSourceMap:false,
lintOnSave: false,
filenameHashing: !isProduction,
// outputDir:"",
pages: {
index: {
entry: 'src/main.js',
template: 'public/index.html',
filename: 'index.html'
},
},
configureWebpack:{
devtool: "source-map"//isProduction ? false : "source-map",
},
devServer: {
port: process.env.PORT||8899, // 服务端口 默认8899
https: false, // 是否使用https
open: true, // 是否打开游览器
// proxy: { // 跨域代理
// '/api': {
// target: loadEnv(mode, process.cwd()).VITE_APP_API,
// changeOrigin: true,
// rewrite: (path) => path.replace(/^\/api/, '')
// }
// }
},
// 扩展 webpack 配置,使 packages 加入编译
chainWebpack: config => {
// config.module
// .rule('js')
// .include
// .add('/packages')
// .end()
// .use('babel')
// .loader('babel-loader')
// .tap(options => {
// return options
// })
//自定义图片
config.module.rule("images").use('url-loader').tap(options=>({
name:`./img/[hash]_[name].[ext]`,
quality:85,
limit: 0,
exModule:false,
}) )
//svg
config.module.rule("svg").exclude.add(resolve('src/assets/svg')).end()
config.module.rule('icons').test(/\.svg$/).include.add(resolve('src/assets/svg')).end().use('svg-sprite-loader').loader('svg-sprite-loader').options({symbolId:'icon-[name]'}).end()
config.optimization.splitChunks(false);
// config.optimization.minimize(false);//不压缩代码
config.resolve.alias
.set("@", path.join(__dirname, 'src'))
}
}
Loading…
Cancel
Save