@blueking/date-picker 3.0.2 → 3.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blueking/date-picker",
3
- "version": "3.0.2",
3
+ "version": "3.0.3",
4
4
  "description": "蓝鲸监控平台日期时间选择",
5
5
  "license": "MIT",
6
6
  "author": "Tencent BlueKing",
@@ -28563,7 +28563,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
28563
28563
  });
28564
28564
  const props2 = __props;
28565
28565
  const emits = __emit;
28566
- const dateTooltipsRef = ref();
28567
28566
  const dateContentRef = ref();
28568
28567
  const format = ref(props2.format);
28569
28568
  const timezoneInfo = computed(() => {
@@ -28581,8 +28580,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
28581
28580
  const b2 = dayjs.tz(dayjs(), timezone).utcOffset();
28582
28581
  return (b2 - a2) / 60;
28583
28582
  });
28584
- const dateDetail = shallowRef(new DateRange(props2.modelValue, props2.format, props2.timezone));
28585
- const tooltipsDetail = shallowRef();
28583
+ const dateDetail = shallowRef(new DateRange(props2.modelValue, props2.format));
28584
+ const tooltipsDetail = shallowRef(new DateRange(dateDetail.value.dateValue, format.value));
28586
28585
  const storeKey2 = computed(() => getStoreKey(props2.version));
28587
28586
  const datePanelShow = ref(false);
28588
28587
  const tooltipsShow = ref(false);
@@ -28644,14 +28643,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
28644
28643
  tooltipsShow.value = false;
28645
28644
  datePanelShow.value = false;
28646
28645
  });
28646
+ watch([() => props2.modelValue, () => props2.format, () => props2.timezone], () => {
28647
+ tooltipsDetail.value = new DateRange(dateDetail.value.dateValue, format.value, timezoneInfo.value.label);
28648
+ });
28647
28649
  function handleDateMouseenter() {
28648
28650
  if (enterTimer) return;
28649
28651
  enterTimer = setTimeout(() => {
28650
28652
  tooltipsShow.value = true;
28651
- console.log("handleDateMouseenter", dateDetail.value, format.value, timezoneInfo.value.label);
28652
- tooltipsDetail.value = new DateRange(dateDetail.value.dateValue, format.value, timezoneInfo.value.label);
28653
28653
  enterTimer = null;
28654
- }, 300);
28654
+ }, 100);
28655
28655
  }
28656
28656
  function handleDateMouseleave() {
28657
28657
  if (leaveTimer) clearTimeout(leaveTimer);
@@ -28673,9 +28673,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
28673
28673
  const endDate = Array.isArray(item == null ? void 0 : item.id) ? item.id[1] : item[1];
28674
28674
  return startDate === start2 && endDate === end2;
28675
28675
  });
28676
- if (canStore && dateDetail.value.isValidate) {
28677
- setStoreDateList(val, storeKey2.value);
28678
- }
28676
+ !canStore && dateDetail.value.isValidate && setStoreDateList(val, storeKey2.value);
28679
28677
  };
28680
28678
  const handleTimezoneChange = (val, info) => {
28681
28679
  dateDetail.value = new DateRange(props2.modelValue, format.value, val);
@@ -28846,8 +28844,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
28846
28844
  createElementVNode(
28847
28845
  "div",
28848
28846
  {
28849
- ref_key: "dateTooltipsRef",
28850
- ref: dateTooltipsRef,
28847
+ ref: "dateTooltipsRef",
28851
28848
  class: "__date-tooltips__",
28852
28849
  style: normalizeStyle({ maxWidth: unref(lang) === "en" ? "210px" : "156px" })
28853
28850
  },
@@ -36166,7 +36166,6 @@ ${$(r2)}`), n2;
36166
36166
  });
36167
36167
  const props2 = __props;
36168
36168
  const emits = __emit;
36169
- const dateTooltipsRef = ref();
36170
36169
  const dateContentRef = ref();
36171
36170
  const format = ref(props2.format);
36172
36171
  const timezoneInfo = computed(() => {
@@ -36184,8 +36183,8 @@ ${$(r2)}`), n2;
36184
36183
  const b2 = dayjs.tz(dayjs(), timezone2).utcOffset();
36185
36184
  return (b2 - a2) / 60;
36186
36185
  });
36187
- const dateDetail = shallowRef(new DateRange(props2.modelValue, props2.format, props2.timezone));
36188
- const tooltipsDetail = shallowRef();
36186
+ const dateDetail = shallowRef(new DateRange(props2.modelValue, props2.format));
36187
+ const tooltipsDetail = shallowRef(new DateRange(dateDetail.value.dateValue, format.value));
36189
36188
  const storeKey2 = computed(() => getStoreKey(props2.version));
