vben admin BasicTable 表格的进阶使用之带搜索区域
前言
很久之前看了下关于 vben 的基础使用,最近项目需求开始用了,业务需要一个带搜索区域的表格,今天写完有点懵逼,来记录的过程中整理下思路~~
这里是之前写过的关于 vben admin BasicTable 表格的基本使用
一、上代码
<template>
<BasicTable @register="registerTable">
<template #toolbar>
<a-button type="primary" @click="exportData"> 数据导出 </a-button>
</template>
</BasicTable>
</template>
<script lang="ts" setup>
import {
BasicForm, FormSchema } from '/@/components/Form';
import {
BasicTable, useTable } from '/@/components/Table';
import {
getBasicColumns } from './details/tableData';
import {
reactive, ref, unref, watch, nextTick } from 'vue';
import {
getTowersInfo, towerLatestData } from '/@/api/bu/device/device';
import {
towerBillPage, exportTowerHistoryToExcel } from '/@/api/bu/device/towerBill';
//这里是表格中搜索区域表单的配置,就和 FORM 的配置是一样的
const detailSearchForm: FormProps = {
baseColProps: {
lg: 6, md: 8 },
labelWidth: 90,
schemas: [
{
label: '工作类型',
field: 'workType',
component: 'Select',
componentProps: {
dictType: 'tower_bill_type',
},
},
{
label: '单据时间',
field: 'startTime',
component: 'RangePicker',
componentProps: {
format: 'YYYY-MM-DD HH:mm:ss',
},
1375




被折叠的 条评论
为什么被折叠?



