签入版本
This commit is contained in:
@@ -51,13 +51,13 @@ class PositionAddHandler(BaseHandler):
|
||||
|
||||
```vue
|
||||
<!-- src/views/system/position/index.vue -->
|
||||
<el-button type="primary" @click="handleAdd" v-perm="['sys:position:add']">
|
||||
添加岗位
|
||||
</el-button>
|
||||
<el-button type="danger" @click="handleDelete()" :disabled="!selectionData.length"
|
||||
<n-button type="primary" @click="handleAdd" v-perm="['sys:position:add']">
|
||||
新建
|
||||
</n-button>
|
||||
<n-button type="error" @click="handleDelete" :disabled="!rowKeys.length"
|
||||
v-perm="['sys:position:batchDelete']">
|
||||
删除
|
||||
</el-button>
|
||||
</n-button>
|
||||
```
|
||||
|
||||
### TableAction auth 属性
|
||||
@@ -65,22 +65,25 @@ class PositionAddHandler(BaseHandler):
|
||||
操作列通过 `TableAction` 组件的 `auth` 属性控制:
|
||||
|
||||
```typescript
|
||||
import { renderIcon } from '@/utils';
|
||||
import { FormOutlined, DeleteOutlined } from '@vicons/antd';
|
||||
|
||||
const actionColumn = {
|
||||
render(record) {
|
||||
return h(TableAction, {
|
||||
return h(TableAction as any, {
|
||||
style: 'button',
|
||||
actions: [
|
||||
{
|
||||
label: '编辑',
|
||||
icon: 'Edit',
|
||||
type: 'warning',
|
||||
icon: renderIcon(FormOutlined),
|
||||
type: 'info',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
auth: ['sys:position:update'],
|
||||
},
|
||||
{
|
||||
label: '删除',
|
||||
icon: 'Delete',
|
||||
type: 'danger',
|
||||
icon: renderIcon(DeleteOutlined),
|
||||
type: 'error',
|
||||
onClick: handleDelete.bind(null, record),
|
||||
auth: ['sys:position:delete'],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user