bkui-vue 0.0.1-beta.79 → 0.0.1-beta.81

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.esm.js CHANGED
@@ -19438,6 +19438,7 @@ var DatePanel = defineComponent({
19438
19438
  props: datePanelProps,
19439
19439
  emits: ["pick", "pick-success", "pick-clear"],
19440
19440
  setup(props, {
19441
+ slots,
19441
19442
  emit
19442
19443
  }) {
19443
19444
  const getTableType = (currentView) => currentView.match(/^time/) ? "time-picker" : `${currentView}-table`;
@@ -19542,6 +19543,7 @@ var DatePanel = defineComponent({
19542
19543
  const handleToggleTime = () => {
19543
19544
  state.currentView = state.currentView === "time" ? "date" : "time";
19544
19545
  };
19546
+ const hasShortcuts = computed(() => !!slots.shortcuts);
19545
19547
  return __spreadProps(__spreadValues({}, toRefs(state)), {
19546
19548
  panelPickerHandlers,
19547
19549
  datePanelLabel,
@@ -19552,6 +19554,7 @@ var DatePanel = defineComponent({
19552
19554
  changeMonth,
19553
19555
  reset: reset2,
19554
19556
  isTime,
19557
+ hasShortcuts,
19555
19558
  onToggleVisibility,
19556
19559
  handleToggleTime,
19557
19560
  handlePickSuccess,
@@ -19559,8 +19562,9 @@ var DatePanel = defineComponent({
19559
19562
  });
19560
19563
  },
19561
19564
  render() {
19565
+ var _a, _b, _c;
19562
19566
  return createVNode("div", {
19563
- "class": ["bk-picker-panel-body-wrapper", this.shortcuts.length ? "bk-picker-panel-with-sidebar" : ""],
19567
+ "class": ["bk-picker-panel-body-wrapper", this.shortcuts.length || this.hasShortcuts ? "bk-picker-panel-with-sidebar" : ""],
19564
19568
  "onMousedown": (e) => {
19565
19569
  e.preventDefault();
19566
19570
  }
@@ -19635,7 +19639,9 @@ var DatePanel = defineComponent({
19635
19639
  "onPick-toggle-time": this.handleToggleTime,
19636
19640
  "onPick-clear": this.handlePickClear,
19637
19641
  "onPick-success": this.handlePickSuccess
19638
- }, null) : ""])]);
19642
+ }, null) : ""]), this.hasShortcuts ? createVNode("div", {
19643
+ "class": "bk-picker-panel-sidebar"
19644
+ }, [(_c = (_b = (_a = this.$slots).shortcuts) == null ? void 0 : _b.call(_a)) != null ? _c : null]) : null]);
19639
19645
  }
19640
19646
  });
19641
19647
  const dateRangePanelProps = {
@@ -19706,6 +19712,7 @@ var DateRangePanel = defineComponent({
19706
19712
  props: dateRangePanelProps,
19707
19713
  emits: ["pick"],
19708
19714
  setup(props, {
19715
+ slots,
19709
19716
  emit
19710
19717
  }) {
19711
19718
  const [minDate, maxDate] = props.modelValue.map((date) => date || initTime());
@@ -19881,8 +19888,10 @@ var DateRangePanel = defineComponent({
19881
19888
  left: preSelecting.value.left ? handlePreSelection.bind("left") : handleRangePick,
19882
19889
  right: preSelecting.value.right ? handlePreSelection.bind("right") : handleRangePick
19883
19890
  }));
19891
+ const hasShortcuts = computed(() => !!slots.shortcuts);
19884
19892
  return __spreadProps(__spreadValues({}, toRefs(state)), {
19885
19893
  isTime,
19894
+ hasShortcuts,
19886
19895
  prevYear,
19887
19896
  nextYear,
19888
19897
  prevMonth,
@@ -19904,6 +19913,7 @@ var DateRangePanel = defineComponent({
19904
19913
  });
19905
19914
  },
19906
19915
  render() {
19916
+ var _a, _b, _c;
19907
19917
  return createVNode("div", {
19908
19918
  "class": ["bk-picker-panel-body-wrapper", "bk-date-picker-with-range", this.shortcuts.length || this.$slots.shortcuts ? "bk-picker-panel-with-sidebar" : ""],
19909
19919
  "onMousedown": (e) => {
@@ -20039,7 +20049,9 @@ var DateRangePanel = defineComponent({
20039
20049
  default:
20040
20050
  return null;
20041
20051
  }
20042
- })() : ""]), [[vShow, !this.isTime]])])]);
20052
+ })() : ""]), [[vShow, !this.isTime]])]), this.hasShortcuts ? createVNode("div", {
20053
+ "class": "bk-picker-panel-sidebar"
20054
+ }, [(_c = (_b = (_a = this.$slots).shortcuts) == null ? void 0 : _b.call(_a)) != null ? _c : null]) : null]);
20043
20055
  }
