石广澎
2023-10-20 4cb068fb1d51129be7199cbd83fb0ef1f97915e2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import mySearch from './mySearch'
 
// vue页面:      <my-search ref="searchBar" :items="items"  @search="search"></my-search>
// items.js 格式   type 为类型   dataIndex为key  label为文本  defaultValue 为默认值
// const items =   [
//   {
//     type: 'text',
//     dataIndex: 'name',
//     label: '文本',
//     defaultValue: ''
//   },
//   {
//     type: 'time-picker',
//     dataIndex: 'time-picker',
//     label: '时间',
//     defaultValue: ''
//   },
//   {
//     type: 'date-picker',
//     dataIndex: 'dateTime',
//     label: '选择日',
//     defaultValue: ''
//   },
//   {
//     type: 'month-picker',
//     dataIndex: 'monthTime',
//     label: '选择月',
//     defaultValue: ''
//   },
//   {
//     type: 'year-picker',
//     dataIndex: 'yearTime',
//     label: '选择年',
//     defaultValue: ''
//   },
//   {
//     type: 'select',
//     dataIndex: 'lv',
//     label: '等级',
//     defaultValue: '',
//     options: [
//       {
//         label: 'A级',
//         value: 'A'
//       },
//       {
//         label: 'B级',
//         value: 'B'
//       },
//       {
//         label: 'C级',
//         value: 'C'
//       },
//       {
//         label: 'D级',
//         value: 'D'
//       }
//     ]
//   },
// ]
mySearch.install = function (Vue) {
    Vue.component(mySearch.name, mySearch)
}
export default mySearch