11<template >
2- <div class =' toolBarWrap' >
3- <div v-for =' (item, index) in batchToolbar' :key =' index' class =' toolBarItem' >
4- <el-button v-if =' !item.render' :type =' item.type' :plain =' item.plain' @click =' btnClick(item)' >{{item.label}}</el-button >
5- </div >
2+ <div >
3+ <filter-search :searchConfigs =' searchConfigs' />
4+ <div class =' toolBarWrap' >
5+ <div v-for =' (item, index) in batchToolbar' :key =' index' class =' toolBarItem' >
6+ <el-button v-if =' !item.render' :type =' item.type' :plain =' item.plain' @click =' btnClick(item)' >{{item.label}}</el-button >
7+ </div >
68
7- <el-dialog :title =' dialogTitle' v-model =' dialogFormVisible' destroy-on-close :before-close =' beforeCloseDialog' >
8- <el-form :model =' form' ref =' formRef' >
9- <el-form-item :label =' column.title' v-for =' (column,index) in columns' :key =' index' :prop =' column.dataIndex' >
10- <el-input v-model =' form[column.dataIndex]' autocomplete =' off' ></el-input >
11- </el-form-item >
9+ <el-dialog :title =' dialogTitle' v-model =' dialogFormVisible' destroy-on-close :before-close =' beforeCloseDialog' >
10+ <el-form :model =' form' ref =' formRef' >
11+ <el-form-item :label =' column.title' v-for =' (column,index) in columns' :key =' index' :prop =' column.dataIndex' >
12+ <el-input v-model =' form[column.dataIndex]' autocomplete =' off' ></el-input >
13+ </el-form-item >
1214
13- <!-- <el-select v-model='form.region' placeholder='请选择活动区域'>
14- <el-option label='区域一' value='shanghai'></el-option>
15- <el-option label='区域二' value='beijing'></el-option>
16- </el-select>-->
17- </el-form >
18- <div slot =' footer' class =' dialog-footer' >
19- <el-button @click =' clickDialogCancel' >取 消</el-button >
20- <el-button type =' primary' @click =' clickDialogOk()' >确 定</el-button >
21- </div >
22- </el-dialog >
15+ <!-- <el-select v-model='form.region' placeholder='请选择活动区域'>
16+ <el-option label='区域一' value='shanghai'></el-option>
17+ <el-option label='区域二' value='beijing'></el-option>
18+ </el-select>-->
19+ </el-form >
20+ <div slot =' footer' class =' dialog-footer' >
21+ <el-button @click =' clickDialogCancel' >取 消</el-button >
22+ <el-button type =' primary' @click =' clickDialogOk()' >确 定</el-button >
23+ </div >
24+ </el-dialog >
25+ </div >
2326 </div >
2427</template >
2528
2629<script lang="ts">
2730import { defineComponent , ComponentOptions , PropType } from ' vue' ;
28- import { ICrudColumn , ICrudColumnToolbar , ICrudToolbarTypeEnum } from ' ../CrudTypes' ;
31+ import { ICrudColumn , ICrudColumnToolbar , ICrudToolbarTypeEnum , ISearch } from ' ../CrudTypes' ;
32+ import FilterSearch from ' ./filterSearch.vue' ;
2933
3034type SetLoadingFn = (flag : boolean ) => void ;
3135
@@ -40,12 +44,16 @@ interface IToolBarData {
4044
4145const ToolBar = defineComponent ({
4246 name: ' toolbar' ,
47+ components: {
48+ FilterSearch ,
49+ },
4350 props: {
4451 batchToolbar: Array as PropType <ICrudColumnToolbar []>,
4552 selectRows: Array as PropType <unknown []>,
4653 setLoading: Function as PropType <SetLoadingFn >,
4754 clearSelection: Function ,
4855 columns: Array as PropType <ICrudColumn []>,
56+ searchConfigs: Array as PropType <ISearch []>,
4957 },
5058 data(): IToolBarData {
5159 return {
0 commit comments