@opentiny/vue-search-box 0.1.1-alpha.1 → 0.1.1-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -0
- package/README.zh-CN.md +28 -0
- package/dist/es/index.es.js +11 -3
- package/dist/es/index.vue.es2.js +11 -42
- package/dist/es/utils/en_US.es.js +37 -37
- package/dist/es/utils/zh_CN.es.js +1 -1
- package/dist/lib/index.cjs.js +10 -2
- package/dist/lib/index.vue.cjs2.js +83 -114
- package/dist/lib/utils/en_US.cjs.js +38 -38
- package/dist/lib/utils/zh_CN.cjs.js +2 -2
- package/dist/types/utils/en_US.d.ts +2 -1
- package/dist/types/utils/zh_CN.d.ts +2 -1
- package/package.json +24 -20
- package/__tests__/search-box.spec.ts +0 -0
- package/scripts/pre-release.cjs +0 -8
- package/src/composables/use-checkbox.ts +0 -90
- package/src/composables/use-custom.ts +0 -53
- package/src/composables/use-datepicker.ts +0 -90
- package/src/composables/use-dropdown.ts +0 -251
- package/src/composables/use-edit.ts +0 -119
- package/src/composables/use-init.ts +0 -69
- package/src/composables/use-match.ts +0 -193
- package/src/composables/use-num-range.ts +0 -86
- package/src/composables/use-placeholder.ts +0 -43
- package/src/composables/use-tag.ts +0 -54
- package/src/index.less +0 -376
- package/src/index.ts +0 -13
- package/src/index.type.ts +0 -192
- package/src/index.vue +0 -1138
- package/src/smb-theme.ts +0 -15
- package/src/theme.json +0 -135
- package/src/utils/clone.ts +0 -37
- package/src/utils/date.ts +0 -724
- package/src/utils/dropdown.ts +0 -27
- package/src/utils/en_US.ts +0 -41
- package/src/utils/index.ts +0 -11
- package/src/utils/tag.ts +0 -80
- package/src/utils/type.ts +0 -6
- package/src/utils/validate.ts +0 -234
- package/src/utils/zh_CN.ts +0 -41
- package/src/vars.less +0 -56
- package/vite.config.theme.ts +0 -20
- package/vite.config.ts +0 -60
package/src/index.less
DELETED
|
@@ -1,376 +0,0 @@
|
|
|
1
|
-
@import './vars.less';
|
|
2
|
-
|
|
3
|
-
@css-prefix: tvp-;
|
|
4
|
-
@css-tiny-prefix: tiny-;
|
|
5
|
-
@search-box-prefix-cls: ~'@{css-prefix}search-box';
|
|
6
|
-
@search-box__dropdown-menu-cls: ~'@{css-prefix}search-box__dropdown-menu';
|
|
7
|
-
@search-box__popover-cls: ~'@{css-prefix}search-box__popover';
|
|
8
|
-
@popover-tiny-cls: ~'@{css-tiny-prefix}popover';
|
|
9
|
-
@checkbox-tiny-cls: ~'@{css-tiny-prefix}checkbox';
|
|
10
|
-
@dropdown-tiny-cls: ~'@{css-tiny-prefix}dropdown';
|
|
11
|
-
@select-tiny-cls: ~'@{css-tiny-prefix}select';
|
|
12
|
-
@input-tiny-cls: ~'@{css-tiny-prefix}input';
|
|
13
|
-
@svg-tiny-cls: ~'@{css-tiny-prefix}svg';
|
|
14
|
-
@button-tiny-cls: ~'@{css-tiny-prefix}button';
|
|
15
|
-
@form-tiny-cls: ~'@{css-tiny-prefix}form';
|
|
16
|
-
|
|
17
|
-
.@{search-box__dropdown-menu-cls},
|
|
18
|
-
.@{search-box__popover-cls} {
|
|
19
|
-
.inject-SearchBox-vars();
|
|
20
|
-
width: 232px;
|
|
21
|
-
overflow: auto;
|
|
22
|
-
overflow-x: hidden;
|
|
23
|
-
|
|
24
|
-
// 覆写select样式
|
|
25
|
-
.@{form-tiny-cls}-item.is-error .@{search-box-prefix-cls}-select .@{select-tiny-cls}__tags-group {
|
|
26
|
-
border-color: #f23030;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.@{search-box-prefix-cls}-select {
|
|
30
|
-
.@{select-tiny-cls} {
|
|
31
|
-
.@{svg-tiny-cls} {
|
|
32
|
-
z-index: 1000;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
&__tags-group {
|
|
36
|
-
min-height: 32px;
|
|
37
|
-
max-height: 82px;
|
|
38
|
-
padding: 2px;
|
|
39
|
-
width: 100%;
|
|
40
|
-
border: 1px solid #c2c2c2;
|
|
41
|
-
border-radius: 6px;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&__tags.is-show-tag {
|
|
45
|
-
max-width: 276px !important;
|
|
46
|
-
width: calc(100% - 8px) !important;
|
|
47
|
-
min-height: 30px;
|
|
48
|
-
padding-right: 20px;
|
|
49
|
-
max-height: 76px;
|
|
50
|
-
overflow: auto;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.@{input-tiny-cls} {
|
|
55
|
-
&__suffix {
|
|
56
|
-
z-index: 1000;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
&__inner {
|
|
60
|
-
border: 0px;
|
|
61
|
-
overflow: hidden;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
input[type='number'] {
|
|
67
|
-
-moz-appearance: textfield;
|
|
68
|
-
/* Firefox */
|
|
69
|
-
appearance: textfield;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
input[type='number']::-webkit-inner-spin-button,
|
|
73
|
-
input[type='number']::-webkit-outer-spin-button {
|
|
74
|
-
-webkit-appearance: none;
|
|
75
|
-
/* Safari */
|
|
76
|
-
margin: 0;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.@{search-box__popover-cls}.@{popover-tiny-cls}[x-placement^='bottom'] {
|
|
81
|
-
margin-top: 0;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.@{search-box-prefix-cls} {
|
|
85
|
-
.inject-SearchBox-vars();
|
|
86
|
-
|
|
87
|
-
display: flex;
|
|
88
|
-
position: relative;
|
|
89
|
-
flex-wrap: wrap;
|
|
90
|
-
align-items: center;
|
|
91
|
-
justify-content: flex-start;
|
|
92
|
-
border: 1px solid var(--tvp-SearchBox-border-color);
|
|
93
|
-
border-radius: var(--tvp-SearchBox-border-radius);
|
|
94
|
-
min-height: var(--tvp-SearchBox-min-height);
|
|
95
|
-
padding-left: var(--tvp-SearchBox-padding-left);
|
|
96
|
-
background-color: var(--tvp-SearchBox-bg-color);
|
|
97
|
-
|
|
98
|
-
&__form {
|
|
99
|
-
width: auto;
|
|
100
|
-
flex: 1;
|
|
101
|
-
min-width: 200px;
|
|
102
|
-
|
|
103
|
-
&-popover {
|
|
104
|
-
position: absolute;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
&:focus-within {
|
|
109
|
-
border-color: var(--tvp-SearchBox-focus-border-color);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
&>&__prefix {
|
|
113
|
-
position: absolute;
|
|
114
|
-
top: calc((var(--tvp-SearchBox-min-height) - var(--tvp-SearchBox-left-icon-font-size)) / 2 - 1px);
|
|
115
|
-
left: 12px;
|
|
116
|
-
display: inline;
|
|
117
|
-
font-size: var(--tvp-SearchBox-left-icon-font-size);
|
|
118
|
-
fill: #808080;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
&__text-highlight {
|
|
122
|
-
color: var(--tvp-SearchBox-dropdown-keyword-text-color);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
&__placeholder {
|
|
126
|
-
padding-right: var(--tvp-SearchBox-place-padding-right);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
&__tag {
|
|
130
|
-
margin: 1px var(--tvp-SearchBox-tag-margin-right) 1px 0;
|
|
131
|
-
max-width: 100%;
|
|
132
|
-
|
|
133
|
-
&>&-value {
|
|
134
|
-
overflow: hidden;
|
|
135
|
-
text-overflow: ellipsis;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
&:hover {
|
|
139
|
-
cursor: pointer;
|
|
140
|
-
color: var(--tvp-SearchBox-tag-hover-text-color);
|
|
141
|
-
fill: var(--tvp-SearchBox-tag-hover-fill-color);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
&-editor {
|
|
145
|
-
span {
|
|
146
|
-
border-bottom: 1px dashed var(--tvp-SearchBox-tag-bottom-border-color);
|
|
147
|
-
line-height: 1;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
&__input {
|
|
153
|
-
.@{input-tiny-cls}-display-only {
|
|
154
|
-
width: calc(100% - var(--tv-Input-suffix-right) - 63px);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
& .@{svg-tiny-cls} {
|
|
158
|
-
margin-left: 0;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
&-close {
|
|
162
|
-
margin-right: var(--tvp-SearchBox-close-icon-margin-right);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
&-separator {
|
|
166
|
-
display: inline-block;
|
|
167
|
-
margin-right: var(--tvp-SearchBox-separator-icon-margin-right);
|
|
168
|
-
height: 14px;
|
|
169
|
-
width: 1px;
|
|
170
|
-
background-color: #dfe1e6;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
&-help {
|
|
174
|
-
margin-right: 0px;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
& &-search {
|
|
178
|
-
display: none;
|
|
179
|
-
margin-right: 2px;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
&__input-wrapper {
|
|
184
|
-
display: flex;
|
|
185
|
-
align-items: center;
|
|
186
|
-
width: 100%;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
// 提高权重,防止被tinyvue样式覆盖
|
|
190
|
-
& &__dropdown:not(.is-disabled) .@{search-box-prefix-cls}__input:not(.is-disabled) {
|
|
191
|
-
.@{input-tiny-cls}__suffix .@{svg-tiny-cls} {
|
|
192
|
-
font-size: 16px;
|
|
193
|
-
margin-top: 0;
|
|
194
|
-
fill: var(--tvp-SearchBox-right-icon-color);
|
|
195
|
-
|
|
196
|
-
&:hover {
|
|
197
|
-
fill: var(--tvp-SearchBox-right-icon-color-hover);
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
.@{input-tiny-cls}__suffix-inner {
|
|
202
|
-
display: flex;
|
|
203
|
-
align-items: center;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
&__prop {
|
|
208
|
-
white-space: nowrap;
|
|
209
|
-
vertical-align: middle;
|
|
210
|
-
font-size: var(--tvp-SearchBox-tag-font-size);
|
|
211
|
-
|
|
212
|
-
span {
|
|
213
|
-
padding-left: 8px;
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
// 撑开输入框宽度
|
|
218
|
-
.@{dropdown-tiny-cls}__trigger {
|
|
219
|
-
display: block;
|
|
220
|
-
|
|
221
|
-
.@{dropdown-tiny-cls}__title {
|
|
222
|
-
width: 100%;
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
&__dropdown {
|
|
227
|
-
display: block;
|
|
228
|
-
flex: 1;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
&__radio-wrap {
|
|
232
|
-
max-height: 240px;
|
|
233
|
-
overflow: auto;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
&__checkbox-wrap {
|
|
237
|
-
max-height: 186px;
|
|
238
|
-
overflow: auto;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
&__checkbox {
|
|
242
|
-
flex-direction: column;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
&__bottom-btn,
|
|
246
|
-
&__checkbox-btn {
|
|
247
|
-
display: flex;
|
|
248
|
-
width: 100%;
|
|
249
|
-
border-top: 1px solid var(--tvp-SearchBox-dropdown-btn-group-border-color);
|
|
250
|
-
margin-top: var(--tvp-SearchBox-dropdown-btn-group-margin-top);
|
|
251
|
-
padding-top: var(--tvp-SearchBox-dropdown-btn-group-padding-top);
|
|
252
|
-
padding-right: 10px;
|
|
253
|
-
padding-bottom: var(--tvp-SearchBox-dropdown-btn-group-padding-bottom);
|
|
254
|
-
|
|
255
|
-
.@{button-tiny-cls} {
|
|
256
|
-
min-width: 72px;
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
&__checkbox-btn {
|
|
261
|
-
padding-left: 10px;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
&__filter-type {
|
|
265
|
-
display: inline-block;
|
|
266
|
-
padding: 0 16px;
|
|
267
|
-
margin-top: 12px;
|
|
268
|
-
height: 18px;
|
|
269
|
-
line-height: 18px;
|
|
270
|
-
font-weight: 500;
|
|
271
|
-
white-space: nowrap;
|
|
272
|
-
overflow: hidden;
|
|
273
|
-
text-overflow: ellipsis;
|
|
274
|
-
color: var(--tvp-SearchBox-dropdown-header-text-color);
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
&__potential-box {
|
|
278
|
-
min-height: 30px;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
&__filter-item {
|
|
282
|
-
color: var(--tvp-SearchBox-search-filter-text-color);
|
|
283
|
-
border-bottom: 1px solid #fff;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
&__dropdown-item.@{dropdown-tiny-cls}-item {
|
|
287
|
-
width: 100%;
|
|
288
|
-
max-width: 100%;
|
|
289
|
-
--tv-DropdownItem-icon-color-hover: var(--tv-color-bg-active-control);
|
|
290
|
-
|
|
291
|
-
&>div {
|
|
292
|
-
white-space: nowrap;
|
|
293
|
-
overflow: hidden;
|
|
294
|
-
text-overflow: ellipsis;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
// 本地和线上优先级不同,修复复选框在dropdown中使用样式出现的问题
|
|
298
|
-
&.@{search-box-prefix-cls}__checkbox-item .@{checkbox-tiny-cls}__inner>.@{svg-tiny-cls} {
|
|
299
|
-
margin-right: 0;
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
// 空白处可以选中复选框
|
|
304
|
-
&__checkbox-item {
|
|
305
|
-
|
|
306
|
-
& &-label,
|
|
307
|
-
.@{checkbox-tiny-cls},
|
|
308
|
-
& .@{dropdown-tiny-cls}-item__label {
|
|
309
|
-
width: 100%;
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
&-label .@{checkbox-tiny-cls}__label {
|
|
313
|
-
width: 100%;
|
|
314
|
-
overflow: hidden;
|
|
315
|
-
text-overflow: ellipsis;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
.@{dropdown-tiny-cls}-item__wrap {
|
|
319
|
-
padding: 0;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
.@{checkbox-tiny-cls} {
|
|
323
|
-
padding: 6px 10px;
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
&__dropdown {
|
|
328
|
-
&-title {
|
|
329
|
-
margin: 8px 0px;
|
|
330
|
-
line-height: 18px;
|
|
331
|
-
color: var(--tvp-SearchBox-dropdown-num-title-text-color);
|
|
332
|
-
font-size: 12px;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
&-start,
|
|
336
|
-
&-end {
|
|
337
|
-
margin: 8px 0px;
|
|
338
|
-
font-size: var(--tvp-SearchBox-dropdown-desc-font-size);
|
|
339
|
-
color: var(--tvp-SearchBox-dropdown-desc-text-color);
|
|
340
|
-
letter-spacing: 0;
|
|
341
|
-
line-height: 1.5;
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
&__panel-box {
|
|
346
|
-
width: 100%;
|
|
347
|
-
padding: 0px 10px;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
&__date-item.@{form-tiny-cls}-item,
|
|
351
|
-
&__number-item.@{form-tiny-cls}-item {
|
|
352
|
-
padding-bottom: 8px;
|
|
353
|
-
margin-bottom: 0;
|
|
354
|
-
width: 200px;
|
|
355
|
-
|
|
356
|
-
&>div {
|
|
357
|
-
width: 100%;
|
|
358
|
-
white-space: nowrap;
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
.@{form-tiny-cls}-item__error {
|
|
362
|
-
font-size: 12px;
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
&__input input {
|
|
367
|
-
border: 0;
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
// 输入框中的input需要额外单独处理样式,仅此输入框生效
|
|
371
|
-
&__input-wrapper .@{search-box-prefix-cls}__dropdown .@{search-box-prefix-cls}__input {
|
|
372
|
-
.@{input-tiny-cls}__inner {
|
|
373
|
-
padding-left: 0px;
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
}
|
package/src/index.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { App } from "vue";
|
|
2
|
-
import TinySearchBox from "./index.vue";
|
|
3
|
-
export { zhCN } from "./utils/zh_CN";
|
|
4
|
-
export { enUS } from "./utils/en_US";
|
|
5
|
-
import "./index.less";
|
|
6
|
-
|
|
7
|
-
export * from "./index.type";
|
|
8
|
-
|
|
9
|
-
TinySearchBox.install = function (app: App) {
|
|
10
|
-
app.component(TinySearchBox.name, TinySearchBox);
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export default TinySearchBox;
|
package/src/index.type.ts
DELETED
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* tag类型, radio-默认单选, noValue-非正常tag,tag值为空, checkbox-多选,map-键值tag, numRange-数字范围tag,
|
|
3
|
-
* dateRange-日期范围tag。tag 的分类是根据键值的结果划分
|
|
4
|
-
*/
|
|
5
|
-
export type ISearchBoxTagType = 'radio' | 'noValue' | 'checkbox' | 'map' | 'numRange' | 'dateRange' | 'dateTimeRange'
|
|
6
|
-
/**
|
|
7
|
-
* 候选tag数据配置项
|
|
8
|
-
*/
|
|
9
|
-
export interface ISearchBoxItem {
|
|
10
|
-
/**
|
|
11
|
-
* 搜索字段,tag的键,'keyword' 作为组件内部保留字,请勿传入该值
|
|
12
|
-
*/
|
|
13
|
-
field: string
|
|
14
|
-
/**
|
|
15
|
-
* tag 键的显示值,实际结果是field
|
|
16
|
-
*/
|
|
17
|
-
label: string
|
|
18
|
-
/**
|
|
19
|
-
* 配置项可生产的tag类型
|
|
20
|
-
*/
|
|
21
|
-
type?: ISearchBoxTagType
|
|
22
|
-
/**
|
|
23
|
-
* tag 值的选择项数据
|
|
24
|
-
*/
|
|
25
|
-
options?: Array<ISearchBoxOption>
|
|
26
|
-
/**
|
|
27
|
-
* 自动识别匹配正则
|
|
28
|
-
* 10.0.2 新增
|
|
29
|
-
*/
|
|
30
|
-
regexp?: RegExp
|
|
31
|
-
/**
|
|
32
|
-
* radio 单选类型可设置, 设置为false时,单选属性可以多次选择
|
|
33
|
-
*/
|
|
34
|
-
replace?: boolean
|
|
35
|
-
/**
|
|
36
|
-
* 单选或多选值的选中项键值
|
|
37
|
-
* 10.0.2 新增
|
|
38
|
-
*/
|
|
39
|
-
optionValueKey?: string
|
|
40
|
-
/**
|
|
41
|
-
* dateRange 类型日期显示和结果格式,dateRange时必选
|
|
42
|
-
*/
|
|
43
|
-
format?: string
|
|
44
|
-
/**
|
|
45
|
-
* numRange 最小值,类型为number
|
|
46
|
-
* dateRange开始日期,类型为Date
|
|
47
|
-
*/
|
|
48
|
-
start?: number | Date
|
|
49
|
-
/**
|
|
50
|
-
* numRange 最大值,类型为number
|
|
51
|
-
* dateRange起始日期,类型为Date
|
|
52
|
-
*/
|
|
53
|
-
end?: number | Date
|
|
54
|
-
/**
|
|
55
|
-
* numRange 可填最小值,用于校验
|
|
56
|
-
* dateRange可选最小值,用于校验
|
|
57
|
-
*/
|
|
58
|
-
min?: number | Date
|
|
59
|
-
/**
|
|
60
|
-
* numRange 可填最大值,用于校验
|
|
61
|
-
* dateRange可选最大值,用于校验
|
|
62
|
-
*/
|
|
63
|
-
max?: number | Date
|
|
64
|
-
/**
|
|
65
|
-
* 每个item对应的提示文本
|
|
66
|
-
*/
|
|
67
|
-
placeholder?: string
|
|
68
|
-
/**
|
|
69
|
-
* 搜索的字段范围
|
|
70
|
-
*/
|
|
71
|
-
searchKeys?: Array<string>
|
|
72
|
-
/**
|
|
73
|
-
* 标识字段映射,3.13.0新增
|
|
74
|
-
*/
|
|
75
|
-
idMapKey?: string
|
|
76
|
-
/**
|
|
77
|
-
* 标签分隔符[3.14.0新增]
|
|
78
|
-
*/
|
|
79
|
-
operator?: string
|
|
80
|
-
/**
|
|
81
|
-
* type=checkbox时,设置是否合并成一个标签[3.16.0新增]
|
|
82
|
-
*/
|
|
83
|
-
mergeTag?: boolean
|
|
84
|
-
[propName: string]: any
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
export interface ISearchBoxOption {
|
|
88
|
-
/**
|
|
89
|
-
* 选项显示值
|
|
90
|
-
*/
|
|
91
|
-
label: string
|
|
92
|
-
/**
|
|
93
|
-
* 搜索目标字段,只有‘label’才需要
|
|
94
|
-
*/
|
|
95
|
-
field?: string
|
|
96
|
-
/**
|
|
97
|
-
* 控制map类型二级选项是否出现内置所有值,map类型需要
|
|
98
|
-
*/
|
|
99
|
-
allValues?: boolean
|
|
100
|
-
/**
|
|
101
|
-
* 控制map类型二级选项是否出现内置空值,map类型需要
|
|
102
|
-
*/
|
|
103
|
-
emptyValue?: boolean
|
|
104
|
-
/**
|
|
105
|
-
* map类型二级选项数据
|
|
106
|
-
*/
|
|
107
|
-
options?: Array<any>
|
|
108
|
-
[propName: string]: any
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* 每个选中tag的类型
|
|
112
|
-
*/
|
|
113
|
-
export interface ISearchBoxTag {
|
|
114
|
-
/**
|
|
115
|
-
* 搜索目标搜字段
|
|
116
|
-
*/
|
|
117
|
-
field: string
|
|
118
|
-
/**
|
|
119
|
-
* tag键,field的显示值
|
|
120
|
-
*/
|
|
121
|
-
label: string
|
|
122
|
-
/**
|
|
123
|
-
* tag值
|
|
124
|
-
*/
|
|
125
|
-
value: string
|
|
126
|
-
/**
|
|
127
|
-
* 类型
|
|
128
|
-
*/
|
|
129
|
-
type: ISearchBoxTagType
|
|
130
|
-
/**
|
|
131
|
-
* 数字范围和日期范围tag 开始值
|
|
132
|
-
*/
|
|
133
|
-
start?: number | string
|
|
134
|
-
/**
|
|
135
|
-
* 数字范围和日期范围tag 结束值
|
|
136
|
-
*/
|
|
137
|
-
end?: number | string
|
|
138
|
-
[propName: string]: any
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* 潜在匹配项的函数返回值类型
|
|
143
|
-
*/
|
|
144
|
-
interface ISearchBoxMatchItem {
|
|
145
|
-
label: string
|
|
146
|
-
field: string
|
|
147
|
-
value: string
|
|
148
|
-
type?: string
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
export interface ISearchBoxMatchOptions {
|
|
152
|
-
getMatchList: (arg1: string) => ISearchBoxMatchItem[] // 潜在匹配对象返回的方法
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
export interface ISearchBoxNewTag {
|
|
156
|
-
/**
|
|
157
|
-
* type 新标签所属第一层元素的type类型值
|
|
158
|
-
*/
|
|
159
|
-
type: string
|
|
160
|
-
/**
|
|
161
|
-
* field 新标签所属第一层元素的field值
|
|
162
|
-
*/
|
|
163
|
-
field: string
|
|
164
|
-
/**
|
|
165
|
-
* label 新标签label值,即标签左侧值
|
|
166
|
-
*/
|
|
167
|
-
label: string
|
|
168
|
-
/**
|
|
169
|
-
* value 新标签的value值,即标签右侧值
|
|
170
|
-
*/
|
|
171
|
-
value: string
|
|
172
|
-
/**
|
|
173
|
-
* start 日期标签或大小标签的起始值,可选参数
|
|
174
|
-
*/
|
|
175
|
-
start?: string | number
|
|
176
|
-
/**
|
|
177
|
-
* end 日期标签或大小标签的结束值,可选参数
|
|
178
|
-
*/
|
|
179
|
-
end?: string | number
|
|
180
|
-
/**
|
|
181
|
-
* id 新标签的idMapKey对应的属性值,可用来识别标签,可以是id也可以是idMapKey指定的值,可选参数
|
|
182
|
-
*/
|
|
183
|
-
id?: string | number
|
|
184
|
-
/**
|
|
185
|
-
* operator标签分隔符,可选参数
|
|
186
|
-
*/
|
|
187
|
-
operator?: string
|
|
188
|
-
/**
|
|
189
|
-
* checkbox类型下使用mergeTag为true时,合并的标签信息,
|
|
190
|
-
*/
|
|
191
|
-
options?: ISearchBoxTag[]
|
|
192
|
-
}
|