36190
36189
  const datePanelShow = ref(false);
36191
36190
  const tooltipsShow = ref(false);
@@ -36247,14 +36246,15 @@ ${$(r2)}`), n2;
36247
36246
  tooltipsShow.value = false;
36248
36247
  datePanelShow.value = false;
36249
36248
  });
36249
+ watch([() => props2.modelValue, () => props2.format, () => props2.timezone], () => {
36250
+ tooltipsDetail.value = new DateRange(dateDetail.value.dateValue, format.value, timezoneInfo.value.label);
36251
+ });
36250
36252
  function handleDateMouseenter() {
36251
36253
  if (enterTimer) return;
36252
36254
  enterTimer = setTimeout(() => {
36253
36255
  tooltipsShow.value = true;
36254
- console.log("handleDateMouseenter", dateDetail.value, format.value, timezoneInfo.value.label);
36255
- tooltipsDetail.value = new DateRange(dateDetail.value.dateValue, format.value, timezoneInfo.value.label);
36256
36256
  enterTimer = null;
36257
- }, 300);
36257
+ }, 100);
36258
36258
  }
36259
36259
  function handleDateMouseleave() {
36260
36260
  if (leaveTimer) clearTimeout(leaveTimer);
@@ -36276,9 +36276,7 @@ ${$(r2)}`), n2;
36276
36276
  const endDate = Array.isArray(item == null ? void 0 : item.id) ? item.id[1] : item[1];
36277
36277
  return startDate === start2 && endDate === end2;
36278
36278
  });
36279
- if (canStore && dateDetail.value.isValidate) {
36280
- setStoreDateList(val, storeKey2.value);
36281
- }
36279
+ !canStore && dateDetail.value.isValidate && setStoreDateList(val, storeKey2.value);
36282
36280
  };
36283
36281
  const handleTimezoneChange = (val, info) => {
36284
36282
  dateDetail.value = new DateRange(props2.modelValue, format.value, val);
@@ -36449,8 +36447,7 @@ ${$(r2)}`), n2;
36449
36447
  createBaseVNode(
36450
36448
  "div",
36451
36449
  {
36452
- ref_key: "dateTooltipsRef",
36453
- ref: dateTooltipsRef,
36450
+ ref: "dateTooltipsRef",
36454
36451
  class: "__date-tooltips__",
36455
36452
  style: normalizeStyle({ maxWidth: unref(lang) === "en" ? "210px" : "156px" })
36456
36453
  },
@@ -28578,7 +28578,6 @@ ${$(r2)}`), n2;
28578
28578
  });
28579
28579
  const props2 = __props;
28580
28580
  const emits = __emit;
28581
- const dateTooltipsRef = __WEBPACK_EXTERNAL_MODULE_vue__.ref();
28582
28581
  const dateContentRef = __WEBPACK_EXTERNAL_MODULE_vue__.ref();
28583
28582
  const format = __WEBPACK_EXTERNAL_MODULE_vue__.ref(props2.format);
28584
28583
  const timezoneInfo = __WEBPACK_EXTERNAL_MODULE_vue__.computed(() => {
@@ -28596,8 +28595,8 @@ ${$(r2)}`), n2;
28596
28595
  const b2 = dayjs.tz(dayjs(), timezone).utcOffset();
28597
28596
  return (b2 - a2) / 60;
28598
28597
  });
28599
- const dateDetail = __WEBPACK_EXTERNAL_MODULE_vue__.shallowRef(new DateRange(props2.modelValue, props2.format, props2.timezone));
28600
- const tooltipsDetail = __WEBPACK_EXTERNAL_MODULE_vue__.shallowRef();
28598
+ const dateDetail = __WEBPACK_EXTERNAL_MODULE_vue__.shallowRef(new DateRange(props2.modelValue, props2.format));
28599
+ const tooltipsDetail = __WEBPACK_EXTERNAL_MODULE_vue__.shallowRef(new DateRange(dateDetail.value.dateValue, format.value));
28601
28600
  const storeKey2 = __WEBPACK_EXTERNAL_MODULE_vue__.computed(() => getStoreKey(props2.version));
28602
28601
  const datePanelShow = __WEBPACK_EXTERNAL_MODULE_vue__.ref(false);
28603
28602
  const tooltipsShow = __WEBPACK_EXTERNAL_MODULE_vue__.ref(false);
@@ -28659,14 +28658,15 @@ ${$(r2)}`), n2;
28659
28658
  tooltipsShow.value = false;
28660
28659
  datePanelShow.value = false;
28661
28660
  });
