Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
chore: sync code
Browse files Browse the repository at this point in the history
  • Loading branch information
buqiyuan committed Feb 22, 2024
1 parent 3018586 commit 812301d
Show file tree
Hide file tree
Showing 135 changed files with 7,090 additions and 975 deletions.
9 changes: 2 additions & 7 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ VITE_APP_TITLE = Admin
# 网站前缀
VITE_BASE_URL = /

# base api
VITE_BASE_API_URL = '/api/admin/'
VITE_BASE_SOCKET_PATH = '/ws-api'
VITE_BASE_SOCKET_NSP = '/admin'

# mock api
VITE_MOCK_API = '/api/'
# enable mock in production
VITE_MOCK_IN_PROD = true

4 changes: 1 addition & 3 deletions .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ ENV = 'development'
VITE_BASE_URL = /

# base api url
VITE_BASE_API_URL = '/api'
VITE_BASE_SOCKET_PATH = '/ws-api'
VITE_BASE_SOCKET_NSP = '/auth'
VITE_BASE_API_URL = '/api'

VITE_DROP_CONSOLE = false
4 changes: 1 addition & 3 deletions .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ ENV = 'production'

# base api url
VITE_BASE_API_URL = 'https://nest-api.buqiyuan.site'
# VITE_BASE_API_URL = 'http://127.0.0.1:7001'
VITE_BASE_SOCKET_PATH = '/ws-api'
VITE_BASE_SOCKET_NSP = 'wss://nest-api.buqiyuan.site/admin'
# VITE_BASE_API_URL = 'http://127.0.0.1:7001'

# 网站前缀
VITE_BASE_URL = /vue3-antdv-admin/
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

# run: pnpm run --filter \"./packages/**\" build
- name: Build
shell: bash
run: pnpm --filter "./packages/*" build

- name: Publish 🚀
shell: bash
run: pnpm publish --filter ./packages/* --access public --no-git-checks
run: pnpm publish --filter ./packages/* --access public --no-git-checks --registry https://registry.npmjs.org --verbose
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
5 changes: 5 additions & 0 deletions .github/workflows/sync-to-gitee.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ on:
push:
branches: [main]

# Ensures that only one mirror task will run at a time.
concurrency:
group: repo-sync
cancel-in-progress: true

jobs:
repo-sync:
runs-on: ubuntu-latest
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
node_modules
.DS_Store
dist
.npmrc
.cache

tests/server/static
Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "docs"]
path = docs
url = https://github.com/buqiyuan/vue3-antdv-admin-docs.git
branch = main
18 changes: 18 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# 使用淘宝镜像源
registry = https://registry.npmmirror.com
# registry = https://registry.npmjs.org

# 根据需要提升含有以下的依赖包到根 node_modules 目录下
public-hoist-pattern[]=husky
public-hoist-pattern[]=*eslint*
public-hoist-pattern[]=*prettier*
public-hoist-pattern[]=lint-staged
public-hoist-pattern[]=*stylelint*
public-hoist-pattern[]=@commitlint/cli
public-hoist-pattern[]=core-js

# 提升所有依赖到根 node_modules 目录下,相当于 public-hoist-pattern[]=*,与上面一种方式一般二选一使用
# 极不推荐用这样的方式解决依赖问题,这样没有充分利用 pnpm 依赖访问安全性的优势,又走回了 npm / yarn 的老路。
# shamefully-hoist=true

enable-pre-post-scripts=true
24 changes: 8 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
# vue3-antdv-admin

> 基于 vite4.x 重构整个前后端项目,完善后端权限控制细粒度,封装更多场景化组件...正在完善中
基于 vite5.x + vue3.x + antd-design-vue4.x + typescript5.x 的后台管理系统

基于 vite4.x + vue3.x + antd-design-vue4.x + typescript5.x 的后台管理系统模板

- 账号:rootadmin,密码:123456
- 在线预览( [gitee](http://buqiyuan.gitee.io/vue3-antdv-admin/) / [vercel](https://vue3-antdv-admin.vercel.app/)
- [swagger 文档](https://nest-api.buqiyuan.site/swagger-api/)
- [后台地址](https://github.com/buqiyuan/nest-admin)
- [vue-cli版](https://github.com/buqiyuan/vue3-antdv-admin/tree/vue-cli)
- 账号:admin,密码:a123456
- [在线预览](http://buqiyuan.gitee.io/vue3-antdv-admin/)
- [项目文档](https://buqiyuan.github.io/vue3-antdv-admin-docs/)
- [swagger 文档](https://nest-api.buqiyuan.site/api-docs/)
- [后端仓库地址](https://github.com/buqiyuan/nest-admin)
- [gitee 地址](https://gitee.com/buqiyuan/vue3-antdv-admin)
- 根据 JSON 生成 typescript 的工具:[http://json2ts.com/](http://json2ts.com/)

部分设计参考了 [vue-vben-admin](https://github.com/vbenjs/vue-vben-admin)

## 安装使用

- 获取项目代码

```bash
git clone --depth 1 https://github.com/buqiyuan/vue3-antdv-admin
git clone https://github.com/buqiyuan/vue3-antdv-admin
```

- 安装依赖
Expand Down Expand Up @@ -47,11 +43,7 @@ pnpm build

安装项目根目录 `.vscode` 推荐的插件,再安装 `Volar`,并禁用 `Vetur`,重启 vscode 即可。

> 使用了 Vue3.x 全家桶、ant-design-vue3.x 和 typescript4.x,实践 vue3.x 的新特性以及玩法,不得不说 vue3.x 的 Composition API 相比于 vue2.x 的 Options API 灵活很多,让我们可以灵活地组合组件逻辑,我们可以很轻松的使用 hooks 的形式去代替以前 mixins 等的写法。更多 hooks 可以参考[vueuse](https://vueuse.org/functions.html)
## 项目简要说明

`rootadmin` 默认开放多点登录,其他新建的账号默认都是单点登录。建议自己拉后端代码到本地跑,避免多人同时操作时产生冲突和误解。
> 使用了 Vue3.x 全家桶、ant-design-vue4.x 和 typescript5.x,实践 vue3.x 的新特性以及玩法,不得不说 vue3.x 的 Composition API 相比于 vue2.x 的 Options API 灵活很多,让我们可以灵活地组合组件逻辑,我们可以很轻松的使用 hooks 的形式去代替以前 mixins 等的写法。更多 hooks 可以参考[vueuse](https://vueuse.org/functions.html)
### todolist

Expand Down
10 changes: 10 additions & 0 deletions docs/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
54 changes: 54 additions & 0 deletions docs/.github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: GitHub Pages

on:
push:
branches: [main]

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '18'
registry-url: https://registry.npmjs.com/

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: latest

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm i --frozen-lockfile

- name: Build
run: pnpm run deploy
env:
FORCE_COLOR: 2

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: ./.vitepress/dist
github_token: ${{ secrets.GITHUB_TOKEN }}
commit_message: Update ghPages
force_orphan: true
118 changes: 118 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
### OSX ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# pnpm link folder
pnpm-global

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# rollup.js default build output
dist/

# vitepress build output
.vitepress/dist
.vitepress/cache

# Serverless directories
.serverless/

# Temporary folders
tmp/
temp/
TODOs.md
src/api/index.json
src/examples/data.json
src/tutorial/data.json
draft.md

# IDEs
.idea

test.html
.firebase
2 changes: 2 additions & 0 deletions docs/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
registry = https://registry.npmmirror.com
# registry = https://registry.npmjs.org
6 changes: 6 additions & 0 deletions docs/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"semi": false,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 75
}

0 comments on commit 812301d

Please sign in to comment.