@keyblade/pro-components 1.13.8-alpha.0 → 1.13.8-alpha.2

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.
@@ -1,7 +1,7 @@
1
1
  import o from "./pro-date-range-picker.vue2.js";
2
2
  /* empty css */
3
- import r from "../_virtual/_plugin-vue_export-helper.js";
4
- const _ = /* @__PURE__ */ r(o, [["__scopeId", "data-v-7db07ed0"]]);
3
+ import e from "../_virtual/_plugin-vue_export-helper.js";
4
+ const _ = /* @__PURE__ */ e(o, [["__scopeId", "data-v-960e2e33"]]);
5
5
  export {
6
6
  _ as default
7
7
  };
@@ -1,7 +1,7 @@
1
- import { defineComponent as R, ref as u, computed as y, resolveComponent as D, createElementBlock as N, openBlock as q, normalizeClass as H, createVNode as o, mergeProps as m, withCtx as c, createTextVNode as I, toDisplayString as L, nextTick as F } from "vue";
2
- import r from "dayjs";
1
+ import { defineComponent as R, ref as m, computed as h, resolveComponent as y, createElementBlock as w, openBlock as N, normalizeClass as q, createVNode as n, mergeProps as c, withCtx as f, createTextVNode as A, toDisplayString as H, nextTick as D } from "vue";
2
+ import o from "dayjs";
3
3
  import { range as p } from "./pro-date-range-picker.js";
