You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

36 lines
908 B

<template>
2 years ago
<div>
<BasicTable @register="register">
<template #toolbar>
<a-button type="primary" @click="expandAll">展开全部</a-button>
<a-button type="primary" @click="collapseAll">折叠全部</a-button>
</template>
</BasicTable>
</div>
</template>
2 years ago
<script lang="ts" setup name="Menu">
2 years ago
import { BasicTable, useTable } from '@/components/Table'
import { getMenuListApi } from '@/api/system/menu'
import { columns, searchFormSchema } from './menu.data'
const [register, { expandAll, collapseAll }] = useTable({
title: '菜单列表',
api: getMenuListApi,
columns,
rowKey: 'id',
formConfig: {
labelWidth: 120,
schemas: searchFormSchema
},
isTreeTable: true,
useSearchForm: true,
pagination: false,
showIndexColumn: false,
actionColumn: {
width: 120,
title: '操作',
dataIndex: 'action',
fixed: 'right'
}
})
</script>