28661
+ __WEBPACK_EXTERNAL_MODULE_vue__.watch([() => props2.modelValue, () => props2.format, () => props2.timezone], () => {
28662
+ tooltipsDetail.value = new DateRange(dateDetail.value.dateValue, format.value, timezoneInfo.value.label);
28663
+ });
28662
28664
  function handleDateMouseenter() {
28663
28665
  if (enterTimer) return;
28664
28666
  enterTimer = setTimeout(() => {
28665
28667
  tooltipsShow.value = true;
28666
- console.log("handleDateMouseenter", dateDetail.value, format.value, timezoneInfo.value.label);
28667
- tooltipsDetail.value = new DateRange(dateDetail.value.dateValue, format.value, timezoneInfo.value.label);
28668
28668
  enterTimer = null;
28669
- }, 300);
28669
+ }, 100);
28670
28670
  }
28671
28671
  function handleDateMouseleave() {
28672
28672
  if (leaveTimer) clearTimeout(leaveTimer);
@@ -28688,9 +28688,7 @@ ${$(r2)}`), n2;
28688
28688
  const endDate = Array.isArray(item == null ? void 0 : item.id) ? item.id[1] : item[1];
28689
28689
  return startDate === start2 && endDate === end2;
28690
28690
  });
28691
- if (canStore && dateDetail.value.isValidate) {
28692
- setStoreDateList(val, storeKey2.value);
28693
- }
28691
+ !canStore && dateDetail.value.isValidate && setStoreDateList(val, storeKey2.value);
28694
28692
  };
28695
28693
  const handleTimezoneChange = (val, info) => {
28696
28694
  dateDetail.value = new DateRange(props2.modelValue, format.value, val);
@@ -28861,8 +28859,7 @@ ${$(r2)}`), n2;
28861
28859
  __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode(
28862
28860
  "div",
28863
28861
  {
28864
- ref_key: "dateTooltipsRef",
28865
- ref: dateTooltipsRef,
28862
+ ref: "dateTooltipsRef",
28866
28863
  class: "__date-tooltips__",
28867
28864
  style: __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle({ maxWidth: __WEBPACK_EXTERNAL_MODULE_vue__.unref(lang) === "en" ? "210px" : "156px" })
28868
28865
  },
@@ -4181,7 +4181,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4181
4181
  });
4182
4182
  const props = __props;
4183
4183
  const emits = __emit;
4184
- const dateTooltipsRef = ref();
4185
4184
  const dateContentRef = ref();
4186
4185
  const format = ref(props.format);
4187
4186
  const timezoneInfo = computed(() => {
@@ -4199,8 +4198,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4199
4198
  const b = dayjs.tz(dayjs(), timezone).utcOffset();
4200
4199
  return (b - a) / 60;
4201
4200
  });
4202
- const dateDetail = shallowRef(new DateRange(props.modelValue, props.format, props.timezone));
4203
- const tooltipsDetail = shallowRef();
4201
+ const dateDetail = shallowRef(new DateRange(props.modelValue, props.format));
4202
+ const tooltipsDetail = shallowRef(new DateRange(dateDetail.value.dateValue, format.value));
4204
4203
  const storeKey2 = computed(() => getStoreKey(props.version));
4205
4204
  const datePanelShow = ref(false);
4206
4205
  const tooltipsShow = ref(false);
@@ -4262,14 +4261,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4262
4261
  tooltipsShow.value = false;
4263
4262
  datePanelShow.value = false;
4264
4263
  });
4264
+ watch([() => props.modelValue, () => props.format, () => props.timezone], () => {
4265
+ tooltipsDetail.value = new DateRange(dateDetail.value.dateValue, format.value, timezoneInfo.value.label);
4266
+ });
4265
4267
  function handleDateMouseenter() {
4266
4268
  if (enterTimer) return;
4267
4269
  enterTimer = setTimeout(() => {
4268
4270
  tooltipsShow.value = true;
4269
- console.log("handleDateMouseenter", dateDetail.value, format.value, timezoneInfo.value.label);
4270
- tooltipsDetail.value = new DateRange(dateDetail.value.dateValue, format.value, timezoneInfo.value.label);
4271
4271
  enterTimer = null;
4272
- }, 300);
4272
+ }, 100);
4273
4273
  }
