@94ai/nf-search-form 8.3.23 → 9.0.0
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/lib/index.d.ts +2922 -0
- package/lib/nf-column-check-dialog.vue.d.ts +150 -150
- package/lib/nf-column-check-drawer.vue.d.ts +105 -105
- package/lib/nf-number-range.vue.d.ts +100 -100
- package/lib/nf-search-form-item.vue.d.ts +112 -112
- package/lib/nf-search-form.cjs.js +117 -132
- package/lib/nf-search-form.esm-bundler.js +118 -133
- package/lib/nf-search-form.vue.d.ts +648 -0
- package/lib/nf-time-range.vue.d.ts +36 -42
- package/lib/style/css.d.ts +0 -1
- package/lib/style/index.d.ts +0 -1
- package/lib/types.d.ts +87 -70
- package/package/nf-search-form-item.vue +24 -23
- package/package/nf-search-form.vue +103 -103
- package/package/nf-time-range.vue +7 -7
- package/package/types.ts +18 -0
- package/package.json +20 -20
|
@@ -1,42 +1,36 @@
|
|
|
1
|
-
declare const _default: import("vue-demi").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
-
value?: string[] | undefined;
|
|
3
|
-
endPlaceholder
|
|
4
|
-
startPlaceholder
|
|
5
|
-
}>, {
|
|
6
|
-
value: () => never[];
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
value:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
default: D[K];
|
|
38
|
-
}> : P[K];
|
|
39
|
-
};
|
|
40
|
-
declare type __VLS_Prettify<T> = {
|
|
41
|
-
[K in keyof T]: T[K];
|
|
42
|
-
} & {};
|
|
1
|
+
declare const _default: import("vue-demi").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
value?: string[] | undefined;
|
|
3
|
+
endPlaceholder?: string | undefined;
|
|
4
|
+
startPlaceholder?: string | undefined;
|
|
5
|
+
}>, {
|
|
6
|
+
value: () => never[];
|
|
7
|
+
}>, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {
|
|
8
|
+
input: (event: [string | undefined, string | undefined]) => void;
|
|
9
|
+
change: (event: [string | undefined, string | undefined]) => void;
|
|
10
|
+
}, string, Readonly<import("vue-demi").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
11
|
+
value?: string[] | undefined;
|
|
12
|
+
endPlaceholder?: string | undefined;
|
|
13
|
+
startPlaceholder?: string | undefined;
|
|
14
|
+
}>, {
|
|
15
|
+
value: () => never[];
|
|
16
|
+
}>>>, {
|
|
17
|
+
value: string[];
|
|
18
|
+
}>;
|
|
19
|
+
export default _default;
|
|
20
|
+
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
21
|
+
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
22
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
23
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
24
|
+
} : {
|
|
25
|
+
type: import('vue').PropType<T[K]>;
|
|
26
|
+
required: true;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
declare type __VLS_WithDefaults<P, D> = {
|
|
30
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
31
|
+
default: D[K];
|
|
32
|
+
}> : P[K];
|
|
33
|
+
};
|
|
34
|
+
declare type __VLS_Prettify<T> = {
|
|
35
|
+
[K in keyof T]: T[K];
|
|
36
|
+
} & {};
|
package/lib/style/css.d.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
package/lib/style/index.d.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
package/lib/types.d.ts
CHANGED
|
@@ -1,70 +1,87 @@
|
|
|
1
|
-
interface
|
|
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
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
1
|
+
export interface IBtnItems {
|
|
2
|
+
btnType?: 'search' | 'export' | 'reset';
|
|
3
|
+
name?: string;
|
|
4
|
+
type?: string;
|
|
5
|
+
icon?: string;
|
|
6
|
+
plain?: boolean;
|
|
7
|
+
size?: string;
|
|
8
|
+
round?: boolean;
|
|
9
|
+
circle?: boolean;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
class?: string;
|
|
13
|
+
validate?: boolean;
|
|
14
|
+
onClick?: (formData: Record<string, any>) => void;
|
|
15
|
+
show?: boolean | ((formData: Record<string, any>) => boolean);
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
}
|
|
18
|
+
interface IExchangeKey {
|
|
19
|
+
type: number;
|
|
20
|
+
value?: any;
|
|
21
|
+
}
|
|
22
|
+
export declare type NfSearchFormItemOption = {
|
|
23
|
+
key?: string;
|
|
24
|
+
_index?: number;
|
|
25
|
+
__index?: number;
|
|
26
|
+
initHidden?: boolean;
|
|
27
|
+
destory?: boolean | ((any: any) => boolean);
|
|
28
|
+
label?: string | ((any: any) => string);
|
|
29
|
+
addLabel?: string;
|
|
30
|
+
prop?: string;
|
|
31
|
+
width?: string;
|
|
32
|
+
isShowColon?: boolean;
|
|
33
|
+
hidden?: boolean;
|
|
34
|
+
required?: boolean;
|
|
35
|
+
rules?: Record<string, any>;
|
|
36
|
+
size?: 'medium' | 'small' | 'mini';
|
|
37
|
+
labelWidth?: string;
|
|
38
|
+
'is-range'?: boolean;
|
|
39
|
+
showMessage?: boolean;
|
|
40
|
+
inlineMessage?: boolean;
|
|
41
|
+
getOptions?: (callback: (options: any[]) => void, formData: Record<string, any>) => void;
|
|
42
|
+
changeProps?: string[];
|
|
43
|
+
show?: (formData: Record<string, any>) => boolean;
|
|
44
|
+
exchangeKey?: IExchangeKey;
|
|
45
|
+
category?: string;
|
|
46
|
+
initValue?: any;
|
|
47
|
+
slot?: string;
|
|
48
|
+
labelSlot?: string;
|
|
49
|
+
inputSlot?: {
|
|
50
|
+
prepend?: string;
|
|
51
|
+
append?: string;
|
|
52
|
+
suffix?: string;
|
|
53
|
+
prefix?: string;
|
|
54
|
+
doublePrepend?: string;
|
|
55
|
+
doubleAppend?: string;
|
|
56
|
+
doubleSuffix?: string;
|
|
57
|
+
doublePrefix?: string;
|
|
58
|
+
doubleSegment?: string;
|
|
59
|
+
};
|
|
60
|
+
class?: string;
|
|
61
|
+
tooltip?: {
|
|
62
|
+
slot: string;
|
|
63
|
+
};
|
|
64
|
+
type?: 'monthrange' | 'datetimerange' | 'daterange' | 'yearrange' | 'halfyearrange' | 'quarterrange' | 'date' | 'month' | 'week' | 'dates';
|
|
65
|
+
element?: 'el-input' | 'el-select' | 'custom-select' | 'ai-select' | 'ai-custom-select' | 'nf-lazy-select' | 'el-input-number' | 'el-date-picker' | 'el-cascader' | 'el-time-select' | 'el-time-picker' | 'number-range' | 'nf-date-picker' | 'nf-timezone-picker' | 'nf-quarter-picker' | 'nf-half-year-picker' | 'nf-double-year' | 'nf-double-week' | 'nf-double-half-year' | 'nf-double-quarter' | 'nf-transfer-select';
|
|
66
|
+
events?: Record<string, Function>;
|
|
67
|
+
placeholder?: string;
|
|
68
|
+
virtualList?: boolean;
|
|
69
|
+
'controls-position'?: 'right' | 'left';
|
|
70
|
+
clearable?: boolean;
|
|
71
|
+
startPlaceholder?: string;
|
|
72
|
+
rangeSeparator?: string;
|
|
73
|
+
endPlaceholder?: string;
|
|
74
|
+
defaultTime?: string[];
|
|
75
|
+
options?: {
|
|
76
|
+
label: string;
|
|
77
|
+
value: string | number;
|
|
78
|
+
}[];
|
|
79
|
+
'picker-options'?: {
|
|
80
|
+
start: string;
|
|
81
|
+
step: string;
|
|
82
|
+
end: string;
|
|
83
|
+
};
|
|
84
|
+
valueFormat?: string;
|
|
85
|
+
min?: 0;
|
|
86
|
+
};
|
|
87
|
+
export {};
|
|
@@ -62,9 +62,9 @@
|
|
|
62
62
|
v-on="bindEvents"
|
|
63
63
|
:type="itemOptions.type || 'datetimerange'"
|
|
64
64
|
:clearable="itemOptions.clearable || true"
|
|
65
|
-
:start-placeholder="itemOptions.startPlaceholder || '
|
|
65
|
+
:start-placeholder="itemOptions.startPlaceholder || t('nf.common.startDate')"
|
|
66
66
|
:range-separator="itemOptions.rangeSeparator || '-'"
|
|
67
|
-
:end-placeholder="itemOptions.endPlaceholder || '
|
|
67
|
+
:end-placeholder="itemOptions.endPlaceholder || t('nf.common.endDate')"
|
|
68
68
|
:default-time="itemOptions.defaultTime || ['00:00:00', '23:59:59']"
|
|
69
69
|
:value-format="itemOptions.valueFormat || 'yyyy-MM-dd HH:mm:ss'"
|
|
70
70
|
@change="handleChange"
|
|
@@ -81,9 +81,9 @@
|
|
|
81
81
|
v-on="bindEvents"
|
|
82
82
|
:type="itemOptions.type || 'datetimerange'"
|
|
83
83
|
:clearable="itemOptions.clearable || true"
|
|
84
|
-
:start-placeholder="itemOptions.startPlaceholder || '
|
|
84
|
+
:start-placeholder="itemOptions.startPlaceholder || t('nf.common.startDate')"
|
|
85
85
|
:range-separator="itemOptions.rangeSeparator || '-'"
|
|
86
|
-
:end-placeholder="itemOptions.endPlaceholder || '
|
|
86
|
+
:end-placeholder="itemOptions.endPlaceholder || t('nf.common.endDate')"
|
|
87
87
|
:default-time="itemOptions.defaultTime || ['00:00:00', '23:59:59']"
|
|
88
88
|
:value-format="itemOptions.valueFormat || 'yyyy-MM-dd HH:mm:ss'"
|
|
89
89
|
@change="handleChange"
|
|
@@ -101,9 +101,9 @@
|
|
|
101
101
|
v-on="bindEvents"
|
|
102
102
|
type="monthrange"
|
|
103
103
|
:clearable="itemOptions.clearable || true"
|
|
104
|
-
:start-placeholder="itemOptions.startPlaceholder || '
|
|
104
|
+
:start-placeholder="itemOptions.startPlaceholder || t('nf.common.startDate')"
|
|
105
105
|
:range-separator="itemOptions.rangeSeparator || '-'"
|
|
106
|
-
:end-placeholder="itemOptions.endPlaceholder || '
|
|
106
|
+
:end-placeholder="itemOptions.endPlaceholder || t('nf.common.endDate')"
|
|
107
107
|
:value-format="itemOptions.valueFormat || 'yyyy-MM'"
|
|
108
108
|
@change="handleChange"
|
|
109
109
|
>
|
|
@@ -118,9 +118,9 @@
|
|
|
118
118
|
v-on="bindEvents"
|
|
119
119
|
type="monthrange"
|
|
120
120
|
:clearable="itemOptions.clearable || true"
|
|
121
|
-
:start-placeholder="itemOptions.startPlaceholder || '
|
|
121
|
+
:start-placeholder="itemOptions.startPlaceholder || t('nf.common.startDate')"
|
|
122
122
|
:range-separator="itemOptions.rangeSeparator || '-'"
|
|
123
|
-
:end-placeholder="itemOptions.endPlaceholder || '
|
|
123
|
+
:end-placeholder="itemOptions.endPlaceholder || t('nf.common.endDate')"
|
|
124
124
|
:value-format="itemOptions.valueFormat || 'yyyy-MM'"
|
|
125
125
|
@change="handleChange"
|
|
126
126
|
>
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
v-model="currentVal"
|
|
135
135
|
v-bind="bindProps"
|
|
136
136
|
v-on="bindEvents"
|
|
137
|
-
:placeholder="itemOptions.placeholder || '
|
|
137
|
+
:placeholder="itemOptions.placeholder || t('nf.common.selectDate')"
|
|
138
138
|
:type="itemOptions.type"
|
|
139
139
|
@change="handleChange"
|
|
140
140
|
>
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
v-model="currentVal"
|
|
148
148
|
v-bind="bindProps"
|
|
149
149
|
v-on="bindEvents"
|
|
150
|
-
:placeholder="itemOptions.placeholder || '
|
|
150
|
+
:placeholder="itemOptions.placeholder || t('nf.common.selectDate')"
|
|
151
151
|
:type="itemOptions.type"
|
|
152
152
|
@change="handleChange"
|
|
153
153
|
>
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
v-model="currentVal"
|
|
161
161
|
v-bind="bindProps"
|
|
162
162
|
v-on="bindEvents"
|
|
163
|
-
:placeholder="itemOptions.placeholder || '
|
|
163
|
+
:placeholder="itemOptions.placeholder || t('nf.common.selectWeek')"
|
|
164
164
|
>
|
|
165
165
|
<slot slot="range-separator" :name="itemOptions.rangeSeparator">
|
|
166
166
|
<span class="iconfont icon-dao" />
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
v-model="currentVal"
|
|
172
172
|
v-bind="bindProps"
|
|
173
173
|
v-on="bindEvents"
|
|
174
|
-
:placeholder="itemOptions.placeholder || '
|
|
174
|
+
:placeholder="itemOptions.placeholder || t('nf.common.selectYear')"
|
|
175
175
|
>
|
|
176
176
|
<slot slot="range-separator" :name="itemOptions.rangeSeparator">
|
|
177
177
|
<span class="iconfont icon-dao" />
|
|
@@ -182,7 +182,7 @@
|
|
|
182
182
|
v-model="currentVal"
|
|
183
183
|
v-bind="bindProps"
|
|
184
184
|
v-on="bindEvents"
|
|
185
|
-
:placeholder="itemOptions.placeholder || '
|
|
185
|
+
:placeholder="itemOptions.placeholder || t('nf.common.selectQuarter')"
|
|
186
186
|
>
|
|
187
187
|
<slot slot="range-separator" :name="itemOptions.rangeSeparator">
|
|
188
188
|
<span class="iconfont icon-dao" />
|
|
@@ -193,7 +193,7 @@
|
|
|
193
193
|
v-model="currentVal"
|
|
194
194
|
v-bind="bindProps"
|
|
195
195
|
v-on="bindEvents"
|
|
196
|
-
:placeholder="itemOptions.placeholder || '
|
|
196
|
+
:placeholder="itemOptions.placeholder || t('nf.common.selectHalfYear')"
|
|
197
197
|
>
|
|
198
198
|
<slot slot="range-separator" :name="itemOptions.rangeSeparator">
|
|
199
199
|
<span class="iconfont icon-dao" />
|
|
@@ -204,7 +204,7 @@
|
|
|
204
204
|
v-model="currentVal"
|
|
205
205
|
v-bind="bindProps"
|
|
206
206
|
v-on="bindEvents"
|
|
207
|
-
:placeholder="itemOptions.placeholder || '
|
|
207
|
+
:placeholder="itemOptions.placeholder || t('nf.common.selectHalfYear')"
|
|
208
208
|
>
|
|
209
209
|
<slot slot="range-separator" :name="itemOptions.rangeSeparator">
|
|
210
210
|
<span class="iconfont icon-dao" />
|
|
@@ -215,7 +215,7 @@
|
|
|
215
215
|
v-model="currentVal"
|
|
216
216
|
v-bind="bindProps"
|
|
217
217
|
v-on="bindEvents"
|
|
218
|
-
:placeholder="itemOptions.placeholder || '
|
|
218
|
+
:placeholder="itemOptions.placeholder || t('nf.common.selectQuarter')"
|
|
219
219
|
>
|
|
220
220
|
<slot slot="range-separator" :name="itemOptions.rangeSeparator">
|
|
221
221
|
<span class="iconfont icon-dao" />
|
|
@@ -235,7 +235,7 @@
|
|
|
235
235
|
v-model="currentVal"
|
|
236
236
|
v-bind="bindProps"
|
|
237
237
|
v-on="bindEvents"
|
|
238
|
-
:placeholder="itemOptions.placeholder || '
|
|
238
|
+
:placeholder="itemOptions.placeholder || t('nf.common.selectTime')"
|
|
239
239
|
@change="handleChange"
|
|
240
240
|
/>
|
|
241
241
|
<!-- el-time-select (type:range) -->
|
|
@@ -244,8 +244,8 @@
|
|
|
244
244
|
v-model="currentVal"
|
|
245
245
|
v-bind="bindProps"
|
|
246
246
|
v-on="bindEvents"
|
|
247
|
-
:start-placeholder="itemOptions.startPlaceholder || '
|
|
248
|
-
:end-placeholder="itemOptions.endPlaceholder || '
|
|
247
|
+
:start-placeholder="itemOptions.startPlaceholder || t('nf.common.startTime')"
|
|
248
|
+
:end-placeholder="itemOptions.endPlaceholder || t('nf.common.endTime')"
|
|
249
249
|
@change="handleChange"
|
|
250
250
|
/>
|
|
251
251
|
<!-- el-time-picker -->
|
|
@@ -254,9 +254,9 @@
|
|
|
254
254
|
v-model="currentVal"
|
|
255
255
|
v-bind="bindProps"
|
|
256
256
|
v-on="bindEvents"
|
|
257
|
-
:placeholder="itemOptions.placeholder || '
|
|
258
|
-
:start-placeholder="itemOptions.startPlaceholder || '
|
|
259
|
-
:end-placeholder="itemOptions.endPlaceholder || '
|
|
257
|
+
:placeholder="itemOptions.placeholder || t('nf.common.selectTime')"
|
|
258
|
+
:start-placeholder="itemOptions.startPlaceholder || t('nf.common.selectTime')"
|
|
259
|
+
:end-placeholder="itemOptions.endPlaceholder || t('nf.common.selectTime')"
|
|
260
260
|
@change="handleChange"
|
|
261
261
|
/>
|
|
262
262
|
<!-- 数字区间 -->
|
|
@@ -306,7 +306,7 @@ import {
|
|
|
306
306
|
getCurrentInstance
|
|
307
307
|
} from 'vue-demi'
|
|
308
308
|
import { NfSearchFormItemOption } from '@94ai/nf-search-form/lib/types'
|
|
309
|
-
import { createUniqueString } from '@94ai/common-utils'
|
|
309
|
+
import { createUniqueString, useLocale } from '@94ai/common-utils'
|
|
310
310
|
|
|
311
311
|
const emit = defineEmits<{
|
|
312
312
|
(e: 'input', event: any): void
|
|
@@ -341,6 +341,7 @@ const props = withDefaults(defineProps<{
|
|
|
341
341
|
})
|
|
342
342
|
|
|
343
343
|
const instance = getCurrentInstance()?.proxy
|
|
344
|
+
const { t } = useLocale()
|
|
344
345
|
|
|
345
346
|
const slotName = computed(() => {
|
|
346
347
|
return props.itemOptions.slot || ''
|