straw-ui-vue 0.1.49 → 0.1.50
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.
|
@@ -50,10 +50,6 @@ export interface StDatePickerDesktopProps extends StPickerDateConstraintProps, S
|
|
|
50
50
|
triggerClass?: ClassValue;
|
|
51
51
|
/** 触发器样式 */
|
|
52
52
|
triggerStyle?: StyleValue;
|
|
53
|
-
/** 类名 */
|
|
54
|
-
class?: ClassValue;
|
|
55
|
-
/** 样式 */
|
|
56
|
-
style?: StyleValue;
|
|
57
53
|
}
|
|
58
54
|
|
|
59
55
|
/** StDatePickerDesktop 事件 */
|
package/dist/straw-ui.js
CHANGED
|
@@ -1399,7 +1399,10 @@ var [Bt, Vt] = x((e) => e), Ht = /* @__PURE__ */ F({
|
|
|
1399
1399
|
l.value = `${p} ${d}`, s.value = "bottom-left";
|
|
1400
1400
|
}, j = async () => {
|
|
1401
1401
|
if (await L(), !p.value || !m.value) return;
|
|
1402
|
-
let e =
|
|
1402
|
+
let e = {
|
|
1403
|
+
width: m.value.offsetWidth,
|
|
1404
|
+
height: m.value.offsetHeight
|
|
1405
|
+
}, { innerWidth: t, innerHeight: n } = window, i = S.value;
|
|
1403
1406
|
if (r.trigger === "contextmenu" && f.value) {
|
|
1404
1407
|
A(t, n, e, i), u.value = !0;
|
|
1405
1408
|
return;
|
|
@@ -12028,20 +12031,6 @@ var ps = /* @__PURE__ */ F({
|
|
|
12028
12031
|
Object,
|
|
12029
12032
|
Array
|
|
12030
12033
|
] },
|
|
12031
|
-
class: { type: [
|
|
12032
|
-
Boolean,
|
|
12033
|
-
null,
|
|
12034
|
-
String,
|
|
12035
|
-
Object,
|
|
12036
|
-
Array
|
|
12037
|
-
] },
|
|
12038
|
-
style: { type: [
|
|
12039
|
-
Boolean,
|
|
12040
|
-
null,
|
|
12041
|
-
String,
|
|
12042
|
-
Object,
|
|
12043
|
-
Array
|
|
12044
|
-
] },
|
|
12045
12034
|
minDate: { default: void 0 },
|
|
12046
12035
|
maxDate: { default: void 0 },
|
|
12047
12036
|
disabledDate: {
|
|
@@ -12101,107 +12090,109 @@ var ps = /* @__PURE__ */ F({
|
|
|
12101
12090
|
"visibleChange"
|
|
12102
12091
|
], ["update:modelValue"]),
|
|
12103
12092
|
setup(e, { expose: t, emit: n }) {
|
|
12104
|
-
let r =
|
|
12105
|
-
range: () =>
|
|
12106
|
-
separator: () =>
|
|
12107
|
-
startPlaceholder: () =>
|
|
12108
|
-
endPlaceholder: () =>
|
|
12109
|
-
value: () =>
|
|
12110
|
-
rangeValue: () =>
|
|
12111
|
-
describe: (e) => qa(e,
|
|
12112
|
-
clearable: () =>
|
|
12113
|
-
disabled: () =>
|
|
12114
|
-
beforeOpen:
|
|
12093
|
+
let r = K(), i = e, a = n, o = J(), s = q(e, "modelValue"), c = Y("triggerRef"), l = Y("panelRef"), u = V(null), d = V([null, null]), f = D(() => Ya(i.minDate ?? null)), m = D(() => Ya(i.maxDate ?? null)), h = D(() => i.placeholder), { visible: g, error: _, displayText: v, clearableVisible: y, open: b, close: x, handleVisibleChange: S } = fs({
|
|
12094
|
+
range: () => i.range,
|
|
12095
|
+
separator: () => i.separator,
|
|
12096
|
+
startPlaceholder: () => i.startPlaceholder,
|
|
12097
|
+
endPlaceholder: () => i.endPlaceholder,
|
|
12098
|
+
value: () => u.value,
|
|
12099
|
+
rangeValue: () => d.value,
|
|
12100
|
+
describe: (e) => qa(e, i.format),
|
|
12101
|
+
clearable: () => i.clearable,
|
|
12102
|
+
disabled: () => i.disabled,
|
|
12103
|
+
beforeOpen: N,
|
|
12115
12104
|
onOpened: () => {
|
|
12116
|
-
|
|
12105
|
+
l.value?.resetDraft(), l.value?.locateSelection(), c.value?.focus();
|
|
12117
12106
|
},
|
|
12118
|
-
onClosed:
|
|
12107
|
+
onClosed: N
|
|
12119
12108
|
});
|
|
12120
|
-
function S(e) {
|
|
12121
|
-
r.range ? o.value = e ? Co(e, r.valueFormat) : null : o.value = So(e, r.valueFormat), i("change", o.value);
|
|
12122
|
-
}
|
|
12123
12109
|
function C(e) {
|
|
12124
|
-
|
|
12110
|
+
i.range ? s.value = e ? Co(e, i.valueFormat) : null : s.value = So(e, i.valueFormat), a("change", s.value);
|
|
12125
12111
|
}
|
|
12126
12112
|
function w(e) {
|
|
12127
|
-
|
|
12128
|
-
u.value = t, t[0] && t[1] && S(t), b();
|
|
12113
|
+
u.value = e, C(e), x();
|
|
12129
12114
|
}
|
|
12130
12115
|
function T(e) {
|
|
12131
|
-
|
|
12116
|
+
let t = yo(e);
|
|
12117
|
+
d.value = t, t[0] && t[1] && C(t), x();
|
|
12132
12118
|
}
|
|
12133
|
-
function E() {
|
|
12134
|
-
|
|
12119
|
+
function E(e) {
|
|
12120
|
+
d.value = e;
|
|
12135
12121
|
}
|
|
12136
|
-
function ee(
|
|
12137
|
-
|
|
12122
|
+
function ee() {
|
|
12123
|
+
u.value = null, d.value = [null, null], s.value = null, _.value = !1, a("clear"), a("change", null), L(() => l.value?.resetDraft());
|
|
12138
12124
|
}
|
|
12139
12125
|
function k(e) {
|
|
12126
|
+
return !(f.value && eo(e, Qa(f.value)) < 0 || m.value && eo(e, Qa(m.value)) > 0 || i.disabledDate?.(e));
|
|
12127
|
+
}
|
|
12128
|
+
function A(e) {
|
|
12140
12129
|
let t = e.trim();
|
|
12141
12130
|
if (!t) {
|
|
12142
|
-
|
|
12131
|
+
ee();
|
|
12143
12132
|
return;
|
|
12144
12133
|
}
|
|
12145
|
-
if (
|
|
12146
|
-
let [e, n] = t.split(
|
|
12147
|
-
if (!
|
|
12148
|
-
|
|
12134
|
+
if (_.value = !1, i.range) {
|
|
12135
|
+
let [e, n] = t.split(i.separator), r = Ya(e ?? ""), a = Ya(n ?? "");
|
|
12136
|
+
if (!r || !a || !k(r) || !k(a)) {
|
|
12137
|
+
_.value = !0;
|
|
12149
12138
|
return;
|
|
12150
12139
|
}
|
|
12151
|
-
|
|
12140
|
+
T([r, a]);
|
|
12152
12141
|
return;
|
|
12153
12142
|
}
|
|
12154
12143
|
let n = Ya(t);
|
|
12155
|
-
!n || !
|
|
12144
|
+
!n || !k(n) ? _.value = !0 : (u.value = n, C(n), L(() => l.value?.resetDraft()));
|
|
12156
12145
|
}
|
|
12157
|
-
function
|
|
12158
|
-
|
|
12146
|
+
function j(e) {
|
|
12147
|
+
S(e), a("visibleChange", e);
|
|
12159
12148
|
}
|
|
12160
|
-
function
|
|
12161
|
-
|
|
12149
|
+
function N() {
|
|
12150
|
+
i.range ? d.value = Za(s.value) : u.value = Xa(s.value);
|
|
12162
12151
|
}
|
|
12163
|
-
return X(() =>
|
|
12152
|
+
return X(() => s.value, N, {
|
|
12164
12153
|
immediate: !0,
|
|
12165
12154
|
deep: !0
|
|
12166
12155
|
}), t({
|
|
12167
|
-
focus: () =>
|
|
12168
|
-
blur: () =>
|
|
12169
|
-
clear:
|
|
12170
|
-
open:
|
|
12171
|
-
close:
|
|
12156
|
+
focus: () => c.value?.focus(),
|
|
12157
|
+
blur: () => c.value?.blur(),
|
|
12158
|
+
clear: ee,
|
|
12159
|
+
open: b,
|
|
12160
|
+
close: x
|
|
12172
12161
|
}), (e, t) => (B(), O(Jt, {
|
|
12173
|
-
visible: G(
|
|
12174
|
-
"onUpdate:visible": t[0] ||= (e) => ie(
|
|
12175
|
-
"content-class":
|
|
12176
|
-
"content-style":
|
|
12177
|
-
disabled:
|
|
12162
|
+
visible: G(g),
|
|
12163
|
+
"onUpdate:visible": t[0] ||= (e) => ie(g) ? g.value = e : null,
|
|
12164
|
+
"content-class": i.popoverClass,
|
|
12165
|
+
"content-style": i.popoverStyle,
|
|
12166
|
+
disabled: i.disabled,
|
|
12178
12167
|
"show-arrow": !1,
|
|
12179
|
-
"trigger-class": G(p)("st-date-picker__trigger",
|
|
12168
|
+
"trigger-class": G(p)("st-date-picker__trigger", i.triggerClass),
|
|
12180
12169
|
placement: "bottom-left",
|
|
12181
12170
|
trigger: "click",
|
|
12182
|
-
onVisibleChange:
|
|
12171
|
+
onVisibleChange: j
|
|
12183
12172
|
}, {
|
|
12184
12173
|
trigger: Z(() => [P(Do, {
|
|
12185
12174
|
ref_key: "triggerRef",
|
|
12186
|
-
ref:
|
|
12187
|
-
|
|
12188
|
-
|
|
12175
|
+
ref: c,
|
|
12176
|
+
class: R(G(r).class),
|
|
12177
|
+
clearable: G(y),
|
|
12178
|
+
disabled: i.disabled,
|
|
12189
12179
|
editable: !0,
|
|
12190
|
-
error: G(
|
|
12191
|
-
"floating-label":
|
|
12192
|
-
icon:
|
|
12193
|
-
open: G(
|
|
12194
|
-
placeholder:
|
|
12195
|
-
size:
|
|
12196
|
-
style: z(
|
|
12197
|
-
text: G(
|
|
12198
|
-
onClear:
|
|
12199
|
-
onCommit:
|
|
12200
|
-
}, M({ _: 2 }, [
|
|
12180
|
+
error: G(_),
|
|
12181
|
+
"floating-label": i.floatingLabel,
|
|
12182
|
+
icon: i.icon,
|
|
12183
|
+
open: G(g),
|
|
12184
|
+
placeholder: h.value,
|
|
12185
|
+
size: i.size,
|
|
12186
|
+
style: z(G(r).style),
|
|
12187
|
+
text: G(v),
|
|
12188
|
+
onClear: ee,
|
|
12189
|
+
onCommit: A
|
|
12190
|
+
}, M({ _: 2 }, [o.prefix ? {
|
|
12201
12191
|
name: "prefix",
|
|
12202
12192
|
fn: Z(() => [U(e.$slots, "prefix")]),
|
|
12203
12193
|
key: "0"
|
|
12204
12194
|
} : void 0]), 1032, [
|
|
12195
|
+
"class",
|
|
12205
12196
|
"clearable",
|
|
12206
12197
|
"disabled",
|
|
12207
12198
|
"error",
|
|
@@ -12215,22 +12206,22 @@ var ps = /* @__PURE__ */ F({
|
|
|
12215
12206
|
])]),
|
|
12216
12207
|
content: Z(() => [P(us, {
|
|
12217
12208
|
ref_key: "panelRef",
|
|
12218
|
-
ref:
|
|
12219
|
-
"disabled-date":
|
|
12220
|
-
marks:
|
|
12221
|
-
"max-date":
|
|
12222
|
-
"max-span":
|
|
12223
|
-
"min-date":
|
|
12224
|
-
range:
|
|
12225
|
-
"range-value":
|
|
12226
|
-
shortcuts:
|
|
12227
|
-
"show-clear":
|
|
12228
|
-
"show-footer":
|
|
12229
|
-
value:
|
|
12230
|
-
onClear:
|
|
12231
|
-
onRangePreview:
|
|
12232
|
-
onSelect:
|
|
12233
|
-
onSelectRange:
|
|
12209
|
+
ref: l,
|
|
12210
|
+
"disabled-date": i.disabledDate,
|
|
12211
|
+
marks: i.marks,
|
|
12212
|
+
"max-date": m.value,
|
|
12213
|
+
"max-span": i.maxSpan,
|
|
12214
|
+
"min-date": f.value,
|
|
12215
|
+
range: i.range,
|
|
12216
|
+
"range-value": d.value,
|
|
12217
|
+
shortcuts: i.shortcuts,
|
|
12218
|
+
"show-clear": i.showClear,
|
|
12219
|
+
"show-footer": i.showFooter,
|
|
12220
|
+
value: u.value,
|
|
12221
|
+
onClear: ee,
|
|
12222
|
+
onRangePreview: E,
|
|
12223
|
+
onSelect: w,
|
|
12224
|
+
onSelectRange: T
|
|
12234
12225
|
}, null, 8, [
|
|
12235
12226
|
"disabled-date",
|
|
12236
12227
|
"marks",
|
|
@@ -12370,20 +12361,6 @@ var ps = /* @__PURE__ */ F({
|
|
|
12370
12361
|
Object,
|
|
12371
12362
|
Array
|
|
12372
12363
|
] },
|
|
12373
|
-
class: { type: [
|
|
12374
|
-
Boolean,
|
|
12375
|
-
null,
|
|
12376
|
-
String,
|
|
12377
|
-
Object,
|
|
12378
|
-
Array
|
|
12379
|
-
] },
|
|
12380
|
-
style: { type: [
|
|
12381
|
-
Boolean,
|
|
12382
|
-
null,
|
|
12383
|
-
String,
|
|
12384
|
-
Object,
|
|
12385
|
-
Array
|
|
12386
|
-
] },
|
|
12387
12364
|
minDate: {},
|
|
12388
12365
|
maxDate: {},
|
|
12389
12366
|
disabledDate: {},
|
|
@@ -12729,20 +12706,6 @@ var ps = /* @__PURE__ */ F({
|
|
|
12729
12706
|
Object,
|
|
12730
12707
|
Array
|
|
12731
12708
|
] },
|
|
12732
|
-
class: { type: [
|
|
12733
|
-
Boolean,
|
|
12734
|
-
null,
|
|
12735
|
-
String,
|
|
12736
|
-
Object,
|
|
12737
|
-
Array
|
|
12738
|
-
] },
|
|
12739
|
-
style: { type: [
|
|
12740
|
-
Boolean,
|
|
12741
|
-
null,
|
|
12742
|
-
String,
|
|
12743
|
-
Object,
|
|
12744
|
-
Array
|
|
12745
|
-
] },
|
|
12746
12709
|
minDate: {},
|
|
12747
12710
|
maxDate: {},
|
|
12748
12711
|
disabledDate: {},
|