@lx-frontend/wrap-element-ui 1.0.21-beta.4 → 1.0.21
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/package.json
CHANGED
package/src/components/EditableTable/features/bizTableHeaderPopover/BizDoubleDatePickerFilter.vue
CHANGED
|
@@ -53,24 +53,32 @@ const datePickerCommonProps = {
|
|
|
53
53
|
|
|
54
54
|
|
|
55
55
|
const pickerStartOptions = computed(() => {
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
// 自定义禁用选项优先级最高
|
|
57
|
+
if ('pickerOptions' in config.value && config.value.pickerOptions?.start) {
|
|
58
|
+
return config.value.pickerOptions.start;
|
|
58
59
|
}
|
|
60
|
+
|
|
61
|
+
// 限制天数范围 自动生成禁用选项
|
|
59
62
|
if ('limit' in config.value) {
|
|
60
63
|
return genStartDateDisabledOptions(tempFilteredValue.value[config.value.prop[1]], config.value.limit);
|
|
61
64
|
}
|
|
62
|
-
|
|
65
|
+
|
|
66
|
+
// 默认(只限制起止时间,不限制范围)
|
|
63
67
|
return genStartDateDisabledOptions(tempFilteredValue.value[config.value.prop[1]]);
|
|
64
68
|
});
|
|
65
69
|
|
|
66
70
|
const pickerEndOptions = computed(() => {
|
|
67
|
-
|
|
68
|
-
|
|
71
|
+
// 自定义禁用选项优先级最高
|
|
72
|
+
if ('pickerOptions' in config.value && config.value.pickerOptions?.end) {
|
|
73
|
+
return config.value.pickerOptions.end;
|
|
69
74
|
}
|
|
75
|
+
|
|
76
|
+
// 限制天数范围 自动生成禁用选项
|
|
70
77
|
if ('limit' in config.value) {
|
|
71
78
|
return genEndDateDisabledOptions(tempFilteredValue.value[config.value.prop[0]], config.value.limit);
|
|
72
79
|
}
|
|
73
|
-
|
|
80
|
+
|
|
81
|
+
// 默认(只限制起止时间,不限制范围)
|
|
74
82
|
return genEndDateDisabledOptions(tempFilteredValue.value[config.value.prop[0]]);
|
|
75
83
|
})
|
|
76
84
|
|
|
@@ -43,8 +43,10 @@ export interface IFilterDoubleDatePickerBase {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
export interface IFilterDoubleDatePicker extends IFilterDoubleDatePickerBase {
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
pickerOptions?: {
|
|
47
|
+
start?: DatePicker['pickerOptions']
|
|
48
|
+
end?: DatePicker['pickerOptions']
|
|
49
|
+
}
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
export interface IFilterDoubleDatePickerLimit extends IFilterDoubleDatePickerBase {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
v-for="({
|
|
9
9
|
isEmpty = true, key, type, prop, label, placeholder, candidate, filterable=false, withoutAll=false, collapseTags=false,
|
|
10
10
|
clearable=false, multiple=false, multipleLimit=0, changeCb, inputLimitCallback, slotName, dateType='date',
|
|
11
|
-
doubleIsInline = true, maxlength = 255,
|
|
11
|
+
doubleIsInline = true, maxlength = 255, pickerOptions, limit
|
|
12
12
|
}) in config"
|
|
13
13
|
:key="label"
|
|
14
14
|
:label="showLabel ? label : ''"
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
:placeholder="dateType == 'date' ? placeholder || '选择日期' : '选择日期范围'"
|
|
73
73
|
start-placeholder="开始日期"
|
|
74
74
|
end-placeholder="结束日期"
|
|
75
|
-
:picker-options="
|
|
75
|
+
:picker-options="pickerOptions"
|
|
76
76
|
/>
|
|
77
77
|
<div
|
|
78
78
|
v-if="type === 'doubleDatePicker'"
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
type="date"
|
|
88
88
|
:editable="false"
|
|
89
89
|
:placeholder="(placeholder || [])[0] || '开始日期'"
|
|
90
|
-
:picker-options="
|
|
90
|
+
:picker-options="pickerOptions?.start || genStartDateDisabledOptions(formData[prop[1]], limit)"
|
|
91
91
|
/>
|
|
92
92
|
<el-date-picker
|
|
93
93
|
@input="val => handleInput(val, prop[1], '', key)"
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
type="date"
|
|
99
99
|
:editable="false"
|
|
100
100
|
:placeholder="(placeholder || [])[1] || '结束日期'"
|
|
101
|
-
:picker-options="
|
|
101
|
+
:picker-options="pickerOptions?.end || genEndDateDisabledOptions(formData[prop[0]], limit)"
|
|
102
102
|
/>
|
|
103
103
|
<el-checkbox
|
|
104
104
|
:value="checkedIds[key]"
|
|
@@ -59,12 +59,14 @@ type DoubleDatePickerOptionBase = BaseDoubleOption & {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
type DoubleDatePickerOption = DoubleDatePickerOptionBase & {
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
pickerOptions?: {
|
|
63
|
+
start?: DatePicker['pickerOptions']
|
|
64
|
+
end?: DatePicker['pickerOptions']
|
|
65
|
+
}
|
|
64
66
|
}
|
|
65
67
|
|
|
66
68
|
type DoubleDatePickerOptionLimit = DoubleDatePickerOptionBase & {
|
|
67
|
-
|
|
69
|
+
limit?: number
|
|
68
70
|
}
|
|
69
71
|
|
|
70
72
|
export type SearchFormConfigOption =
|