|
@@ -27,10 +27,10 @@
|
|
|
<el-table-column label="创建时间" width="200" prop="createdAt" />
|
|
<el-table-column label="创建时间" width="200" prop="createdAt" />
|
|
|
<el-table-column label="操作" width="160">
|
|
<el-table-column label="操作" width="160">
|
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
|
- <el-space>
|
|
|
|
|
- <el-button type="primary" :icon="Edit" text @click="openDrawer(row)" v-permission="{ action: [PERM_USER.ROLE_EDIT] }" />
|
|
|
|
|
- <el-button :icon="Delete" text @click="deleteRole(row.id)" v-permission="{ action: [PERM_USER.ROLE_DELETE] }" />
|
|
|
|
|
- </el-space>
|
|
|
|
|
|
|
+ <section class="actions">
|
|
|
|
|
+ <img src="@/assets/icons/edit.png" @click="openDrawer(row)" v-permission="{ action: [PERM_USER.ROLE_EDIT] }" />
|
|
|
|
|
+ <img src="@/assets/icons/delete.png" @click="deleteRole(row.id)" v-permission="{ action: [PERM_USER.ROLE_DELETE] }" />
|
|
|
|
|
+ </section>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
@@ -55,7 +55,7 @@
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
import { ref, onMounted } from 'vue';
|
|
import { ref, onMounted } from 'vue';
|
|
|
import { ElMessageBox } from 'element-plus';
|
|
import { ElMessageBox } from 'element-plus';
|
|
|
- import { Edit, Delete, Search } from '@element-plus/icons-vue';
|
|
|
|
|
|
|
+ import { Search } from '@element-plus/icons-vue';
|
|
|
import RoleDrawer from './components/RoleDrawer.vue';
|
|
import RoleDrawer from './components/RoleDrawer.vue';
|
|
|
import useRolesQuery from './hooks/useRolesQuery';
|
|
import useRolesQuery from './hooks/useRolesQuery';
|
|
|
import { Role } from '@/types/role/type';
|
|
import { Role } from '@/types/role/type';
|
|
@@ -97,3 +97,14 @@
|
|
|
queryRolesPage();
|
|
queryRolesPage();
|
|
|
});
|
|
});
|
|
|
</script>
|
|
</script>
|
|
|
|
|
+
|
|
|
|
|
+<style scoped>
|
|
|
|
|
+ .actions {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .actions > img {
|
|
|
|
|
+ margin-right: 24px;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ }
|
|
|
|
|
+</style>
|