bkui-vue 2.0.1-beta.16 → 2.0.1-beta.18
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/dist/index.cjs.js +18 -18
- package/dist/index.esm.js +3419 -3418
- package/dist/index.umd.js +18 -18
- package/lib/date-picker/date-picker.d.ts +0 -1
- package/lib/date-picker/index.d.ts +0 -3
- package/lib/date-picker/index.js +34 -13
- package/lib/index.js +1 -1
- package/package.json +1 -1
@@ -131,7 +131,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
131
131
|
fontSizeCls: import("vue").ComputedRef<string>;
|
132
132
|
longWidthCls: import("vue").ComputedRef<string>;
|
133
133
|
localReadonly: import("vue").ComputedRef<boolean>;
|
134
|
-
allowCrossDayProp: import("vue").ComputedRef<boolean>;
|
135
134
|
ownPickerProps: import("vue").ComputedRef<Record<string, any>>;
|
136
135
|
teleportTo: import("vue").Ref<any>;
|
137
136
|
pickerDropdownRef: import("vue").Ref<any>;
|
@@ -140,7 +140,6 @@ declare const BkDatePicker: {
|
|
140
140
|
fontSizeCls: import("vue").ComputedRef<string>;
|
141
141
|
longWidthCls: import("vue").ComputedRef<string>;
|
142
142
|
localReadonly: import("vue").ComputedRef<boolean>;
|
143
|
-
allowCrossDayProp: import("vue").ComputedRef<boolean>;
|
144
143
|
ownPickerProps: import("vue").ComputedRef<Record<string, any>>;
|
145
144
|
teleportTo: import("vue").Ref<any>;
|
146
145
|
pickerDropdownRef: import("vue").Ref<any>;
|
@@ -490,7 +489,6 @@ declare const BkDatePicker: {
|
|
490
489
|
fontSizeCls: import("vue").ComputedRef<string>;
|
491
490
|
longWidthCls: import("vue").ComputedRef<string>;
|
492
491
|
localReadonly: import("vue").ComputedRef<boolean>;
|
493
|
-
allowCrossDayProp: import("vue").ComputedRef<boolean>;
|
494
492
|
ownPickerProps: import("vue").ComputedRef<Record<string, any>>;
|
495
493
|
teleportTo: import("vue").Ref<any>;
|
496
494
|
pickerDropdownRef: import("vue").Ref<any>;
|
@@ -703,7 +701,6 @@ declare const BkDatePicker: {
|
|
703
701
|
fontSizeCls: import("vue").ComputedRef<string>;
|
704
702
|
longWidthCls: import("vue").ComputedRef<string>;
|
705
703
|
localReadonly: import("vue").ComputedRef<boolean>;
|
706
|
-
allowCrossDayProp: import("vue").ComputedRef<boolean>;
|
707
704
|
ownPickerProps: import("vue").ComputedRef<Record<string, any>>;
|
708
705
|
teleportTo: import("vue").Ref<any>;
|
709
706
|
pickerDropdownRef: import("vue").Ref<any>;
|
package/lib/date-picker/index.js
CHANGED
@@ -3713,13 +3713,23 @@ var dateRangePanelProps = {
|
|
3713
3713
|
}
|
3714
3714
|
if (props.splitPanels) {
|
3715
3715
|
var otherPanel = panel === 'left' ? 'right' : 'left';
|
3716
|
-
if (panel === 'left' &&
|
3717
|
-
|
3718
|
-
|
3716
|
+
if (panel === 'left' && state.leftPanelDate >= state.rightPanelDate) {
|
3717
|
+
if (state.currentView === 'year') {
|
3718
|
+
if (Math.floor(state.leftPanelDate.getFullYear() / 10) * 10 === Math.floor(state.rightPanelDate.getFullYear() / 10) * 10) {
|
3719
|
+
changePanelDate(otherPanel, type, 10);
|
3720
|
+
}
|
3721
|
+
} else {
|
3722
|
+
changePanelDate(otherPanel, type, 1);
|
3723
|
+
}
|
3719
3724
|
}
|
3720
|
-
if (panel === 'right' &&
|
3721
|
-
|
3722
|
-
|
3725
|
+
if (panel === 'right' && state.rightPanelDate <= state.leftPanelDate) {
|
3726
|
+
if (state.currentView === 'year') {
|
3727
|
+
if (Math.floor(state.leftPanelDate.getFullYear() / 10) * 10 === Math.floor(state.rightPanelDate.getFullYear() / 10) * 10) {
|
3728
|
+
changePanelDate(otherPanel, type, -10);
|
3729
|
+
}
|
3730
|
+
} else {
|
3731
|
+
changePanelDate(otherPanel, type, -1);
|
3732
|
+
}
|
3723
3733
|
}
|
3724
3734
|
} else {
|
3725
3735
|
var _otherPanel = panel === 'left' ? 'right' : 'left';
|
@@ -4282,6 +4292,7 @@ var dateRangePanelProps = {
|
|
4282
4292
|
}
|
4283
4293
|
}() : '']), [[external_vue_namespaceObject.vShow, !this.isTime]]), this.isTime ? (0,external_vue_namespaceObject.createVNode)(time_range, {
|
4284
4294
|
"ref": "timePickerRef",
|
4295
|
+
"allowCrossDay": !!this.timePickerOptions.allowCrossDay,
|
4285
4296
|
"disabledDate": this.disabledDate,
|
4286
4297
|
"format": this.format,
|
4287
4298
|
"selectionMode": this.selectionMode,
|
@@ -4506,9 +4517,16 @@ function date_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
4506
4517
|
return props.options;
|
4507
4518
|
});
|
4508
4519
|
// 限制 allow-cross-day 属性只在 time-picker 组件 type 为 timerange 时生效
|
4509
|
-
|
4510
|
-
|
4511
|
-
|
4520
|
+
// const allowCrossDayProp = computed(() => (panel.value === 'RangeTimePickerPanel' ? props.allowCrossDay : false));
|
4521
|
+
// const allowCrossDayProp = computed(() => {
|
4522
|
+
// if (panel.value === 'RangeTimePickerPanel') {
|
4523
|
+
// return props.allowCrossDay;
|
4524
|
+
// }
|
4525
|
+
// if (panel.value === 'DateRangePanel') {
|
4526
|
+
// return (props?.timePickerOptions as any)?.allowCrossDay;
|
4527
|
+
// }
|
4528
|
+
// return false;
|
4529
|
+
// });
|
4512
4530
|
var inputRef = (0,external_vue_namespaceObject.ref)(null);
|
4513
4531
|
var inputFocus = function inputFocus() {
|
4514
4532
|
var _inputRef$value;
|
@@ -4633,7 +4651,10 @@ function date_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
4633
4651
|
// return;
|
4634
4652
|
// }
|
4635
4653
|
state.showClose = false;
|
4636
|
-
state.internalValue = state.tmpValue;
|
4654
|
+
// state.internalValue = state.tmpValue;
|
4655
|
+
if (state.internalValue !== state.tmpValue) {
|
4656
|
+
handleInputChange(_e);
|
4657
|
+
}
|
4637
4658
|
};
|
4638
4659
|
var emitChange = function emitChange(type) {
|
4639
4660
|
(0,external_vue_namespaceObject.nextTick)(function () {
|
@@ -4655,7 +4676,7 @@ function date_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
4655
4676
|
var newValue = e.target.value;
|
4656
4677
|
var newDate = parseDate(newValue, props.type, props.multiple, props.format);
|
4657
4678
|
var valueToTest = isArrayValue ? newDate : newDate[0];
|
4658
|
-
var isDisabled = (_props$disabledDate = props.disabledDate) === null || _props$disabledDate === void 0 ? void 0 : _props$disabledDate.call(props, valueToTest);
|
4679
|
+
var isDisabled = !valueToTest ? false : (_props$disabledDate = props.disabledDate) === null || _props$disabledDate === void 0 ? void 0 : _props$disabledDate.call(props, valueToTest);
|
4659
4680
|
var isValidDate = newDate.reduce(function (valid, date) {
|
4660
4681
|
return valid && date instanceof Date;
|
4661
4682
|
}, true);
|
@@ -4673,7 +4694,7 @@ function date_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
4673
4694
|
var newValue = e.target.value;
|
4674
4695
|
var newDate = parseDate(newValue, props.type, props.multiple, props.format);
|
4675
4696
|
var valueToTest = isArrayValue ? newDate : newDate[0];
|
4676
|
-
var isDisabled = (_props$disabledDate2 = props.disabledDate) === null || _props$disabledDate2 === void 0 ? void 0 : _props$disabledDate2.call(props, valueToTest);
|
4697
|
+
var isDisabled = !valueToTest ? false : (_props$disabledDate2 = props.disabledDate) === null || _props$disabledDate2 === void 0 ? void 0 : _props$disabledDate2.call(props, valueToTest);
|
4677
4698
|
var isValidDate = newDate.reduce(function (valid, date) {
|
4678
4699
|
return valid && date instanceof Date;
|
4679
4700
|
}, true);
|
@@ -4869,7 +4890,7 @@ function date_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
4869
4890
|
fontSizeCls: fontSizeCls,
|
4870
4891
|
longWidthCls: longWidthCls,
|
4871
4892
|
localReadonly: localReadonly,
|
4872
|
-
|
4893
|
+
// allowCrossDayProp,
|
4873
4894
|
ownPickerProps: ownPickerProps,
|
4874
4895
|
teleportTo: teleportTo,
|
4875
4896
|
pickerDropdownRef: pickerDropdownRef,
|
package/lib/index.js
CHANGED