@blueking/date-picker 2.0.0-beta.35 → 2.0.0-beta.37
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 +1 -1
- package/typings/utils/utils.d.ts +3 -3
- package/typings/vue3.d.ts +3 -0
- package/vue2/index.es.min.js +30 -29
- package/vue2/index.iife.min.js +30 -29
- package/vue2/index.umd.min.js +30 -29
- package/vue3/index.es.min.js +30 -29
- package/vue3/index.iife.min.js +30 -29
- package/vue3/index.umd.min.js +30 -29
package/package.json
CHANGED
package/typings/utils/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ComputedRef, type InjectionKey
|
|
1
|
+
import { type ComputedRef, type InjectionKey } from 'vue';
|
|
2
2
|
import { type LangKey } from '../lang/lang';
|
|
3
3
|
import { type ITimezoneItem } from './timezone';
|
|
4
4
|
import { type IDatePickerProps, type DateValue } from './types';
|
|
@@ -10,8 +10,8 @@ export interface IDatePickerProvider {
|
|
|
10
10
|
timezoneInfo: ComputedRef<ITimezoneItem>;
|
|
11
11
|
version: ComputedRef<number | string>;
|
|
12
12
|
validateTimeRange: ComputedRef<DateValue | undefined>;
|
|
13
|
-
minDuration:
|
|
14
|
-
maxDuration:
|
|
13
|
+
minDuration: ComputedRef<number | undefined>;
|
|
14
|
+
maxDuration: ComputedRef<number | undefined>;
|
|
15
15
|
}
|
|
16
16
|
export declare const DATE_PICKER_PROVIDER_KEY: InjectionKey<IDatePickerProvider>;
|
|
17
17
|
export declare const useDatePickerProvider: (data: IDatePickerProvider) => void;
|
package/typings/vue3.d.ts
CHANGED
package/vue2/index.es.min.js
CHANGED
|
@@ -26862,17 +26862,16 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
26862
26862
|
recentUseList.value = [];
|
|
26863
26863
|
localStorage.removeItem(storeKey2.value);
|
|
26864
26864
|
};
|
|
26865
|
-
const handleShowDisableMsg = (e) => {
|
|
26866
|
-
if (
|
|
26867
|
-
|
|
26868
|
-
|
|
26869
|
-
|
|
26870
|
-
|
|
26871
|
-
|
|
26872
|
-
|
|
26873
|
-
|
|
26874
|
-
|
|
26875
|
-
}
|
|
26865
|
+
const handleShowDisableMsg = (e, date) => {
|
|
26866
|
+
if (validateDateRange(date)) return;
|
|
26867
|
+
popoverInstance = __webpack_exports__default$8({
|
|
26868
|
+
content: validMsg.value,
|
|
26869
|
+
immediate: false,
|
|
26870
|
+
isShow: true,
|
|
26871
|
+
popoverDelay: 0,
|
|
26872
|
+
target: e.target,
|
|
26873
|
+
trigger: "manual"
|
|
26874
|
+
});
|
|
26876
26875
|
popoverInstance == null ? void 0 : popoverInstance.show(e.target);
|
|
26877
26876
|
};
|
|
26878
26877
|
const handleHideDisableMsg = () => {
|
|
@@ -26901,7 +26900,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
26901
26900
|
}),
|
|
26902
26901
|
key: index,
|
|
26903
26902
|
onClick: ($event) => unref(validateDateRange)(date) && handleChange(date.dateValue),
|
|
26904
|
-
onMouseenter: (
|
|
26903
|
+
onMouseenter: (e) => handleShowDisableMsg(e, date),
|
|
26905
26904
|
onMouseleave: handleHideDisableMsg
|
|
26906
26905
|
}, toDisplayString(date.toDisplayString()), 43, _hoisted_3$1);
|
|
26907
26906
|
}),
|
|
@@ -27088,18 +27087,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
27088
27087
|
const storeKey2 = computed(() => getStoreKey(props2.version));
|
|
27089
27088
|
const datePanelShow = ref(false);
|
|
27090
27089
|
const tooltipsShow = ref(false);
|
|
27091
|
-
|
|
27092
|
-
|
|
27093
|
-
(v2) => {
|
|
27094
|
-
var _a, _b;
|
|
27095
|
-
if (((_b = (_a = dateDetail.value) == null ? void 0 : _a.dateValue) == null ? void 0 : _b.length) && dateDetail.value.dateValue.every((item, index) => item === (v2 == null ? void 0 : v2[index])))
|
|
27096
|
-
return;
|
|
27097
|
-
dateDetail.value = new DateRange(v2, format.value, timezoneInfo.value.label);
|
|
27098
|
-
},
|
|
27099
|
-
{
|
|
27100
|
-
immediate: true
|
|
27101
|
-
}
|
|
27102
|
-
);
|
|
27090
|
+
let enterTimer;
|
|
27091
|
+
let leaveTimer;
|
|
27103
27092
|
const commonDateUseList = computed(() => {
|
|
27104
27093
|
var _a;
|
|
27105
27094
|
return ((_a = props2.commonUseList) == null ? void 0 : _a.length) ? props2.commonUseList : commonDateList;
|
|
@@ -27115,6 +27104,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
27115
27104
|
}
|
|
27116
27105
|
return (_a = dateDetail.value) == null ? void 0 : _a.toDisplayString();
|
|
27117
27106
|
});
|
|
27107
|
+
watch(
|
|
27108
|
+
() => props2.modelValue,
|
|
27109
|
+
(v2) => {
|
|
27110
|
+
var _a, _b;
|
|
27111
|
+
if (((_b = (_a = dateDetail.value) == null ? void 0 : _a.dateValue) == null ? void 0 : _b.length) && dateDetail.value.dateValue.every((item, index) => item === (v2 == null ? void 0 : v2[index])))
|
|
27112
|
+
return;
|
|
27113
|
+
dateDetail.value = new DateRange(v2, format.value, timezoneInfo.value.label);
|
|
27114
|
+
},
|
|
27115
|
+
{
|
|
27116
|
+
immediate: true
|
|
27117
|
+
}
|
|
27118
|
+
);
|
|
27118
27119
|
useDatePickerProvider({
|
|
27119
27120
|
commonUseList: commonDateUseList,
|
|
27120
27121
|
format,
|
|
@@ -27123,15 +27124,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
27123
27124
|
timezoneInfo,
|
|
27124
27125
|
version: computed(() => props2.version),
|
|
27125
27126
|
validateTimeRange: computed(() => props2.validDateRange),
|
|
27126
|
-
minDuration:
|
|
27127
|
-
maxDuration:
|
|
27127
|
+
minDuration: computed(() => props2.minDuration),
|
|
27128
|
+
maxDuration: computed(() => props2.maxDuration)
|
|
27128
27129
|
});
|
|
27129
27130
|
onBeforeUnmount(() => {
|
|
27130
27131
|
tooltipsShow.value = false;
|
|
27131
27132
|
datePanelShow.value = false;
|
|
27132
27133
|
});
|
|
27133
|
-
let enterTimer;
|
|
27134
|
-
let leaveTimer;
|
|
27135
27134
|
function handleDateMouseenter() {
|
|
27136
27135
|
if (enterTimer) return;
|
|
27137
27136
|
enterTimer = setTimeout(() => {
|
|
@@ -27240,11 +27239,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
27240
27239
|
content: withCtx(() => [
|
|
27241
27240
|
createVNode(_sfc_main$1, {
|
|
27242
27241
|
"default-date": dateDetail.value,
|
|
27242
|
+
"max-duration": _ctx.maxDuration,
|
|
27243
|
+
"min-duration": _ctx.minDuration,
|
|
27243
27244
|
"need-timezone": _ctx.needTimezone,
|
|
27244
27245
|
timezone: timezoneInfo.value.label,
|
|
27245
27246
|
onChange: handleChange,
|
|
27246
27247
|
"onUpdate:timezone": handleTimezoneChange
|
|
27247
|
-
}, null, 8, ["default-date", "need-timezone", "timezone"])
|
|
27248
|
+
}, null, 8, ["default-date", "max-duration", "min-duration", "need-timezone", "timezone"])
|
|
27248
27249
|
]),
|
|
27249
27250
|
default: withCtx(() => {
|
|
27250
27251
|
var _a, _b, _c, _d;
|
package/vue2/index.iife.min.js
CHANGED
|
@@ -33883,17 +33883,16 @@ ${$(r2)}`), n2;
|
|
|
33883
33883
|
recentUseList.value = [];
|
|
33884
33884
|
localStorage.removeItem(storeKey2.value);
|
|
33885
33885
|
};
|
|
33886
|
-
const handleShowDisableMsg = (e) => {
|
|
33887
|
-
if (
|
|
33888
|
-
|
|
33889
|
-
|
|
33890
|
-
|
|
33891
|
-
|
|
33892
|
-
|
|
33893
|
-
|
|
33894
|
-
|
|
33895
|
-
|
|
33896
|
-
}
|
|
33886
|
+
const handleShowDisableMsg = (e, date) => {
|
|
33887
|
+
if (validateDateRange(date)) return;
|
|
33888
|
+
popoverInstance = __webpack_exports__default$8({
|
|
33889
|
+
content: validMsg.value,
|
|
33890
|
+
immediate: false,
|
|
33891
|
+
isShow: true,
|
|
33892
|
+
popoverDelay: 0,
|
|
33893
|
+
target: e.target,
|
|
33894
|
+
trigger: "manual"
|
|
33895
|
+
});
|
|
33897
33896
|
popoverInstance == null ? void 0 : popoverInstance.show(e.target);
|
|
33898
33897
|
};
|
|
33899
33898
|
const handleHideDisableMsg = () => {
|
|
@@ -33922,7 +33921,7 @@ ${$(r2)}`), n2;
|
|
|
33922
33921
|
}),
|
|
33923
33922
|
key: index,
|
|
33924
33923
|
onClick: ($event) => unref(validateDateRange)(date) && handleChange(date.dateValue),
|
|
33925
|
-
onMouseenter: (
|
|
33924
|
+
onMouseenter: (e) => handleShowDisableMsg(e, date),
|
|
33926
33925
|
onMouseleave: handleHideDisableMsg
|
|
33927
33926
|
}, toDisplayString(date.toDisplayString()), 43, _hoisted_3$1);
|
|
33928
33927
|
}),
|
|
@@ -34109,18 +34108,8 @@ ${$(r2)}`), n2;
|
|
|
34109
34108
|
const storeKey2 = computed(() => getStoreKey(props2.version));
|
|
34110
34109
|
const datePanelShow = ref(false);
|
|
34111
34110
|
const tooltipsShow = ref(false);
|
|
34112
|
-
|
|
34113
|
-
|
|
34114
|
-
(v2) => {
|
|
34115
|
-
var _a, _b;
|
|
34116
|
-
if (((_b = (_a = dateDetail.value) == null ? void 0 : _a.dateValue) == null ? void 0 : _b.length) && dateDetail.value.dateValue.every((item, index) => item === (v2 == null ? void 0 : v2[index])))
|
|
34117
|
-
return;
|
|
34118
|
-
dateDetail.value = new DateRange(v2, format.value, timezoneInfo.value.label);
|
|
34119
|
-
},
|
|
34120
|
-
{
|
|
34121
|
-
immediate: true
|
|
34122
|
-
}
|
|
34123
|
-
);
|
|
34111
|
+
let enterTimer;
|
|
34112
|
+
let leaveTimer;
|
|
34124
34113
|
const commonDateUseList = computed(() => {
|
|
34125
34114
|
var _a;
|
|
34126
34115
|
return ((_a = props2.commonUseList) == null ? void 0 : _a.length) ? props2.commonUseList : commonDateList;
|
|
@@ -34136,6 +34125,18 @@ ${$(r2)}`), n2;
|
|
|
34136
34125
|
}
|
|
34137
34126
|
return (_a = dateDetail.value) == null ? void 0 : _a.toDisplayString();
|
|
34138
34127
|
});
|
|
34128
|
+
watch(
|
|
34129
|
+
() => props2.modelValue,
|
|
34130
|
+
(v2) => {
|
|
34131
|
+
var _a, _b;
|
|
34132
|
+
if (((_b = (_a = dateDetail.value) == null ? void 0 : _a.dateValue) == null ? void 0 : _b.length) && dateDetail.value.dateValue.every((item, index) => item === (v2 == null ? void 0 : v2[index])))
|
|
34133
|
+
return;
|
|
34134
|
+
dateDetail.value = new DateRange(v2, format.value, timezoneInfo.value.label);
|
|
34135
|
+
},
|
|
34136
|
+
{
|
|
34137
|
+
immediate: true
|
|
34138
|
+
}
|
|
34139
|
+
);
|
|
34139
34140
|
useDatePickerProvider({
|
|
34140
34141
|
commonUseList: commonDateUseList,
|
|
34141
34142
|
format,
|
|
@@ -34144,15 +34145,13 @@ ${$(r2)}`), n2;
|
|
|
34144
34145
|
timezoneInfo,
|
|
34145
34146
|
version: computed(() => props2.version),
|
|
34146
34147
|
validateTimeRange: computed(() => props2.validDateRange),
|
|
34147
|
-
minDuration:
|
|
34148
|
-
maxDuration:
|
|
34148
|
+
minDuration: computed(() => props2.minDuration),
|
|
34149
|
+
maxDuration: computed(() => props2.maxDuration)
|
|
34149
34150
|
});
|
|
34150
34151
|
onBeforeUnmount(() => {
|
|
34151
34152
|
tooltipsShow.value = false;
|
|
34152
34153
|
datePanelShow.value = false;
|
|
34153
34154
|
});
|
|
34154
|
-
let enterTimer;
|
|
34155
|
-
let leaveTimer;
|
|
34156
34155
|
function handleDateMouseenter() {
|
|
34157
34156
|
if (enterTimer) return;
|
|
34158
34157
|
enterTimer = setTimeout(() => {
|
|
@@ -34261,11 +34260,13 @@ ${$(r2)}`), n2;
|
|
|
34261
34260
|
content: withCtx(() => [
|
|
34262
34261
|
createVNode(_sfc_main$1, {
|
|
34263
34262
|
"default-date": dateDetail.value,
|
|
34263
|
+
"max-duration": _ctx.maxDuration,
|
|
34264
|
+
"min-duration": _ctx.minDuration,
|
|
34264
34265
|
"need-timezone": _ctx.needTimezone,
|
|
34265
34266
|
timezone: timezoneInfo.value.label,
|
|
34266
34267
|
onChange: handleChange,
|
|
34267
34268
|
"onUpdate:timezone": handleTimezoneChange
|
|
34268
|
-
}, null, 8, ["default-date", "need-timezone", "timezone"])
|
|
34269
|
+
}, null, 8, ["default-date", "max-duration", "min-duration", "need-timezone", "timezone"])
|
|
34269
34270
|
]),
|
|
34270
34271
|
default: withCtx(() => {
|
|
34271
34272
|
var _a, _b, _c, _d;
|
package/vue2/index.umd.min.js
CHANGED
|
@@ -26877,17 +26877,16 @@ ${$(r2)}`), n2;
|
|
|
26877
26877
|
recentUseList.value = [];
|
|
26878
26878
|
localStorage.removeItem(storeKey2.value);
|
|
26879
26879
|
};
|
|
26880
|
-
const handleShowDisableMsg = (e) => {
|
|
26881
|
-
if (
|
|
26882
|
-
|
|
26883
|
-
|
|
26884
|
-
|
|
26885
|
-
|
|
26886
|
-
|
|
26887
|
-
|
|
26888
|
-
|
|
26889
|
-
|
|
26890
|
-
}
|
|
26880
|
+
const handleShowDisableMsg = (e, date) => {
|
|
26881
|
+
if (validateDateRange(date)) return;
|
|
26882
|
+
popoverInstance = __webpack_exports__default$8({
|
|
26883
|
+
content: validMsg.value,
|
|
26884
|
+
immediate: false,
|
|
26885
|
+
isShow: true,
|
|
26886
|
+
popoverDelay: 0,
|
|
26887
|
+
target: e.target,
|
|
26888
|
+
trigger: "manual"
|
|
26889
|
+
});
|
|
26891
26890
|
popoverInstance == null ? void 0 : popoverInstance.show(e.target);
|
|
26892
26891
|
};
|
|
26893
26892
|
const handleHideDisableMsg = () => {
|
|
@@ -26916,7 +26915,7 @@ ${$(r2)}`), n2;
|
|
|
26916
26915
|
}),
|
|
26917
26916
|
key: index,
|
|
26918
26917
|
onClick: ($event) => __WEBPACK_EXTERNAL_MODULE_vue__.unref(validateDateRange)(date) && handleChange(date.dateValue),
|
|
26919
|
-
onMouseenter: (
|
|
26918
|
+
onMouseenter: (e) => handleShowDisableMsg(e, date),
|
|
26920
26919
|
onMouseleave: handleHideDisableMsg
|
|
26921
26920
|
}, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString(date.toDisplayString()), 43, _hoisted_3$1);
|
|
26922
26921
|
}),
|
|
@@ -27103,18 +27102,8 @@ ${$(r2)}`), n2;
|
|
|
27103
27102
|
const storeKey2 = __WEBPACK_EXTERNAL_MODULE_vue__.computed(() => getStoreKey(props2.version));
|
|
27104
27103
|
const datePanelShow = __WEBPACK_EXTERNAL_MODULE_vue__.ref(false);
|
|
27105
27104
|
const tooltipsShow = __WEBPACK_EXTERNAL_MODULE_vue__.ref(false);
|
|
27106
|
-
|
|
27107
|
-
|
|
27108
|
-
(v2) => {
|
|
27109
|
-
var _a, _b;
|
|
27110
|
-
if (((_b = (_a = dateDetail.value) == null ? void 0 : _a.dateValue) == null ? void 0 : _b.length) && dateDetail.value.dateValue.every((item, index) => item === (v2 == null ? void 0 : v2[index])))
|
|
27111
|
-
return;
|
|
27112
|
-
dateDetail.value = new DateRange(v2, format.value, timezoneInfo.value.label);
|
|
27113
|
-
},
|
|
27114
|
-
{
|
|
27115
|
-
immediate: true
|
|
27116
|
-
}
|
|
27117
|
-
);
|
|
27105
|
+
let enterTimer;
|
|
27106
|
+
let leaveTimer;
|
|
27118
27107
|
const commonDateUseList = __WEBPACK_EXTERNAL_MODULE_vue__.computed(() => {
|
|
27119
27108
|
var _a;
|
|
27120
27109
|
return ((_a = props2.commonUseList) == null ? void 0 : _a.length) ? props2.commonUseList : commonDateList;
|
|
@@ -27130,6 +27119,18 @@ ${$(r2)}`), n2;
|
|
|
27130
27119
|
}
|
|
27131
27120
|
return (_a = dateDetail.value) == null ? void 0 : _a.toDisplayString();
|
|
27132
27121
|
});
|
|
27122
|
+
__WEBPACK_EXTERNAL_MODULE_vue__.watch(
|
|
27123
|
+
() => props2.modelValue,
|
|
27124
|
+
(v2) => {
|
|
27125
|
+
var _a, _b;
|
|
27126
|
+
if (((_b = (_a = dateDetail.value) == null ? void 0 : _a.dateValue) == null ? void 0 : _b.length) && dateDetail.value.dateValue.every((item, index) => item === (v2 == null ? void 0 : v2[index])))
|
|
27127
|
+
return;
|
|
27128
|
+
dateDetail.value = new DateRange(v2, format.value, timezoneInfo.value.label);
|
|
27129
|
+
},
|
|
27130
|
+
{
|
|
27131
|
+
immediate: true
|
|
27132
|
+
}
|
|
27133
|
+
);
|
|
27133
27134
|
useDatePickerProvider({
|
|
27134
27135
|
commonUseList: commonDateUseList,
|
|
27135
27136
|
format,
|
|
@@ -27138,15 +27139,13 @@ ${$(r2)}`), n2;
|
|
|
27138
27139
|
timezoneInfo,
|
|
27139
27140
|
version: __WEBPACK_EXTERNAL_MODULE_vue__.computed(() => props2.version),
|
|
27140
27141
|
validateTimeRange: __WEBPACK_EXTERNAL_MODULE_vue__.computed(() => props2.validDateRange),
|
|
27141
|
-
minDuration: __WEBPACK_EXTERNAL_MODULE_vue__.
|
|
27142
|
-
maxDuration: __WEBPACK_EXTERNAL_MODULE_vue__.
|
|
27142
|
+
minDuration: __WEBPACK_EXTERNAL_MODULE_vue__.computed(() => props2.minDuration),
|
|
27143
|
+
maxDuration: __WEBPACK_EXTERNAL_MODULE_vue__.computed(() => props2.maxDuration)
|
|
27143
27144
|
});
|
|
27144
27145
|
__WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount(() => {
|
|
27145
27146
|
tooltipsShow.value = false;
|
|
27146
27147
|
datePanelShow.value = false;
|
|
27147
27148
|
});
|
|
27148
|
-
let enterTimer;
|
|
27149
|
-
let leaveTimer;
|
|
27150
27149
|
function handleDateMouseenter() {
|
|
27151
27150
|
if (enterTimer) return;
|
|
27152
27151
|
enterTimer = setTimeout(() => {
|
|
@@ -27255,11 +27254,13 @@ ${$(r2)}`), n2;
|
|
|
27255
27254
|
content: __WEBPACK_EXTERNAL_MODULE_vue__.withCtx(() => [
|
|
27256
27255
|
__WEBPACK_EXTERNAL_MODULE_vue__.createVNode(_sfc_main$1, {
|
|
27257
27256
|
"default-date": dateDetail.value,
|
|
27257
|
+
"max-duration": _ctx.maxDuration,
|
|
27258
|
+
"min-duration": _ctx.minDuration,
|
|
27258
27259
|
"need-timezone": _ctx.needTimezone,
|
|
27259
27260
|
timezone: timezoneInfo.value.label,
|
|
27260
27261
|
onChange: handleChange,
|
|
27261
27262
|
"onUpdate:timezone": handleTimezoneChange
|
|
27262
|
-
}, null, 8, ["default-date", "need-timezone", "timezone"])
|
|
27263
|
+
}, null, 8, ["default-date", "max-duration", "min-duration", "need-timezone", "timezone"])
|
|
27263
27264
|
]),
|
|
27264
27265
|
default: __WEBPACK_EXTERNAL_MODULE_vue__.withCtx(() => {
|
|
27265
27266
|
var _a, _b, _c, _d;
|
package/vue3/index.es.min.js
CHANGED
|
@@ -3947,17 +3947,16 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3947
3947
|
recentUseList.value = [];
|
|
3948
3948
|
localStorage.removeItem(storeKey2.value);
|
|
3949
3949
|
};
|
|
3950
|
-
const handleShowDisableMsg = (e) => {
|
|
3951
|
-
if (
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
}
|
|
3950
|
+
const handleShowDisableMsg = (e, date) => {
|
|
3951
|
+
if (validateDateRange(date)) return;
|
|
3952
|
+
popoverInstance = $bkPopover({
|
|
3953
|
+
content: validMsg.value,
|
|
3954
|
+
immediate: false,
|
|
3955
|
+
isShow: true,
|
|
3956
|
+
popoverDelay: 0,
|
|
3957
|
+
target: e.target,
|
|
3958
|
+
trigger: "manual"
|
|
3959
|
+
});
|
|
3961
3960
|
popoverInstance == null ? void 0 : popoverInstance.show(e.target);
|
|
3962
3961
|
};
|
|
3963
3962
|
const handleHideDisableMsg = () => {
|
|
@@ -3986,7 +3985,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3986
3985
|
}),
|
|
3987
3986
|
key: index,
|
|
3988
3987
|
onClick: ($event) => unref(validateDateRange)(date) && handleChange(date.dateValue),
|
|
3989
|
-
onMouseenter: (
|
|
3988
|
+
onMouseenter: (e) => handleShowDisableMsg(e, date),
|
|
3990
3989
|
onMouseleave: handleHideDisableMsg
|
|
3991
3990
|
}, toDisplayString(date.toDisplayString()), 43, _hoisted_3$1);
|
|
3992
3991
|
}),
|
|
@@ -4173,18 +4172,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4173
4172
|
const storeKey2 = computed(() => getStoreKey(props.version));
|
|
4174
4173
|
const datePanelShow = ref(false);
|
|
4175
4174
|
const tooltipsShow = ref(false);
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
(v) => {
|
|
4179
|
-
var _a, _b;
|
|
4180
|
-
if (((_b = (_a = dateDetail.value) == null ? void 0 : _a.dateValue) == null ? void 0 : _b.length) && dateDetail.value.dateValue.every((item, index) => item === (v == null ? void 0 : v[index])))
|
|
4181
|
-
return;
|
|
4182
|
-
dateDetail.value = new DateRange(v, format.value, timezoneInfo.value.label);
|
|
4183
|
-
},
|
|
4184
|
-
{
|
|
4185
|
-
immediate: true
|
|
4186
|
-
}
|
|
4187
|
-
);
|
|
4175
|
+
let enterTimer;
|
|
4176
|
+
let leaveTimer;
|
|
4188
4177
|
const commonDateUseList = computed(() => {
|
|
4189
4178
|
var _a;
|
|
4190
4179
|
return ((_a = props.commonUseList) == null ? void 0 : _a.length) ? props.commonUseList : commonDateList;
|
|
@@ -4200,6 +4189,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4200
4189
|
}
|
|
4201
4190
|
return (_a = dateDetail.value) == null ? void 0 : _a.toDisplayString();
|
|
4202
4191
|
});
|
|
4192
|
+
watch(
|
|
4193
|
+
() => props.modelValue,
|
|
4194
|
+
(v) => {
|
|
4195
|
+
var _a, _b;
|
|
4196
|
+
if (((_b = (_a = dateDetail.value) == null ? void 0 : _a.dateValue) == null ? void 0 : _b.length) && dateDetail.value.dateValue.every((item, index) => item === (v == null ? void 0 : v[index])))
|
|
4197
|
+
return;
|
|
4198
|
+
dateDetail.value = new DateRange(v, format.value, timezoneInfo.value.label);
|
|
4199
|
+
},
|
|
4200
|
+
{
|
|
4201
|
+
immediate: true
|
|
4202
|
+
}
|
|
4203
|
+
);
|
|
4203
4204
|
useDatePickerProvider({
|
|
4204
4205
|
commonUseList: commonDateUseList,
|
|
4205
4206
|
format,
|
|
@@ -4208,15 +4209,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4208
4209
|
timezoneInfo,
|
|
4209
4210
|
version: computed(() => props.version),
|
|
4210
4211
|
validateTimeRange: computed(() => props.validDateRange),
|
|
4211
|
-
minDuration:
|
|
4212
|
-
maxDuration:
|
|
4212
|
+
minDuration: computed(() => props.minDuration),
|
|
4213
|
+
maxDuration: computed(() => props.maxDuration)
|
|
4213
4214
|
});
|
|
4214
4215
|
onBeforeUnmount(() => {
|
|
4215
4216
|
tooltipsShow.value = false;
|
|
4216
4217
|
datePanelShow.value = false;
|
|
4217
4218
|
});
|
|
4218
|
-
let enterTimer;
|
|
4219
|
-
let leaveTimer;
|
|
4220
4219
|
function handleDateMouseenter() {
|
|
4221
4220
|
if (enterTimer) return;
|
|
4222
4221
|
enterTimer = setTimeout(() => {
|
|
@@ -4325,11 +4324,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4325
4324
|
content: withCtx(() => [
|
|
4326
4325
|
createVNode(_sfc_main$1, {
|
|
4327
4326
|
"default-date": dateDetail.value,
|
|
4327
|
+
"max-duration": _ctx.maxDuration,
|
|
4328
|
+
"min-duration": _ctx.minDuration,
|
|
4328
4329
|
"need-timezone": _ctx.needTimezone,
|
|
4329
4330
|
timezone: timezoneInfo.value.label,
|
|
4330
4331
|
onChange: handleChange,
|
|
4331
4332
|
"onUpdate:timezone": handleTimezoneChange
|
|
4332
|
-
}, null, 8, ["default-date", "need-timezone", "timezone"])
|
|
4333
|
+
}, null, 8, ["default-date", "max-duration", "min-duration", "need-timezone", "timezone"])
|
|
4333
4334
|
]),
|
|
4334
4335
|
default: withCtx(() => {
|
|
4335
4336
|
var _a, _b, _c, _d;
|
package/vue3/index.iife.min.js
CHANGED
|
@@ -27483,17 +27483,16 @@ ${$(r2)}`), n2;
|
|
|
27483
27483
|
recentUseList.value = [];
|
|
27484
27484
|
localStorage.removeItem(storeKey2.value);
|
|
27485
27485
|
};
|
|
27486
|
-
const handleShowDisableMsg = (e) => {
|
|
27487
|
-
if (
|
|
27488
|
-
|
|
27489
|
-
|
|
27490
|
-
|
|
27491
|
-
|
|
27492
|
-
|
|
27493
|
-
|
|
27494
|
-
|
|
27495
|
-
|
|
27496
|
-
}
|
|
27486
|
+
const handleShowDisableMsg = (e, date) => {
|
|
27487
|
+
if (validateDateRange(date)) return;
|
|
27488
|
+
popoverInstance = __webpack_exports__default$8({
|
|
27489
|
+
content: validMsg.value,
|
|
27490
|
+
immediate: false,
|
|
27491
|
+
isShow: true,
|
|
27492
|
+
popoverDelay: 0,
|
|
27493
|
+
target: e.target,
|
|
27494
|
+
trigger: "manual"
|
|
27495
|
+
});
|
|
27497
27496
|
popoverInstance == null ? void 0 : popoverInstance.show(e.target);
|
|
27498
27497
|
};
|
|
27499
27498
|
const handleHideDisableMsg = () => {
|
|
@@ -27522,7 +27521,7 @@ ${$(r2)}`), n2;
|
|
|
27522
27521
|
}),
|
|
27523
27522
|
key: index,
|
|
27524
27523
|
onClick: ($event) => __WEBPACK_EXTERNAL_MODULE_vue__.unref(validateDateRange)(date) && handleChange(date.dateValue),
|
|
27525
|
-
onMouseenter: (
|
|
27524
|
+
onMouseenter: (e) => handleShowDisableMsg(e, date),
|
|
27526
27525
|
onMouseleave: handleHideDisableMsg
|
|
27527
27526
|
}, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString(date.toDisplayString()), 43, _hoisted_3$1);
|
|
27528
27527
|
}),
|
|
@@ -27709,18 +27708,8 @@ ${$(r2)}`), n2;
|
|
|
27709
27708
|
const storeKey2 = __WEBPACK_EXTERNAL_MODULE_vue__.computed(() => getStoreKey(props2.version));
|
|
27710
27709
|
const datePanelShow = __WEBPACK_EXTERNAL_MODULE_vue__.ref(false);
|
|
27711
27710
|
const tooltipsShow = __WEBPACK_EXTERNAL_MODULE_vue__.ref(false);
|
|
27712
|
-
|
|
27713
|
-
|
|
27714
|
-
(v2) => {
|
|
27715
|
-
var _a, _b;
|
|
27716
|
-
if (((_b = (_a = dateDetail.value) == null ? void 0 : _a.dateValue) == null ? void 0 : _b.length) && dateDetail.value.dateValue.every((item, index) => item === (v2 == null ? void 0 : v2[index])))
|
|
27717
|
-
return;
|
|
27718
|
-
dateDetail.value = new DateRange(v2, format.value, timezoneInfo.value.label);
|
|
27719
|
-
},
|
|
27720
|
-
{
|
|
27721
|
-
immediate: true
|
|
27722
|
-
}
|
|
27723
|
-
);
|
|
27711
|
+
let enterTimer;
|
|
27712
|
+
let leaveTimer;
|
|
27724
27713
|
const commonDateUseList = __WEBPACK_EXTERNAL_MODULE_vue__.computed(() => {
|
|
27725
27714
|
var _a;
|
|
27726
27715
|
return ((_a = props2.commonUseList) == null ? void 0 : _a.length) ? props2.commonUseList : commonDateList;
|
|
@@ -27736,6 +27725,18 @@ ${$(r2)}`), n2;
|
|
|
27736
27725
|
}
|
|
27737
27726
|
return (_a = dateDetail.value) == null ? void 0 : _a.toDisplayString();
|
|
27738
27727
|
});
|
|
27728
|
+
__WEBPACK_EXTERNAL_MODULE_vue__.watch(
|
|
27729
|
+
() => props2.modelValue,
|
|
27730
|
+
(v2) => {
|
|
27731
|
+
var _a, _b;
|
|
27732
|
+
if (((_b = (_a = dateDetail.value) == null ? void 0 : _a.dateValue) == null ? void 0 : _b.length) && dateDetail.value.dateValue.every((item, index) => item === (v2 == null ? void 0 : v2[index])))
|
|
27733
|
+
return;
|
|
27734
|
+
dateDetail.value = new DateRange(v2, format.value, timezoneInfo.value.label);
|
|
27735
|
+
},
|
|
27736
|
+
{
|
|
27737
|
+
immediate: true
|
|
27738
|
+
}
|
|
27739
|
+
);
|
|
27739
27740
|
useDatePickerProvider({
|
|
27740
27741
|
commonUseList: commonDateUseList,
|
|
27741
27742
|
format,
|
|
@@ -27744,15 +27745,13 @@ ${$(r2)}`), n2;
|
|
|
27744
27745
|
timezoneInfo,
|
|
27745
27746
|
version: __WEBPACK_EXTERNAL_MODULE_vue__.computed(() => props2.version),
|
|
27746
27747
|
validateTimeRange: __WEBPACK_EXTERNAL_MODULE_vue__.computed(() => props2.validDateRange),
|
|
27747
|
-
minDuration: __WEBPACK_EXTERNAL_MODULE_vue__.
|
|
27748
|
-
maxDuration: __WEBPACK_EXTERNAL_MODULE_vue__.
|
|
27748
|
+
minDuration: __WEBPACK_EXTERNAL_MODULE_vue__.computed(() => props2.minDuration),
|
|
27749
|
+
maxDuration: __WEBPACK_EXTERNAL_MODULE_vue__.computed(() => props2.maxDuration)
|
|
27749
27750
|
});
|
|
27750
27751
|
__WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount(() => {
|
|
27751
27752
|
tooltipsShow.value = false;
|
|
27752
27753
|
datePanelShow.value = false;
|
|
27753
27754
|
});
|
|
27754
|
-
let enterTimer;
|
|
27755
|
-
let leaveTimer;
|
|
27756
27755
|
function handleDateMouseenter() {
|
|
27757
27756
|
if (enterTimer) return;
|
|
27758
27757
|
enterTimer = setTimeout(() => {
|
|
@@ -27861,11 +27860,13 @@ ${$(r2)}`), n2;
|
|
|
27861
27860
|
content: __WEBPACK_EXTERNAL_MODULE_vue__.withCtx(() => [
|
|
27862
27861
|
__WEBPACK_EXTERNAL_MODULE_vue__.createVNode(_sfc_main$1, {
|
|
27863
27862
|
"default-date": dateDetail.value,
|
|
27863
|
+
"max-duration": _ctx.maxDuration,
|
|
27864
|
+
"min-duration": _ctx.minDuration,
|
|
27864
27865
|
"need-timezone": _ctx.needTimezone,
|
|
27865
27866
|
timezone: timezoneInfo.value.label,
|
|
27866
27867
|
onChange: handleChange,
|
|
27867
27868
|
"onUpdate:timezone": handleTimezoneChange
|
|
27868
|
-
}, null, 8, ["default-date", "need-timezone", "timezone"])
|
|
27869
|
+
}, null, 8, ["default-date", "max-duration", "min-duration", "need-timezone", "timezone"])
|
|
27869
27870
|
]),
|
|
27870
27871
|
default: __WEBPACK_EXTERNAL_MODULE_vue__.withCtx(() => {
|
|
27871
27872
|
var _a, _b, _c, _d;
|
package/vue3/index.umd.min.js
CHANGED
|
@@ -3943,17 +3943,16 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
3943
3943
|
recentUseList.value = [];
|
|
3944
3944
|
localStorage.removeItem(storeKey2.value);
|
|
3945
3945
|
};
|
|
3946
|
-
const handleShowDisableMsg = (e) => {
|
|
3947
|
-
if (
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
}
|
|
3946
|
+
const handleShowDisableMsg = (e, date) => {
|
|
3947
|
+
if (validateDateRange(date)) return;
|
|
3948
|
+
popoverInstance = bkuiVue.$bkPopover({
|
|
3949
|
+
content: validMsg.value,
|
|
3950
|
+
immediate: false,
|
|
3951
|
+
isShow: true,
|
|
3952
|
+
popoverDelay: 0,
|
|
3953
|
+
target: e.target,
|
|
3954
|
+
trigger: "manual"
|
|
3955
|
+
});
|
|
3957
3956
|
popoverInstance == null ? void 0 : popoverInstance.show(e.target);
|
|
3958
3957
|
};
|
|
3959
3958
|
const handleHideDisableMsg = () => {
|
|
@@ -3982,7 +3981,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
3982
3981
|
}),
|
|
3983
3982
|
key: index,
|
|
3984
3983
|
onClick: ($event) => vue.unref(validateDateRange)(date) && handleChange(date.dateValue),
|
|
3985
|
-
onMouseenter: (
|
|
3984
|
+
onMouseenter: (e) => handleShowDisableMsg(e, date),
|
|
3986
3985
|
onMouseleave: handleHideDisableMsg
|
|
3987
3986
|
}, vue.toDisplayString(date.toDisplayString()), 43, _hoisted_3$1);
|
|
3988
3987
|
}),
|
|
@@ -4169,18 +4168,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
4169
4168
|
const storeKey2 = vue.computed(() => getStoreKey(props.version));
|
|
4170
4169
|
const datePanelShow = vue.ref(false);
|
|
4171
4170
|
const tooltipsShow = vue.ref(false);
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
(v) => {
|
|
4175
|
-
var _a, _b;
|
|
4176
|
-
if (((_b = (_a = dateDetail.value) == null ? void 0 : _a.dateValue) == null ? void 0 : _b.length) && dateDetail.value.dateValue.every((item, index) => item === (v == null ? void 0 : v[index])))
|
|
4177
|
-
return;
|
|
4178
|
-
dateDetail.value = new DateRange(v, format.value, timezoneInfo.value.label);
|
|
4179
|
-
},
|
|
4180
|
-
{
|
|
4181
|
-
immediate: true
|
|
4182
|
-
}
|
|
4183
|
-
);
|
|
4171
|
+
let enterTimer;
|
|
4172
|
+
let leaveTimer;
|
|
4184
4173
|
const commonDateUseList = vue.computed(() => {
|
|
4185
4174
|
var _a;
|
|
4186
4175
|
return ((_a = props.commonUseList) == null ? void 0 : _a.length) ? props.commonUseList : commonDateList;
|
|
@@ -4196,6 +4185,18 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
4196
4185
|
}
|
|
4197
4186
|
return (_a = dateDetail.value) == null ? void 0 : _a.toDisplayString();
|
|
4198
4187
|
});
|
|
4188
|
+
vue.watch(
|
|
4189
|
+
() => props.modelValue,
|
|
4190
|
+
(v) => {
|
|
4191
|
+
var _a, _b;
|
|
4192
|
+
if (((_b = (_a = dateDetail.value) == null ? void 0 : _a.dateValue) == null ? void 0 : _b.length) && dateDetail.value.dateValue.every((item, index) => item === (v == null ? void 0 : v[index])))
|
|
4193
|
+
return;
|
|
4194
|
+
dateDetail.value = new DateRange(v, format.value, timezoneInfo.value.label);
|
|
4195
|
+
},
|
|
4196
|
+
{
|
|
4197
|
+
immediate: true
|
|
4198
|
+
}
|
|
4199
|
+
);
|
|
4199
4200
|
useDatePickerProvider({
|
|
4200
4201
|
commonUseList: commonDateUseList,
|
|
4201
4202
|
format,
|
|
@@ -4204,15 +4205,13 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
4204
4205
|
timezoneInfo,
|
|
4205
4206
|
version: vue.computed(() => props.version),
|
|
4206
4207
|
validateTimeRange: vue.computed(() => props.validDateRange),
|
|
4207
|
-
minDuration: vue.
|
|
4208
|
-
maxDuration: vue.
|
|
4208
|
+
minDuration: vue.computed(() => props.minDuration),
|
|
4209
|
+
maxDuration: vue.computed(() => props.maxDuration)
|
|
4209
4210
|
});
|
|
4210
4211
|
vue.onBeforeUnmount(() => {
|
|
4211
4212
|
tooltipsShow.value = false;
|
|
4212
4213
|
datePanelShow.value = false;
|
|
4213
4214
|
});
|
|
4214
|
-
let enterTimer;
|
|
4215
|
-
let leaveTimer;
|
|
4216
4215
|
function handleDateMouseenter() {
|
|
4217
4216
|
if (enterTimer) return;
|
|
4218
4217
|
enterTimer = setTimeout(() => {
|
|
@@ -4321,11 +4320,13 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
4321
4320
|
content: vue.withCtx(() => [
|
|
4322
4321
|
vue.createVNode(_sfc_main$1, {
|
|
4323
4322
|
"default-date": dateDetail.value,
|
|
4323
|
+
"max-duration": _ctx.maxDuration,
|
|
4324
|
+
"min-duration": _ctx.minDuration,
|
|
4324
4325
|
"need-timezone": _ctx.needTimezone,
|
|
4325
4326
|
timezone: timezoneInfo.value.label,
|
|
4326
4327
|
onChange: handleChange,
|
|
4327
4328
|
"onUpdate:timezone": handleTimezoneChange
|
|
4328
|
-
}, null, 8, ["default-date", "need-timezone", "timezone"])
|
|
4329
|
+
}, null, 8, ["default-date", "max-duration", "min-duration", "need-timezone", "timezone"])
|
|
4329
4330
|
]),
|
|
4330
4331
|
default: vue.withCtx(() => {
|
|
4331
4332
|
var _a, _b, _c, _d;
|