Skip to content

Commit

Permalink
release 1.2.1 (#29)
Browse files Browse the repository at this point in the history
* feat(components): feat(components): admin init loading / init.css style

* docs(deps): github 仓库地址修改

* feat(components): fix eslint/login/userPage/rolePage/useComponents/baseConfig

* style(components): fix

fix eslit

* feat(components): feat(useTabele) (user/role)page

* feat(components): 用户模块开发

* feat(components): menu page

* feat(components): 基础组件开发 用户/角色/菜单(新增菜单icon可选择/views组件树)

* feat(components): 完善 /系统模块/菜单功能

* feat(components): 新增 => 用户/角色/菜单 列表状态控制

* fix(deps): 修复axios code403提示信息 新增用户弹框修改 角色绑定菜单select改为tree

* feat(components): 联调 user/role/menu

* fix(hooks): fix import lodash

* feat(styles): fix eval add buildInfo

* resou(styles): 加载loading init.css

* resou(deps): 阿里icon变更为cdn引入

* feat(components): 对接接口

* feat(deps): 路由数据调整,pinia调整

* style(components): del console.log

* feat(hooks): add directive

* ci(deps): ecit env axios url

* ci(deps): close production mock

* feat(components): feat(components): admin init loading / init.css style

* docs(deps): github 仓库地址修改

* feat(components): fix eslint/login/userPage/rolePage/useComponents/baseConfig

* style(components): fix

fix eslit

* feat(components): feat(useTabele) (user/role)page

* feat(components): 用户模块开发

* feat(components): menu page

* feat(components): 基础组件开发 用户/角色/菜单(新增菜单icon可选择/views组件树)

* feat(components): 完善 /系统模块/菜单功能

* feat(components): 新增 => 用户/角色/菜单 列表状态控制

* fix(deps): 修复axios code403提示信息 新增用户弹框修改 角色绑定菜单select改为tree

* feat(components): 联调 user/role/menu

* fix(hooks): fix import lodash

* feat(styles): fix eval add buildInfo

* resou(styles): 加载loading init.css

* resou(deps): 阿里icon变更为cdn引入

* feat(components): 对接接口

* feat(deps): 路由数据调整,pinia调整

* style(components): del console.log

* feat(hooks): add directive

* ci(deps): ecit env axios url

* ci(deps): close production mock

* Update dev.yml

* Update dev.yml

* Update dev.yml

* resou(deps): clear mock data

* ci(hooks): fix 使用动态路由被tree shaking忽略 使用import.meta.glob的方式加载

* resou(deps): write changelog

* 1.2.0-beta.0

* feat(components): 移除 moment 时间插件 删除第二套登录模板 登录页右上角不在显示版本信息 更换 logo

* 1.2.0-beta.1

* fix(components): 修复tab 菜单绑定数据不一致问题

* docs(deps): update md

* 1.2.1

Co-authored-by: yc6 <[email protected]>
  • Loading branch information
zane0904 and yc6 authored Dec 30, 2022
1 parent 3056969 commit eaf8d17
Show file tree
Hide file tree
Showing 136 changed files with 5,920 additions and 9,710 deletions.
48 changes: 24 additions & 24 deletions .env
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# PORT
VITE_APP_PORT = 8010
# build
VITE_APP_BUILD = dist
# path
VITE_APP_PATH = /
# log
VITE_APP_LOG = true
# sourceMap
VITE_APP_SOURCEMAP = false
# https
VITE_APP_HTTPS = false
# open
VITE_APP_OPEN = false
# mock
VITE_APP_MOCK = true
# 生产mock
VITE_APP_PROD_MOCK = true
# title
VITE_APP_TITLE = VnaiveAdmin
# layout prefixCls
VITE_APP_PREFIXCLS = Vnaive
# rollup-plugin-visualizer
VITE_APP_ANALYSIS = true
# PORT
VITE_APP_PORT = 8010
# build
VITE_APP_BUILD = dist
# path
VITE_APP_PATH = /
# close console.log
VITE_APP_LOG = true
# sourceMap
VITE_APP_SOURCEMAP = false
# https
VITE_APP_HTTPS = false
# open
VITE_APP_OPEN = false
# mock
VITE_APP_MOCK = false
# 生产mock
VITE_APP_PROD_MOCK = true
# title
VITE_APP_TITLE = VnaiveAdmin
# layout prefixCls
VITE_APP_PREFIXCLS = Vnaive
# rollup-plugin-visualizer
VITE_APP_ANALYSIS = true
4 changes: 2 additions & 2 deletions .env.development
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# dev
VITE_APP_PROXY = [["/api","http://localhost:3666"],["/tapi","http://localhost:3666"],["/douban","https://movie.douban.com/"]]
# dev
VITE_APP_PROXY = [["/api","https://dev.mmxxn.cn/admin"],["/tapi","http://localhost:3666"],["/douban","https://movie.douban.com/"]]
16 changes: 12 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ module.exports = defineConfig({
'plugin:prettier/recommended',
],
rules: {
'vue/v-slot-style': [
'error',
{
atComponent: 'v-slot',
default: 'v-slot',
named: 'longform',
},
],
'vue/no-parsing-error': [2, { 'x-invalid-end-tag': false }],
'vue/no-multiple-template-root': 'off',
'vue/script-setup-uses-vars': 'error',
Expand Down Expand Up @@ -114,7 +122,7 @@ module.exports = defineConfig({
},
],
// 一个函数的复杂性不超过 10,所有分支、循环、回调加在一起,在一个函数里不超过 10 个
complexity: [2, 10],
complexity: [2, 15],
// 一个函数的嵌套不能超过 4 层,多个 for 循环,深层的 if-else,这些都是罪恶之源
'max-depth': [2, 4],
// 一个函数最多有 3 层 callback,使用 async/await
Expand Down Expand Up @@ -148,12 +156,12 @@ module.exports = defineConfig({
'no-empty': 2, //块语句中的内容不能为空
'no-empty-character-class': 2, //正则表达式中的[]内容不能为空
'no-eq-null': 2, //禁止对null使用==或!=运算符
'no-eval': 1, //禁止使用eval
'no-eval': 2, //禁止使用eval
'no-ex-assign': 2, //禁止给catch语句中的异常参数赋值
'no-extend-native': 2, //禁止扩展native对象
'no-extra-bind': 2, //禁止不必要的函数绑定
'no-extra-boolean-cast': 2, //禁止不必要的bool转换
'no-extra-semi': 2, //禁止多余的冒号
'no-extra-semi': 1, //禁止多余的冒号
'no-fallthrough': 1, //禁止switch穿透
'no-floating-decimal': 2, //禁止省略浮点数中的0 .5 3.
'no-func-assign': 2, //禁止重复的函数声明
Expand Down Expand Up @@ -202,7 +210,7 @@ module.exports = defineConfig({
'no-sequences': 0, //禁止使用逗号运算符
// 'no-shadow': 2, //外部作用域中的变量不能与它所包含的作用域中的变量或参数同名
'no-shadow-restricted-names': 2, //严格模式中规定的限制标识符不能作为声明时的变量名使用
'no-spaced-func': 2, //函数调用时 函数名与()之间不能有空格
'no-spaced-func': 0, //函数调用时 函数名与()之间不能有空格
'no-sparse-arrays': 2, //禁止稀疏数组, [1,,2]
'no-sync': 0, //nodejs 禁止同步方法
'no-ternary': 0, //禁止使用三目运算符
Expand Down
55 changes: 36 additions & 19 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# main.yml
name: devEvn to aliyun
name: devEvn to server
on:
push:
branches: [ develop ]
branches: [develop]
pull_request:
branches: [develop]
jobs:
build:
runs-on: ubuntu-latest
steps:
# 切换分支
- name: 切换分支 Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

# pnpm
- name: 安装 pnpm
Expand All @@ -20,33 +22,48 @@ jobs:

# 使用 node:16.14.0
- name: 切换node use Node.js 16.14.0
uses: actions/setup-node@v1
uses: actions/setup-node@v3.0.0
with:
node-version: 16.14.0

#缓存依赖
- name: Cache nodeModules
uses: actions/cache@v1
env:
cache-name: cache-node-modules
with:
# 需要缓存的文件的路径
path: ./node_modules
# 对缓存的文件指定的唯一标识
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./package.json') }}
# 用于没有再找目标key的缓存的backup选项
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
{{ runner.os }}-
# 安装依赖
- name: 安装依赖 pnpm install
run: pnpm run bootstrap # 安装依赖
run: pnpm run bootstrap # 安装依赖

# npm build
- name: 执行打包 npm build
env:
NODE_OPTIONS: --max_old_space_size=4096
run: pnpm run build # 执行打包 |

# Deploy
# 连接到ssh,并且做一个拷贝操作的action
run: pnpm run build # 执行打包 |

# npm 压缩
- name: 压缩dist
run: tar -zcvf release.tgz dist
# 连接到服务器
# name: rsync-deployments 是通过ssh通过rsync部署代码的GitHub操作
- name: 发布dev环境 Deploy 🚀
uses: cross-the-world/scp-pipeline@master
env:
WELCOME: "ssh scp ssh pipelines"
LASTSSH: "Doing something after copying"
WELCOME: 'ssh scp ssh pipelines'
LASTSSH: 'Doing something after copying'
with:
host: ${{ secrets.ALY_HOST }}
user: ${{ secrets.ALY_USER }}
pass: ${{ secrets.ALY_PASS }}
remote: ${{ secrets.ALY_DEV_DIR }} # 放到服务器上指定文件夹
local: ./dist/* # 构建完成后静态目录的地址
connect_timeout: 15s

host: ${{ secrets.SERVER_HOST }}
user: ${{ secrets.SERVER_USER }}
pass: ${{ secrets.SERVER_PASS }}
remote: ${{ secrets.SERVER_DEV_DIR }} # 放到服务器上指定文件夹
local: ./release.tgz # 构建完成后静态目录的地址
connect_timeout: 15s
57 changes: 37 additions & 20 deletions .github/workflows/pro.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# main.yml
name: deploy to aliyun
name: prod to server
on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
steps:
# 切换分支
- name: 切换分支 Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

# pnpm
- name: 安装 pnpm
Expand All @@ -20,33 +22,48 @@ jobs:

# 使用 node:16.14.0
- name: 切换node use Node.js 16.14.0
uses: actions/setup-node@v1
uses: actions/setup-node@v3.0.0
with:
node-version: 16.14.0

#缓存依赖
- name: Cache nodeModules
uses: actions/cache@v1
env:
cache-name: cache-node-modules
with:
# 需要缓存的文件的路径
path: ./node_modules
# 对缓存的文件指定的唯一标识
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./package.json') }}
# 用于没有再找目标key的缓存的backup选项
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
{{ runner.os }}-
# 安装依赖
- name: 安装依赖 pnpm install
run: pnpm install # 安装依赖
run: pnpm run bootstrap # 安装依赖

# npm build
- name: 执行打包 npm build
env:
NODE_OPTIONS: --max_old_space_size=4096
run: pnpm run build # 执行打包 |

# Deploy
# 连接到ssh,并且做一个拷贝操作的action
run: pnpm run build # 执行打包 |

# npm 压缩
- name: 压缩dist
run: tar -zcvf release.tgz dist
# 连接到服务器
# name: rsync-deployments 是通过ssh通过rsync部署代码的GitHub操作
- name: 发布production环境 Deploy 🚀
- name: 发布dev环境 Deploy 🚀
uses: cross-the-world/scp-pipeline@master
env:
WELCOME: "ssh scp ssh pipelines"
LASTSSH: "Doing something after copying"
WELCOME: 'ssh scp ssh pipelines'
LASTSSH: 'Doing something after copying'
with:
host: ${{ secrets.ALY_HOST }}
user: ${{ secrets.ALY_USER }}
pass: ${{ secrets.ALY_PASS }}
remote: ${{ secrets.ALY_DIR }} # 放到服务器上指定文件夹
local: ./dist/* # 构建完成后静态目录的地址
connect_timeout: 15s

host: ${{ secrets.SERVER_HOST }}
user: ${{ secrets.SERVER_USER }}
pass: ${{ secrets.SERVER_PASS }}
remote: ${{ secrets.SERVER_DIR }} # 放到服务器上指定文件夹
local: ./release.tgz # 构建完成后静态目录的地址
connect_timeout: 15s
20 changes: 10 additions & 10 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"semi": false,
"singleQuote": true,
"printWidth": 80,
"trailingComma": "all",
"arrowParens": "avoid",
"endOfLine": "lf",
"tabWidth": 2,
"bracketSpacing": true
}
{
"semi": false,
"singleQuote": true,
"printWidth": 80,
"trailingComma": "all",
"arrowParens": "avoid",
"endOfLine": "lf",
"tabWidth": 2,
"bracketSpacing": true
}
65 changes: 64 additions & 1 deletion CHANGELOG.zh_CN.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,67 @@
## 1.1.0(2022-x.x)
## 1.2.0(2022-12.30)

### 升级说明

- 升级墨菲安全扫描

### ✨ Features

-

### 🐛 Bug Fixes

- 修复 tab 标签页与菜单绑定不一致问题

## 1.2.0-beta.1(2022-12.24)

### 升级说明

- 移除 moment 时间插件 使用 dayjs
- 删除第二套登录模板
- 登录页右上角不在显示版本信息

### ✨ Features

- 更换 logo、README(logo)

### 🐛 Bug Fixes

- 使用动态路由时获取不到组件控制台给出 warn 提示

## 1.2.0-beta.0(2022-12.19)

### 升级说明

- 去掉 mock 数据使用接口数据
- 系统管理(用户/角色/菜单)增删改查权限控制
- 阿里字体图标资源不再放入项目使用 CDN 方式

### ✨ Features

- 全局组件 Modal/table/Descriptions 开发
- 用户头像更换

### 🐛 Bug Fixes

- 异步动态路由不再使用 import(`${componentName}`)方式改为 import.meta.glob 的方式加载
- pinia 数据调整
- github action dist 改为压缩包上传,防止传输过程丢包
- lodash 使用方式更改

## 1.1.1(2022-10.8)

### 升级说明

小问题不用在意

### ✨ Features

- 新增加载 loading
- 引入 init.css

### 🐛 Bug Fixes

## 1.1.0(2022-10.8)

### 升级说明

Expand Down
Loading

0 comments on commit eaf8d17

Please sign in to comment.