4
- const M = "keyblade-pro-date-range-picker", w = /* @__PURE__ */ R({
4
+ const I = "keyblade-pro-date-range-picker", $ = /* @__PURE__ */ R({
5
5
  __name: "pro-date-range-picker",
6
6
  props: {
7
7
  modelValue: {},
@@ -16,102 +16,111 @@ const M = "keyblade-pro-date-range-picker", w = /* @__PURE__ */ R({
16
16
  datePickerProps: {}
17
17
  },
18
18
  emits: ["update:modelValue"],
19
- setup(P, { emit: g }) {
20
- const e = P, f = g, V = u(), b = u(), n = u(), k = y({
19
+ setup(F, { emit: g }) {
20
+ const e = F, V = g, k = m(), P = m(), i = m(), s = h({
21
21
  get: () => e.modelValue[e.startField],
22
22
  set: (t) => {
23
- f("update:modelValue", {
23
+ V("update:modelValue", {
24
24
  ...e.modelValue,
25
25
  [e.startField]: t
26
26
  });
27
27
  }
28
- }), h = y({
28
+ }), b = h({
29
29
  get: () => e.modelValue[e.endField],
30
30
  set: (t) => {
31
- f("update:modelValue", {
31
+ V("update:modelValue", {
32
32
  ...e.modelValue,
33
33
  [e.endField]: t
34
34
  });
35
35
  }
36
- }), v = (t) => e.modelValue[e.endField] ? r(t).isAfter(r(e.modelValue[e.endField])) : !1, S = (t) => e.modelValue[e.startField] ? (e.intraday && t.setDate(t.getDate() + 1), r(t).isBefore(r(e.modelValue[e.startField]))) : !1, C = (t) => {
36
+ }), v = (t) => {
37
+ var l;
38
+ if (!e.modelValue[e.endField]) return !1;
39
+ let a = o(e.modelValue[e.endField]);
40
+ return e.intraday && !((l = e.datePickerProps) != null && l.showTime) && (a = a.add(1, "day")), o(t).isAfter(a);
41
+ }, S = (t) => {
42
+ var d;
43
+ return e.modelValue[e.startField] ? (e.intraday && ((d = e.datePickerProps) != null && d.showTime) && t.setDate(t.getDate() + 1), o(t).isBefore(o(e.modelValue[e.startField]))) : !1;
44
+ }, C = (t) => {
37
45
  if (!e.modelValue[e.startField] || !t || !e.intraday) {
38
- n.value = {};
46
+ i.value = {};
39
47
  return;
40
48
  }
41
- const a = r(e.modelValue[e.startField]), i = r(t);
42
- if (!a.isSame(i, "day")) {
43
- n.value = {};
49
+ const a = o(e.modelValue[e.startField]), d = o(t);
50
+ if (!a.isSame(d, "day")) {
51
+ i.value = {};
44
52
  return;
45
53
  }
46
- const d = a.hour(), l = a.minute(), B = a.second();
47
- n.value = {
48
- disabledHours: () => p(0, d),
49
- disabledMinutes: (s) => s === d ? p(0, l) : [],
50
- disabledSeconds: (s, T) => s === d && T === l ? p(0, B) : []
54
+ const l = a.hour(), r = a.minute(), _ = a.second();
55
+ i.value = {
56
+ disabledHours: () => p(0, l),
57
+ disabledMinutes: (u) => u === l ? p(0, r) : [],
58
+ disabledSeconds: (u, B) => u === l && B === r ? p(0, _) : []
51
59
  };
52
- }, E = () => {
60
+ }, T = () => {
53
61
  setTimeout(() => {
54
- e.modelValue[e.startField] && !e.modelValue[e.endField] && F(() => {
55
- var a;
56
- const t = (a = b.value) == null ? void 0 : a.$el.parentElement.querySelector("input");
57
- t && t.click();
62
+ const t = e.modelValue[e.endField], a = e.modelValue[e.startField];
63
+ o(a).isAfter(o(t)) && (s.value = t), t && !a && D(() => {
64
+ var l;
65
+ const d = (l = P.value) == null ? void 0 : l.$el.parentElement.querySelector("input");
66
+ d && d.click();
58
67
  });
59
68
  });
60
- }, _ = () => {
69
+ }, E = () => {
61
70
  setTimeout(() => {
62
- e.modelValue[e.endField] && !e.modelValue[e.startField] && F(() => {
71
+ e.modelValue[e.endField] && !e.modelValue[e.startField] && D(() => {
63
72
  var a;
64
- const t = (a = V.value) == null ? void 0 : a.$el.parentElement.querySelector("input");
73
+ const t = (a = k.value) == null ? void 0 : a.$el.parentElement.querySelector("input");
65
74
  t && t.click();
66
75
  });
67
76
  });
68
77
  };
69
78
  return (t, a) => {
70
- const i = D("a-date-picker"), d = D("a-form-item");
71
- return q(), N("div", {
72
- class: H(M)
79
+ const d = y("a-date-picker"), l = y("a-form-item");
80
+ return N(), w("div", {
81
+ class: q(I)
73
82
  }, [
74
- o(d, m(t.formItemProps, {
83
+ n(l, c(t.formItemProps, {
75
84
  field: t.startField,
76
85
  "hide-label": t.hideLabel
77
86
  }), {
78
- default: c(() => [
79
- o(i, m({
87
+ default: f(() => [
88
+ n(d, c({
80
89
  ref_key: "startDatePickerRef",
81
- ref: V,
82
- modelValue: k.value,
83
- "onUpdate:modelValue": a[0] || (a[0] = (l) => k.value = l)
90
+ ref: k,
91
+ modelValue: s.value,
92
+ "onUpdate:modelValue": a[0] || (a[0] = (r) => s.value = r)
84
93
  }, t.datePickerProps, {
85
94
  placeholder: t.startPlaceholder,
86
- "disabled-date": (l) => v(l),
87
- onChange: E
95
+ "disabled-date": (r) => v(r),
96
+ onChange: T
88
97
  }), null, 16, ["modelValue", "placeholder", "disabled-date"])
89
98
  ]),
90
99
  _: 1
91
100
  }, 16, ["field", "hide-label"]),
92
- o(d, { "hide-label": "" }, {
93
- default: c(() => [
94
- I(L(t.separator), 1)
101
+ n(l, { "hide-label": "" }, {
102
+ default: f(() => [
103
+ A(H(t.separator), 1)
95
104
  ]),
96
105
  _: 1
97
106
  }),
98
- o(d, {
107
+ n(l, {
99
108
  field: t.endField,
100
109
  "hide-label": "",
101
110
  style: { "margin-right": "0px" }
102
111
  }, {
103
- default: c(() => [
104
- o(i, m({
112
+ default: f(() => [
113
+ n(d, c({
105
114
  ref_key: "endDatePickerRef",
106
- ref: b,
107
- modelValue: h.value,
108
- "onUpdate:modelValue": a[1] || (a[1] = (l) => h.value = l)
115
+ ref: P,
116
+ modelValue: b.value,
117
+ "onUpdate:modelValue": a[1] || (a[1] = (r) => b.value = r)
109
118
  }, t.datePickerProps, {
110
119
  placeholder: t.endPlaceholder,
111
- "disabled-date": (l) => S(l),
112
- "disabled-time": () => n.value,
120
+ "disabled-date": (r) => S(r),
121
+ "disabled-time": () => i.value,
113
122
  onSelect: C,
114
- onChange: _
123
+ onChange: E
115
124
  }), null, 16, ["modelValue", "placeholder", "disabled-date", "disabled-time"])
116
125
  ]),
117
126
  _: 1
@@ -121,5 +130,5 @@ const M = "keyblade-pro-date-range-picker", w = /* @__PURE__ */ R({
121
130
  }
122
131
  });
123
132
  export {
124
- w as default
133
+ $ as default
125
134
  };
package/es/style.css CHANGED
@@ -1 +1 @@
1
- .keyblade-pro-page-header{background:var(--color-bg-2);padding:16px 32px}.keyblade-pro-page-header .keyblade-pro-page-header-section-breadcrumb .arco-breadcrumb-item:first-child{padding-left:0}.keyblade-pro-page-header .keyblade-pro-page-header-title.arco-typography{padding-top:4px;margin-top:0}.keyblade-pro-layout{width:100%;height:100%}.keyblade-pro-layout .keyblade-pro-layout-header{position:fixed;top:0;left:0;width:100%;height:var(--4a477a1a);z-index:100;display:flex;align-items:center;justify-content:space-between;padding:0 20px;background-color:var(--color-bg-2);border-bottom:1px solid var(--color-border);transition:all .2s cubic-bezier(.34,.69,.1,1)}.keyblade-pro-layout .keyblade-pro-layout-header-left{cursor:pointer;display:flex;align-items:center}.keyblade-pro-layout .keyblade-pro-layout-header-left-logo-img{width:28px;height:28px}.keyblade-pro-layout .keyblade-pro-layout-header-left-logo-title.arco-typography{margin:0;font-size:18px}.keyblade-pro-layout .keyblade-pro-layout-header-center{flex:1}.keyblade-pro-layout .keyblade-pro-layout-sider{padding-top:var(--4a477a1a);position:fixed;top:0;left:0;z-index:99;height:100%;transition:all .2s cubic-bezier(.34,.69,.1,1)}.keyblade-pro-layout .keyblade-pro-layout-sider-content{position:relative;height:100%;overflow:auto}.keyblade-pro-layout .keyblade-pro-layout-sider-collapse-btn.arco-btn{position:absolute;right:12px;bottom:12px}.keyblade-pro-layout .keyblade-pro-layout-body{padding-top:var(--4a477a1a);padding-left:var(--3599ef93);min-height:100vh;overflow-y:hidden;background-color:var(--color-fill-2);transition:padding .2s cubic-bezier(.34,.69,.1,1)}.keyblade-pro-layout .keyblade-pro-layout-body-hide-sider{padding-left:0}.keyblade-pro-layout .keyblade-pro-layout-body-affix .arco-affix{z-index:98}.keyblade-pro-layout .keyblade-pro-layout-body-footer{display:flex;align-items:center;justify-content:center;height:40px;color:var(--color-text-2);text-align:center}.keyblade-pro-layout .keyblade-pro-layout-body-collapsed{padding-left:var(--5b478c92)}.keyblade-pro-layout-side .keyblade-pro-layout-header{z-index:98;left:var(--3599ef93);width:calc(100% - var(--3599ef93))}.keyblade-pro-layout-side .keyblade-pro-layout-header-collapsed{left:var(--5b478c92);width:calc(100% - var(--5b478c92))}.keyblade-pro-layout-side .keyblade-pro-layout-sider{padding-top:0}.keyblade-pro-layout-side .keyblade-pro-layout-sider-content-logo{position:relative;display:flex;align-items:center;padding:16px;cursor:pointer;transition:padding .3s cubic-bezier(.645,.045,.355,1)}.keyblade-pro-layout-side .keyblade-pro-layout-sider-content-logo-img{width:28px;height:28px}.keyblade-pro-layout-side .keyblade-pro-layout-sider-content-logo-title.arco-typography{margin:0;font-size:18px}.keyblade-pro-layout-side .keyblade-pro-layout-sider-collapsed .keyblade-pro-layout-sider-content-logo{padding:16px 10px}.keyblade-pro-menu .keyblade-pro-menu-item-img{width:14px;height:auto}.keyblade-pro-reuse-tabs{position:relative;background-color:var(--color-bg-2);padding:4px 20px}.keyblade-pro-page-container .keyblade-pro-page-container-content{padding:20px}.keyblade-pro-image-upload-cropper-dialog-cropper-wrapper[data-v-1bddf267]{width:100%;height:400px}.keyblade-pro-image-upload-cropper-dialog-operate[data-v-1bddf267]{margin-top:24px;display:flex;align-items:center;justify-content:center}.keyblade-pro-image-upload-cropper-dialog-footer[data-v-1bddf267]{margin-top:24px;display:flex;align-items:center;justify-content:flex-end}.keyblade-pro-image-upload-cropper-dialog-footer-left[data-v-1bddf267]{display:flex;align-items:center;justify-content:flex-start;margin-right:12px}.keyblade-pro-image-upload-cropper-dialog-footer-right[data-v-1bddf267]{flex:1;display:flex;align-items:center;justify-content:flex-end}.keyblade-pro-date-range-picker[data-v-7db07ed0]{display:flex;align-items:center}.keyblade-pro-date-range-picker[data-v-7db07ed0] .arco-form-item{margin-right:8px;margin-bottom:0}
1
+ .keyblade-pro-page-header{background:var(--color-bg-2);padding:16px 32px}.keyblade-pro-page-header .keyblade-pro-page-header-section-breadcrumb .arco-breadcrumb-item:first-child{padding-left:0}.keyblade-pro-page-header .keyblade-pro-page-header-title.arco-typography{padding-top:4px;margin-top:0}.keyblade-pro-layout{width:100%;height:100%}.keyblade-pro-layout .keyblade-pro-layout-header{position:fixed;top:0;left:0;width:100%;height:var(--4a477a1a);z-index:100;display:flex;align-items:center;justify-content:space-between;padding:0 20px;background-color:var(--color-bg-2);border-bottom:1px solid var(--color-border);transition:all .2s cubic-bezier(.34,.69,.1,1)}.keyblade-pro-layout .keyblade-pro-layout-header-left{cursor:pointer;display:flex;align-items:center}.keyblade-pro-layout .keyblade-pro-layout-header-left-logo-img{width:28px;height:28px}.keyblade-pro-layout .keyblade-pro-layout-header-left-logo-title.arco-typography{margin:0;font-size:18px}.keyblade-pro-layout .keyblade-pro-layout-header-center{flex:1}.keyblade-pro-layout .keyblade-pro-layout-sider{padding-top:var(--4a477a1a);position:fixed;top:0;left:0;z-index:99;height:100%;transition:all .2s cubic-bezier(.34,.69,.1,1)}.keyblade-pro-layout .keyblade-pro-layout-sider-content{position:relative;height:100%;overflow:auto}.keyblade-pro-layout .keyblade-pro-layout-sider-collapse-btn.arco-btn{position:absolute;right:12px;bottom:12px}.keyblade-pro-layout .keyblade-pro-layout-body{padding-top:var(--4a477a1a);padding-left:var(--3599ef93);min-height:100vh;overflow-y:hidden;background-color:var(--color-fill-2);transition:padding .2s cubic-bezier(.34,.69,.1,1)}.keyblade-pro-layout .keyblade-pro-layout-body-hide-sider{padding-left:0}.keyblade-pro-layout .keyblade-pro-layout-body-affix .arco-affix{z-index:98}.keyblade-pro-layout .keyblade-pro-layout-body-footer{display:flex;align-items:center;justify-content:center;height:40px;color:var(--color-text-2);text-align:center}.keyblade-pro-layout .keyblade-pro-layout-body-collapsed{padding-left:var(--5b478c92)}.keyblade-pro-layout-side .keyblade-pro-layout-header{z-index:98;left:var(--3599ef93);width:calc(100% - var(--3599ef93))}.keyblade-pro-layout-side .keyblade-pro-layout-header-collapsed{left:var(--5b478c92);width:calc(100% - var(--5b478c92))}.keyblade-pro-layout-side .keyblade-pro-layout-sider{padding-top:0}.keyblade-pro-layout-side .keyblade-pro-layout-sider-content-logo{position:relative;display:flex;align-items:center;padding:16px;cursor:pointer;transition:padding .3s cubic-bezier(.645,.045,.355,1)}.keyblade-pro-layout-side .keyblade-pro-layout-sider-content-logo-img{width:28px;height:28px}.keyblade-pro-layout-side .keyblade-pro-layout-sider-content-logo-title.arco-typography{margin:0;font-size:18px}.keyblade-pro-layout-side .keyblade-pro-layout-sider-collapsed .keyblade-pro-layout-sider-content-logo{padding:16px 10px}.keyblade-pro-menu .keyblade-pro-menu-item-img{width:14px;height:auto}.keyblade-pro-reuse-tabs{position:relative;background-color:var(--color-bg-2);padding:4px 20px}.keyblade-pro-page-container .keyblade-pro-page-container-content{padding:20px}.keyblade-pro-image-upload-cropper-dialog-cropper-wrapper[data-v-1bddf267]{width:100%;height:400px}.keyblade-pro-image-upload-cropper-dialog-operate[data-v-1bddf267]{margin-top:24px;display:flex;align-items:center;justify-content:center}.keyblade-pro-image-upload-cropper-dialog-footer[data-v-1bddf267]{margin-top:24px;display:flex;align-items:center;justify-content:flex-end}.keyblade-pro-image-upload-cropper-dialog-footer-left[data-v-1bddf267]{display:flex;align-items:center;justify-content:flex-start;margin-right:12px}.keyblade-pro-image-upload-cropper-dialog-footer-right[data-v-1bddf267]{flex:1;display:flex;align-items:center;justify-content:flex-end}.keyblade-pro-date-range-picker[data-v-960e2e33]{display:flex;align-items:center}.keyblade-pro-date-range-picker[data-v-960e2e33] .arco-form-item{margin-right:8px;margin-bottom:0}.keyblade-pro-date-range-picker[data-v-960e2e33] .arco-picker{background-color:var(--color-bg-1);border-color:var(--color-border-1)}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@keyblade/pro-components",
3
3
  "description": "KeyBlade Pro Components",
4
4
  "author": "yangshuai <704807396@qq.com>",
5
- "version": "1.13.8-alpha.0",
5
+ "version": "1.13.8-alpha.2",
6
6
  "private": false,
7
7
  "type": "module",
8
8
  "main": "es/index.js",