Compare commits
merge into: it-center-data:master
it-center-data:liliang
it-center-data:master
it-center-data:refactoring
pull from: it-center-data:refactoring
it-center-data:liliang
it-center-data:master
it-center-data:refactoring
2 Commits
master
...
refactorin
| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
79a9bc9ec6 |
重构的分支
|
3 years ago |
|
|
1b9b6ada10 |
添加src/views/sys/scrapy/index.vue爬虫页面
|
3 years ago |
531 changed files with 8331 additions and 37794 deletions
Split View
Diff Options
-
6.env
-
8.env.development
-
11.eslintrc.js
-
11.gitattributes
-
39.github/ISSUE_TEMPLATE/1-bug.md
-
32.github/ISSUE_TEMPLATE/2-feature.md
-
28.github/ISSUE_TEMPLATE/3-bug-cn.md
-
8.github/ISSUE_TEMPLATE/config.yml
-
89.github/commit-convention.md
-
5.github/contributing.md
-
34.github/pull_request_template.md
-
123.github/workflows/deploy.yml
-
17.github/workflows/issue-close-require.yml
-
29.github/workflows/issue-labeled.yml
-
24.github/workflows/release.yml
-
5.gitignore
-
8.husky/commit-msg
-
9.husky/common.sh
-
10.husky/pre-commit
-
13.vscode/extensions.json
-
13.vscode/launch.json
-
160.vscode/settings.json
-
1262CHANGELOG.en_US.md
-
1586CHANGELOG.md
-
1317CHANGELOG.zh_CN.md
-
1CNAME
-
222LICENSE
-
184README.md
-
175README.zh-CN.md
-
4build/generate/icon/index.ts
-
12build/script/buildConf.ts
-
6build/script/postBuild.ts
-
10build/utils.ts
-
6build/vite/plugin/compress.ts
-
6build/vite/plugin/html.ts
-
20build/vite/plugin/index.ts
-
13build/vite/plugin/styleImport.ts
-
4build/vite/plugin/svgSprite.ts
-
6build/vite/plugin/theme.ts
-
74commitlint.config.js
-
16mock/_createProductionServer.ts
-
20mock/_util.ts
-
3mock/demo/table-demo.ts
-
4mock/sys/menu.ts
-
14mock/sys/user.ts
-
190package.json
-
234public/resource/tinymce/skins/ui/oxide-dark/content.inline.min.css
-
230public/resource/tinymce/skins/ui/oxide-dark/content.min.css
-
12public/resource/tinymce/skins/ui/oxide-dark/content.mobile.min.css
-
870public/resource/tinymce/skins/ui/oxide-dark/skin.min.css
-
234public/resource/tinymce/skins/ui/oxide-dark/skin.mobile.min.css
-
7public/resource/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css
-
234public/resource/tinymce/skins/ui/oxide/content.inline.min.css
-
230public/resource/tinymce/skins/ui/oxide/content.min.css
-
12public/resource/tinymce/skins/ui/oxide/content.mobile.min.css
-
870public/resource/tinymce/skins/ui/oxide/skin.min.css
-
234public/resource/tinymce/skins/ui/oxide/skin.mobile.min.css
-
7public/resource/tinymce/skins/ui/oxide/skin.shadowdom.min.css
-
1spider-management-backend-web
-
1src/App.vue
-
16src/api/demo/account.ts
-
9src/api/demo/cascader.ts
-
12src/api/demo/model/areaModel.ts
-
15src/api/demo/model/optionsModel.ts
-
20src/api/demo/model/tableModel.ts
-
11src/api/demo/select.ts
-
20src/api/demo/table.ts
-
11src/api/demo/tree.ts
-
2src/api/model/baseModel.ts
-
4src/api/sys/model/uploadModel.ts
-
12src/api/sys/upload.ts
-
16src/api/sys/user.ts
-
4src/components/Application/src/AppLocalePicker.vue
-
3src/components/Button/src/BasicButton.vue
-
9src/components/Button/src/props.ts
-
3src/components/CardList/src/CardList.vue
-
2src/components/CardList/src/data.ts
-
4src/components/CodeEditor/src/codemirror/codemirror.css
-
97src/components/Container/src/collapse/CollapseContainer.vue
-
56src/components/Container/src/collapse/CollapseHeader.vue
-
24src/components/ContextMenu/src/ContextMenu.vue
-
1src/components/ContextMenu/src/typing.ts
-
5src/components/Cropper/src/CopperModal.vue
-
6src/components/Cropper/src/CropperAvatar.vue
-
5src/components/Description/src/Description.vue
-
2src/components/Drawer/src/BasicDrawer.vue
-
2src/components/Drawer/src/components/DrawerFooter.vue
-
7src/components/Drawer/src/typing.ts
-
2src/components/Dropdown/src/Dropdown.vue
-
26src/components/Excel/src/Export2Excel.ts
-
79src/components/Excel/src/ImportExcel.vue
-
2src/components/Form/index.ts
-
39src/components/Form/src/BasicForm.vue
-
4src/components/Form/src/componentMap.ts
-
7src/components/Form/src/components/ApiCascader.vue
-
17src/components/Form/src/components/ApiRadioGroup.vue
-
31src/components/Form/src/components/ApiSelect.vue
-
134src/components/Form/src/components/ApiTransfer.vue
-
90src/components/Form/src/components/ApiTree.vue
-
49src/components/Form/src/components/FormItem.vue
@ -1,8 +1,8 @@ |
|||
# port |
|||
VITE_PORT = 3100 |
|||
VITE_PORT = 3201 |
|||
|
|||
# spa-title |
|||
VITE_GLOB_APP_TITLE = Vben Admin |
|||
VITE_GLOB_APP_TITLE = 统一认证管理后台 |
|||
|
|||
# spa shortname |
|||
VITE_GLOB_APP_SHORT_NAME = vue_vben_admin |
|||
VITE_GLOB_APP_SHORT_NAME = one_auth |
|||
@ -1,22 +1,22 @@ |
|||
# Whether to open mock |
|||
VITE_USE_MOCK = true |
|||
VITE_USE_MOCK = false |
|||
|
|||
# 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 = [["/basic-api","http://localhost:3000"],["/upload","http://localhost:3300/upload"]] |
|||
# VITE_PROXY=[["/api","https://vvbin.cn/test"]] |
|||
|
|||
# Delete console |
|||
VITE_DROP_CONSOLE = false |
|||
|
|||
# Basic interface address SPA |
|||
VITE_GLOB_API_URL=/basic-api |
|||
VITE_GLOB_API_URL=http://localhost:8001 |
|||
|
|||
# File upload address, optional |
|||
VITE_GLOB_UPLOAD_URL=/upload |
|||
VITE_GLOB_UPLOAD_URL=/admin/upload/file |
|||
|
|||
# Interface prefix |
|||
VITE_GLOB_API_URL_PREFIX= |
|||
@ -1,11 +0,0 @@ |
|||
# https://docs.github.com/cn/get-started/getting-started-with-git/configuring-git-to-handle-line-endings |
|||
|
|||
# Automatically normalize line endings (to LF) for all text-based files. |
|||
* text=auto eol=lf |
|||
|
|||
# Declare files that will always have CRLF line endings on checkout. |
|||
*.{cmd,[cC][mM][dD]} text eol=crlf |
|||
*.{bat,[bB][aA][tT]} text eol=crlf |
|||
|
|||
# Denote all files that are truly binary and should not be modified. |
|||
*.{ico,png,jpg,jpeg,gif,webp,svg,woff,woff2} binary |
|||
@ -1,39 +0,0 @@ |
|||
--- |
|||
name: 🐛 Bug report |
|||
about: Create a report to help us improve |
|||
title: '' |
|||
labels: 'bug: pending triage' |
|||
assignees: '' |
|||
--- |
|||
|
|||
<!-- |
|||
抱歉,您遇到了一个错误。感谢您抽出宝贵的时间进行举报! |
|||
|
|||
请尽可能填写以下模板。 |
|||
|
|||
Ouch, sorry you’ve run into a bug. Thank for taking the time to report it! |
|||
|
|||
Please fill in as much of the template below as you’re able. |
|||
|
|||
P.S. have you seen our support and contributing docs? |
|||
--> |
|||
|
|||
**⚠️ 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: |
|||
@ -1,32 +0,0 @@ |
|||
--- |
|||
name: 🚀 Feature request |
|||
about: Suggest an idea for this project |
|||
title: '' |
|||
labels: '' |
|||
assignees: '' |
|||
--- |
|||
|
|||
<!-- |
|||
感谢您提出使这个项目更好的想法! |
|||
请尽可能填写以下模板。 |
|||
|
|||
Thank you for suggesting an idea to make this project better! |
|||
Please fill in as much of the template below as you’re able. |
|||
|
|||
--> |
|||
|
|||
### 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? |
|||
@ -1,28 +0,0 @@ |
|||
--- |
|||
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) 及其版本: |
|||
@ -1,8 +0,0 @@ |
|||
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. |
|||
@ -1,89 +0,0 @@ |
|||
## 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**: |
|||
|
|||
``` |
|||
<type>(<scope>): <subject> |
|||
<BLANK LINE> |
|||
<body> |
|||
<BLANK LINE> |
|||
<footer> |
|||
``` |
|||
|
|||
The **header** is mandatory and the **scope** of the header is optional. |
|||
|
|||
### Revert |
|||
|
|||
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body, it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted. |
|||
|
|||
### Type |
|||
|
|||
If the prefix is `feat`, `fix` or `perf`, it will appear in the changelog. However, if there is any [BREAKING CHANGE](#footer), the commit will always appear in the changelog. |
|||
|
|||
Other prefixes are up to your discretion. Suggested prefixes are `docs`, `chore`, `style`, `refactor`, and `test` for non-changelog related tasks. |
|||
|
|||
### Scope |
|||
|
|||
The scope could be anything specifying the place of the commit change. For example `dev`, `build`, `workflow`, `cli` etc... |
|||
|
|||
### Subject |
|||
|
|||
The subject contains a succinct description of the change: |
|||
|
|||
- use the imperative, present tense: "change" not "changed" nor "changes" |
|||
- don't capitalize the first letter |
|||
- no dot (.) at the end |
|||
|
|||
### Body |
|||
|
|||
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes". The body should include the motivation for the change and contrast this with previous behavior. |
|||
|
|||
### Footer |
|||
|
|||
The footer should contain any information about **Breaking Changes** and is also the place to reference GitHub issues that this commit **Closes**. |
|||
|
|||
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this. |
|||
@ -1,5 +0,0 @@ |
|||
# Contributing Guide |
|||
|
|||
1. Make sure you put things in the right category! |
|||
2. Always add your items to the end of a list. To be fair, the order is first-come-first-serve. |
|||
3. If you think something belongs in the wrong category, or think there needs to be a new category, feel free to edit things too. |
|||
@ -1,34 +0,0 @@ |
|||
### `General` |
|||
|
|||
> ✏️ Mark the necessary items without changing the structure of the PR template. |
|||
|
|||
- [ ] Pull request template structure not broken |
|||
|
|||
### `Type` |
|||
|
|||
> ℹ️ What types of changes does your code introduce? |
|||
|
|||
> 👉 _Put an `x` in the boxes that apply_ |
|||
|
|||
- [ ] Bug fix (non-breaking change which fixes an issue) |
|||
- [ ] New feature (non-breaking change which adds functionality) |
|||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) |
|||
- [ ] This change requires a documentation update |
|||
|
|||
### `Checklist` |
|||
|
|||
> ℹ️ Check all checkboxes - this will indicate that you have done everything in accordance with the rules in [CONTRIBUTING](contributing.md). |
|||
|
|||
> 👉 _Put an `x` in the boxes that apply._ |
|||
|
|||
- [ ] My code follows the style guidelines of this project |
|||
- [ ] Is the code format correct |
|||
- [ ] Is the git submission information standard? |
|||
- [ ] My code follows the style guidelines of this project |
|||
- [ ] I have performed a self-review of my own code |
|||
- [ ] I have commented my code, particularly in hard-to-understand areas |
|||
- [ ] I have made corresponding changes to the documentation |
|||
- [ ] My changes generate no new warnings |
|||
- [ ] I have added tests that prove my fix is effective or that my feature works |
|||
- [ ] New and existing unit tests pass locally with my changes |
|||
- [ ] Any dependent changes have been merged and published in downstream modules |
|||
@ -1,123 +0,0 @@ |
|||
name: deploy |
|||
|
|||
on: |
|||
push: |
|||
branches: |
|||
- main |
|||
|
|||
jobs: |
|||
# push-to-ftp: |
|||
# if: "contains(github.event.head_commit.message, '[deploy]')" |
|||
# runs-on: ubuntu-latest |
|||
# steps: |
|||
# - name: Checkout |
|||
# uses: actions/checkout@v2 |
|||
|
|||
# - name: Sed Config Base |
|||
# shell: bash |
|||
# run: | |
|||
# sed -i 's#VITE_PUBLIC_PATH\s*=.*#VITE_PUBLIC_PATH = /next/#g' ./.env.production |
|||
# sed -i "s#VITE_BUILD_COMPRESS\s*=.*#VITE_BUILD_COMPRESS = 'gzip'#g" ./.env.production |
|||
# cat ./.env.production |
|||
|
|||
# - name: use Node.js 14 |
|||
# uses: actions/setup-node@v2.1.2 |
|||
# with: |
|||
# node-version: '14.x' |
|||
|
|||
# - name: Get yarn cache |
|||
# id: yarn-cache |
|||
# run: echo "::set-output name=dir::$(yarn cache dir)" |
|||
|
|||
# - name: Cache dependencies |
|||
# uses: actions/cache@v2 |
|||
# with: |
|||
# path: ${{ steps.yarn-cache.outputs.dir }} |
|||
# key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} |
|||
# restore-keys: | |
|||
# ${{ runner.os }}-yarn- |
|||
|
|||
# - name: Build |
|||
# run: | |
|||
# yarn install |
|||
# yarn run build |
|||
|
|||
# - name: Deploy |
|||
# uses: SamKirkland/FTP-Deploy-Action@2.0.0 |
|||
# env: |
|||
# FTP_SERVER: ${{ secrets.FTP_SERVER }} |
|||
# FTP_USERNAME: ${{ secrets.FTP_USERNAME }} |
|||
# FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }} |
|||
# METHOD: sftp |
|||
# PORT: ${{ secrets.FTP_PORT }} |
|||
# LOCAL_DIR: dist |
|||
# REMOTE_DIR: /srv/www/vben-admin |
|||
# ARGS: --delete --verbose --parallel=80 |
|||
|
|||
push-to-gh-pages: |
|||
runs-on: ubuntu-latest |
|||
steps: |
|||
- name: Checkout |
|||
uses: actions/checkout@v3 |
|||
|
|||
- name: Sed Config Base |
|||
shell: bash |
|||
run: | |
|||
sed -i "s#VITE_BUILD_COMPRESS\s*=.*#VITE_BUILD_COMPRESS = 'gzip'#g" ./.env.production |
|||
sed -i "s#VITE_DROP_CONSOLE\s*=.*#VITE_DROP_CONSOLE = true#g" ./.env.production |
|||
cat ./.env.production |
|||
|
|||
- name: use Node.js 16 |
|||
uses: actions/setup-node@v3 |
|||
with: |
|||
node-version: '16.x' |
|||
|
|||
- name: Get yarn cache directory path |
|||
id: yarn-cache-dir-path |
|||
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT |
|||
|
|||
- name: Cache dependencies |
|||
uses: actions/cache@v3 |
|||
with: |
|||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} |
|||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} |
|||
restore-keys: | |
|||
${{ runner.os }}-yarn- |
|||
|
|||
- name: Set SSH Environment |
|||
env: |
|||
DOCS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }} |
|||
run: | |
|||
mkdir -p ~/.ssh/ |
|||
echo "$ACTIONS_DEPLOY_KEY" > ~/.ssh/id_rsa |
|||
chmod 600 ~/.ssh/id_rsa |
|||
ssh-keyscan github.com > ~/.ssh/known_hosts |
|||
chmod 700 ~/.ssh && chmod 600 ~/.ssh/* |
|||
git config --global user.email "vbenadmin@163.com" |
|||
git config --global user.name "vbenAdmin" |
|||
|
|||
- name: Build |
|||
env: |
|||
NODE_OPTIONS: "--max_old_space_size=4096" |
|||
run: | |
|||
yarn install |
|||
yarn run build |
|||
touch dist/.nojekyll |
|||
cp dist/index.html dist/404.html |
|||
|
|||
- name: Delete gh-pages branch |
|||
run: | |
|||
git push origin --delete gh-pages |
|||
|
|||
- name: Deploy |
|||
uses: peaceiris/actions-gh-pages@v3.9.0 |
|||
with: |
|||
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} |
|||
PUBLISH_BRANCH: gh-pages |
|||
PUBLISH_DIR: ./dist |
|||
CNAME: vben.vvbin.cn |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
@ -1,17 +0,0 @@ |
|||
name: Issue Close Require |
|||
|
|||
on: |
|||
schedule: |
|||
- cron: '0 0 * * *' |
|||
|
|||
jobs: |
|||
close-issues: |
|||
runs-on: ubuntu-latest |
|||
steps: |
|||
- name: need reproduction |
|||
uses: actions-cool/issues-helper@v2.1.1 |
|||
with: |
|||
actions: 'close-issues' |
|||
token: ${{ secrets.OPER_TOKEN }} |
|||
labels: 'need reproduction' |
|||
inactive-day: 3 |
|||
@ -1,29 +0,0 @@ |
|||
name: Issue Labeled |
|||
|
|||
on: |
|||
issues: |
|||
types: [labeled] |
|||
|
|||
jobs: |
|||
reply-labeled: |
|||
runs-on: ubuntu-latest |
|||
steps: |
|||
- name: remove pending |
|||
if: github.event.label.name == 'enhancement' || github.event.label.name == 'bug' |
|||
uses: actions-cool/issues-helper@v2.1.1 |
|||
with: |
|||
actions: 'remove-labels' |
|||
token: ${{ secrets.OPER_TOKEN }} |
|||
issue-number: ${{ github.event.issue.number }} |
|||
labels: 'bug: pending triage' |
|||
|
|||
- name: need reproduction |
|||
if: github.event.label.name == 'need reproduction' |
|||
uses: actions-cool/issues-helper@v2.1.1 |
|||
with: |
|||
actions: 'create-comment, remove-labels' |
|||
token: ${{ secrets.OPER_TOKEN }} |
|||
issue-number: ${{ github.event.issue.number }} |
|||
body: | |
|||
Hello @${{ github.event.issue.user.login }}. Please provide the complete reproduction steps and code. Issues labeled by `need reproduction` will be closed if no activities in 3 days. |
|||
labels: 'bug: pending triage' |
|||
@ -1,24 +0,0 @@ |
|||
name: Create Release |
|||
|
|||
on: |
|||
push: |
|||
tags: |
|||
- v* |
|||
|
|||
jobs: |
|||
build: |
|||
name: Create Release |
|||
runs-on: ubuntu-latest |
|||
steps: |
|||
- name: Checkout code |
|||
uses: actions/checkout@master |
|||
|
|||
- name: Create Release for Tag |
|||
id: release_tag |
|||
uses: yyx990803/release-tag@master |
|||
env: |
|||
GITHUB_TOKEN: ${{ secrets.OPER_TOKEN }} |
|||
with: |
|||
tag_name: ${{ github.ref }} |
|||
body: | |
|||
Please refer to [CHANGELOG.md](https://github.com/anncwb/vue-vben-admin/blob/main/CHANGELOG.md) for details. |
|||
@ -1,8 +0,0 @@ |
|||
#!/bin/sh |
|||
|
|||
# shellcheck source=./_/husky.sh |
|||
. "$(dirname "$0")/_/husky.sh" |
|||
|
|||
PATH="/usr/local/bin:$PATH" |
|||
|
|||
npx --no-install commitlint --edit "$1" |
|||
@ -1,9 +0,0 @@ |
|||
#!/bin/sh |
|||
command_exists () { |
|||
command -v "$1" >/dev/null 2>&1 |
|||
} |
|||
|
|||
# Workaround for Windows 10, Git Bash and Yarn |
|||
if command_exists winpty && test -t 1; then |
|||
exec < /dev/tty |
|||
fi |
|||
@ -1,10 +0,0 @@ |
|||
#!/bin/sh |
|||
. "$(dirname "$0")/_/husky.sh" |
|||
. "$(dirname "$0")/common.sh" |
|||
|
|||
[ -n "$CI" ] && exit 0 |
|||
|
|||
PATH="/usr/local/bin:$PATH" |
|||
|
|||
# Format and submit code according to lintstagedrc.js configuration |
|||
npm run lint:lint-staged |
|||
@ -1,13 +0,0 @@ |
|||
{ |
|||
"recommendations": [ |
|||
"vue.volar", |
|||
"dbaeumer.vscode-eslint", |
|||
"stylelint.vscode-stylelint", |
|||
"esbenp.prettier-vscode", |
|||
"mrmlnc.vscode-less", |
|||
"lokalise.i18n-ally", |
|||
"antfu.iconify", |
|||
"mikestead.dotenv", |
|||
"heybourn.headwind" |
|||
] |
|||
} |
|||
@ -1,13 +0,0 @@ |
|||
{ |
|||
"version": "0.2.0", |
|||
"configurations": [ |
|||
{ |
|||
"type": "chrome", |
|||
"request": "launch", |
|||
"name": "Launch Chrome", |
|||
"url": "http://localhost:3100", |
|||
"webRoot": "${workspaceFolder}/src", |
|||
"sourceMaps": true |
|||
} |
|||
] |
|||
} |
|||
@ -1,160 +0,0 @@ |
|||
{ |
|||
"typescript.tsdk": "./node_modules/typescript/lib", |
|||
"volar.tsPlugin": true, |
|||
"volar.tsPluginStatus": false, |
|||
"npm.packageManager": "pnpm", |
|||
"editor.tabSize": 2, |
|||
"editor.defaultFormatter": "esbenp.prettier-vscode", |
|||
"files.eol": "\n", |
|||
"search.exclude": { |
|||
"**/node_modules": true, |
|||
"**/*.log": true, |
|||
"**/*.log*": true, |
|||
"**/bower_components": true, |
|||
"**/dist": true, |
|||
"**/elehukouben": true, |
|||
"**/.git": true, |
|||
"**/.gitignore": true, |
|||
"**/.svn": true, |
|||
"**/.DS_Store": true, |
|||
"**/.idea": true, |
|||
"**/.vscode": false, |
|||
"**/yarn.lock": true, |
|||
"**/tmp": true, |
|||
"out": true, |
|||
"dist": true, |
|||
"node_modules": true, |
|||
"CHANGELOG.md": true, |
|||
"examples": true, |
|||
"res": true, |
|||
"screenshots": true, |
|||
"yarn-error.log": true, |
|||
"**/.yarn": true |
|||
}, |
|||
"files.exclude": { |
|||
"**/.cache": true, |
|||
"**/.editorconfig": true, |
|||
"**/.eslintcache": true, |
|||
"**/bower_components": true, |
|||
"**/.idea": true, |
|||
"**/tmp": true, |
|||
"**/.git": true, |
|||
"**/.svn": true, |
|||
"**/.hg": true, |
|||
"**/CVS": true, |
|||
"**/.DS_Store": true |
|||
}, |
|||
"files.watcherExclude": { |
|||
"**/.git/objects/**": true, |
|||
"**/.git/subtree-cache/**": true, |
|||
"**/.vscode/**": true, |
|||
"**/node_modules/**": true, |
|||
"**/tmp/**": true, |
|||
"**/bower_components/**": true, |
|||
"**/dist/**": true, |
|||
"**/yarn.lock": true |
|||
}, |
|||
"stylelint.enable": true, |
|||
"stylelint.validate": ["css", "less", "postcss", "scss", "vue", "sass"], |
|||
"path-intellisense.mappings": { |
|||
"/@/": "${workspaceRoot}/src" |
|||
}, |
|||
"[javascriptreact]": { |
|||
"editor.defaultFormatter": "esbenp.prettier-vscode" |
|||
}, |
|||
"[typescript]": { |
|||
"editor.defaultFormatter": "esbenp.prettier-vscode" |
|||
}, |
|||
"[typescriptreact]": { |
|||
"editor.defaultFormatter": "esbenp.prettier-vscode" |
|||
}, |
|||
"[html]": { |
|||
"editor.defaultFormatter": "esbenp.prettier-vscode" |
|||
}, |
|||
"[css]": { |
|||
"editor.defaultFormatter": "esbenp.prettier-vscode" |
|||
}, |
|||
"[less]": { |
|||
"editor.defaultFormatter": "esbenp.prettier-vscode" |
|||
}, |
|||
"[scss]": { |
|||
"editor.defaultFormatter": "esbenp.prettier-vscode" |
|||
}, |
|||
"[markdown]": { |
|||
"editor.defaultFormatter": "esbenp.prettier-vscode" |
|||
}, |
|||
"editor.codeActionsOnSave": { |
|||
"source.fixAll.eslint": true |
|||
}, |
|||
"[vue]": { |
|||
"editor.codeActionsOnSave": { |
|||
"source.fixAll.eslint": true, |
|||
"source.fixAll.stylelint": true |
|||
} |
|||
}, |
|||
"i18n-ally.localesPaths": ["src/locales/lang"], |
|||
"i18n-ally.keystyle": "nested", |
|||
"i18n-ally.sortKeys": true, |
|||
"i18n-ally.namespace": true, |
|||
"i18n-ally.pathMatcher": "{locale}/{namespaces}.{ext}", |
|||
"i18n-ally.enabledParsers": ["ts"], |
|||
"i18n-ally.sourceLanguage": "en", |
|||
"i18n-ally.displayLanguage": "zh-CN", |
|||
"i18n-ally.enabledFrameworks": ["vue", "react"], |
|||
"cSpell.words": [ |
|||
"vben", |
|||
"windi", |
|||
"browserslist", |
|||
"tailwindcss", |
|||
"esnext", |
|||
"antv", |
|||
"tinymce", |
|||
"qrcode", |
|||
"sider", |
|||
"pinia", |
|||
"sider", |
|||
"nprogress", |
|||
"INTLIFY", |
|||
"stylelint", |
|||
"esno", |
|||
"vitejs", |
|||
"sortablejs", |
|||
"mockjs", |
|||
"codemirror", |
|||
"iconify", |
|||
"commitlint", |
|||
"vditor", |
|||
"echarts", |
|||
"cropperjs", |
|||
"logicflow", |
|||
"vueuse", |
|||
"zxcvbn", |
|||
"lintstagedrc", |
|||
"brotli", |
|||
"tailwindcss", |
|||
"sider", |
|||
"pnpm", |
|||
"antd" |
|||
], |
|||
"vetur.format.scriptInitialIndent": true, |
|||
"vetur.format.styleInitialIndent": true, |
|||
"vetur.validation.script": false, |
|||
"MicroPython.executeButton": [ |
|||
{ |
|||
"text": "▶", |
|||
"tooltip": "运行", |
|||
"alignment": "left", |
|||
"command": "extension.executeFile", |
|||
"priority": 3.5 |
|||
} |
|||
], |
|||
"MicroPython.syncButton": [ |
|||
{ |
|||
"text": "$(sync)", |
|||
"tooltip": "同步", |
|||
"alignment": "left", |
|||
"command": "extension.execute", |
|||
"priority": 4 |
|||
} |
|||
] |
|||
} |
|||
1262
CHANGELOG.en_US.md
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
1586
CHANGELOG.md
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
1317
CHANGELOG.zh_CN.md
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1 +0,0 @@ |
|||
vben.vvbin.cn |
|||
@ -1,21 +1,201 @@ |
|||
MIT License |
|||
|
|||
Copyright (c) 2020-present, Vben |
|||
|
|||
Permission is hereby granted, free of charge, to any person obtaining a copy |
|||
of this software and associated documentation files (the "Software"), to deal |
|||
in the Software without restriction, including without limitation the rights |
|||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|||
copies of the Software, and to permit persons to whom the Software is |
|||
furnished to do so, subject to the following conditions: |
|||
|
|||
The above copyright notice and this permission notice shall be included in all |
|||
copies or substantial portions of the Software. |
|||
|
|||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
|||
SOFTWARE. |
|||
Apache License |
|||
Version 2.0, January 2004 |
|||
http://www.apache.org/licenses/ |
|||
|
|||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
|||
|
|||
1. Definitions. |
|||
|
|||
"License" shall mean the terms and conditions for use, reproduction, |
|||
and distribution as defined by Sections 1 through 9 of this document. |
|||
|
|||
"Licensor" shall mean the copyright owner or entity authorized by |
|||
the copyright owner that is granting the License. |
|||
|
|||
"Legal Entity" shall mean the union of the acting entity and all |
|||
other entities that control, are controlled by, or are under common |
|||
control with that entity. For the purposes of this definition, |
|||
"control" means (i) the power, direct or indirect, to cause the |
|||
direction or management of such entity, whether by contract or |
|||
otherwise, or (ii) ownership of fifty percent (50%) or more of the |
|||
outstanding shares, or (iii) beneficial ownership of such entity. |
|||
|
|||
"You" (or "Your") shall mean an individual or Legal Entity |
|||
exercising permissions granted by this License. |
|||
|
|||
"Source" form shall mean the preferred form for making modifications, |
|||
including but not limited to software source code, documentation |
|||
source, and configuration files. |
|||
|
|||
"Object" form shall mean any form resulting from mechanical |
|||
transformation or translation of a Source form, including but |
|||
not limited to compiled object code, generated documentation, |
|||
and conversions to other media types. |
|||
|
|||
"Work" shall mean the work of authorship, whether in Source or |
|||
Object form, made available under the License, as indicated by a |
|||
copyright notice that is included in or attached to the work |
|||
(an example is provided in the Appendix below). |
|||
|
|||
"Derivative Works" shall mean any work, whether in Source or Object |
|||
form, that is based on (or derived from) the Work and for which the |
|||
editorial revisions, annotations, elaborations, or other modifications |
|||
represent, as a whole, an original work of authorship. For the purposes |
|||
of this License, Derivative Works shall not include works that remain |
|||
separable from, or merely link (or bind by name) to the interfaces of, |
|||
the Work and Derivative Works thereof. |
|||
|
|||
"Contribution" shall mean any work of authorship, including |
|||
the original version of the Work and any modifications or additions |
|||
to that Work or Derivative Works thereof, that is intentionally |
|||
submitted to Licensor for inclusion in the Work by the copyright owner |
|||
or by an individual or Legal Entity authorized to submit on behalf of |
|||
the copyright owner. For the purposes of this definition, "submitted" |
|||
means any form of electronic, verbal, or written communication sent |
|||
to the Licensor or its representatives, including but not limited to |
|||
communication on electronic mailing lists, source code control systems, |
|||
and issue tracking systems that are managed by, or on behalf of, the |
|||
Licensor for the purpose of discussing and improving the Work, but |
|||
excluding communication that is conspicuously marked or otherwise |
|||
designated in writing by the copyright owner as "Not a Contribution." |
|||
|
|||
"Contributor" shall mean Licensor and any individual or Legal Entity |
|||
on behalf of whom a Contribution has been received by Licensor and |
|||
subsequently incorporated within the Work. |
|||
|
|||
2. Grant of Copyright License. Subject to the terms and conditions of |
|||
this License, each Contributor hereby grants to You a perpetual, |
|||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
|||
copyright license to reproduce, prepare Derivative Works of, |
|||
publicly display, publicly perform, sublicense, and distribute the |
|||
Work and such Derivative Works in Source or Object form. |
|||
|
|||
3. Grant of Patent License. Subject to the terms and conditions of |
|||
this License, each Contributor hereby grants to You a perpetual, |
|||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
|||
(except as stated in this section) patent license to make, have made, |
|||
use, offer to sell, sell, import, and otherwise transfer the Work, |
|||
where such license applies only to those patent claims licensable |
|||
by such Contributor that are necessarily infringed by their |
|||
Contribution(s) alone or by combination of their Contribution(s) |
|||
with the Work to which such Contribution(s) was submitted. If You |
|||
institute patent litigation against any entity (including a |
|||
cross-claim or counterclaim in a lawsuit) alleging that the Work |
|||
or a Contribution incorporated within the Work constitutes direct |
|||
or contributory patent infringement, then any patent licenses |
|||
granted to You under this License for that Work shall terminate |
|||
as of the date such litigation is filed. |
|||
|
|||
4. Redistribution. You may reproduce and distribute copies of the |
|||
Work or Derivative Works thereof in any medium, with or without |
|||
modifications, and in Source or Object form, provided that You |
|||
meet the following conditions: |
|||
|
|||
(a) You must give any other recipients of the Work or |
|||
Derivative Works a copy of this License; and |
|||
|
|||
(b) You must cause any modified files to carry prominent notices |
|||
stating that You changed the files; and |
|||
|
|||
(c) You must retain, in the Source form of any Derivative Works |
|||
that You distribute, all copyright, patent, trademark, and |
|||
attribution notices from the Source form of the Work, |
|||
excluding those notices that do not pertain to any part of |
|||
the Derivative Works; and |
|||
|
|||
(d) If the Work includes a "NOTICE" text file as part of its |
|||
distribution, then any Derivative Works that You distribute must |
|||
include a readable copy of the attribution notices contained |
|||
within such NOTICE file, excluding those notices that do not |
|||
pertain to any part of the Derivative Works, in at least one |
|||
of the following places: within a NOTICE text file distributed |
|||
as part of the Derivative Works; within the Source form or |
|||
documentation, if provided along with the Derivative Works; or, |
|||
within a display generated by the Derivative Works, if and |
|||
wherever such third-party notices normally appear. The contents |
|||
of the NOTICE file are for informational purposes only and |
|||
do not modify the License. You may add Your own attribution |
|||
notices within Derivative Works that You distribute, alongside |
|||
or as an addendum to the NOTICE text from the Work, provided |
|||
that such additional attribution notices cannot be construed |
|||
as modifying the License. |
|||
|
|||
You may add Your own copyright statement to Your modifications and |
|||
may provide additional or different license terms and conditions |
|||
for use, reproduction, or distribution of Your modifications, or |
|||
for any such Derivative Works as a whole, provided Your use, |
|||
reproduction, and distribution of the Work otherwise complies with |
|||
the conditions stated in this License. |
|||
|
|||
5. Submission of Contributions. Unless You explicitly state otherwise, |
|||
any Contribution intentionally submitted for inclusion in the Work |
|||
by You to the Licensor shall be under the terms and conditions of |
|||
this License, without any additional terms or conditions. |
|||
Notwithstanding the above, nothing herein shall supersede or modify |
|||
the terms of any separate license agreement you may have executed |
|||
with Licensor regarding such Contributions. |
|||
|
|||
6. Trademarks. This License does not grant permission to use the trade |
|||
names, trademarks, service marks, or product names of the Licensor, |
|||
except as required for reasonable and customary use in describing the |
|||
origin of the Work and reproducing the content of the NOTICE file. |
|||
|
|||
7. Disclaimer of Warranty. Unless required by applicable law or |
|||
agreed to in writing, Licensor provides the Work (and each |
|||
Contributor provides its Contributions) on an "AS IS" BASIS, |
|||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
|||
implied, including, without limitation, any warranties or conditions |
|||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A |
|||
PARTICULAR PURPOSE. You are solely responsible for determining the |
|||
appropriateness of using or redistributing the Work and assume any |
|||
risks associated with Your exercise of permissions under this License. |
|||
|
|||
8. Limitation of Liability. In no event and under no legal theory, |
|||
whether in tort (including negligence), contract, or otherwise, |
|||
unless required by applicable law (such as deliberate and grossly |
|||
negligent acts) or agreed to in writing, shall any Contributor be |
|||
liable to You for damages, including any direct, indirect, special, |
|||
incidental, or consequential damages of any character arising as a |
|||
result of this License or out of the use or inability to use the |
|||
Work (including but not limited to damages for loss of goodwill, |
|||
work stoppage, computer failure or malfunction, or any and all |
|||
other commercial damages or losses), even if such Contributor |
|||
has been advised of the possibility of such damages. |
|||
|
|||
9. Accepting Warranty or Additional Liability. While redistributing |
|||
the Work or Derivative Works thereof, You may choose to offer, |
|||
and charge a fee for, acceptance of support, warranty, indemnity, |
|||
or other liability obligations and/or rights consistent with this |
|||
License. However, in accepting such obligations, You may act only |
|||
on Your own behalf and on Your sole responsibility, not on behalf |
|||
of any other Contributor, and only if You agree to indemnify, |
|||
defend, and hold each Contributor harmless for any liability |
|||
incurred by, or claims asserted against, such Contributor by reason |
|||
of your accepting any such warranty or additional liability. |
|||
|
|||
END OF TERMS AND CONDITIONS |
|||
|
|||
APPENDIX: How to apply the Apache License to your work. |
|||
|
|||
To apply the Apache License to your work, attach the following |
|||
boilerplate notice, with the fields enclosed by brackets "[]" |
|||
replaced with your own identifying information. (Don't include |
|||
the brackets!) The text should be enclosed in the appropriate |
|||
comment syntax for the file format. We also recommend that a |
|||
file or class name and description of purpose be included on the |
|||
same "printed page" as the copyright notice for easier |
|||
identification within third-party archives. |
|||
|
|||
Copyright [2022] [meta unit] |
|||
|
|||
Licensed under the Apache License, Version 2.0 (the "License"); |
|||
you may not use this file except in compliance with the License. |
|||
You may obtain a copy of the License at |
|||
|
|||
http://www.apache.org/licenses/LICENSE-2.0 |
|||
|
|||
Unless required by applicable law or agreed to in writing, software |
|||
distributed under the License is distributed on an "AS IS" BASIS, |
|||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|||
See the License for the specific language governing permissions and |
|||
limitations under the License. |
|||
@ -1,169 +1,39 @@ |
|||
<div align="center"> <a href="https://github.com/anncwb/vue-vben-admin"> <img alt="VbenAdmin Logo" width="200" height="200" src="https://anncwb.github.io/anncwb/images/logo.png"> </a> <br> <br> |
|||
# one-auth-backend |
|||
|
|||
[](LICENSE) |
|||
#### 介绍 |
|||
{**以下是 Gitee 平台说明,您可以替换此简介** |
|||
Gitee 是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 |
|||
无论是个人、团队、或是企业,都能够用 Gitee 实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} |
|||
|
|||
<h1>Vue vben admin</h1> |
|||
</div> |
|||
#### 软件架构 |
|||
软件架构说明 |
|||
|
|||
**English** | [中文](./README.zh-CN.md) |
|||
|
|||
## Introduction |
|||
#### 安装教程 |
|||
|
|||
Vue Vben Admin is a free and open source middle and back-end template. Using the latest `vue3`, `vite2`, `TypeScript` and other mainstream technology development, the out-of-the-box middle and back-end front-end solutions can also be used for learning reference. |
|||
1. xxxx |
|||
2. xxxx |
|||
3. xxxx |
|||
|
|||
## Feature |
|||
#### 使用说明 |
|||
|
|||
- **State of The Art Development**:Use front-end front-end technology development such as Vue3/vite2 |
|||
- **TypeScript**: Application-level JavaScript language |
|||
- **Theming**: Configurable themes |
|||
- **International**:Built-in complete internationalization program |
|||
- **Mock Server** Built-in mock data scheme |
|||
- **Authority** Built-in complete dynamic routing permission generation scheme. |
|||
- **Component** Multiple commonly used components are encapsulated twice |
|||
1. xxxx |
|||
2. xxxx |
|||
3. xxxx |
|||
|
|||
## Preview |
|||
#### 参与贡献 |
|||
|
|||
- [vue-vben-admin](https://vben.vvbin.cn/) - Full version Chinese site |
|||
- [vue-vben-admin-gh-pages](https://anncwb.github.io/vue-vben-admin/) - Full version of the github site |
|||
- [vben-admin-thin-next](https://vben.vvbin.cn/thin/next/) - Simplified Chinese site |
|||
- [vben-admin-thin-gh-pages](https://anncwb.github.io/vben-admin-thin-next/) -Simplified github site |
|||
1. Fork 本仓库 |
|||
2. 新建 Feat_xxx 分支 |
|||
3. 提交代码 |
|||
4. 新建 Pull Request |
|||
|
|||
Test account: vben/123456 |
|||
|
|||
<p align="center"> |
|||
<img alt="VbenAdmin Logo" width="100%" src="https://anncwb.github.io/anncwb/images/preview1.png"> |
|||
<img alt="VbenAdmin Logo" width="100%" src="https://anncwb.github.io/anncwb/images/preview2.png"> |
|||
<img alt="VbenAdmin Logo" width="100%" src="https://anncwb.github.io/anncwb/images/preview3.png"> |
|||
</p> |
|||
#### 特技 |
|||
|
|||
### Use Gitpod |
|||
|
|||
Open the project in Gitpod (free online dev environment for GitHub) and start coding immediately. |
|||
|
|||
[](https://gitpod.io/#https://github.com/anncwb/vue-vben-admin) |
|||
|
|||
## Documentation |
|||
|
|||
[Document](https://doc.vvbin.cn/) |
|||
|
|||
## Preparation |
|||
|
|||
- [node](http://nodejs.org/) and [git](https://git-scm.com/) - Project development environment |
|||
- [Vite](https://vitejs.dev/) - Familiar with vite features |
|||
- [Vue3](https://v3.vuejs.org/) - Familiar with Vue basic syntax |
|||
- [TypeScript](https://www.typescriptlang.org/) - Familiar with the basic syntax of `TypeScript` |
|||
- [Es6+](http://es6.ruanyifeng.com/) - Familiar with es6 basic syntax |
|||
- [Vue-Router-Next](https://next.router.vuejs.org/) - Familiar with the basic use of vue-router |
|||
- [Ant-Design-Vue](https://2x.antdv.com/docs/vue/introduce-cn/) - ui basic use |
|||
- [Mock.js](https://github.com/nuysoft/Mock) - mockjs basic syntax |
|||
|
|||
## Install and use |
|||
|
|||
- Get the project code |
|||
|
|||
```bash |
|||
git clone https://github.com/anncwb/vue-vben-admin.git |
|||
``` |
|||
|
|||
- Installation dependencies |
|||
|
|||
```bash |
|||
cd vue-vben-admin |
|||
|
|||
pnpm install |
|||
|
|||
``` |
|||
|
|||
- run |
|||
|
|||
```bash |
|||
pnpm serve |
|||
``` |
|||
|
|||
- build |
|||
|
|||
```bash |
|||
pnpm build |
|||
``` |
|||
|
|||
## Change Log |
|||
|
|||
[CHANGELOG](./CHANGELOG.zh_CN.md) |
|||
|
|||
## Project |
|||
|
|||
- [vue-vben-admin](https://github.com/anncwb/vue-vben-admin) - full version |
|||
- [vue-vben-admin-thin-next](https://github.com/anncwb/vben-admin-thin-next) - Simplified version |
|||
|
|||
## How to contribute |
|||
|
|||
You are very welcome to join Or submit a Pull Request。 |
|||
|
|||
**Pull Request:** |
|||
|
|||
1. Fork code! |
|||
2. Create your own branch: `git checkout -b feat/xxxx` |
|||
3. Submit your changes: `git commit -am 'feat(function): add xxxxx'` |
|||
4. Push your branch: `git push origin feat/xxxx` |
|||
5. submit`pull request` |
|||
|
|||
## Git Contribution submission specification |
|||
|
|||
- reference [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)) |
|||
|
|||
- `feat` Add new features |
|||
- `fix` Fix the problem/BUG |
|||
- `style` The code style is related and does not affect the running result |
|||
- `perf` Optimization/performance improvement |
|||
- `refactor` Refactor |
|||
- `revert` Undo edit |
|||
- `test` Test related |
|||
- `docs` Documentation/notes |
|||
- `chore` Dependency update/scaffolding configuration modification etc. |
|||
- `workflow` Workflow improvements |
|||
- `ci` Continuous integration |
|||
- `types` Type definition file changes |
|||
- `wip` In development |
|||
|
|||
## Related warehouse |
|||
|
|||
If these plugins are helpful to you, you can give a star support |
|||
|
|||
- [vite-plugin-mock](https://github.com/anncwb/vite-plugin-mock) - Used for local and development environment data mock |
|||
- [vite-plugin-html](https://github.com/anncwb/vite-plugin-html) - Used for html template conversion and compression |
|||
- [vite-plugin-style-import](https://github.com/anncwb/vite-plugin-style-import) - Used for component library style introduction on demand |
|||
- [vite-plugin-theme](https://github.com/anncwb/vite-plugin-theme) - Used for online switching of theme colors and other color-related configurations |
|||
- [vite-plugin-imagemin](https://github.com/anncwb/vite-plugin-imagemin) - Used to pack compressed image resources |
|||
- [vite-plugin-compression](https://github.com/anncwb/vite-plugin-compression) - Used to pack input .gz|.brotil files |
|||
- [vite-plugin-svg-icons](https://github.com/anncwb/vite-plugin-svg-icons) - Used to quickly generate svg sprite |
|||
|
|||
## Browser support |
|||
|
|||
The `Chrome 80+` browser is recommended for local development |
|||
|
|||
Support modern browsers, not IE |
|||
|
|||
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt=" Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt=" Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari | |
|||
| :-: | :-: | :-: | :-: | :-: | |
|||
| not support | last 2 versions | last 2 versions | last 2 versions | last 2 versions | |
|||
|
|||
## Maintainer |
|||
|
|||
[@Vben](https://github.com/anncwb) |
|||
|
|||
## Donate |
|||
|
|||
If you think this project is helpful to you, you can help the author buy a cup of coffee to show your support! |
|||
|
|||
 |
|||
|
|||
<a style="display: block;width: 100px;height: 50px;line-height: 50px; color: #fff;text-align: center; background: #408aed;border-radius: 4px;" href="https://www.paypal.com/paypalme/cvvben">Paypal Me</a> |
|||
|
|||
## Discord |
|||
|
|||
- [github discussions](https://github.com/anncwb/vue-vben-admin/discussions) |
|||
- [Discord](https://discord.gg/8GuAdwDhj6) |
|||
|
|||
## License |
|||
|
|||
[MIT © Vben-2020](./LICENSE) |
|||
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md |
|||
2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) |
|||
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 |
|||
4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 |
|||
5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) |
|||
6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) |
|||
@ -1,175 +0,0 @@ |
|||
<div align="center"> <a href="https://github.com/anncwb/vue-vben-admin"> <img alt="VbenAdmin Logo" width="200" height="200" src="https://anncwb.github.io/anncwb/images/logo.png"> </a> <br> <br> |
|||
|
|||
[](LICENSE) |
|||
|
|||
<h1>Vue vben admin</h1> |
|||
</div> |
|||
|
|||
**中文** | [English](./README.md) |
|||
|
|||
## 简介 |
|||
|
|||
Vue Vben Admin 是一个免费开源的中后台模版。使用了最新的`vue3`,`vite2`,`TypeScript`等主流技术开发,开箱即用的中后台前端解决方案,也可用于学习参考。 |
|||
|
|||
## 特性 |
|||
|
|||
- **最新技术栈**:使用 Vue3/vite2 等前端前沿技术开发 |
|||
- **TypeScript**: 应用程序级 JavaScript 的语言 |
|||
- **主题**:可配置的主题 |
|||
- **国际化**:内置完善的国际化方案 |
|||
- **Mock 数据** 内置 Mock 数据方案 |
|||
- **权限** 内置完善的动态路由权限生成方案 |
|||
- **组件** 二次封装了多个常用的组件 |
|||
|
|||
## 预览 |
|||
|
|||
- [vue-vben-admin](https://vben.vvbin.cn/) - 完整版中文站点 |
|||
- [vue-vben-admin-gh-pages](https://anncwb.github.io/vue-vben-admin/) - 完整版 github 站点 |
|||
- [vben-admin-thin-next](https://vben.vvbin.cn/thin/next/) - 简化版中文站点 |
|||
- [vben-admin-thin-gh-pages](https://anncwb.github.io/vben-admin-thin-next/) - 简化版 github 站点 |
|||
|
|||
测试账号: vben/123456 |
|||
|
|||
<p align="center"> |
|||
<img alt="VbenAdmin Logo" width="100%" src="https://anncwb.github.io/anncwb/images/preview1.png"> |
|||
<img alt="VbenAdmin Logo" width="100%" src="https://anncwb.github.io/anncwb/images/preview2.png"> |
|||
<img alt="VbenAdmin Logo" width="100%" src="https://anncwb.github.io/anncwb/images/preview3.png"> |
|||
</p> |
|||
|
|||
### 使用 Gitpod |
|||
|
|||
在 Gitpod(适用于 GitHub 的免费在线开发环境)中打开项目,并立即开始编码. |
|||
|
|||
[](https://gitpod.io/#https://github.com/anncwb/vue-vben-admin) |
|||
|
|||
## 文档 |
|||
|
|||
[文档地址](https://doc.vvbin.cn/) |
|||
|
|||
## 准备 |
|||
|
|||
- [node](http://nodejs.org/) 和 [git](https://git-scm.com/) -项目开发环境 |
|||
- [Vite](https://vitejs.dev/) - 熟悉 vite 特性 |
|||
- [Vue3](https://v3.vuejs.org/) - 熟悉 Vue 基础语法 |
|||
- [TypeScript](https://www.typescriptlang.org/) - 熟悉`TypeScript`基本语法 |
|||
- [Es6+](http://es6.ruanyifeng.com/) - 熟悉 es6 基本语法 |
|||
- [Vue-Router-Next](https://next.router.vuejs.org/) - 熟悉 vue-router 基本使用 |
|||
- [Ant-Design-Vue](https://2x.antdv.com/docs/vue/introduce-cn/) - ui 基本使用 |
|||
- [Mock.js](https://github.com/nuysoft/Mock) - mockjs 基本语法 |
|||
|
|||
## 安装使用 |
|||
|
|||
- 获取项目代码 |
|||
|
|||
```bash |
|||
git clone https://github.com/anncwb/vue-vben-admin.git |
|||
``` |
|||
|
|||
- 安装依赖 |
|||
|
|||
```bash |
|||
cd vue-vben-admin |
|||
|
|||
pnpm install |
|||
|
|||
``` |
|||
|
|||
- 运行 |
|||
|
|||
```bash |
|||
pnpm serve |
|||
``` |
|||
|
|||
- 打包 |
|||
|
|||
```bash |
|||
pnpm build |
|||
``` |
|||
|
|||
## 更新日志 |
|||
|
|||
[CHANGELOG](./CHANGELOG.zh_CN.md) |
|||
|
|||
## 项目地址 |
|||
|
|||
- [vue-vben-admin](https://github.com/anncwb/vue-vben-admin) - 完整版 |
|||
- [vue-vben-admin-thin-next](https://github.com/anncwb/vben-admin-thin-next) - 简化版 |
|||
|
|||
## 如何贡献 |
|||
|
|||
非常欢迎你的加入 或者提交一个 Pull Request。 |
|||
|
|||
**Pull Request:** |
|||
|
|||
1. Fork 代码! |
|||
2. 创建自己的分支: `git checkout -b feat/xxxx` |
|||
3. 提交你的修改: `git commit -am 'feat(function): add xxxxx'` |
|||
4. 推送您的分支: `git push origin feat/xxxx` |
|||
5. 提交`pull request` |
|||
|
|||
## Git 贡献提交规范 |
|||
|
|||
- 参考 [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)) |
|||
|
|||
- `feat` 增加新功能 |
|||
- `fix` 修复问题/BUG |
|||
- `style` 代码风格相关无影响运行结果的 |
|||
- `perf` 优化/性能提升 |
|||
- `refactor` 重构 |
|||
- `revert` 撤销修改 |
|||
- `test` 测试相关 |
|||
- `docs` 文档/注释 |
|||
- `chore` 依赖更新/脚手架配置修改等 |
|||
- `workflow` 工作流改进 |
|||
- `ci` 持续集成 |
|||
- `types` 类型定义文件更改 |
|||
- `wip` 开发中 |
|||
|
|||
## 浏览器支持 |
|||
|
|||
本地开发推荐使用`Chrome 80+` 浏览器 |
|||
|
|||
支持现代浏览器, 不支持 IE |
|||
|
|||
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt=" Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt=" Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari | |
|||
| :-: | :-: | :-: | :-: | :-: | |
|||
| not support | last 2 versions | last 2 versions | last 2 versions | last 2 versions | |
|||
|
|||
## 相关仓库 |
|||
|
|||
如果这些插件对你有帮助,可以给一个 star 支持下 |
|||
|
|||
- [vite-plugin-mock](https://github.com/anncwb/vite-plugin-mock) - 用于本地及开发环境数据 mock |
|||
- [vite-plugin-html](https://github.com/anncwb/vite-plugin-html) - 用于 html 模版转换及压缩 |
|||
- [vite-plugin-style-import](https://github.com/anncwb/vite-plugin-style-import) - 用于组件库样式按需引入 |
|||
- [vite-plugin-theme](https://github.com/anncwb/vite-plugin-theme) - 用于在线切换主题色等颜色相关配置 |
|||
- [vite-plugin-imagemin](https://github.com/anncwb/vite-plugin-imagemin) - 用于打包压缩图片资源 |
|||
- [vite-plugin-compression](https://github.com/anncwb/vite-plugin-compression) - 用于打包输出.gz|.brotil 文件 |
|||
- [vite-plugin-svg-icons](https://github.com/anncwb/vite-plugin-svg-icons) - 用于快速生成 svg 雪碧图 |
|||
|
|||
## 后台整合示例 |
|||
|
|||
- [lamp-cloud](https://github.com/zuihou/lamp-cloud) - 基于 SpringCloud Alibaba 的微服务中后台快速开发平台 |
|||
- [matecloud](https://github.com/matevip/matecloud) - MateCloud 微服务脚手架,基于 Spring Cloud 2020.0.3、SpringBoot 2.5.3 的全开源平台 |
|||
|
|||
## 维护者 |
|||
|
|||
[@Vben](https://github.com/anncwb) |
|||
|
|||
## 捐赠 |
|||
|
|||
如果你觉得这个项目对你有帮助,你可以帮作者买一杯咖啡表示支持! |
|||
|
|||
 |
|||
|
|||
<a style="display: block;width: 100px;height: 50px;line-height: 50px; color: #fff;text-align: center; background: #408aed;border-radius: 4px;" href="https://www.paypal.com/paypalme/cvvben">Paypal Me</a> |
|||
|
|||
## 交流 |
|||
|
|||
`Vue-vben-Admin` 是完全开源免费的项目,在帮助开发者更方便地进行中大型管理系统开发,同时也提供 QQ 交流群使用问题欢迎在群内提问。 |
|||
|
|||
- QQ 群 `569291866` |
|||
|
|||
## License |
|||
|
|||
[MIT © Vben-2020](./LICENSE) |
|||
234
public/resource/tinymce/skins/ui/oxide-dark/content.inline.min.css
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
230
public/resource/tinymce/skins/ui/oxide-dark/content.min.css
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
870
public/resource/tinymce/skins/ui/oxide-dark/skin.min.css
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
234
public/resource/tinymce/skins/ui/oxide-dark/skin.mobile.min.css
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1,7 +0,0 @@ |
|||
/** |
|||
* Copyright (c) Tiny Technologies, Inc. All rights reserved. |
|||
* Licensed under the LGPL or a commercial license. |
|||
* For LGPL see License.txt in the project root for license information. |
|||
* For commercial licenses see https://www.tiny.cloud/ |
|||
*/ |
|||
body.tox-dialog__disable-scroll{overflow:hidden}.tox-fullscreen{border:0;height:100%;margin:0;overflow:hidden;-ms-scroll-chaining:none;overscroll-behavior:none;padding:0;touch-action:pinch-zoom;width:100%}.tox.tox-tinymce.tox-fullscreen .tox-statusbar__resize-handle{display:none}.tox-shadowhost.tox-fullscreen,.tox.tox-tinymce.tox-fullscreen{left:0;position:fixed;top:0;z-index:1200}.tox.tox-tinymce.tox-fullscreen{background-color:transparent}.tox-fullscreen .tox.tox-tinymce-aux,.tox-fullscreen~.tox.tox-tinymce-aux{z-index:1201} |
|||
234
public/resource/tinymce/skins/ui/oxide/content.inline.min.css
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
230
public/resource/tinymce/skins/ui/oxide/content.min.css
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
870
public/resource/tinymce/skins/ui/oxide/skin.min.css
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
234
public/resource/tinymce/skins/ui/oxide/skin.mobile.min.css
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1,7 +0,0 @@ |
|||
/** |
|||
* Copyright (c) Tiny Technologies, Inc. All rights reserved. |
|||
* Licensed under the LGPL or a commercial license. |
|||
* For LGPL see License.txt in the project root for license information. |
|||
* For commercial licenses see https://www.tiny.cloud/ |
|||
*/ |
|||
body.tox-dialog__disable-scroll{overflow:hidden}.tox-fullscreen{border:0;height:100%;margin:0;overflow:hidden;-ms-scroll-chaining:none;overscroll-behavior:none;padding:0;touch-action:pinch-zoom;width:100%}.tox.tox-tinymce.tox-fullscreen .tox-statusbar__resize-handle{display:none}.tox-shadowhost.tox-fullscreen,.tox.tox-tinymce.tox-fullscreen{left:0;position:fixed;top:0;z-index:1200}.tox.tox-tinymce.tox-fullscreen{background-color:transparent}.tox-fullscreen .tox.tox-tinymce-aux,.tox-fullscreen~.tox.tox-tinymce-aux{z-index:1201} |
|||
@ -1 +0,0 @@ |
|||
Subproject commit f25cfcc7beafd63ca7c80757785ac3f0cf4b9a3a |
|||
@ -1,16 +0,0 @@ |
|||
import { defHttp } from '/@/utils/http/axios'; |
|||
import { GetAccountInfoModel } from './model/accountModel'; |
|||
|
|||
enum Api { |
|||
ACCOUNT_INFO = '/account/getAccountInfo', |
|||
SESSION_TIMEOUT = '/user/sessionTimeout', |
|||
TOKEN_EXPIRED = '/user/tokenExpired', |
|||
} |
|||
|
|||
// Get personal center-basic settings
|
|||
|
|||
export const accountInfoApi = () => defHttp.get<GetAccountInfoModel>({ url: Api.ACCOUNT_INFO }); |
|||
|
|||
export const sessionTimeoutApi = () => defHttp.post<void>({ url: Api.SESSION_TIMEOUT }); |
|||
|
|||
export const tokenExpiredApi = () => defHttp.post<void>({ url: Api.TOKEN_EXPIRED }); |
|||
@ -1,9 +0,0 @@ |
|||
import { defHttp } from '/@/utils/http/axios'; |
|||
import { AreaModel, AreaParams } from '/@/api/demo/model/areaModel'; |
|||
|
|||
enum Api { |
|||
AREA_RECORD = '/cascader/getAreaRecord', |
|||
} |
|||
|
|||
export const areaRecord = (data: AreaParams) => |
|||
defHttp.post<AreaModel>({ url: Api.AREA_RECORD, data }); |
|||
@ -1,12 +0,0 @@ |
|||
export interface AreaModel { |
|||
id: string; |
|||
code: string; |
|||
parentCode: string; |
|||
name: string; |
|||
levelType: number; |
|||
[key: string]: string | number; |
|||
} |
|||
|
|||
export interface AreaParams { |
|||
parentCode: string; |
|||
} |
|||
@ -1,15 +0,0 @@ |
|||
import { BasicFetchResult } from '/@/api/model/baseModel'; |
|||
|
|||
export interface DemoOptionsItem { |
|||
label: string; |
|||
value: string; |
|||
} |
|||
|
|||
export interface selectParams { |
|||
id: number | string; |
|||
} |
|||
|
|||
/** |
|||
* @description: Request list return value |
|||
*/ |
|||
export type DemoOptionsGetResultModel = BasicFetchResult<DemoOptionsItem>; |
|||
@ -1,20 +0,0 @@ |
|||
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel'; |
|||
/** |
|||
* @description: Request list interface parameters |
|||
*/ |
|||
export type DemoParams = BasicPageParams; |
|||
|
|||
export interface DemoListItem { |
|||
id: string; |
|||
beginTime: string; |
|||
endTime: string; |
|||
address: string; |
|||
name: string; |
|||
no: number; |
|||
status: number; |
|||
} |
|||
|
|||
/** |
|||
* @description: Request list return value |
|||
*/ |
|||
export type DemoListGetResultModel = BasicFetchResult<DemoListItem>; |
|||
@ -1,11 +0,0 @@ |
|||
import { defHttp } from '/@/utils/http/axios'; |
|||
import { DemoOptionsItem, selectParams } from './model/optionsModel'; |
|||
enum Api { |
|||
OPTIONS_LIST = '/select/getDemoOptions', |
|||
} |
|||
|
|||
/** |
|||
* @description: Get sample options value |
|||
*/ |
|||
export const optionsListApi = (params?: selectParams) => |
|||
defHttp.get<DemoOptionsItem[]>({ url: Api.OPTIONS_LIST, params }); |
|||
@ -1,20 +0,0 @@ |
|||
import { defHttp } from '/@/utils/http/axios'; |
|||
import { DemoParams, DemoListGetResultModel } from './model/tableModel'; |
|||
|
|||
enum Api { |
|||
DEMO_LIST = '/table/getDemoList', |
|||
} |
|||
|
|||
/** |
|||
* @description: Get sample list value |
|||
*/ |
|||
|
|||
export const demoListApi = (params: DemoParams) => |
|||
defHttp.get<DemoListGetResultModel>({ |
|||
url: Api.DEMO_LIST, |
|||
params, |
|||
headers: { |
|||
// @ts-ignore
|
|||
ignoreCancelToken: true, |
|||
}, |
|||
}); |
|||
@ -1,11 +0,0 @@ |
|||
import { defHttp } from '/@/utils/http/axios'; |
|||
|
|||
enum Api { |
|||
TREE_OPTIONS_LIST = '/tree/getDemoOptions', |
|||
} |
|||
|
|||
/** |
|||
* @description: Get sample options value |
|||
*/ |
|||
export const treeOptionsListApi = (params?: Recordable) => |
|||
defHttp.get<Recordable[]>({ url: Api.TREE_OPTIONS_LIST, params }); |
|||
@ -1,5 +1,3 @@ |
|||
export interface UploadApiResult { |
|||
message: string; |
|||
code: number; |
|||
export interface UploadFileResult { |
|||
url: string; |
|||
} |
|||
@ -1,22 +1,22 @@ |
|||
import { UploadApiResult } from './model/uploadModel'; |
|||
import { UploadFileResult } from './model/uploadModel'; |
|||
import { defHttp } from '/@/utils/http/axios'; |
|||
import { UploadFileParams } from '/#/axios'; |
|||
import { useGlobSetting } from '/@/hooks/setting'; |
|||
|
|||
const { uploadUrl = '' } = useGlobSetting(); |
|||
const { uploadUrl = '/admin/upload/file' } = useGlobSetting(); |
|||
|
|||
/** |
|||
* @description: Upload interface |
|||
*/ |
|||
export function uploadApi( |
|||
export const uploadApi = ( |
|||
params: UploadFileParams, |
|||
onUploadProgress: (progressEvent: ProgressEvent) => void, |
|||
) { |
|||
return defHttp.uploadFile<UploadApiResult>( |
|||
) => { |
|||
return defHttp.uploadFile<UploadFileResult>( |
|||
{ |
|||
url: uploadUrl, |
|||
onUploadProgress, |
|||
}, |
|||
params, |
|||
); |
|||
} |
|||
}; |
|||
@ -1,44 +1,38 @@ |
|||
<script lang="tsx"> |
|||
import { defineComponent, computed, unref, type ExtractPropTypes } from 'vue'; |
|||
import { useDesign } from '/@/hooks/web/useDesign'; |
|||
<template> |
|||
<div :class="[`${prefixCls}__header px-2 py-5`, $attrs.class]"> |
|||
<BasicTitle :helpMessage="helpMessage" normal> |
|||
<template v-if="title"> |
|||
{{ title }} |
|||
</template> |
|||
<template v-else> |
|||
<slot name="title"></slot> |
|||
</template> |
|||
</BasicTitle> |
|||
<div :class="`${prefixCls}__action`"> |
|||
<slot name="action"></slot> |
|||
<BasicArrow v-if="canExpan" up :expand="show" @click="$emit('expand')" /> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
<script lang="ts"> |
|||
import { defineComponent } from 'vue'; |
|||
import { BasicArrow, BasicTitle } from '/@/components/Basic'; |
|||
|
|||
const collapseHeaderProps = { |
|||
prefixCls: String, |
|||
title: String, |
|||
show: Boolean, |
|||
canExpan: Boolean, |
|||
const props = { |
|||
prefixCls: { type: String }, |
|||
helpMessage: { |
|||
type: [Array, String] as PropType<string[] | string>, |
|||
default: '', |
|||
}, |
|||
title: { type: String }, |
|||
show: { type: Boolean }, |
|||
canExpan: { type: Boolean }, |
|||
}; |
|||
|
|||
export type CollapseHeaderProps = ExtractPropTypes<typeof collapseHeaderProps>; |
|||
|
|||
export default defineComponent({ |
|||
name: 'CollapseHeader', |
|||
components: { BasicArrow, BasicTitle }, |
|||
inheritAttrs: false, |
|||
props: collapseHeaderProps, |
|||
props, |
|||
emits: ['expand'], |
|||
setup(props, { slots, attrs, emit }) { |
|||
const { prefixCls } = useDesign('collapse-container'); |
|||
const _prefixCls = computed(() => props.prefixCls || unref(prefixCls)); |
|||
return () => ( |
|||
<div class={[`${unref(_prefixCls)}__header px-2 py-5`, attrs.class]}> |
|||
<BasicTitle helpMessage={props.helpMessage} normal> |
|||
{slots.title?.() || props.title} |
|||
</BasicTitle> |
|||
|
|||
<div class={`${unref(_prefixCls)}__action`}> |
|||
{slots.action |
|||
? slots.action({ expand: props.show, onClick: () => emit('expand') }) |
|||
: props.canExpan && ( |
|||
<BasicArrow up expand={props.show} onClick={() => emit('expand')} /> |
|||
)} |
|||
</div> |
|||
</div> |
|||
); |
|||
}, |
|||
}); |
|||
</script> |
|||
@ -1,134 +0,0 @@ |
|||
<template> |
|||
<Transfer |
|||
:data-source="getdataSource" |
|||
:filter-option="filterOption" |
|||
:render="(item) => item.title" |
|||
:showSelectAll="showSelectAll" |
|||
:selectedKeys="selectedKeys" |
|||
:targetKeys="getTargetKeys" |
|||
:showSearch="showSearch" |
|||
@change="handleChange" |
|||
/> |
|||
</template> |
|||
|
|||
<script lang="ts"> |
|||
import { computed, defineComponent, watch, ref, unref, watchEffect } from 'vue'; |
|||
import { Transfer } from 'ant-design-vue'; |
|||
import { isFunction } from '/@/utils/is'; |
|||
import { get, omit } from 'lodash-es'; |
|||
import { propTypes } from '/@/utils/propTypes'; |
|||
import { useI18n } from '/@/hooks/web/useI18n'; |
|||
import { TransferDirection, TransferItem } from 'ant-design-vue/lib/transfer'; |
|||
export default defineComponent({ |
|||
name: 'ApiTransfer', |
|||
components: { Transfer }, |
|||
props: { |
|||
value: { type: Array as PropType<Array<string>> }, |
|||
api: { |
|||
type: Function as PropType<(arg?: Recordable) => Promise<TransferItem[]>>, |
|||
default: null, |
|||
}, |
|||
params: { type: Object }, |
|||
dataSource: { type: Array as PropType<Array<TransferItem>> }, |
|||
immediate: propTypes.bool.def(true), |
|||
alwaysLoad: propTypes.bool.def(false), |
|||
afterFetch: { type: Function as PropType<Fn> }, |
|||
resultField: propTypes.string.def(''), |
|||
labelField: propTypes.string.def('title'), |
|||
valueField: propTypes.string.def('key'), |
|||
showSearch: { type: Boolean, default: false }, |
|||
disabled: { type: Boolean, default: false }, |
|||
filterOption: { |
|||
type: Function as PropType<(inputValue: string, item: TransferItem) => boolean>, |
|||
}, |
|||
selectedKeys: { type: Array as PropType<Array<string>> }, |
|||
showSelectAll: { type: Boolean, default: false }, |
|||
targetKeys: { type: Array as PropType<Array<string>> }, |
|||
}, |
|||
emits: ['options-change', 'change'], |
|||
setup(props, { attrs, emit }) { |
|||
const _dataSource = ref<TransferItem[]>([]); |
|||
const _targetKeys = ref<string[]>([]); |
|||
const { t } = useI18n(); |
|||
|
|||
const getAttrs = computed(() => { |
|||
return { |
|||
...(!props.api ? { dataSource: unref(_dataSource) } : {}), |
|||
...attrs, |
|||
}; |
|||
}); |
|||
const getdataSource = computed(() => { |
|||
const { labelField, valueField } = props; |
|||
|
|||
return unref(_dataSource).reduce((prev, next: Recordable) => { |
|||
if (next) { |
|||
prev.push({ |
|||
...omit(next, [labelField, valueField]), |
|||
title: next[labelField], |
|||
key: next[valueField], |
|||
}); |
|||
} |
|||
return prev; |
|||
}, [] as TransferItem[]); |
|||
}); |
|||
const getTargetKeys = computed<string[]>(() => { |
|||
if (unref(_targetKeys).length > 0) { |
|||
return unref(_targetKeys); |
|||
} |
|||
if (Array.isArray(props.value)) { |
|||
return props.value; |
|||
} |
|||
return []; |
|||
}); |
|||
|
|||
function handleChange(keys: string[], direction: TransferDirection, moveKeys: string[]) { |
|||
_targetKeys.value = keys; |
|||
console.log(direction); |
|||
console.log(moveKeys); |
|||
emit('change', keys); |
|||
} |
|||
|
|||
watchEffect(() => { |
|||
props.immediate && !props.alwaysLoad && fetch(); |
|||
}); |
|||
|
|||
watch( |
|||
() => props.params, |
|||
() => { |
|||
fetch(); |
|||
}, |
|||
{ deep: true }, |
|||
); |
|||
|
|||
async function fetch() { |
|||
const api = props.api; |
|||
if (!api || !isFunction(api)) { |
|||
if (Array.isArray(props.dataSource)) { |
|||
_dataSource.value = props.dataSource; |
|||
} |
|||
return; |
|||
} |
|||
_dataSource.value = []; |
|||
try { |
|||
const res = await api(props.params); |
|||
if (Array.isArray(res)) { |
|||
_dataSource.value = res; |
|||
emitChange(); |
|||
return; |
|||
} |
|||
if (props.resultField) { |
|||
_dataSource.value = get(res, props.resultField) || []; |
|||
} |
|||
emitChange(); |
|||
} catch (error) { |
|||
console.warn(error); |
|||
} finally { |
|||
} |
|||
} |
|||
function emitChange() { |
|||
emit('options-change', unref(getdataSource)); |
|||
} |
|||
return { getTargetKeys, getdataSource, t, getAttrs, handleChange }; |
|||
}, |
|||
}); |
|||
</script> |
|||
@ -1,90 +0,0 @@ |
|||
<template> |
|||
<a-tree v-bind="getAttrs" @change="handleChange"> |
|||
<template #[item]="data" v-for="item in Object.keys($slots)"> |
|||
<slot :name="item" v-bind="data || {}"></slot> |
|||
</template> |
|||
<template #suffixIcon v-if="loading"> |
|||
<LoadingOutlined spin /> |
|||
</template> |
|||
</a-tree> |
|||
</template> |
|||
|
|||
<script lang="ts"> |
|||
import { computed, defineComponent, watch, ref, onMounted, unref } from 'vue'; |
|||
import { Tree } from 'ant-design-vue'; |
|||
import { isArray, isFunction } from '/@/utils/is'; |
|||
import { get } from 'lodash-es'; |
|||
import { propTypes } from '/@/utils/propTypes'; |
|||
import { LoadingOutlined } from '@ant-design/icons-vue'; |
|||
export default defineComponent({ |
|||
name: 'ApiTree', |
|||
components: { ATree: Tree, LoadingOutlined }, |
|||
props: { |
|||
api: { type: Function as PropType<(arg?: Recordable) => Promise<Recordable>> }, |
|||
params: { type: Object }, |
|||
immediate: { type: Boolean, default: true }, |
|||
resultField: propTypes.string.def(''), |
|||
afterFetch: { type: Function as PropType<Fn> }, |
|||
}, |
|||
emits: ['options-change', 'change'], |
|||
setup(props, { attrs, emit }) { |
|||
const treeData = ref<Recordable[]>([]); |
|||
const isFirstLoaded = ref<Boolean>(false); |
|||
const loading = ref(false); |
|||
const getAttrs = computed(() => { |
|||
return { |
|||
...(props.api ? { treeData: unref(treeData) } : {}), |
|||
...attrs, |
|||
}; |
|||
}); |
|||
|
|||
function handleChange(...args) { |
|||
emit('change', ...args); |
|||
} |
|||
|
|||
watch( |
|||
() => props.params, |
|||
() => { |
|||
!unref(isFirstLoaded) && fetch(); |
|||
}, |
|||
{ deep: true }, |
|||
); |
|||
|
|||
watch( |
|||
() => props.immediate, |
|||
(v) => { |
|||
v && !isFirstLoaded.value && fetch(); |
|||
}, |
|||
); |
|||
|
|||
onMounted(() => { |
|||
props.immediate && fetch(); |
|||
}); |
|||
|
|||
async function fetch() { |
|||
const { api, afterFetch } = props; |
|||
if (!api || !isFunction(api)) return; |
|||
loading.value = true; |
|||
treeData.value = []; |
|||
let result; |
|||
try { |
|||
result = await api(props.params); |
|||
} catch (e) { |
|||
console.error(e); |
|||
} |
|||
if (afterFetch && isFunction(afterFetch)) { |
|||
result = afterFetch(result); |
|||
} |
|||
loading.value = false; |
|||
if (!result) return; |
|||
if (!isArray(result)) { |
|||
result = get(result, props.resultField); |
|||
} |
|||
treeData.value = (result as Recordable[]) || []; |
|||
isFirstLoaded.value = true; |
|||
emit('options-change', treeData.value); |
|||
} |
|||
return { getAttrs, loading, handleChange }; |
|||
}, |
|||
}); |
|||
</script> |
|||
Some files were not shown because too many files changed in this diff
Write
Preview
Loading…
Cancel
Save