| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <script setup lang="tsx">
- import type { InternalRowData } from 'naive-ui/es/data-table/src/interface';
- import { fetchGetTagList } from '@/service/api/goods/tag';
- import { useTable } from '@/components/zt/Table/hooks/useTable';
- const columns: NaiveUI.TableColumn<InternalRowData>[] = [
- {
- key: 'name',
- title: '标签名称',
- align: 'center',
- minWidth: 100
- }
- ];
- const [registerTable] = useTable({
- searchFormConfig: {
- schemas: [
- {
- field: 'name',
- label: '用户昵称',
- component: 'NInput'
- }
- ],
- inline: false,
- size: 'small',
- labelPlacement: 'left',
- isFull: false
- },
- tableConfig: {
- keyField: 'id',
- title: '标签列表',
- showAddButton: true
- }
- });
- </script>
- <template>
- <LayoutTable>
- <ZTable :columns="columns" :api="fetchGetTagList" :show-table-action="false" @register="registerTable"></ZTable>
- </LayoutTable>
- </template>
- <style scoped></style>
|