4274
4274
  function handleDateMouseleave() {
4275
4275
  if (leaveTimer) clearTimeout(leaveTimer);
@@ -4291,9 +4291,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4291
4291
  const endDate = Array.isArray(item == null ? void 0 : item.id) ? item.id[1] : item[1];
4292
4292
  return startDate === start && endDate === end;
4293
4293
  });
4294
- if (canStore && dateDetail.value.isValidate) {
4295
- setStoreDateList(val, storeKey2.value);
4296
- }
4294
+ !canStore && dateDetail.value.isValidate && setStoreDateList(val, storeKey2.value);
4297
4295
  };
4298
4296
  const handleTimezoneChange = (val, info) => {
4299
4297
  dateDetail.value = new DateRange(props.modelValue, format.value, val);
@@ -4464,8 +4462,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4464
4462
  createElementVNode(
4465
4463
  "div",
4466
4464
  {
4467
- ref_key: "dateTooltipsRef",
4468
- ref: dateTooltipsRef,
4465
+ ref: "dateTooltipsRef",
4469
4466
  class: "__date-tooltips__",
4470
4467
  style: normalizeStyle({ maxWidth: unref(lang) === "en" ? "210px" : "156px" })
4471
4468
  },
@@ -29184,7 +29184,6 @@ ${$(r2)}`), n2;
29184
29184
  });
29185
29185
  const props2 = __props;
29186
29186
  const emits = __emit;
29187
- const dateTooltipsRef = __WEBPACK_EXTERNAL_MODULE_vue__.ref();
29188
29187
  const dateContentRef = __WEBPACK_EXTERNAL_MODULE_vue__.ref();
29189
29188
  const format = __WEBPACK_EXTERNAL_MODULE_vue__.ref(props2.format);
29190
29189
  const timezoneInfo = __WEBPACK_EXTERNAL_MODULE_vue__.computed(() => {
@@ -29202,8 +29201,8 @@ ${$(r2)}`), n2;
29202
29201
  const b2 = dayjs.tz(dayjs(), timezone2).utcOffset();
29203
29202
  return (b2 - a2) / 60;
29204
29203
  });
29205
- const dateDetail = __WEBPACK_EXTERNAL_MODULE_vue__.shallowRef(new DateRange(props2.modelValue, props2.format, props2.timezone));
29206
- const tooltipsDetail = __WEBPACK_EXTERNAL_MODULE_vue__.shallowRef();
29204
+ const dateDetail = __WEBPACK_EXTERNAL_MODULE_vue__.shallowRef(new DateRange(props2.modelValue, props2.format));
29205
+ const tooltipsDetail = __WEBPACK_EXTERNAL_MODULE_vue__.shallowRef(new DateRange(dateDetail.value.dateValue, format.value));
29207
29206
  const storeKey2 = __WEBPACK_EXTERNAL_MODULE_vue__.computed(() => getStoreKey(props2.version));
29208
29207
  const datePanelShow = __WEBPACK_EXTERNAL_MODULE_vue__.ref(false);
29209
29208
  const tooltipsShow = __WEBPACK_EXTERNAL_MODULE_vue__.ref(false);
@@ -29265,14 +29264,15 @@ ${$(r2)}`), n2;
29265
29264
  tooltipsShow.value = false;
29266
29265
  datePanelShow.value = false;
29267
29266
  });
29267
+ __WEBPACK_EXTERNAL_MODULE_vue__.watch([() => props2.modelValue, () => props2.format, () => props2.timezone], () => {
29268
+ tooltipsDetail.value = new DateRange(dateDetail.value.dateValue, format.value, timezoneInfo.value.label);
29269
+ });
29268
29270
  function handleDateMouseenter() {
29269
29271
  if (enterTimer) return;
29270
29272
  enterTimer = setTimeout(() => {
29271
29273
  tooltipsShow.value = true;
29272
- console.log("handleDateMouseenter", dateDetail.value, format.value, timezoneInfo.value.label);
29273
- tooltipsDetail.value = new DateRange(dateDetail.value.dateValue, format.value, timezoneInfo.value.label);
29274
29274
  enterTimer = null;
29275
- }, 300);
29275
+ }, 100);
29276
29276
  }
29277
29277
  function handleDateMouseleave() {
29278
29278
  if (leaveTimer) clearTimeout(leaveTimer);
@@ -29294,9 +29294,7 @@ ${$(r2)}`), n2;
29294
29294
  const endDate = Array.isArray(item == null ? void 0 : item.id) ? item.id[1] : item[1];