20044
20056
  });
20045
20057
  const datePickerProps = {
@@ -20272,6 +20284,7 @@ var Component$5 = defineComponent({
20272
20284
  const isConfirm = computed(() => !!slots.trigger || props.type === "datetime" || props.type === "datetimerange" || props.multiple);
20273
20285
  const hasHeader = computed(() => !!slots.header);
20274
20286
  const hasFooter = computed(() => !!slots.footer);
20287
+ const hasShortcuts = computed(() => !!slots.shortcuts);
20275
20288
  const fontSizeCls = computed(() => {
20276
20289
  let cls = "";
20277
20290
  if (props.fontSize === "medium") {
@@ -20554,6 +20567,7 @@ var Component$5 = defineComponent({
20554
20567
  isConfirm,
20555
20568
  hasHeader,
20556
20569
  hasFooter,
20570
+ hasShortcuts,
20557
20571
  fontSizeCls,
20558
20572
  longWidthCls,
20559
20573
  localReadonly,
@@ -20647,6 +20661,12 @@ var Component$5 = defineComponent({
20647
20661
  "class": "bk-icon icon-close-circle-shape clear-action",
20648
20662
  "onClick": this.handleClear
20649
20663
  }, null) : ""]);
20664
+ const shortcutsSlot = this.hasShortcuts ? {
20665
+ shortcuts: () => {
20666
+ var _a2, _b2;
20667
+ return ((_b2 = (_a2 = this.$slots).shortcuts) == null ? void 0 : _b2.call(_a2)) || null;
20668
+ }
20669
+ } : {};
20650
20670
  return withDirectives(createVNode("div", {
20651
20671
  "class": ["bk-date-picker", this.type === "datetimerange" ? "long" : "", this.longWidthCls]
20652
20672
  }, [createVNode("div", {
@@ -20684,7 +20704,7 @@ var Component$5 = defineComponent({
20684
20704
  "focusedDate": this.focusedDate,
20685
20705
  "onPick": this.onPick,
20686
20706
  "onPick-success": this.onPickSuccess
20687
- }, null) : createVNode(DatePanel, {
20707
+ }, shortcutsSlot) : createVNode(DatePanel, {
20688
20708
  "ref": "pickerPanelRef",
20689
20709
  "clearable": this.clearable,
20690
20710
  "showTime": this.type === "datetime" || this.type === "datetimerange",
@@ -20700,7 +20720,7 @@ var Component$5 = defineComponent({
20700
20720
  "onPick": this.onPick,
20701
20721
  "onPick-clear": this.handleClear,
20702
20722
  "onPick-success": this.onPickSuccess
20703
- }, null), this.hasFooter ? createVNode("div", {
20723
+ }, shortcutsSlot), this.hasFooter ? createVNode("div", {
20704
20724
  "class": ["bk-date-picker-footer-wrapper", this.footerSlotCls]
20705
20725
  }, [(_f = (_e = (_d = this.$slots).footer) == null ? void 0 : _e.call(_d)) != null ? _f : null]) : null];
20706
20726
  }