diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..dccf841d --- /dev/null +++ b/.editorconfig @@ -0,0 +1,19 @@ +root = true + +[*] +charset=utf-8 +end_of_line=lf +insert_final_newline=true +indent_style=space +indent_size=2 +max_line_length = 100 + +[*.{yml,yaml,json}] +indent_style = space +indent_size = 2 + +[*.md] +trim_trailing_whitespace = false + +[Makefile] +indent_style = tab diff --git a/.env b/.env new file mode 100644 index 00000000..d10d9e92 --- /dev/null +++ b/.env @@ -0,0 +1,8 @@ +# port +VITE_PORT = 3110 + +# 网站标题 +VITE_GLOB_APP_TITLE = 东胜物流管理平台 + +# 简称,用于配置文件名字 不要出现空格、数字开头等特殊字符 +VITE_GLOB_APP_SHORT_NAME = WmsAdmin diff --git a/.env.development b/.env.development new file mode 100644 index 00000000..302ad8cd --- /dev/null +++ b/.env.development @@ -0,0 +1,30 @@ +# Whether to open mock +VITE_USE_MOCK = true + +# public path +VITE_PUBLIC_PATH = / + +# Cross-domain proxy, you can configure multiple +# Please note that no line breaks +# VITE_PROXY = [["/basic-api","http://localhost:3000"],["/upload","http://localhost:3300/upload"]] +VITE_PROXY=[["/api","http://60.209.125.238:3008"],["/stage-api","https://www.666cxf.com/stage-api"]] # 开发 测试环境 + + +# Delete console +VITE_DROP_CONSOLE = false + +# 后台接口父地址(必填) +# VITE_GLOB_API_URL=http://localhost:3008 +VITE_GLOB_API_URL="/api" # 开发 测试环境 + +# File upload address, optional +#VITE_GLOB_UPLOAD_URL=http://localhost:8091/api/Common/UploadFile +VITE_GLOB_UPLOAD_URL=http://localhost:9991/api/VW_INFO_FILES/CommonUpload + +# Interface prefix +VITE_GLOB_API_URL_PREFIX= + + + +# 预览地址 +VITE_GLOB_VIEW_URL=http://localhost:9991/ diff --git a/.env.production b/.env.production new file mode 100644 index 00000000..b7ba2992 --- /dev/null +++ b/.env.production @@ -0,0 +1,37 @@ +# Whether to open mock +VITE_USE_MOCK = false + +# public path +VITE_PUBLIC_PATH = / + +# Delete console +VITE_DROP_CONSOLE = true + +# Whether to enable gzip or brotli compression +# Optional: gzip | brotli | none +# If you need multiple forms, you can use `,` to separate +VITE_BUILD_COMPRESS = 'gzip' + +# Whether to delete origin files when using compress, default false +VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false + +# Basic interface address SPA +VITE_GLOB_API_URL=http://60.209.125.238:3008 + +# File upload address, optional +VITE_GLOB_UPLOAD_URL=http://47.104.255.182:8091/api/VW_INFO_FILES/CommonUpload + +# 预览地址 +VITE_GLOB_VIEW_URL=http://60.209.125.238:3013 + +# Interface prefix +VITE_GLOB_API_URL_PREFIX= + +# Whether to enable image compression +VITE_USE_IMAGEMIN= true + +# use pwa +VITE_USE_PWA = false + +# Is it compatible with older browsers +VITE_LEGACY = false diff --git a/.env.test b/.env.test new file mode 100644 index 00000000..469b307d --- /dev/null +++ b/.env.test @@ -0,0 +1,36 @@ +NODE_ENV=production +# Whether to open mock +VITE_USE_MOCK = true + +# public path +VITE_PUBLIC_PATH = / + +# Delete console +VITE_DROP_CONSOLE = true + +# Whether to enable gzip or brotli compression +# Optional: gzip | brotli | none +# If you need multiple forms, you can use `,` to separate +VITE_BUILD_COMPRESS = 'none' + +# Whether to delete origin files when using compress, default false +VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false + +# Basic interface address SPA +VITE_GLOB_API_URL=/basic-api + +# File upload address, optional +# It can be forwarded by nginx or write the actual address directly +VITE_GLOB_UPLOAD_URL=/upload + +# Interface prefix +VITE_GLOB_API_URL_PREFIX= + +# Whether to enable image compression +VITE_USE_IMAGEMIN= true + +# use pwa +VITE_USE_PWA = false + +# Is it compatible with older browsers +VITE_LEGACY = false diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..348631b2 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,15 @@ + +*.sh +node_modules +*.md +*.woff +*.ttf +.vscode +.idea +dist +/public +/docs +.husky +.local +/bin +Dockerfile diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 00000000..9aa3e10c --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,76 @@ +module.exports = { + root: true, + env: { + browser: true, + node: true, + es6: true, + }, + parser: 'vue-eslint-parser', + parserOptions: { + parser: '@typescript-eslint/parser', + ecmaVersion: 2020, + sourceType: 'module', + jsxPragma: 'React', + ecmaFeatures: { + jsx: true, + }, + }, + extends: [ + 'plugin:vue/vue3-recommended', + 'plugin:@typescript-eslint/recommended', + 'plugin:prettier/recommended', + ], + rules: { + 'vue/script-setup-uses-vars': 'error', + '@typescript-eslint/ban-ts-ignore': 'off', + '@typescript-eslint/explicit-function-return-type': 'off', + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-var-requires': 'off', + '@typescript-eslint/no-empty-function': 'off', + 'vue/custom-event-name-casing': 'off', + 'no-use-before-define': 'off', + '@typescript-eslint/no-use-before-define': 'off', + '@typescript-eslint/ban-ts-comment': 'off', + '@typescript-eslint/ban-types': 'off', + '@typescript-eslint/no-non-null-assertion': 'off', + '@typescript-eslint/explicit-module-boundary-types': 'off', + '@typescript-eslint/no-unused-vars': [ + 'error', + { + argsIgnorePattern: '^_', + varsIgnorePattern: '^_', + }, + ], + 'no-unused-vars': [ + 'error', + { + argsIgnorePattern: '^_', + varsIgnorePattern: '^_', + }, + ], + 'space-before-function-paren': 'off', + + 'vue/attributes-order': 'off', + 'vue/one-component-per-file': 'off', + 'vue/html-closing-bracket-newline': 'off', + 'vue/max-attributes-per-line': 'off', + 'vue/multiline-html-element-content-newline': 'off', + 'vue/singleline-html-element-content-newline': 'off', + 'vue/attribute-hyphenation': 'off', + 'vue/require-default-prop': 'off', + 'vue/require-explicit-emits': 'off', + 'vue/html-self-closing': [ + 'error', + { + html: { + void: 'always', + normal: 'never', + component: 'always', + }, + svg: 'always', + math: 'always', + }, + ], + 'vue/multi-word-component-names': 'off', + }, +}; diff --git a/.github/ISSUE_TEMPLATE/1-bug.md b/.github/ISSUE_TEMPLATE/1-bug.md new file mode 100644 index 00000000..0f5e1e0a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/1-bug.md @@ -0,0 +1,39 @@ +--- +name: 🐛 Bug report +about: Create a report to help us improve +title: '' +labels: 'bug: pending triage' +assignees: '' +--- + + + +**⚠️ IMPORTANT ⚠️ Please check the following list before proceeding. If you ignore this issue template, your issue will be directly closed.** + +- [ ] Read [the docs](https://anncwb.github.io/vue-vben-admin-doc/). +- [ ] Make sure the code is up to date. (Some bugs have been fixed in the latest code) +- [ ] This is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/anncwb/vue-vben-admin/discussions) or join our [Discord](https://discord.gg/8GuAdwDhj6) Chat Server. + +### Describe the bug + +A clear and concise description of what the bug is.. + +### Reproduction + +Please describe the steps of the problem in detail to ensure that we can restore the correct problem + +## System Info + +- Operating System: +- Node version: +- Package manager (npm/yarn/pnpm) and version: diff --git a/.github/ISSUE_TEMPLATE/2-feature.md b/.github/ISSUE_TEMPLATE/2-feature.md new file mode 100644 index 00000000..cbe41645 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/2-feature.md @@ -0,0 +1,32 @@ +--- +name: 🚀 Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' +--- + + + +### Subject of the feature + +Describe your issue here. + +### Problem + +If the feature requests relates to a problem, please describe the problem you are trying to solve here. + +### Expected behaviour + +What should happen? Please describe the desired behaviour. + +### Alternatives + +What are the alternative solutions? Please describe what else you have considered? diff --git a/.github/ISSUE_TEMPLATE/3-bug-cn.md b/.github/ISSUE_TEMPLATE/3-bug-cn.md new file mode 100644 index 00000000..fade42ad --- /dev/null +++ b/.github/ISSUE_TEMPLATE/3-bug-cn.md @@ -0,0 +1,28 @@ +--- +name: 🐛 Bug 报告 +about: 向我们报告一个Bug以帮助我们改进 +title: '' +labels: 'bug: pending triage' +assignees: '' +--- + +**⚠️ 重要 ⚠️ 在进一步操作之前,请检查下列选项。如果您忽视此模板或者没有提供关键信息,您的 Issue 将直接被关闭** + +- [ ] 已阅读 [文档](https://anncwb.github.io/vue-vben-admin-doc/). +- [ ] 确保您的代码已是最新或者所报告的 Bug 在最新版本中可以重现. (部分 Bug 可能已经在最近的代码中修复) +- [ ] 已在 Issues 中搜索了相关的关键词 +- [ ] 不是 ant design vue 组件库的 Bug + +### 描述 Bug + +请清晰地描述此 Bug 的具体表现。 + +### 复现 Bug + +请描述在演示页面中复现 Bug 的详细步骤,以确保我们可以理解并定位问题。部分 Bug 如果未在 Demo 中涉及,请务必提供关键代码 + +## 系统信息 + +- 操作系统: +- Node 版本: +- 包管理器 (npm/yarn/pnpm) 及其版本: diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..b83ccbf2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: Discord Chat + url: https://discord.gg/8GuAdwDhj6 + about: Ask questions and discuss with other Vben users in real time. + - name: Questions & Discussions + url: https://github.com/anncwb/vue-vben-admin/discussions + about: Use GitHub discussions for message-board style questions and discussions. diff --git a/.github/commit-convention.md b/.github/commit-convention.md new file mode 100644 index 00000000..a1a969e9 --- /dev/null +++ b/.github/commit-convention.md @@ -0,0 +1,89 @@ +## Git Commit Message Convention + +> This is adapted from [Angular's commit convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular). + +#### TL;DR: + +Messages must be matched by the following regex: + +```js +/^(revert: )?(feat|fix|docs|style|refactor|perf|test|workflow|build|ci|chore|types|wip): .{1,50}/; +``` + +#### Examples + +Appears under "Features" header, `dev` subheader: + +``` +feat(dev): add 'comments' option +``` + +Appears under "Bug Fixes" header, `dev` subheader, with a link to issue #28: + +``` +fix(dev): fix dev error + +close #28 +``` + +Appears under "Performance Improvements" header, and under "Breaking Changes" with the breaking change explanation: + +``` +perf(build): remove 'foo' option + +BREAKING CHANGE: The 'foo' option has been removed. +``` + +The following commit and commit `667ecc1` do not appear in the changelog if they are under the same release. If not, the revert commit appears under the "Reverts" header. + +``` +revert: feat(compiler): add 'comments' option + +This reverts commit 667ecc1654a317a13331b17617d973392f415f02. +``` + +### Full Message Format + +A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**: + +``` +(): + + + +