29295
29295
  return startDate === start2 && endDate === end2;
29296
29296
  });
29297
- if (canStore && dateDetail.value.isValidate) {
29298
- setStoreDateList(val, storeKey2.value);
29299
- }
29297
+ !canStore && dateDetail.value.isValidate && setStoreDateList(val, storeKey2.value);
29300
29298
  };
29301
29299
  const handleTimezoneChange = (val, info) => {
29302
29300
  dateDetail.value = new DateRange(props2.modelValue, format.value, val);
@@ -29467,8 +29465,7 @@ ${$(r2)}`), n2;
29467
29465
  __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode(
29468
29466
  "div",
29469
29467
  {
29470
- ref_key: "dateTooltipsRef",
29471
- ref: dateTooltipsRef,
29468
+ ref: "dateTooltipsRef",
29472
29469
  class: "__date-tooltips__",
29473
29470
  style: __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle({ maxWidth: __WEBPACK_EXTERNAL_MODULE_vue__.unref(lang) === "en" ? "210px" : "156px" })
29474
29471
  },
@@ -4177,7 +4177,6 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
4177
4177
  });
4178
4178
  const props = __props;
4179
4179
  const emits = __emit;
4180
- const dateTooltipsRef = vue.ref();
4181
4180
  const dateContentRef = vue.ref();
4182
4181
  const format = vue.ref(props.format);
4183
4182
  const timezoneInfo = vue.computed(() => {
@@ -4195,8 +4194,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
4195
4194
  const b = dayjs.tz(dayjs(), timezone).utcOffset();
4196
4195
  return (b - a) / 60;
4197
4196
  });
4198
- const dateDetail = vue.shallowRef(new DateRange(props.modelValue, props.format, props.timezone));
4199
- const tooltipsDetail = vue.shallowRef();
4197
+ const dateDetail = vue.shallowRef(new DateRange(props.modelValue, props.format));
4198
+ const tooltipsDetail = vue.shallowRef(new DateRange(dateDetail.value.dateValue, format.value));
4200
4199
  const storeKey2 = vue.computed(() => getStoreKey(props.version));
4201
4200
  const datePanelShow = vue.ref(false);
4202
4201
  const tooltipsShow = vue.ref(false);
@@ -4258,14 +4257,15 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
4258
4257
  tooltipsShow.value = false;
4259
4258
  datePanelShow.value = false;
4260
4259
  });
4260
+ vue.watch([() => props.modelValue, () => props.format, () => props.timezone], () => {
4261
+ tooltipsDetail.value = new DateRange(dateDetail.value.dateValue, format.value, timezoneInfo.value.label);
4262
+ });
4261
4263
  function handleDateMouseenter() {
4262
4264
  if (enterTimer) return;
4263
4265
  enterTimer = setTimeout(() => {
4264
4266
  tooltipsShow.value = true;
4265
- console.log("handleDateMouseenter", dateDetail.value, format.value, timezoneInfo.value.label);
4266
- tooltipsDetail.value = new DateRange(dateDetail.value.dateValue, format.value, timezoneInfo.value.label);
4267
4267
  enterTimer = null;
4268
- }, 300);
4268
+ }, 100);
4269
4269
  }
4270
4270
  function handleDateMouseleave() {
4271
4271
  if (leaveTimer) clearTimeout(leaveTimer);
@@ -4287,9 +4287,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
4287
4287
  const endDate = Array.isArray(item == null ? void 0 : item.id) ? item.id[1] : item[1];
4288
4288
  return startDate === start && endDate === end;
4289
4289
  });
4290
- if (canStore && dateDetail.value.isValidate) {
4291
- setStoreDateList(val, storeKey2.value);
4292
- }
4290
+ !canStore && dateDetail.value.isValidate && setStoreDateList(val, storeKey2.value);
4293
4291
  };
4294
4292
  const handleTimezoneChange = (val, info) => {
4295
4293
  dateDetail.value = new DateRange(props.modelValue, format.value, val);
@@ -4460,8 +4458,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
4460
4458
  vue.createElementVNode(
4461
4459
  "div",
4462
4460
  {
4463
- ref_key: "dateTooltipsRef",
4464
- ref: dateTooltipsRef,
4461
+ ref: "dateTooltipsRef",
4465
4462
  class: "__date-tooltips__",
4466
4463
  style: vue.normalizeStyle({ maxWidth: vue.unref(lang) === "en" ? "210px" : "156px" })
4467
4464
  },