Browse Source

👣 提供原生模板

master
wangxiang 3 years ago
parent
commit
c38510dc5d
  1. 31
      kicc-ui/src/views/system/config/index.vue
  2. 3
      kicc-ui/src/views/system/role/index.vue
  3. 3
      kicc-ui/src/views/system/user/index.vue

31
kicc-ui/src/views/system/config/index.vue

@ -46,6 +46,7 @@ @@ -46,6 +46,7 @@
</AFormItem>
</AForm>
<ATable ref="tableElRef"
rowKey="id"
:loading="state.loading"
:size="state.selectedKeys[0]"
:dataSource="state.dataSource"
@ -56,6 +57,10 @@ @@ -56,6 +57,10 @@
y: state.tableHeight,
scrollToFirstRowOnChange: true
}"
:rowSelection="{
type: 'checkbox',
onChange: handleSelectionChange
}"
:pagination="{
current: 1,
pageSize: 10,
@ -71,9 +76,20 @@ @@ -71,9 +76,20 @@
<div class="flex items-center">
<BasicTitle>{{ '参数配置列表' }}</BasicTitle>
<div :class="`${headerPrefixCls}__toolbar`">
<a-button type="primary">新增</a-button>
<a-button type="primary">编辑</a-button>
<a-button type="primary">删除</a-button>
<a-button v-auth="['config_add']"
type="primary"
@click="handleAdd()"
>新增参数</a-button>
<a-button v-auth="['config_edit']"
type="primary"
:disabled="state.single"
@click="handleEdit()"
>修改参数</a-button>
<a-button v-auth="['config_del']"
type="primary"
:disabled="state.multiple"
@click="handleDel()"
>删除参数</a-button>
<ADivider type="vertical"/>
<div class="table-settings">
<!--重做-->
@ -274,11 +290,10 @@ @@ -274,11 +290,10 @@
}
/** 处理多选框选中数据 */
function handleSelectionChange(selection?: Recordable) {
const rawRows = toRaw(selection?.rows) || [];
state.ids = rawRows.map(item => item.id);
state.single = rawRows.length != 1;
state.multiple = !rawRows.length;
function handleSelectionChange(selectedRowKeys: string[]) {
state.ids = selectedRowKeys;
state.single = selectedRowKeys.length != 1;
state.multiple = !selectedRowKeys.length;
}
/** 新增按钮操作,行内新增与工具栏局域新增通用 */

3
kicc-ui/src/views/system/role/index.vue

@ -97,7 +97,8 @@ @@ -97,7 +97,8 @@
dataIndex: 'action',
slots: { customRender: 'action' },
fixed: false
}
},
handleSearchInfoFn: () => clearSelectedRowKeys()
});
/** 处理多选框选中数据 */

3
kicc-ui/src/views/system/user/index.vue

@ -132,7 +132,8 @@ @@ -132,7 +132,8 @@
dataIndex: 'action',
slots: { customRender: 'action' },
fixed: false
}
},
handleSearchInfoFn: () => clearSelectedRowKeys()
});
/** 处理多选框选中数据 */

Loading…
Cancel
Save