Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
ldp-docs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
doc
ldp-docs
Commits
488138a1
Commit
488138a1
authored
Dec 16, 2020
by
祁新
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 增加LDP前端权限控制使用说明。
parent
d8cbd876
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
+44
-0
LDP前端权限控制使用说明.md
开发文档/LDP前端权限控制使用说明.md
+44
-0
No files found.
开发文档/LDP前端权限控制使用说明.md
0 → 100644
View file @
488138a1
# LDP前端权限控制使用说明
> 前端权限控制使用`vue`自定义指令操作`(v-ace)`。
> 一般是给按钮或者其他控件设置操作权限。
-
已在
`main.js`
中全局注册 直接使用就行。
```JavaScript
import Vue from 'vue';
import ACE from '@/directive/ace/index'; // 权限控制指令
Vue.use(ACE);
```
| 指令编码 | 说明 |
| ---------- | ---- |
|
`DEL_BTN`
| 删除 |
|
`ADD_BTN`
| 新增 |
|
`EDIT_BTN`
| 编辑 |
-
使用例子
```JavaScript
// ... 使用v-ace:DEL_BTN 绑定删除权限
<template>
<el-button icon="el-icon-delete" v-ace:DEL_BTN type="danger" @click="handleDelete">
删除
</el-button>
</template>
// ... 也可以绑定动态变量
<template>
<el-button icon="el-icon-delete" v-ace="ace" type="danger" @click="handleDelete">
删除
</el-button>
</template>
<script>
export default {
data() {
return {
// 也可以是,分割的多权限 比如 ADD_BTN,DEL_BTN
ace: 'DEL_BTN'
}
}
}
</script>
```
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment