Skip to content

Commit

Permalink
deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
hooray committed Nov 25, 2024
1 parent 45c0fc9 commit 34abc98
Show file tree
Hide file tree
Showing 13 changed files with 416 additions and 154 deletions.
5 changes: 4 additions & 1 deletion .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ _hmt.push(['_requirePlugin', 'UrlChangeTracker', {
text: 'Vexip UI 组件库',
link: 'https://www.vexipui.com/zh-CN',
},
{
text: 'MineAdmin 开箱即用后台系统',
link: 'https://github.com/mineadmin/mineadmin',
},
{
text: '交换友链 ?',
link: '/links',
Expand Down Expand Up @@ -261,7 +265,6 @@ _hmt.push(['_requirePlugin', 'UrlChangeTracker', {
text: '扩展组件',
items: [
{ text: 'Auth 鉴权', link: '/components/auth' },
{ text: 'AuthAll 鉴权', link: '/components/auth-all' },
{ text: 'PageHeader 页头', link: '/components/page-header' },
{ text: 'PageMain 内容块', link: '/components/page-main' },
{ text: 'FixedActionBar 固定底部操作栏', link: '/components/fixed-action-bar' },
Expand Down
80 changes: 79 additions & 1 deletion buy-4yr.md
Original file line number Diff line number Diff line change
@@ -1 +1,79 @@
![](public/buy-4yr.png)
<script setup>
import { withBase } from 'vitepress'
</script>

# Fantastic-admin 四周年庆

:::tip 全年最低价,优惠力度最高低至8折
自 2020/10/17 发布以来,Fantastic-admin 一直致力于为开发者提供舒适的开发体验。为了庆祝产品发布四周年,我们将在 **2024/10/17 - 2024/11/17** 期间推出一系列优惠,助您提升工作效率,体验更优质的服务。
:::

## 新用户优惠

### 优惠 ①

购买 Fantastic-admin 专业版,在原有优惠力度上(原899元),再享 8 折优惠

周年庆特价 **719**

> 优惠公式(向下取整):899*80%
### 优惠 ②

购买 Fantastic-admin 专业版 + [One-step-admin](https://one-step-admin.hurui.me/) 专业版,在原有优惠力度上(原1299元),再享 9 折优惠

周年庆特价 **1169**

> 优惠公式(向下取整):1299*90%
### 优惠 ③

购买 Fantastic-admin 专业版 + [Fantastic-mobile](https://fantastic-mobile.hurui.me/) 专业版,在原有优惠力度上(原1099元),再享 9 折优惠

周年庆特价 **989**

> 优惠公式(向下取整):1099*90%
### 优惠 ④

购买 Fantastic-admin 专业版 + [One-step-admin](https://one-step-admin.hurui.me/) 专业版 + [Fantastic-mobile](https://fantastic-mobile.hurui.me/) 专业版,在原有优惠力度上(原1499元),再享 9 折优惠

周年庆特价 **1349**

> 优惠公式(向下取整):1499*90%
## 老用户优惠

> 已购买 Fantastic-admin 专业版的个人用户
### 优惠 ①

购买 [One-step-admin](https://one-step-admin.hurui.me/) 专业版,在原有优惠力度上(原699元),享受老客优惠(减100元),再享 9 折优惠

周年庆特价 **539**

> 优惠公式(向下取整):(699-100)*90%
### 优惠 ②

购买 [Fantastic-mobile](https://fantastic-mobile.hurui.me/) 专业版,在原有优惠力度上(原369元),享受老客优惠(减100元),再享 9 折优惠

周年庆特价 **242**

> 优惠公式(向下取整):(369-100)*90%
### 优惠 ③

购买 [One-step-admin](https://one-step-admin.hurui.me/) 专业版 + [Fantastic-mobile](https://fantastic-mobile.hurui.me/) 专业版,在原有优惠力度上(原899元),享受老客优惠(减100元),再享 9 折优惠

周年庆特价 **719**

> 优惠公式(向下取整):(899-100)*90%
## 购买请直接联系作者

<p align="center"><img :src="withBase('/friend-wechat.png')" width="300" /></p>

## 补充

2024/09/17 - 2024/10/16 期间购买 Fantastic-admin 专业版的个人用户,均已补偿100元现金或赠送 [Fantastic-mobile](https://fantastic-mobile.hurui.me/) 专业版。
1 change: 1 addition & 0 deletions buy.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,3 +290,4 @@ Fantastic-admin 在探索商业化的道路上,离不开开源项目的支持
| 2024/02/04 | [Vue.js](https://cn.vuejs.org/) | 15000.00 |
| 2024/05/06 | [Element Plus](https://element-plus.org/zh-CN/) | 2000.00 |
| 2024/07/17 | [Vxe Table](https://vxetable.cn/) | 800.00 |
| 2024/10/18 | [Element Plus](https://element-plus.org/zh-CN/) | 2000.00 |
13 changes: 0 additions & 13 deletions components/auth-all.md

This file was deleted.

14 changes: 8 additions & 6 deletions components/auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

## Props

| 参数 | 说明 | 类型 | 可选值 | 默认值 |
| :---- | :------------------------------------------------------------------------ | :------------- | :----- | :----- |
| value | 权限数据,如果传入为 array 时,匹配到其中一项则鉴权通过,并显示 slot 内容 | array / string | - | - |
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
| :---- | :------------------------------------------------------- | :------------- | :----- | :----- |
| value | 权限数据,可传入单个或一组需要验证的权限数据 | array / string | - | - |
| all | 是否验证全部权限数据,默认匹配中其中一项则判定为鉴权成功 | boolean | - | false |

## Slots

| name | 说明 |
| :--- | :------------------- |
| - | 需要鉴权的 HTML 内容 |
| name | 说明 |
| :------ | :------------------- |
| - | 鉴权成功显示的 HTML 内容 |
| no-auth | 鉴权失败显示的 HTML 内容 |
40 changes: 40 additions & 0 deletions guide/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,46 @@

只记录 feat/fix 以及破坏性变更。

## 4.12.0

:::info [基础版](https://github.com/fantastic-admin/basic/releases/tag/v4.12.0)
🚨 Breaking Changes

- 重构鉴权指令、鉴权组件 &nbsp;-&nbsp; by @hooray [<samp>(c34c2)</samp>](https://github.com/fantastic-admin/basic/commit/c34c2d1)

🐞 Bug Fixes

- 修复顶部相关布局时,工具栏重复渲染 &nbsp;-&nbsp; by @hooray [<samp>(026df)</samp>](https://github.com/fantastic-admin/basic/commit/026dfdb)
- 修复顶部相关布局时,移动端下工具栏不显示 &nbsp;-&nbsp; by @hooray [<samp>(efd85)</samp>](https://github.com/fantastic-admin/basic/commit/efd8536)
- 修复vscode无法校验css文件 &nbsp;-&nbsp; by @hooray [<samp>(5fcfc)</samp>](https://github.com/fantastic-admin/basic/commit/5fcfcb7)

🏎 Performance

- 优化导航菜单折叠 &nbsp;-&nbsp; by @hooray [<samp>(15983)</samp>](https://github.com/fantastic-admin/basic/commit/1598324)
:::

:::tip [专业版](https://github.com/fantastic-admin/pro/releases/tag/v4.12.0)
🚨 Breaking Changes

- 使用 watermark-js-plus 重构水印功能 &nbsp;-&nbsp; by @hooray [<samp>(3cce7)</samp>](https://github.com/fantastic-admin/pro/commit/3cce73ce)
- 重构鉴权指令、鉴权组件 &nbsp;-&nbsp; by @hooray [<samp>(f70e5)</samp>](https://github.com/fantastic-admin/pro/commit/f70e5d6c)

🚀 Features

- Dayjs 国际化跟随框架设置 &nbsp;-&nbsp; by @hooray [<samp>(8226c)</samp>](https://github.com/fantastic-admin/pro/commit/8226c68d)

🐞 Bug Fixes

- 修复应用配置里工具栏关闭的功能依旧会在在偏好设置里显示的bug &nbsp;-&nbsp; by @hooray [<samp>(00089)</samp>](https://github.com/fantastic-admin/pro/commit/00089514)
- 修复顶部相关布局时,工具栏重复渲染 &nbsp;-&nbsp; by @hooray [<samp>(d0ad1)</samp>](https://github.com/fantastic-admin/pro/commit/d0ad1deb)
- 修复顶部相关布局时,移动端下工具栏不显示 &nbsp;-&nbsp; by @hooray [<samp>(d7107)</samp>](https://github.com/fantastic-admin/pro/commit/d71075d8)
- 修复vscode无法校验css文件 &nbsp;-&nbsp; by @hooray [<samp>(e2d64)</samp>](https://github.com/fantastic-admin/pro/commit/e2d64439)

🏎 Performance

- 优化导航菜单折叠 &nbsp;-&nbsp; by @hooray [<samp>(2cfe6)</samp>](https://github.com/fantastic-admin/pro/commit/2cfe6b5c)
:::

## 4.11.0

:::info [基础版](https://github.com/fantastic-admin/basic/releases/tag/v4.11.0)
Expand Down
36 changes: 18 additions & 18 deletions guide/permission.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,24 @@ meta: {

路由权限是比较暴力的,即没有权限则该路由页面无法访问,并且也不会在导航栏中显示。但在实际业务中,遇到更多的情况通常是,可以访问路由页面,但会根据不同权限,使用页面里的不同功能,这时候就需要用到下面三种鉴权方式。

## 鉴权指令

对于单个元素,提供了 `v-auth` 指令。

```vue-html
<!-- 单权限验证 -->
<button v-auth="'department.create'">新增部门</button>
<!-- 多权限验证,用户只要具备其中任何一个权限,则验证通过 -->
<button v-auth="['department.create', 'department.edit']">新增部门</button>
<!-- 多权限验证,用户必须具备全部权限,才验证通过 -->
<button v-auth.all="['department.create', 'department.edit']">新增部门</button>
```

## 鉴权组件

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

```vue-html
<!-- 单权限验证 -->
Expand All @@ -53,27 +68,12 @@ meta: {
</Auth>
<!-- 多权限验证,用户必须具备全部权限,才验证通过 -->
<AuthAll :value="['department.create', 'department.edit']">
<Auth :value="['department.create', 'department.edit']" all>
<p>你有该权限</p>
<template #no-auth>
<p>你没有该权限</p>
</template>
</AuthAll>
```

## 鉴权指令

对于单个元素,也提供了 `v-auth``v-auth-all` 鉴权指令,使用上对比鉴权组件更方便,当然它能做的事情也更简单。

```vue-html
<!-- 单权限验证 -->
<button v-auth="'department.create'">新增部门</button>
<!-- 多权限验证,用户只要具备其中任何一个权限,则验证通过 -->
<button v-auth="['department.create', 'department.edit']">新增部门</button>
<!-- 多权限验证,用户必须具备全部权限,才验证通过 -->
<button v-auth-all="['department.create', 'department.edit']">新增部门</button>
</Auth>
```

## 鉴权函数
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"devDependencies": {
"@antfu/eslint-config": "3.7.3",
"eslint": "^9.12.0",
"sass": "^1.79.4",
"vitepress": "1.4.0",
"vue": "^3.5.11"
"sass": "^1.79.5",
"vitepress": "1.4.1",
"vue": "^3.5.12"
}
}
Loading

0 comments on commit 34abc98

Please sign in to comment.