├── .editorconfig ├── .env ├── .env.development ├── .env.production ├── .env.test ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.yml │ ├── bug_report_zh.yml │ ├── config.yml │ ├── feature_request.yml │ └── feature_request_zh.yml ├── PULL_REQUEST_TEMPLATE.md └── workflows │ └── create-release.yml ├── .gitignore ├── .husky ├── commit-msg └── pre-commit ├── .vscode └── extensions.json ├── CHANGELOG.md ├── LICENSE ├── README.md ├── README.zh-CN.md ├── build ├── plugins │ ├── auto-import.ts │ ├── icons.ts │ ├── index.ts │ ├── mock.ts │ └── vue-components.ts ├── proxy.ts └── utils.ts ├── commitlint.config.js ├── index.html ├── mock ├── _createMockServer.ts ├── _util.ts └── service │ ├── menu.ts │ └── user.ts ├── netlify.toml ├── package.json ├── pnpm-lock.yaml ├── public └── favicon.ico ├── src ├── App.vue ├── api │ ├── config.ts │ ├── index.ts │ └── user │ │ ├── index.ts │ │ └── types.ts ├── assets │ ├── icons │ │ └── giftbox.svg │ ├── images │ │ ├── qrcode.png │ │ └── test.jpeg │ └── logo.png ├── components │ ├── CodeEditor │ │ ├── index.ts │ │ └── src │ │ │ └── CodeEditor.vue │ ├── CountTo │ │ ├── index.ts │ │ └── src │ │ │ └── CountTo.vue │ ├── Countdown │ │ ├── index.ts │ │ └── src │ │ │ ├── CountdownButton.vue │ │ │ ├── CountdownInput.vue │ │ │ └── useCountdown.ts │ ├── Cropper │ │ ├── index.ts │ │ └── src │ │ │ ├── Cropper.vue │ │ │ └── types.ts │ ├── Excel │ │ ├── index.ts │ │ └── src │ │ │ ├── ExportExcel.ts │ │ │ ├── ImportExcel.vue │ │ │ └── types.ts │ ├── Iframe │ │ ├── index.ts │ │ └── src │ │ │ └── Iframe.vue │ ├── Page │ │ ├── index.ts │ │ └── src │ │ │ └── PageWrapper.vue │ ├── Plum.vue │ ├── QrCode │ │ ├── index.ts │ │ └── src │ │ │ ├── QrCode.vue │ │ │ ├── drawCanvas.ts │ │ │ ├── drawLogo.ts │ │ │ ├── qrcodePlus.ts │ │ │ ├── toCanvas.ts │ │ │ └── typing.ts │ ├── StrengthMeter │ │ ├── index.ts │ │ └── src │ │ │ └── StrengthMeter.vue │ ├── TickForm │ │ ├── index.ts │ │ └── src │ │ │ ├── TickForm.vue │ │ │ └── props.ts │ └── Watermark │ │ ├── index.ts │ │ └── src │ │ ├── config.ts │ │ ├── types.ts │ │ ├── useProtectWatermark.ts │ │ └── useWatermark.ts ├── directives │ ├── index.ts │ └── lazyImg.ts ├── enums │ ├── cache.ts │ ├── index.ts │ ├── path.ts │ └── role.ts ├── hooks │ └── useRequest.ts ├── layouts │ ├── blank │ │ └── index.vue │ ├── default │ │ ├── content │ │ │ └── index.vue │ │ ├── features │ │ │ └── index.vue │ │ ├── footer │ │ │ └── index.vue │ │ ├── header │ │ │ ├── components │ │ │ │ ├── Breadcrumb.vue │ │ │ │ ├── FullScreen.vue │ │ │ │ ├── SettingDrawer.vue │ │ │ │ ├── SiderTrigger.vue │ │ │ │ └── UserDropdown.vue │ │ │ └── index.vue │ │ ├── index.vue │ │ ├── sidebar │ │ │ ├── components │ │ │ │ ├── Logo.vue │ │ │ │ ├── Menu.vue │ │ │ │ ├── MenuItem.vue │ │ │ │ └── MenuWithChildren.vue │ │ │ └── index.vue │ │ └── useCollapsed.ts │ └── index.ts ├── main.ts ├── router │ ├── guard │ │ ├── index.ts │ │ └── permissionGuard.ts │ ├── index.ts │ └── routes │ │ ├── basic.ts │ │ ├── index.ts │ │ ├── modules │ │ ├── about.ts │ │ ├── demo.ts │ │ ├── docs.ts │ │ └── page.ts │ │ ├── plugins │ │ └── dynamicRoutes.ts │ │ └── typings.ts ├── stores │ ├── index.ts │ └── modules │ │ ├── index.ts │ │ ├── routes.ts │ │ └── user.ts ├── styles │ ├── animation.less │ ├── index.less │ ├── main.less │ └── variable.less ├── utils │ ├── cache.ts │ ├── file │ │ └── download.ts │ ├── index.ts │ ├── is.ts │ ├── log.ts │ ├── map-menu.ts │ ├── request │ │ ├── index.ts │ │ └── types.ts │ ├── resize.ts │ └── useMutationObserver.ts └── views │ ├── about │ ├── components │ │ ├── Dependencies.vue │ │ ├── DevDependencies.vue │ │ └── ProjectInfo.vue │ └── index.vue │ ├── demo │ ├── code-editor │ │ └── index.vue │ ├── count-to │ │ └── index.vue │ ├── cropper │ │ └── index.vue │ ├── excel │ │ ├── data.ts │ │ ├── export.vue │ │ └── import.vue │ ├── fullscreen │ │ └── index.vue │ ├── md-editor │ │ └── index.vue │ ├── protect-element │ │ └── index.vue │ ├── rich-text │ │ └── index.vue │ ├── tick-form │ │ ├── demo │ │ │ ├── ant.vue │ │ │ ├── params.vue │ │ │ ├── reset.vue │ │ │ ├── update.vue │ │ │ ├── validator.vue │ │ │ └── watch.vue │ │ └── index.vue │ └── watermark │ │ └── index.vue │ ├── docs │ ├── antdv │ │ └── index.vue │ └── hbs-admin │ │ └── index.vue │ ├── login │ ├── components │ │ ├── ForgetPasswordForm.vue │ │ ├── LoginForm.vue │ │ ├── MobileForm.vue │ │ ├── QrCodeForm.vue │ │ └── RegisterForm.vue │ ├── index.vue │ └── useLogin.ts │ └── page │ └── not-found │ └── index.vue ├── tsconfig.json ├── types ├── env.d.ts ├── global.d.ts ├── index.d.ts ├── request.d.ts ├── requestHooks.d.ts ├── routes.d.ts ├── store.d.ts └── tickForm.d.ts ├── unocss.config.js └── vite.config.ts /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_size = 2 6 | indent_style = space 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | insert_final_newline = false 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | VITE_PORT = 8080 2 | -------------------------------------------------------------------------------- /.env.development: -------------------------------------------------------------------------------- 1 | # Whether to open mock 2 | VITE_USE_MOCK = true 3 | 4 | # public path 5 | VITE_PUBLIC_PATH = / 6 | 7 | # Cross-domain proxy, you can configure multiple 8 | # Please note that no line breaks 9 | VITE_PROXY = [['/api', 'http://localhost:8080']] 10 | 11 | # Delete console 12 | VITE_DROP_CONSOLE = false 13 | 14 | # Basic interface address SPA 15 | VITE_GLOB_API_URL = /api 16 | -------------------------------------------------------------------------------- /.env.production: -------------------------------------------------------------------------------- 1 | # Whether to open mock 2 | VITE_USE_MOCK = true 3 | 4 | # public path 5 | VITE_PUBLIC_PATH = / 6 | 7 | # Delete console 8 | VITE_DROP_CONSOLE = true 9 | 10 | # Basic interface address SPA 11 | VITE_GLOB_API_URL = /api 12 | -------------------------------------------------------------------------------- /.env.test: -------------------------------------------------------------------------------- 1 | VITE_BASE_URL = 'api' 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.yml: -------------------------------------------------------------------------------- 1 | name: "\U0001F41E Bug report" 2 | description: Report an issue 3 | labels: [pending triage] 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | Thanks for taking the time to fill out this bug report! 9 | - type: textarea 10 | id: bug-description 11 | attributes: 12 | label: Describe the bug 13 | description: A clear and concise description of what the bug is. If you intend to submit a PR for this issue, tell us in the description. Thanks! 14 | validations: 15 | required: true 16 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report_zh.yml: -------------------------------------------------------------------------------- 1 | name: "\U0001F41E 错误报告" 2 | description: 报告问题 3 | labels: [pending triage] 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | 感谢您花时间填写此错误报告! 9 | - type: textarea 10 | id: bug-description 11 | attributes: 12 | label: 描述错误 13 | description: 清晰简洁地描述错误是什么。 如果您打算为此问题提交 PR,请在描述中告诉我们。 谢谢! 14 | validations: 15 | required: true 16 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.yml: -------------------------------------------------------------------------------- 1 | name: "\U0001F680 New feature proposal" 2 | description: Propose a new feature to be added 3 | labels: ["enhancement"] 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | Thanks for your interest in the project and taking the time to fill out this feature report! 9 | - type: textarea 10 | id: feature-description 11 | attributes: 12 | label: Clear and concise description of the problem 13 | description: If you intend to submit a PR for this issue, tell us in the description. Thanks! 14 | validations: 15 | required: true 16 | - type: textarea 17 | id: additional-context 18 | attributes: 19 | label: Additional context 20 | description: Any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request_zh.yml: -------------------------------------------------------------------------------- 1 | name: "\U0001F680 新功能提案" 2 | description: 提出要添加的新功能 3 | labels: ["enhancement"] 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | 感谢您对该项目的兴趣并花时间填写此功能报告! 9 | - type: textarea 10 | id: feature-description 11 | attributes: 12 | label: 清晰简洁的问题描述 13 | description: 如果您打算为此问题提交 PR,请在描述中告诉我们。 谢谢! 14 | validations: 15 | required: true 16 | - type: textarea 17 | id: additional-context 18 | attributes: 19 | label: 附加上下文 20 | description: 此处有关功能请求的任何其他上下文或屏幕截图。 21 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ### Description 4 | 5 | 6 | 7 | ### What is the purpose of this pull request? 8 | 9 | - [ ] Bug fix 10 | - [ ] New Feature 11 | - [ ] Documentation update 12 | - [ ] Other 13 | 14 | ### Before submitting the PR, please make sure you do the following 15 | 16 | - [ ] Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate. 17 | - [ ] Provide a description in this PR that addresses **what** the PR is solving, or reference the issue that it solves (e.g. `fixes #123`). 18 | -------------------------------------------------------------------------------- /.github/workflows/create-release.yml: -------------------------------------------------------------------------------- 1 | on: 2 | push: 3 | tags: 4 | - 'v*' 5 | 6 | name: Create Release 7 | 8 | jobs: 9 | build: 10 | name: Create Release 11 | runs-on: ubuntu-latest 12 | steps: 13 | - name: Checkout code 14 | uses: actions/checkout@master 15 | - name: Create Release for Tag 16 | id: create_release 17 | uses: Hongbusi/create-release@main 18 | env: 19 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 20 | with: 21 | tag_name: ${{ github.ref }} 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | auto-imports.d.ts 13 | components.d.ts 14 | dist-ssr 15 | *.local 16 | 17 | # Editor directories and files 18 | .vscode/* 19 | !.vscode/extensions.json 20 | .idea 21 | .DS_Store 22 | *.suo 23 | *.ntvs* 24 | *.njsproj 25 | *.sln 26 | *.sw? 27 | -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | npx --no-install commitlint --edit 5 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | pnpm run lint 5 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "editorconfig.editorconfig", 4 | "dbaeumer.vscode-eslint", 5 | "johnsoncodehk.volar", 6 | "johnsoncodehk.vscode-typescript-vue-plugin" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## [1.2.2](https://github.com/developer-plus/vue-hbs-admin/compare/v1.2.1...v1.2.2) (2022-05-08) 2 | 3 | 4 | ### Bug Fixes 5 | 6 | * countTo import error ([#109](https://github.com/developer-plus/vue-hbs-admin/issues/109)) ([1ece073](https://github.com/developer-plus/vue-hbs-admin/commit/1ece07303b2e9bfe804c753660cb81175bc97634)) 7 | * **deps:** update dependency @unocss/reset to v0.33.1 ([#124](https://github.com/developer-plus/vue-hbs-admin/issues/124)) ([ebb5313](https://github.com/developer-plus/vue-hbs-admin/commit/ebb5313346115a5f5f4292b7f9e84d993ab29cb9)) 8 | * **deps:** update dependency @vueuse/core to v8.4.2 ([#122](https://github.com/developer-plus/vue-hbs-admin/issues/122)) ([070a4ff](https://github.com/developer-plus/vue-hbs-admin/commit/070a4ff21d531440850d62375e947d6242b9cd6d)) 9 | * **deps:** update dependency ant-design-vue to v3.2.3 ([#118](https://github.com/developer-plus/vue-hbs-admin/issues/118)) ([0dcf8b9](https://github.com/developer-plus/vue-hbs-admin/commit/0dcf8b9b3eea95fe57f79eef9c0d2b142ce026d0)) 10 | * **deps:** update dependency dayjs to v1.11.2 ([#125](https://github.com/developer-plus/vue-hbs-admin/issues/125)) ([9400d19](https://github.com/developer-plus/vue-hbs-admin/commit/9400d19988d88de37a04fa89fab56ef7cdac8b9c)) 11 | * **deps:** update dependency pinia to v2.0.14 ([#121](https://github.com/developer-plus/vue-hbs-admin/issues/121)) ([8a2b7d8](https://github.com/developer-plus/vue-hbs-admin/commit/8a2b7d8676eb533d0d17333da5a3b3061646d74d)) 12 | 13 | 14 | ### Features 15 | 16 | * user logout ([#91](https://github.com/developer-plus/vue-hbs-admin/issues/91)) ([884668b](https://github.com/developer-plus/vue-hbs-admin/commit/884668b7429bd8c470b33a88e58dde92d6ad96f4)) 17 | 18 | 19 | 20 | ## [1.2.1](https://github.com/developer-plus/vue-hbs-admin/compare/v1.2.0...v1.2.1) (2022-05-05) 21 | 22 | 23 | ### Bug Fixes 24 | 25 | * **deps:** add rollup ([#106](https://github.com/developer-plus/vue-hbs-admin/issues/106)) ([8dfab12](https://github.com/developer-plus/vue-hbs-admin/commit/8dfab1297e036cc03e9ba069f878e442454da12d)) 26 | * **deps:** pin dependencies ([#93](https://github.com/developer-plus/vue-hbs-admin/issues/93)) ([8a5609e](https://github.com/developer-plus/vue-hbs-admin/commit/8a5609e667bcf8a2b1520f43afc38c98bd9391d3)) 27 | * **deps:** update dependency @vueuse/core to v8.4.1 ([#114](https://github.com/developer-plus/vue-hbs-admin/issues/114)) ([1dcdace](https://github.com/developer-plus/vue-hbs-admin/commit/1dcdace088890b137120d572f63a68a6ea4f2183)) 28 | * **deps:** update dependency vue-router to v4.0.15 ([#113](https://github.com/developer-plus/vue-hbs-admin/issues/113)) ([2a69f62](https://github.com/developer-plus/vue-hbs-admin/commit/2a69f62e1dd3fbfe1941021532c09da3d5bad74d)) 29 | * element level optimization ([#87](https://github.com/developer-plus/vue-hbs-admin/issues/87)) ([0095cf0](https://github.com/developer-plus/vue-hbs-admin/commit/0095cf017e265e06c9b9a8f2a0bb2ba23fe16976)) 30 | * fix CountTo not working ([#96](https://github.com/developer-plus/vue-hbs-admin/issues/96)) ([0a65d71](https://github.com/developer-plus/vue-hbs-admin/commit/0a65d71c59587bd32d7aa51f58a9d5664c7c52ad)) 31 | * fix low dpi display horizontal page scrollbar ([#112](https://github.com/developer-plus/vue-hbs-admin/issues/112)) ([42e32d3](https://github.com/developer-plus/vue-hbs-admin/commit/42e32d3ee32e6b44d144beb1c9a7e20b2316803d)) 32 | * single breadcrumb item display separator ([#88](https://github.com/developer-plus/vue-hbs-admin/issues/88)) ([8faeedb](https://github.com/developer-plus/vue-hbs-admin/commit/8faeedb27f1b7a93f099a82d0cef177a1f2ff073)) 33 | 34 | 35 | 36 | # [1.2.0](https://github.com/developer-plus/vue-hbs-admin/compare/v1.0.0...v1.2.0) (2022-05-02) 37 | 38 | 39 | ### Bug Fixes 40 | 41 | * failure to create a custom watermark ([#68](https://github.com/developer-plus/vue-hbs-admin/issues/68)) ([4a6b22f](https://github.com/developer-plus/vue-hbs-admin/commit/4a6b22f1dbd2dd34002353ae18a9e8e12f443b4a)) 42 | * update README ([#73](https://github.com/developer-plus/vue-hbs-admin/issues/73)) ([d31ea7f](https://github.com/developer-plus/vue-hbs-admin/commit/d31ea7f6b650655c9079c316239d20bbefb8bb9e)) 43 | 44 | 45 | ### Features 46 | 47 | * add breadcrumb navigation ([#74](https://github.com/developer-plus/vue-hbs-admin/issues/74)) ([9de3f22](https://github.com/developer-plus/vue-hbs-admin/commit/9de3f22037570b35ec7ba10a00785c1d05e4337a)) 48 | * add code editor ([#79](https://github.com/developer-plus/vue-hbs-admin/issues/79)) ([f0c7d65](https://github.com/developer-plus/vue-hbs-admin/commit/f0c7d65537939fff1683652ca7de8e15a1cc26a8)) 49 | * add lazy-img directives ([#69](https://github.com/developer-plus/vue-hbs-admin/issues/69)) ([2cc91ea](https://github.com/developer-plus/vue-hbs-admin/commit/2cc91ea877f02ef855b87a770148934cc725e73a)) 50 | * add protect watermark && protect element page ([#77](https://github.com/developer-plus/vue-hbs-admin/issues/77)) ([ee60855](https://github.com/developer-plus/vue-hbs-admin/commit/ee60855700e577a7ce891ed6d38321cf18501270)) 51 | * docs pages ([#70](https://github.com/developer-plus/vue-hbs-admin/issues/70)) ([b7aef35](https://github.com/developer-plus/vue-hbs-admin/commit/b7aef35eeb2b29489ea370536382c5548987bc1c)) 52 | 53 | 54 | 55 | # [1.1.0](https://github.com/developer-plus/vue-hbs-admin/compare/v1.0.0...v1.1.0) (2022-05-02) 56 | 57 | 58 | ### Bug Fixes 59 | 60 | * failure to create a custom watermark ([#68](https://github.com/developer-plus/vue-hbs-admin/issues/68)) ([4a6b22f](https://github.com/developer-plus/vue-hbs-admin/commit/4a6b22f1dbd2dd34002353ae18a9e8e12f443b4a)) 61 | * update README ([#73](https://github.com/developer-plus/vue-hbs-admin/issues/73)) ([d31ea7f](https://github.com/developer-plus/vue-hbs-admin/commit/d31ea7f6b650655c9079c316239d20bbefb8bb9e)) 62 | 63 | 64 | ### Features 65 | 66 | * add breadcrumb navigation ([#74](https://github.com/developer-plus/vue-hbs-admin/issues/74)) ([9de3f22](https://github.com/developer-plus/vue-hbs-admin/commit/9de3f22037570b35ec7ba10a00785c1d05e4337a)) 67 | * add code editor ([#79](https://github.com/developer-plus/vue-hbs-admin/issues/79)) ([f0c7d65](https://github.com/developer-plus/vue-hbs-admin/commit/f0c7d65537939fff1683652ca7de8e15a1cc26a8)) 68 | * add lazy-img directives ([#69](https://github.com/developer-plus/vue-hbs-admin/issues/69)) ([2cc91ea](https://github.com/developer-plus/vue-hbs-admin/commit/2cc91ea877f02ef855b87a770148934cc725e73a)) 69 | * add protect watermark && protect element page ([#77](https://github.com/developer-plus/vue-hbs-admin/issues/77)) ([ee60855](https://github.com/developer-plus/vue-hbs-admin/commit/ee60855700e577a7ce891ed6d38321cf18501270)) 70 | * docs pages ([#70](https://github.com/developer-plus/vue-hbs-admin/issues/70)) ([b7aef35](https://github.com/developer-plus/vue-hbs-admin/commit/b7aef35eeb2b29489ea370536382c5548987bc1c)) 71 | 72 | 73 | 74 | # [1.0.0](https://github.com/developer-plus/vue-hbs-admin/compare/v0.0.7...v1.0.0) (2022-04-28) 75 | 76 | 77 | ### Features 78 | 79 | * **component:** page wrapper ([#61](https://github.com/developer-plus/vue-hbs-admin/issues/61)) ([fed3f70](https://github.com/developer-plus/vue-hbs-admin/commit/fed3f70eed106a26f694904a06d5183149bfc348)) 80 | * dynamic menu optimize ([#65](https://github.com/developer-plus/vue-hbs-admin/issues/65)) ([b916478](https://github.com/developer-plus/vue-hbs-admin/commit/b9164780d640abe521bf2088b0a60297549edc58)) 81 | * dynamic menus ([#60](https://github.com/developer-plus/vue-hbs-admin/issues/60)) ([768e7f8](https://github.com/developer-plus/vue-hbs-admin/commit/768e7f8b36e3c4a1d77042fb5bff8c50b3c702af)) 82 | * fullscreen ([#37](https://github.com/developer-plus/vue-hbs-admin/issues/37)) ([de6ee23](https://github.com/developer-plus/vue-hbs-admin/commit/de6ee23fa9dbf159b4ed83f36e9c9f84bcec8b14)) 83 | * loading ([#35](https://github.com/developer-plus/vue-hbs-admin/issues/35)) ([1af952d](https://github.com/developer-plus/vue-hbs-admin/commit/1af952d0b0ce9865eef08230f301940284702128)) 84 | 85 | 86 | 87 | ## [0.0.7](https://github.com/Hongbusi/vue-hbs-admin/compare/v0.0.6...v0.0.7) (2022-04-21) 88 | 89 | 90 | ### Features 91 | 92 | * **demo:** markdown-editor ([#28](https://github.com/Hongbusi/vue-hbs-admin/issues/28)) ([5e210e4](https://github.com/Hongbusi/vue-hbs-admin/commit/5e210e45625e55562899e142e3cfd962720a8d77)) 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Hongbusi 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vue-hbs-admin 2 | 3 | English / [简体中文](./README.zh-CN.md) 4 | 5 | [Live Demo](https://vue-hbs-admin.netlify.app) · [Develop Guide](https://vue-hbs-admin-docs.netlify.app) 6 | 7 | 8 | 9 | ## Introduction 10 | 11 | Provide ready-made out-of-the-box solutions and rich examples for backend management systems to improve development efficiency. 12 | 13 | ## Features 14 | 15 | - Vue3,Vite3 - Latest Frontend Technologies; 16 | - Pinia - State Mangement; 17 | - TypeScript - Type-safe JavaScript superset; 18 | - UnoCSS - Atomic CSS Engine; 19 | - Mock - Built-in Mock data solution; 20 | - unplugin - API, components auto import. 21 | 22 | ## Why 23 | 24 | - Learn Vue3 + Vite + TS in depth 25 | - Provide ready-to-use out-of-the-box solutions and rich examples to improve development efficiency. 26 | - Learn and master project development specifications, code specifications, etc. 27 | - Learn and master the process of maintaining open source projects. 28 | - Group progress, learning together, common maintenance, mutual review, step by step. 29 | - Set a small goal: get 300 star 30 | 31 | ## Participating Contributions 32 | 33 | Your contribution is very welcome, and you can build with us in the following ways 😄 : 34 | 35 | - Report bugs, raise new features or description problems via [Issue](https://github.com/Hongbusi/vue-hbs-admin/issues) 36 | - Submit [Pull Request](https://github.com/Hongbusi/vue-hbs-admin/pulls) to improve featuress 37 | 38 | Want to perfect this project together? You can add WeChat: `Hongbusi16530` to learn more. 39 | 40 | ## Git Commit Specification 41 | 42 | Refer to the [Vue]((https://github.com/vuejs/vue/blob/dev/.github/COMMIT_CONVENTION.md) ) specification ([Angular](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular)) 43 | 44 | - `feat` new feature 45 | - `fix` bug fix 46 | - `docs` modify documentation 47 | - `style` code style fix (white-space, formatting, missing semi colons, etc) 48 | - `refactor` refactor code 49 | - `perf` a code change that improves performance 50 | - `test` when adding missing tests 51 | - `build` changing project builds or external dependencies (such as webpack、gulp、npm and others) 52 | - `ci` change scripts commands in configuration files and packages of continuous integration software, e.g. Travis, Circle, etc. 53 | - `chore` changes to the build process or supporting tools (For example, changing the test environment) 54 | - `revert` code revert 55 | 56 | ## Changelog 57 | 58 | [CHANGELOG](./CHANGELOG.md) 59 | 60 | ## Contributors 61 | 62 | ![GitHub Contributors Image](https://contrib.rocks/image?repo=developer-plus/vue-hbs-admin) 63 | 64 | ## LICENSE 65 | 66 | MIT, Copyright (c) 2022 Hongbusi. 67 | -------------------------------------------------------------------------------- /README.zh-CN.md: -------------------------------------------------------------------------------- 1 | # vue-hbs-admin 2 | 3 | [English](./README.md) / 简体中文 4 | 5 | [在线预览](https://vue-hbs-admin.netlify.app) · [开发文档](https://vue-hbs-admin-docs.netlify.app) 6 | 7 | 8 | 9 | ## 简介 10 | 11 | 为后台管理系统提供现成的开箱解决方案及丰富的示例,提高开发效率。 12 | 13 | ## 特性 14 | 15 | - Vue3,Vite3 - 前端最新技术; 16 | - Pinia - 状态管理; 17 | - TypeScript - 应用程序级 JavaScript 的语言; 18 | - UnoCSS - 即时按需原子 CSS 引擎; 19 | - Mock - 内置 Mock 数据方案; 20 | - unplugin - API,components 自动导入。 21 | 22 | ## 初心 23 | 24 | - 深入学习 Vue3 + Vite + TS; 25 | - 提供现成的开箱解决方案及丰富的示例,提高开发效率; 26 | - 学习并掌握项目开发规范、代码规范等; 27 | - 学习并掌握维护开源项目流程,为日后参加开源打好基础; 28 | - 抱团进步,一起学习,共同维护,相互 review,步步高升; 29 | - 定个小目标:300 star。 30 | 31 | ## 参与贡献 32 | 33 | 我们非常欢迎你的贡献,你可以通过以下方式和我们一起共建 😄 : 34 | 35 | - 通过 [Issue](https://github.com/Hongbusi/vue-hbs-admin/issues) 报告 bug、提新需求或进行咨询; 36 | - 提交 [Pull Request](https://github.com/Hongbusi/vue-hbs-admin/pulls) 改进代码。 37 | 38 | 想一起完善这个项目?你可以添加微信:`Hongbusi16530` 了解更多。 39 | 40 | ## Git 提交规范 41 | 42 | 参考 [Vue](https://github.com/vuejs/vue/blob/dev/.github/COMMIT_CONVENTION.md) 规范([Angular](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular)) 43 | 44 | - `feat` 新增特性 (feature) 45 | - `fix` 修复 Bug(bug fix) 46 | - `docs` 修改文档 (documentation) 47 | - `style` 代码格式修改(white-space, formatting, missing semi colons, etc) 48 | - `refactor` 代码重构(refactor) 49 | - `perf` 改善性能(A code change that improves performance) 50 | - `test` 测试(when adding missing tests) 51 | - `build` 变更项目构建或外部依赖(例如 scopes: webpack、gulp、npm 等) 52 | - `ci` 更改持续集成软件的配置文件和 package 中的 scripts 命令,例如 scopes: Travis, Circle 等 53 | - `chore` 变更构建流程或辅助工具(比如更改测试环境) 54 | - `revert` 代码回退 55 | 56 | ## 更新日志 57 | 58 | [CHANGELOG](./CHANGELOG.md) 59 | 60 | ## Contributors 61 | 62 | ![GitHub Contributors Image](https://contrib.rocks/image?repo=developer-plus/vue-hbs-admin) 63 | 64 | ## LICENSE 65 | 66 | MIT, Copyright (c) 2022 Hongbusi. 67 | -------------------------------------------------------------------------------- /build/plugins/auto-import.ts: -------------------------------------------------------------------------------- 1 | import AutoImport from 'unplugin-auto-import/vite' 2 | 3 | export default function setupAutoImport() { 4 | return AutoImport({ 5 | imports: [ 6 | 'vue', 7 | 'vue-router', 8 | '@vueuse/core' 9 | ], 10 | dts: 'types/auto-imports.d.ts' 11 | }) 12 | } 13 | -------------------------------------------------------------------------------- /build/plugins/icons.ts: -------------------------------------------------------------------------------- 1 | import Icons from 'unplugin-icons/vite' 2 | import { FileSystemIconLoader } from 'unplugin-icons/loaders' 3 | 4 | export default function setupIcons() { 5 | return Icons({ 6 | compiler: 'vue3', 7 | customCollections: { 8 | 'my-icons': FileSystemIconLoader( 9 | 'src/assets/icons', 10 | svg => svg.replace(/^ 11 | 12 | const httpsRE = /^https:\/\// 13 | 14 | /** 15 | * Generate proxy 16 | * @param list 17 | */ 18 | export function createProxy(list: ProxyList = []) { 19 | const ret: ProxyTargetList = {} 20 | for (const [prefix, target] of list) { 21 | const isHttps = httpsRE.test(target) 22 | 23 | // https://github.com/http-party/node-http-proxy#options 24 | ret[prefix] = { 25 | target, 26 | changeOrigin: true, 27 | ws: true, 28 | rewrite: path => path.replace(new RegExp(`^${prefix}`), ''), 29 | // https is require secure=false 30 | ...(isHttps ? { secure: false } : {}) 31 | } 32 | } 33 | return ret 34 | } 35 | -------------------------------------------------------------------------------- /build/utils.ts: -------------------------------------------------------------------------------- 1 | // Read all environment variable configuration files to process.env 2 | export function wrapperEnv(envConf: Recordable): ViteEnv { 3 | const ret: any = {} 4 | 5 | for (const envName of Object.keys(envConf)) { 6 | let realName = envConf[envName].replace(/\\n/g, '\n') 7 | realName = realName === 'true' ? true : realName === 'false' ? false : realName 8 | 9 | if (envName === 'VITE_PORT') { 10 | realName = Number(realName) 11 | } 12 | if (envName === 'VITE_PROXY' && realName) { 13 | try { 14 | realName = JSON.parse(realName.replace(/'/g, '"')) 15 | } 16 | catch (error) { 17 | realName = '' 18 | } 19 | } 20 | ret[envName] = realName 21 | if (typeof realName === 'string') { 22 | process.env[envName] = realName 23 | } 24 | else if (typeof realName === 'object') { 25 | process.env[envName] = JSON.stringify(realName) 26 | } 27 | } 28 | return ret 29 | } 30 | -------------------------------------------------------------------------------- /commitlint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ['@commitlint/config-conventional'] 3 | } 4 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | vue-hbs-admin 9 | 82 | 83 | 84 | 85 |
86 |
87 |
88 |
89 |
90 | 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /mock/_createMockServer.ts: -------------------------------------------------------------------------------- 1 | import { createProdMockServer } from 'vite-plugin-mock/es/createProdMockServer' 2 | 3 | const modules = import.meta.globEager('./**/*.ts') 4 | 5 | const mockModules: any[] = [] 6 | Object.keys(modules).forEach((key) => { 7 | if (key.includes('/_')) { 8 | return 9 | } 10 | mockModules.push(...modules[key].default) 11 | }) 12 | 13 | export function setupMockServer() { 14 | createProdMockServer(mockModules) 15 | } 16 | -------------------------------------------------------------------------------- /mock/_util.ts: -------------------------------------------------------------------------------- 1 | export interface requestParams { 2 | method: string 3 | body: any 4 | headers?: { authorization?: string } 5 | query: any 6 | } 7 | 8 | export function resultSuccess(data: T, { message = 'ok' } = {}) { 9 | return { 10 | code: 0, 11 | data, 12 | message, 13 | type: 'success' 14 | } 15 | } 16 | 17 | export function resultError(message = 'Request failed', { code = -1, result = null } = {}) { 18 | return { 19 | code, 20 | result, 21 | message, 22 | type: 'error' 23 | } 24 | } 25 | 26 | export function getRequestToken({ headers }: requestParams): string | undefined { 27 | return headers?.authorization 28 | } 29 | -------------------------------------------------------------------------------- /mock/service/menu.ts: -------------------------------------------------------------------------------- 1 | import type { MockMethod } from 'vite-plugin-mock' 2 | import type { requestParams } from '../_util' 3 | import { resultSuccess, resultError, getRequestToken } from '../_util' 4 | import { createFakeUserList } from './user' 5 | 6 | export default [ 7 | { 8 | url: '/api/menu/list', 9 | method: 'get', 10 | response: (request: requestParams) => { 11 | const token = getRequestToken(request) 12 | if (!token) { 13 | return resultError('Invalid token!') 14 | } 15 | const checkUser = createFakeUserList().find(item => item.token === token) 16 | if (!checkUser) { 17 | return resultError('Invalid user token!') 18 | } 19 | 20 | const menu: Object[] = [ 21 | { 22 | id: '1', 23 | name: '系统总览', 24 | type: 1, 25 | url: '/main/analysis', 26 | icon: 'dashboard', 27 | children: [ 28 | { 29 | id: '2', 30 | name: '核心技术', 31 | type: 2, 32 | url: '/main/analysis/overvie', 33 | children: null 34 | } 35 | ] 36 | }, 37 | { 38 | id: '2', 39 | name: '关于', 40 | type: 2, 41 | url: '/about', 42 | icon: 'dashboard', 43 | children: null 44 | } 45 | ] 46 | 47 | return resultSuccess(menu) 48 | } 49 | } 50 | ] as MockMethod[] 51 | -------------------------------------------------------------------------------- /mock/service/user.ts: -------------------------------------------------------------------------------- 1 | import type { MockMethod } from 'vite-plugin-mock' 2 | import type { requestParams } from '../_util' 3 | import { resultSuccess, resultError, getRequestToken } from '../_util' 4 | 5 | export function createFakeUserList() { 6 | return [ 7 | { 8 | id: '1', 9 | username: 'Hongbusi', 10 | realName: 'Hongbusi', 11 | avatar: 'https://q1.qlogo.cn/g?b=qq&nk=190848757&s=640', 12 | desc: 'zhe', 13 | password: 'admin', 14 | token: 'fakeToken1', 15 | homePath: '/dashboard/analysis', 16 | roles: [ 17 | { 18 | roleName: 'Super Admin', 19 | value: 'super' 20 | } 21 | ] 22 | }, 23 | { 24 | id: '2', 25 | username: 'test', 26 | password: 'admin', 27 | realName: 'test user', 28 | avatar: 'https://q1.qlogo.cn/g?b=qq&nk=339449197&s=640', 29 | desc: 'tester', 30 | token: 'fakeToken2', 31 | homePath: '/dashboard/workbench', 32 | roles: [ 33 | { 34 | roleName: 'Tester', 35 | value: 'test' 36 | } 37 | ] 38 | } 39 | ] 40 | } 41 | 42 | export default [ 43 | { 44 | url: '/api/login', 45 | timeout: 200, 46 | method: 'post', 47 | response: ({ body }: requestParams) => { 48 | const { username, password } = body 49 | const checkUser = createFakeUserList().find( 50 | item => item.username === username && password === item.password 51 | ) 52 | 53 | if (!checkUser) { 54 | return resultError('Incorrect account or password!') 55 | } 56 | 57 | const { id, username: _username, token, realName, desc, roles } = checkUser 58 | 59 | return resultSuccess({ 60 | roles, 61 | id, 62 | username: _username, 63 | token, 64 | realName, 65 | desc 66 | }) 67 | } 68 | }, 69 | { 70 | url: '/api/user/info', 71 | method: 'get', 72 | response: (request: requestParams) => { 73 | const token = getRequestToken(request) 74 | if (!token) return resultError('Invalid token') 75 | const checkUser = createFakeUserList().find(item => item.token === token) 76 | if (!checkUser) { 77 | return resultError('The corresponding user information was not obtained!') 78 | } 79 | return resultSuccess(checkUser) 80 | } 81 | } 82 | ] as MockMethod[] 83 | -------------------------------------------------------------------------------- /netlify.toml: -------------------------------------------------------------------------------- 1 | [build.environment] 2 | # bypass npm auto install 3 | NPM_FLAGS = "--version" 4 | NODE_VERSION = "16" 5 | 6 | [build] 7 | publish = "dist" 8 | command = "npx pnpm i --store=node_modules/.pnpm-store && npx pnpm run build" 9 | 10 | [[redirects]] 11 | from = "/*" 12 | to = "/index.html" 13 | status = 200 14 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-hbs-admin", 3 | "private": true, 4 | "version": "1.2.2", 5 | "scripts": { 6 | "dev": "vite", 7 | "build": "vite build", 8 | "typecheck": "vue-tsc --noEmit", 9 | "preview": "vite preview", 10 | "lint": "lint-staged", 11 | "prepare": "husky install", 12 | "commit": "cz", 13 | "release": "release", 14 | "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s" 15 | }, 16 | "eslintConfig": { 17 | "extends": "@hongbusi" 18 | }, 19 | "dependencies": { 20 | "@ant-design/icons-vue": "6.1.0", 21 | "@unocss/reset": "0.44.1", 22 | "@vueuse/core": "8.9.2", 23 | "@wangeditor/editor": "5.1.7", 24 | "@wangeditor/editor-for-vue": "5.1.12", 25 | "@zxcvbn-ts/core": "2.0.1", 26 | "ant-design-vue": "3.2.10", 27 | "axios": "0.27.2", 28 | "codemirror": "5", 29 | "cropperjs": "1.5.12", 30 | "dayjs": "1.11.3", 31 | "lodash-es": "4.17.21", 32 | "nprogress": "0.2.0", 33 | "pinia": "2.0.16", 34 | "qrcode": "1.5.1", 35 | "vditor": "3.8.15", 36 | "vue": "3.2.37", 37 | "vue-router": "4.1.2", 38 | "xlsx": "0.18.5" 39 | }, 40 | "devDependencies": { 41 | "@commitlint/cli": "17.0.3", 42 | "@commitlint/config-conventional": "17.0.3", 43 | "@hongbusi/eslint-config": "0.3.4", 44 | "@hongbusi/release": "0.0.9", 45 | "@types/codemirror": "5.60.5", 46 | "@types/lodash-es": "4.17.6", 47 | "@types/node": "18.0.4", 48 | "@types/nprogress": "0.2.0", 49 | "@types/qrcode": "1.4.2", 50 | "@vitejs/plugin-vue": "3.0.0", 51 | "commitizen": "4.2.4", 52 | "conventional-changelog-cli": "2.2.2", 53 | "cz-conventional-changelog": "3.3.0", 54 | "eslint": "8.19.0", 55 | "husky": "8.0.1", 56 | "less": "4.1.3", 57 | "lint-staged": "13.0.3", 58 | "mockjs": "1.1.0", 59 | "rollup": "2.76.0", 60 | "taze": "^0.7.6", 61 | "typescript": "4.7.4", 62 | "unocss": "0.44.1", 63 | "unplugin-auto-import": "0.9.2", 64 | "unplugin-icons": "0.14.7", 65 | "unplugin-vue-components": "0.21.1", 66 | "vite": "3.0.0", 67 | "vite-plugin-mock": "2.9.6", 68 | "vue-tsc": "0.38.5" 69 | }, 70 | "config": { 71 | "commitizen": { 72 | "path": "cz-conventional-changelog" 73 | } 74 | }, 75 | "lint-staged": { 76 | "*.{vue,js,jsx,ts,tsx}": "eslint --fix" 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developer-plus/vue-hbs-admin/c7277bf2f7939c18dabdcd996c17963984eb8886/public/favicon.ico -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /src/api/config.ts: -------------------------------------------------------------------------------- 1 | export const BASE_URL = import.meta.env.VITE_GLOB_API_URL 2 | 3 | export const TIME_OUT = 1000 * 5 4 | -------------------------------------------------------------------------------- /src/api/index.ts: -------------------------------------------------------------------------------- 1 | import Request from '../utils/request' 2 | import { BASE_URL, TIME_OUT } from './config' 3 | import localCache from '~/utils/cache' 4 | import { EnumCache } from '~/enums' 5 | 6 | const request = new Request({ 7 | baseURL: BASE_URL, 8 | timeout: TIME_OUT, 9 | interceptorHooks: { 10 | requestInterceptor: (config) => { 11 | const token = localCache.getCache(EnumCache.TOKEN_KEY) 12 | if (token) { 13 | config.headers.Authorization = token 14 | } 15 | return config 16 | }, 17 | requestInterceptorCatch: (error) => { 18 | return error 19 | }, 20 | responseInterceptor: (response) => { 21 | return response.data 22 | }, 23 | responseInterceptorCatch: (error) => { 24 | return error 25 | } 26 | } 27 | }) 28 | 29 | export default request 30 | -------------------------------------------------------------------------------- /src/api/user/index.ts: -------------------------------------------------------------------------------- 1 | import request from '../index' 2 | 3 | import type { Account, LoginInfo } from './types' 4 | 5 | enum API { 6 | Login = '/login', 7 | UserInfo = '/user/info', 8 | MenuList = '/menu/list' 9 | } 10 | 11 | export function loginRequest(account: Account) { 12 | return request.post({ 13 | url: API.Login, 14 | data: account 15 | }) 16 | } 17 | 18 | export function getUserInfo() { 19 | return request.get({ url: API.UserInfo }) 20 | } 21 | 22 | export function getMenuList() { 23 | return request.get({ url: API.MenuList }) 24 | } 25 | -------------------------------------------------------------------------------- /src/api/user/types.ts: -------------------------------------------------------------------------------- 1 | export interface Account { 2 | username: string 3 | password: string 4 | } 5 | 6 | export interface LoginInfo { 7 | id: number 8 | token: string 9 | username: string 10 | } 11 | -------------------------------------------------------------------------------- /src/assets/icons/giftbox.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/assets/images/qrcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developer-plus/vue-hbs-admin/c7277bf2f7939c18dabdcd996c17963984eb8886/src/assets/images/qrcode.png -------------------------------------------------------------------------------- /src/assets/images/test.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developer-plus/vue-hbs-admin/c7277bf2f7939c18dabdcd996c17963984eb8886/src/assets/images/test.jpeg -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developer-plus/vue-hbs-admin/c7277bf2f7939c18dabdcd996c17963984eb8886/src/assets/logo.png -------------------------------------------------------------------------------- /src/components/CodeEditor/index.ts: -------------------------------------------------------------------------------- 1 | import CodeEditor from './src/CodeEditor.vue' 2 | 3 | export { 4 | CodeEditor 5 | } 6 | -------------------------------------------------------------------------------- /src/components/CodeEditor/src/CodeEditor.vue: -------------------------------------------------------------------------------- 1 |