mirror of
https://github.com/halo-dev/docs.git
synced 2026-01-21 02:12:47 +08:00
docs: update documentation for Halo 2.16 (#367)
为 Halo 2.16.0 更新文档。 /kind documentation ```release-note None ```
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
---
|
||||
title: v-permission
|
||||
description: 权限指令
|
||||
---
|
||||
|
||||
与 [HasPermission](./has-permission.md) 组件相同,此指令也是用于根据权限控制元素的显示与隐藏。
|
||||
|
||||
## 使用方式
|
||||
|
||||
```html
|
||||
<script lang="ts" setup>
|
||||
import { VButton } from "@halo-dev/components"
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VButton type="danger" v-permission="['system:posts:manage']">删除</VButton>
|
||||
</template>
|
||||
```
|
||||
Reference in New Issue
Block a user