fix: 修复用户管理分页条消失错误,优化表格 slot 命名

This commit is contained in:
2024-10-13 15:50:02 +08:00
parent 50a6d17516
commit 6a77168645
17 changed files with 43 additions and 40 deletions

View File

@@ -17,7 +17,7 @@
<IconDown v-if="expanded" />
<IconRight v-else />
</template>
<template #custom-left>
<template #toolbar-left>
<a-input v-model="name" placeholder="请输入名称" allow-clear @change="search">
<template #prefix><icon-search /></template>
</a-input>
@@ -26,7 +26,7 @@
<template #default>重置</template>
</a-button>
</template>
<template #custom-right>
<template #toolbar-right>
<a-button v-permission="['system:dept:add']" type="primary" @click="onAdd()">
<template #icon><icon-plus /></template>
<span>新增</span>

View File

@@ -2,9 +2,7 @@
<div class="table-page">
<a-row justify="space-between" align="center" class="header page_header">
<a-space wrap>
<slot name="custom-title">
<div class="title">字典管理</div>
</slot>
<div class="title">字典管理</div>
</a-space>
</a-row>
<a-row align="stretch" :gutter="14" class="h-full page_content">
@@ -23,7 +21,7 @@
:disabled-column-keys="['label']"
@refresh="search"
>
<template #custom-left>
<template #toolbar-left>
<a-input v-model="queryForm.description" placeholder="请输入标签/描述" allow-clear @change="search">
<template #prefix><icon-search /></template>
</a-input>
@@ -32,7 +30,7 @@
<template #default>重置</template>
</a-button>
</template>
<template #custom-right>
<template #toolbar-right>
<a-button v-permission="['system:dict:item:add']" type="primary" @click="onAdd">
<template #icon><icon-plus /></template>
<span>新增</span>

View File

@@ -16,7 +16,7 @@
<IconDown v-if="expanded" />
<IconRight v-else />
</template>
<template #custom-left>
<template #toolbar-left>
<a-input v-model="title" placeholder="请输入菜单标题" allow-clear @change="search">
<template #prefix><icon-search /></template>
</a-input>
@@ -25,7 +25,7 @@
<template #default>重置</template>
</a-button>
</template>
<template #custom-right>
<template #toolbar-right>
<a-button v-permission="['system:menu:add']" type="primary" @click="onAdd()">
<template #icon><icon-plus /></template>
<span>新增</span>

View File

@@ -12,7 +12,7 @@
:disabled-column-keys="['title']"
@refresh="search"
>
<template #custom-left>
<template #toolbar-left>
<a-input v-model="queryForm.title" placeholder="请输入标题" allow-clear @change="search">
<template #prefix><icon-search /></template>
</a-input>
@@ -29,7 +29,7 @@
<template #default>重置</template>
</a-button>
</template>
<template #custom-right>
<template #toolbar-right>
<a-button v-permission="['system:notice:add']" type="primary" @click="onAdd">
<template #icon><icon-plus /></template>
<span>新增</span>

View File

@@ -12,7 +12,7 @@
:disabled-column-keys="['name']"
@refresh="search"
>
<template #custom-left>
<template #toolbar-left>
<a-input v-model="queryForm.description" placeholder="请输入名称/编码/描述" allow-clear @change="search">
<template #prefix><icon-search /></template>
</a-input>
@@ -21,7 +21,7 @@
<template #default>重置</template>
</a-button>
</template>
<template #custom-right>
<template #toolbar-right>
<a-button v-permission="['system:role:add']" type="primary" @click="onAdd">
<template #icon><icon-plus /></template>
<span>新增</span>

View File

@@ -12,7 +12,7 @@
:disabled-column-keys="['name']"
@refresh="search"
>
<template #custom-left>
<template #toolbar-left>
<a-input v-model="queryForm.description" placeholder="请输入名称/编码/描述" allow-clear @change="search">
<template #prefix><icon-search /></template>
</a-input>
@@ -29,7 +29,7 @@
<template #default>重置</template>
</a-button>
</template>
<template #custom-right>
<template #toolbar-right>
<a-button v-permission="['system:storage:add']" type="primary" @click="onAdd">
<template #icon><icon-plus /></template>
<span>新增</span>

View File

@@ -2,9 +2,7 @@
<div class="table-page">
<a-row justify="space-between" align="center" class="header page_header">
<a-space wrap>
<slot name="custom-title">
<div class="title">用户管理</div>
</slot>
<div class="title">用户管理</div>
</a-space>
</a-row>
<a-row align="stretch" :gutter="14" class="h-full page_content">
@@ -12,7 +10,6 @@
<DeptTree placeholder="请输入名称" @node-click="handleSelectDept" />
</a-col>
<a-col :xs="24" :sm="24" :md="18" :lg="19" :xl="19" :xxl="20" class="h-full ov-hidden">
<GiForm v-model="queryForm" :options="options" :columns="queryFormColumns" @search="search" @reset="reset"></GiForm>
<GiTable
row-key="id"
:data="dataList"
@@ -24,7 +21,10 @@
:disabled-column-keys="['username']"
@refresh="search"
>
<template #custom-left>
<template #top>
<GiForm v-model="queryForm" :options="options" :columns="queryFormColumns" @search="search" @reset="reset"></GiForm>
</template>
<template #toolbar-left>
<a-button v-permission="['system:user:add']" type="primary" @click="onAdd">
<template #icon>
<icon-plus />
@@ -38,7 +38,7 @@
<span>导入</span>
</a-button>
</template>
<template #custom-right>
<template #toolbar-right>
<a-button v-permission="['system:user:export']" @click="onExport">
<template #icon>
<icon-download />
@@ -76,7 +76,11 @@
删除
</a-link>
<a-dropdown>
<a-link v-if="has.hasPermOr(['system:user:resetPwd'])" type="text">更多</a-link>
<a-button v-if="has.hasPermOr(['system:user:resetPwd'])" type="text" size="mini">
<template #icon>
<icon-more :size="16" />
</template>
</a-button>
<template #content>
<a-doption v-permission="['system:user:resetPwd']" @click="onResetPwd(record)">重置密码</a-doption>
</template>
@@ -201,7 +205,7 @@ const columns: TableInstanceColumns[] = [
{
title: '操作',
slotName: 'action',
width: 200,
width: 150,
align: 'center',
fixed: !isMobile() ? 'right' : undefined,
show: has.hasPermOr(['system:user:update', 'system:user:delete', 'system:user:resetPwd'])