reactor:【system 系统管理】dept 部门管理的实现,对齐 ele 和 antd(isExpanded 放在 onRefresh 前面)
This commit is contained in:
@@ -23,11 +23,6 @@ const [FormModal, formModalApi] = useVbenModal({
|
|||||||
destroyOnClose: true,
|
destroyOnClose: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
/** 刷新表格 */
|
|
||||||
function onRefresh() {
|
|
||||||
gridApi.query();
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 切换树形展开/收缩状态 */
|
/** 切换树形展开/收缩状态 */
|
||||||
const isExpanded = ref(true);
|
const isExpanded = ref(true);
|
||||||
function toggleExpand() {
|
function toggleExpand() {
|
||||||
@@ -35,6 +30,11 @@ function toggleExpand() {
|
|||||||
gridApi.grid.setAllTreeExpand(isExpanded.value);
|
gridApi.grid.setAllTreeExpand(isExpanded.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 刷新表格 */
|
||||||
|
function onRefresh() {
|
||||||
|
gridApi.query();
|
||||||
|
}
|
||||||
|
|
||||||
/** 创建分类 */
|
/** 创建分类 */
|
||||||
function handleCreate() {
|
function handleCreate() {
|
||||||
formModalApi.setData(null).open();
|
formModalApi.setData(null).open();
|
||||||
|
|||||||
@@ -120,11 +120,6 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
|||||||
<template #toolbar-tools>
|
<template #toolbar-tools>
|
||||||
<TableAction
|
<TableAction
|
||||||
:actions="[
|
:actions="[
|
||||||
{
|
|
||||||
label: isExpanded ? '收缩' : '展开',
|
|
||||||
type: 'primary',
|
|
||||||
onClick: toggleExpand,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: $t('ui.actionTitle.create', ['菜单']),
|
label: $t('ui.actionTitle.create', ['菜单']),
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
@@ -132,6 +127,11 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
|||||||
auth: ['infra:demo02-category:create'],
|
auth: ['infra:demo02-category:create'],
|
||||||
onClick: handleCreate,
|
onClick: handleCreate,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: isExpanded ? '收缩' : '展开',
|
||||||
|
type: 'primary',
|
||||||
|
onClick: toggleExpand,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: $t('ui.actionTitle.export'),
|
label: $t('ui.actionTitle.export'),
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
|
|||||||
@@ -30,11 +30,6 @@ function getLeaderName(userId: number) {
|
|||||||
return userList.value.find((user) => user.id === userId)?.nickname;
|
return userList.value.find((user) => user.id === userId)?.nickname;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 刷新表格 */
|
|
||||||
function onRefresh() {
|
|
||||||
gridApi.query();
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 切换树形展开/收缩状态 */
|
/** 切换树形展开/收缩状态 */
|
||||||
const isExpanded = ref(true);
|
const isExpanded = ref(true);
|
||||||
function toggleExpand() {
|
function toggleExpand() {
|
||||||
@@ -42,6 +37,11 @@ function toggleExpand() {
|
|||||||
gridApi.grid.setAllTreeExpand(isExpanded.value);
|
gridApi.grid.setAllTreeExpand(isExpanded.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 刷新表格 */
|
||||||
|
function onRefresh() {
|
||||||
|
gridApi.query();
|
||||||
|
}
|
||||||
|
|
||||||
/** 创建部门 */
|
/** 创建部门 */
|
||||||
function handleCreate() {
|
function handleCreate() {
|
||||||
formModalApi.setData(null).open();
|
formModalApi.setData(null).open();
|
||||||
|
|||||||
@@ -118,11 +118,6 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
|||||||
<template #toolbar-tools>
|
<template #toolbar-tools>
|
||||||
<TableAction
|
<TableAction
|
||||||
:actions="[
|
:actions="[
|
||||||
{
|
|
||||||
label: isExpanded ? '收缩' : '展开',
|
|
||||||
type: 'primary',
|
|
||||||
onClick: toggleExpand,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: $t('ui.actionTitle.create', ['示例分类']),
|
label: $t('ui.actionTitle.create', ['示例分类']),
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
@@ -130,6 +125,11 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
|||||||
auth: ['infra:demo02-category:create'],
|
auth: ['infra:demo02-category:create'],
|
||||||
onClick: handleCreate,
|
onClick: handleCreate,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: isExpanded ? '收缩' : '展开',
|
||||||
|
type: 'primary',
|
||||||
|
onClick: toggleExpand,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: $t('ui.actionTitle.export'),
|
label: $t('ui.actionTitle.export'),
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
|
|||||||
@@ -30,11 +30,6 @@ function getLeaderName(userId: number) {
|
|||||||
return userList.value.find((user) => user.id === userId)?.nickname;
|
return userList.value.find((user) => user.id === userId)?.nickname;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 刷新表格 */
|
|
||||||
function onRefresh() {
|
|
||||||
gridApi.query();
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 切换树形展开/收缩状态 */
|
/** 切换树形展开/收缩状态 */
|
||||||
const isExpanded = ref(true);
|
const isExpanded = ref(true);
|
||||||
function toggleExpand() {
|
function toggleExpand() {
|
||||||
@@ -42,6 +37,11 @@ function toggleExpand() {
|
|||||||
gridApi.grid.setAllTreeExpand(isExpanded.value);
|
gridApi.grid.setAllTreeExpand(isExpanded.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 刷新表格 */
|
||||||
|
function onRefresh() {
|
||||||
|
gridApi.query();
|
||||||
|
}
|
||||||
|
|
||||||
/** 创建部门 */
|
/** 创建部门 */
|
||||||
function handleCreate() {
|
function handleCreate() {
|
||||||
formModalApi.setData(null).open();
|
formModalApi.setData(null).open();
|
||||||
|
|||||||
Reference in New Issue
Block a user