|
|
@@ -20,6 +20,9 @@ const state = reactive({
|
|
|
},
|
|
|
// 列表数据
|
|
|
dataList: [],
|
|
|
+ batch: {
|
|
|
+ selectionDataList: [],
|
|
|
+ },
|
|
|
})
|
|
|
|
|
|
const getDataList = async () => {
|
|
|
@@ -52,7 +55,7 @@ function sortChange({ prop, order }: { prop: string; order: string }) {
|
|
|
|
|
|
function onCreate() {}
|
|
|
|
|
|
-function onRoleEdit(row: any) {
|
|
|
+function onRoleEdit(_row: any) {
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -69,7 +72,7 @@ function onRoleDel(row: any) {
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
- <div :class="{ 'absolute-container': data.tableAutoHeight }">
|
|
|
+ <div :class="{ 'absolute-container': state.tableAutoHeight }">
|
|
|
<page-header title="角色管理" content="页面数据为 Mock 示例数据,非真实数据。" />
|
|
|
<page-main>
|
|
|
<el-space wrap>
|
|
|
@@ -83,11 +86,11 @@ function onRoleDel(row: any) {
|
|
|
</el-button>
|
|
|
</el-space>
|
|
|
<search-bar>
|
|
|
- <el-form :model="data.search" size="default" label-width="100px" label-suffix=":">
|
|
|
+ <el-form :model="state.search" size="default" label-width="100px" label-suffix=":">
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="名称">
|
|
|
- <el-input v-model="data.search.keywords" placeholder="请输入角色名称,支持模糊查询" clearable @keydown.enter="currentChange()" @clear="currentChange()" />
|
|
|
+ <el-input v-model="state.search.keywords" placeholder="请输入角色名称,支持模糊查询" clearable @keydown.enter="currentChange()" @clear="currentChange()" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
@@ -104,7 +107,7 @@ function onRoleDel(row: any) {
|
|
|
</el-form>
|
|
|
</search-bar>
|
|
|
|
|
|
- <el-table v-loading="data.loading" class="list-table" :data="data.dataList" border stripe highlight-current-row height="100%" @sort-change="sortChange" @selection-change="data.batch.selectionDataList = $event">
|
|
|
+ <el-table v-loading="state.loading" class="list-table" :data="state.dataList" border stripe highlight-current-row height="100%" @sort-change="sortChange" @selection-change="state.batch.selectionDataList = $event">
|
|
|
<el-table-column prop="name" label="名称" />
|
|
|
<el-table-column label="操作" width="250" align="center" fixed="right">
|
|
|
<template #default="scope">
|