Skip to content

Commit fe6a55f

Browse files
committed
deploy
1 parent a4c9852 commit fe6a55f

File tree

7 files changed

+746
-562
lines changed

7 files changed

+746
-562
lines changed

.vitepress/config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ _hmt.push(['_requirePlugin', 'UrlChangeTracker', {
200200
text: '扩展组件',
201201
items: [
202202
{ text: 'Auth 鉴权', link: '/components/auth' },
203-
{ text: 'AuthAll 鉴权', link: '/components/auth-all' },
204203
{ text: 'PageHeader 页头', link: '/components/page-header' },
205204
{ text: 'PageMain 内容块', link: '/components/page-main' },
206205
{ text: 'ActionContainer 固定底部操作栏', link: '/components/action-container' },

components/auth-all.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

components/auth.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
# Auth 鉴权
2-
3-
## Props
4-
5-
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
6-
| :---- | :------------------------------------------------------------------------ | :------------- | :----- | :----- |
7-
| value | 权限数据,如果传入为 array 时,匹配到其中一项则鉴权通过,并显示 slot 内容 | array / string | - | - |
8-
9-
## Slots
10-
11-
| name | 说明 |
12-
| :--- | :------------------- |
13-
| - | 需要鉴权的 HTML 内容 |
1+
# Auth 鉴权
2+
3+
## Props
4+
5+
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
6+
| :---- | :------------------------------------------------------- | :------------- | :----- | :----- |
7+
| value | 权限数据,可传入单个或一组需要验证的权限数据 | array / string | - | - |
8+
| all | 是否验证全部权限数据,默认匹配中其中一项则判定为鉴权成功 | boolean | - | false |
9+
10+
## Slots
11+
12+
| name | 说明 |
13+
| :------ | :------------------- |
14+
| - | 鉴权成功显示的 HTML 内容 |
15+
| no-auth | 鉴权失败显示的 HTML 内容 |

guide/changelog.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,45 @@
22

33
只记录 feat/fix 以及破坏性更新记录。
44

5+
## 4.8.0
6+
7+
:::info [基础版](https://github.com/one-step-admin/basic/releases/tag/v4.8.0)
8+
🚨 Breaking Changes
9+
10+
- 重构鉴权指令、鉴权组件 &nbsp;-&nbsp; by @hooray [<samp>(cf955)</samp>](https://github.com/one-step-admin/basic/commit/cf955b2)
11+
12+
🐞 Bug Fixes
13+
14+
- 修复顶部相关布局时,顶栏重复渲染 &nbsp;-&nbsp; by @hooray [<samp>(868bf)</samp>](https://github.com/one-step-admin/basic/commit/868bf06)
15+
- 修复vscode无法校验css文件 &nbsp;-&nbsp; by @hooray [<samp>(9bf13)</samp>](https://github.com/one-step-admin/basic/commit/9bf1369)
16+
17+
🏎 Performance
18+
19+
- 优化导航菜单折叠 &nbsp;-&nbsp; by @hooray [<samp>(d3f99)</samp>](https://github.com/one-step-admin/basic/commit/d3f99b0)
20+
:::
21+
22+
:::tip [专业版](https://github.com/one-step-admin/pro/releases/tag/v4.8.0)
23+
🚨 Breaking Changes
24+
25+
- 使用 watermark-js-plus 重构水印功能 &nbsp;-&nbsp; by @hooray [<samp>(f94a9)</samp>](https://github.com/one-step-admin/pro/commit/f94a92f)
26+
- 重构鉴权指令、鉴权组件 &nbsp;-&nbsp; by @hooray [<samp>(cb023)</samp>](https://github.com/one-step-admin/pro/commit/cb023c0)
27+
28+
🚀 Features
29+
30+
- Dayjs 国际化跟随框架设置 &nbsp;-&nbsp; by @hooray [<samp>(cc7e1)</samp>](https://github.com/one-step-admin/pro/commit/cc7e172)
31+
- 工具栏增加控制台切换按钮 &nbsp;-&nbsp; by @hooray [<samp>(c8158)</samp>](https://github.com/one-step-admin/pro/commit/c81586f)
32+
33+
🐞 Bug Fixes
34+
35+
- 修复应用配置里工具栏关闭的功能依旧会在在偏好设置里显示的bug &nbsp;-&nbsp; by @hooray [<samp>(ccb93)</samp>](https://github.com/one-step-admin/pro/commit/ccb931b)
36+
- 修复顶部相关布局时,顶栏重复渲染 &nbsp;-&nbsp; by @hooray [<samp>(3d043)</samp>](https://github.com/one-step-admin/pro/commit/3d0439a)
37+
- 修复vscode无法校验css文件 &nbsp;-&nbsp; by @hooray [<samp>(73257)</samp>](https://github.com/one-step-admin/pro/commit/73257d8)
38+
39+
🏎 Performance
40+
41+
- 优化导航菜单折叠 &nbsp;-&nbsp; by @hooray [<samp>(98dde)</samp>](https://github.com/one-step-admin/pro/commit/98dde14)
42+
:::
43+
544
## 4.7.0
645

746
:::info [基础版](https://github.com/one-step-admin/basic/releases/tag/v4.7.0)

guide/permission.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,24 @@ const globalSettings: Settings.all = {
1414

1515
在演示源码中,默认提供了两组权限,你可以在“权限验证”导航里切换帐号查看不同权限下的效果。如果使用的不是 `admin``test` 用户名登录,则在导航栏里看不到“权限验证”导航入口。
1616

17+
## 鉴权指令
18+
19+
对于单个元素,提供了 `v-auth` 指令。
20+
21+
```vue-html
22+
<!-- 单权限验证 -->
23+
<button v-auth="'department.create'">新增部门</button>
24+
25+
<!-- 多权限验证,用户只要具备其中任何一个权限,则验证通过 -->
26+
<button v-auth="['department.create', 'department.edit']">新增部门</button>
27+
28+
<!-- 多权限验证,用户必须具备全部权限,才验证通过 -->
29+
<button v-auth.all="['department.create', 'department.edit']">新增部门</button>
30+
```
31+
1732
## 鉴权组件
1833

19-
页面中某个模块,当前用户具备该权限是如何显示,不具备该权限又是如何显示,针对这样的需求,框架提供了 `<Auth>` `<AuthAll>` 组件,具体使用如下:
34+
页面中某个模块,当前用户具备该权限是如何显示,不具备该权限又是如何显示,针对这样的需求,框架提供了 `<Auth>` 组件。
2035

2136
```vue-html
2237
<!-- 单权限验证 -->
@@ -36,27 +51,12 @@ const globalSettings: Settings.all = {
3651
</Auth>
3752
3853
<!-- 多权限验证,用户必须具备全部权限,才验证通过 -->
39-
<AuthAll :value="['department.create', 'department.edit']">
54+
<Auth :value="['department.create', 'department.edit']" all>
4055
<p>你有该权限</p>
4156
<template #no-auth>
4257
<p>你没有该权限</p>
4358
</template>
44-
</AuthAll>
45-
```
46-
47-
## 鉴权指令
48-
49-
对于单个元素,也提供了 `v-auth``v-auth-all` 鉴权指令,使用上对比鉴权组件更方便,当然它能做的事情也更简单。
50-
51-
```vue-html
52-
<!-- 单权限验证 -->
53-
<button v-auth="'department.create'">新增部门</button>
54-
55-
<!-- 多权限验证,用户只要具备其中任何一个权限,则验证通过 -->
56-
<button v-auth="['department.create', 'department.edit']">新增部门</button>
57-
58-
<!-- 多权限验证,用户必须具备全部权限,才验证通过 -->
59-
<button v-auth-all="['department.create', 'department.edit']">新增部门</button>
59+
</Auth>
6060
```
6161

6262
## 鉴权函数

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
"vitepress-plugin-comment-with-giscus": "^1.1.15"
1818
},
1919
"devDependencies": {
20-
"@antfu/eslint-config": "3.6.0",
21-
"vitepress": "1.3.4",
22-
"vue": "^3.5.5"
20+
"@antfu/eslint-config": "3.8.0",
21+
"vitepress": "1.4.1",
22+
"vue": "^3.5.12"
2323
}
2424
}

0 commit comments

Comments
 (0)