@varlet/ui 1.26.4 → 1.26.7
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/README.en-US.md +14 -15
- package/README.md +19 -18
- package/es/date-picker/DatePicker.js +86 -12
- package/es/date-picker/date-picker.css +1 -1
- package/es/date-picker/date-picker.less +11 -0
- package/es/date-picker/props.js +4 -0
- package/es/date-picker/src/day-picker-panel.js +17 -4
- package/es/date-picker/src/month-picker-panel.js +17 -4
- package/es/date-picker/src/panel-header.js +1 -0
- package/es/image-preview/ImagePreview.js +4 -1
- package/es/image-preview/imagePreview.css +1 -1
- package/es/image-preview/imagePreview.less +11 -1
- package/es/index-bar/IndexBar.js +8 -14
- package/es/snackbar/style/index.js +1 -1
- package/es/snackbar/style/less.js +1 -1
- package/es/style.css +1 -1
- package/es/uploader/Uploader.js +14 -1
- package/es/uploader/props.js +4 -0
- package/es/varlet.esm.js +201 -83
- package/highlight/attributes.json +8 -0
- package/highlight/tags.json +3 -1
- package/highlight/web-types.json +23 -1
- package/lib/date-picker/DatePicker.js +86 -11
- package/lib/date-picker/date-picker.css +1 -1
- package/lib/date-picker/date-picker.less +11 -0
- package/lib/date-picker/props.js +4 -0
- package/lib/date-picker/src/day-picker-panel.js +17 -4
- package/lib/date-picker/src/month-picker-panel.js +17 -4
- package/lib/date-picker/src/panel-header.js +1 -0
- package/lib/image-preview/ImagePreview.js +4 -1
- package/lib/image-preview/imagePreview.css +1 -1
- package/lib/image-preview/imagePreview.less +11 -1
- package/lib/index-bar/IndexBar.js +7 -13
- package/lib/style.css +1 -1
- package/lib/uploader/Uploader.js +14 -1
- package/lib/uploader/props.js +4 -0
- package/package.json +5 -5
- package/types/datePicker.d.ts +1 -0
- package/types/uploader.d.ts +1 -0
- package/umd/varlet.js +4 -4
package/es/varlet.esm.js
CHANGED
|
@@ -1337,11 +1337,11 @@ var Locale = {
|
|
|
1337
1337
|
merge,
|
|
1338
1338
|
useLocale
|
|
1339
1339
|
};
|
|
1340
|
-
var _hoisted_1$
|
|
1340
|
+
var _hoisted_1$H = {
|
|
1341
1341
|
class: "var-action-sheet__title"
|
|
1342
1342
|
};
|
|
1343
1343
|
var _hoisted_2$t = ["onClick"];
|
|
1344
|
-
var _hoisted_3$
|
|
1344
|
+
var _hoisted_3$j = {
|
|
1345
1345
|
class: "var-action-sheet__action-name"
|
|
1346
1346
|
};
|
|
1347
1347
|
function render$W(_ctx, _cache) {
|
|
@@ -1372,7 +1372,7 @@ function render$W(_ctx, _cache) {
|
|
|
1372
1372
|
}), {
|
|
1373
1373
|
default: withCtx(() => [createElementVNode("div", mergeProps({
|
|
1374
1374
|
class: "var-action-sheet var--box"
|
|
1375
|
-
}, _ctx.$attrs), [renderSlot(_ctx.$slots, "title", {}, () => [createElementVNode("div", _hoisted_1$
|
|
1375
|
+
}, _ctx.$attrs), [renderSlot(_ctx.$slots, "title", {}, () => [createElementVNode("div", _hoisted_1$H, toDisplayString(_ctx.dt(_ctx.title, _ctx.pack.actionSheetTitle)), 1)]), renderSlot(_ctx.$slots, "actions", {}, () => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.actions, (action) => {
|
|
1376
1376
|
return withDirectives((openBlock(), createElementBlock("div", {
|
|
1377
1377
|
class: normalizeClass(["var-action-sheet__action-item", [action.className, action.disabled ? "var-action-sheet--disabled" : null]]),
|
|
1378
1378
|
key: action.name,
|
|
@@ -1386,7 +1386,7 @@ function render$W(_ctx, _cache) {
|
|
|
1386
1386
|
"var-action-sheet-cover": "",
|
|
1387
1387
|
name: action.icon,
|
|
1388
1388
|
size: action.iconSize
|
|
1389
|
-
}, null, 8, ["name", "size"])) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_3$
|
|
1389
|
+
}, null, 8, ["name", "size"])) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_3$j, toDisplayString(action.name), 1)], 14, _hoisted_2$t)), [[_directive_ripple, {
|
|
1390
1390
|
disabled: action.disabled
|
|
1391
1391
|
}]]);
|
|
1392
1392
|
}), 128))])], 16)]),
|
|
@@ -1509,14 +1509,14 @@ var props$P = {
|
|
|
1509
1509
|
default: true
|
|
1510
1510
|
}
|
|
1511
1511
|
};
|
|
1512
|
-
var _hoisted_1$
|
|
1512
|
+
var _hoisted_1$G = {
|
|
1513
1513
|
class: "var-app-bar__left"
|
|
1514
1514
|
};
|
|
1515
1515
|
var _hoisted_2$s = {
|
|
1516
1516
|
key: 0,
|
|
1517
1517
|
class: "var-app-bar__title"
|
|
1518
1518
|
};
|
|
1519
|
-
var _hoisted_3$
|
|
1519
|
+
var _hoisted_3$i = {
|
|
1520
1520
|
class: "var-app-bar__right"
|
|
1521
1521
|
};
|
|
1522
1522
|
function render$V(_ctx, _cache) {
|
|
@@ -1528,13 +1528,13 @@ function render$V(_ctx, _cache) {
|
|
|
1528
1528
|
background: _ctx.color,
|
|
1529
1529
|
color: _ctx.textColor
|
|
1530
1530
|
})
|
|
1531
|
-
}, [createElementVNode("div", _hoisted_1$
|
|
1531
|
+
}, [createElementVNode("div", _hoisted_1$G, [renderSlot(_ctx.$slots, "left"), _ctx.titlePosition === "left" ? (openBlock(), createElementBlock("div", {
|
|
1532
1532
|
key: 0,
|
|
1533
1533
|
class: "var-app-bar__title",
|
|
1534
1534
|
style: normalizeStyle({
|
|
1535
1535
|
paddingLeft: _ctx.paddingLeft
|
|
1536
1536
|
})
|
|
1537
|
-
}, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(_ctx.title), 1)])], 4)) : createCommentVNode("v-if", true)]), _ctx.titlePosition === "center" ? (openBlock(), createElementBlock("div", _hoisted_2$s, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(_ctx.title), 1)])])) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_3$
|
|
1537
|
+
}, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(_ctx.title), 1)])], 4)) : createCommentVNode("v-if", true)]), _ctx.titlePosition === "center" ? (openBlock(), createElementBlock("div", _hoisted_2$s, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(_ctx.title), 1)])])) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_3$i, [_ctx.titlePosition === "right" ? (openBlock(), createElementBlock("div", {
|
|
1538
1538
|
key: 0,
|
|
1539
1539
|
class: "var-app-bar__title",
|
|
1540
1540
|
style: normalizeStyle({
|
|
@@ -1600,14 +1600,14 @@ var props$O = {
|
|
|
1600
1600
|
}
|
|
1601
1601
|
};
|
|
1602
1602
|
var _withScopeId$2 = (n) => (pushScopeId(""), n = n(), popScopeId(), n);
|
|
1603
|
-
var _hoisted_1$
|
|
1603
|
+
var _hoisted_1$F = {
|
|
1604
1604
|
class: "var-loading"
|
|
1605
1605
|
};
|
|
1606
1606
|
var _hoisted_2$r = {
|
|
1607
1607
|
key: 0,
|
|
1608
1608
|
class: "var-loading__circle"
|
|
1609
1609
|
};
|
|
1610
|
-
var _hoisted_3$
|
|
1610
|
+
var _hoisted_3$h = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("svg", {
|
|
1611
1611
|
viewBox: "25 25 50 50"
|
|
1612
1612
|
}, [/* @__PURE__ */ createElementVNode("circle", {
|
|
1613
1613
|
cx: "50",
|
|
@@ -1615,9 +1615,9 @@ var _hoisted_3$g = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createEl
|
|
|
1615
1615
|
r: "20",
|
|
1616
1616
|
fill: "none"
|
|
1617
1617
|
})], -1));
|
|
1618
|
-
var _hoisted_4$a = [_hoisted_3$
|
|
1618
|
+
var _hoisted_4$a = [_hoisted_3$h];
|
|
1619
1619
|
function render$U(_ctx, _cache) {
|
|
1620
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1620
|
+
return openBlock(), createElementBlock("div", _hoisted_1$F, [_ctx.$slots.default ? (openBlock(), createElementBlock("div", {
|
|
1621
1621
|
key: 0,
|
|
1622
1622
|
class: normalizeClass(["var-loading__content", [_ctx.loading ? "var-loading__content--active" : null]])
|
|
1623
1623
|
}, [renderSlot(_ctx.$slots, "default")], 2)) : createCommentVNode("v-if", true), _ctx.isShow ? (openBlock(), createElementBlock("div", {
|
|
@@ -1759,7 +1759,7 @@ var props$N = {
|
|
|
1759
1759
|
type: Function
|
|
1760
1760
|
}
|
|
1761
1761
|
};
|
|
1762
|
-
var _hoisted_1$
|
|
1762
|
+
var _hoisted_1$E = ["disabled"];
|
|
1763
1763
|
function render$T(_ctx, _cache) {
|
|
1764
1764
|
var _component_var_loading = resolveComponent("var-loading");
|
|
1765
1765
|
var _directive_ripple = resolveDirective("ripple");
|
|
@@ -1785,7 +1785,7 @@ function render$T(_ctx, _cache) {
|
|
|
1785
1785
|
radius: _ctx.loadingRadius
|
|
1786
1786
|
}, null, 8, ["type", "size", "radius"])) : createCommentVNode("v-if", true), createElementVNode("div", {
|
|
1787
1787
|
class: normalizeClass(["var-button__content", [_ctx.loading || _ctx.pending ? "var-button--hidden" : null]])
|
|
1788
|
-
}, [renderSlot(_ctx.$slots, "default")], 2)], 46, _hoisted_1$
|
|
1788
|
+
}, [renderSlot(_ctx.$slots, "default")], 2)], 46, _hoisted_1$E)), [[_directive_ripple, {
|
|
1789
1789
|
disabled: _ctx.disabled || !_ctx.ripple
|
|
1790
1790
|
}]]);
|
|
1791
1791
|
}
|
|
@@ -1985,7 +1985,7 @@ var props$L = {
|
|
|
1985
1985
|
type: String
|
|
1986
1986
|
}
|
|
1987
1987
|
};
|
|
1988
|
-
var _hoisted_1$
|
|
1988
|
+
var _hoisted_1$D = {
|
|
1989
1989
|
class: "var-badge var--box"
|
|
1990
1990
|
};
|
|
1991
1991
|
var _hoisted_2$q = {
|
|
@@ -1993,7 +1993,7 @@ var _hoisted_2$q = {
|
|
|
1993
1993
|
};
|
|
1994
1994
|
function render$R(_ctx, _cache) {
|
|
1995
1995
|
var _component_var_icon = resolveComponent("var-icon");
|
|
1996
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1996
|
+
return openBlock(), createElementBlock("div", _hoisted_1$D, [createVNode(Transition, {
|
|
1997
1997
|
name: "var-badge-fade"
|
|
1998
1998
|
}, {
|
|
1999
1999
|
default: withCtx(() => [withDirectives(createElementVNode("span", mergeProps(_ctx.$attrs, {
|
|
@@ -2103,12 +2103,12 @@ var props$K = {
|
|
|
2103
2103
|
type: Function
|
|
2104
2104
|
}
|
|
2105
2105
|
};
|
|
2106
|
-
var _hoisted_1$
|
|
2106
|
+
var _hoisted_1$C = ["src", "alt"];
|
|
2107
2107
|
var _hoisted_2$p = {
|
|
2108
2108
|
key: 0,
|
|
2109
2109
|
class: "var-card__title"
|
|
2110
2110
|
};
|
|
2111
|
-
var _hoisted_3$
|
|
2111
|
+
var _hoisted_3$g = {
|
|
2112
2112
|
key: 0,
|
|
2113
2113
|
class: "var-card__subtitle"
|
|
2114
2114
|
};
|
|
@@ -2136,7 +2136,7 @@ function render$Q(_ctx, _cache) {
|
|
|
2136
2136
|
}),
|
|
2137
2137
|
src: _ctx.src,
|
|
2138
2138
|
alt: _ctx.alt
|
|
2139
|
-
}, null, 12, _hoisted_1$
|
|
2139
|
+
}, null, 12, _hoisted_1$C)) : createCommentVNode("v-if", true)]), renderSlot(_ctx.$slots, "title", {}, () => [_ctx.title ? (openBlock(), createElementBlock("div", _hoisted_2$p, toDisplayString(_ctx.title), 1)) : createCommentVNode("v-if", true)]), renderSlot(_ctx.$slots, "subtitle", {}, () => [_ctx.subtitle ? (openBlock(), createElementBlock("div", _hoisted_3$g, toDisplayString(_ctx.subtitle), 1)) : createCommentVNode("v-if", true)]), renderSlot(_ctx.$slots, "description", {}, () => [_ctx.description ? (openBlock(), createElementBlock("div", _hoisted_4$9, toDisplayString(_ctx.description), 1)) : createCommentVNode("v-if", true)]), _ctx.$slots.extra ? (openBlock(), createElementBlock("div", _hoisted_5$7, [renderSlot(_ctx.$slots, "extra")])) : createCommentVNode("v-if", true)], 2)), [[_directive_ripple, {
|
|
2140
2140
|
disabled: !_ctx.ripple
|
|
2141
2141
|
}]]);
|
|
2142
2142
|
}
|
|
@@ -2183,7 +2183,7 @@ var props$J = {
|
|
|
2183
2183
|
type: String
|
|
2184
2184
|
}
|
|
2185
2185
|
};
|
|
2186
|
-
var _hoisted_1$
|
|
2186
|
+
var _hoisted_1$B = {
|
|
2187
2187
|
class: "var-cell__content"
|
|
2188
2188
|
};
|
|
2189
2189
|
function render$P(_ctx, _cache) {
|
|
@@ -2196,7 +2196,7 @@ function render$P(_ctx, _cache) {
|
|
|
2196
2196
|
}, [renderSlot(_ctx.$slots, "icon", {}, () => [createVNode(_component_var_icon, {
|
|
2197
2197
|
class: "var--flex",
|
|
2198
2198
|
name: _ctx.icon
|
|
2199
|
-
}, null, 8, ["name"])])], 2)) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_1$
|
|
2199
|
+
}, null, 8, ["name"])])], 2)) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_1$B, [createElementVNode("div", {
|
|
2200
2200
|
class: normalizeClass(["var-cell__title", [_ctx.titleClass ? _ctx.titleClass : null]])
|
|
2201
2201
|
}, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(_ctx.title), 1)])], 2), _ctx.$slots.desc || _ctx.desc ? (openBlock(), createElementBlock("div", {
|
|
2202
2202
|
key: 0,
|
|
@@ -2227,21 +2227,21 @@ var props$I = {
|
|
|
2227
2227
|
default: ""
|
|
2228
2228
|
}
|
|
2229
2229
|
};
|
|
2230
|
-
var _hoisted_1$
|
|
2230
|
+
var _hoisted_1$A = {
|
|
2231
2231
|
key: 0,
|
|
2232
2232
|
class: "var-form-details"
|
|
2233
2233
|
};
|
|
2234
2234
|
var _hoisted_2$o = {
|
|
2235
2235
|
class: "var-form-details__message"
|
|
2236
2236
|
};
|
|
2237
|
-
var _hoisted_3$
|
|
2237
|
+
var _hoisted_3$f = {
|
|
2238
2238
|
class: "var-form-details__length"
|
|
2239
2239
|
};
|
|
2240
2240
|
function render$O(_ctx, _cache) {
|
|
2241
2241
|
return openBlock(), createBlock(Transition, {
|
|
2242
2242
|
name: "var-form-details"
|
|
2243
2243
|
}, {
|
|
2244
|
-
default: withCtx(() => [_ctx.errorMessage || _ctx.maxlengthText ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2244
|
+
default: withCtx(() => [_ctx.errorMessage || _ctx.maxlengthText ? (openBlock(), createElementBlock("div", _hoisted_1$A, [createElementVNode("div", _hoisted_2$o, toDisplayString(_ctx.errorMessage), 1), createElementVNode("div", _hoisted_3$f, toDisplayString(_ctx.maxlengthText), 1)])) : createCommentVNode("v-if", true)]),
|
|
2245
2245
|
_: 1
|
|
2246
2246
|
});
|
|
2247
2247
|
}
|
|
@@ -2355,7 +2355,7 @@ function useFormItems() {
|
|
|
2355
2355
|
bindFormItems: bindChildren
|
|
2356
2356
|
};
|
|
2357
2357
|
}
|
|
2358
|
-
var _hoisted_1$
|
|
2358
|
+
var _hoisted_1$z = {
|
|
2359
2359
|
class: "var-checkbox"
|
|
2360
2360
|
};
|
|
2361
2361
|
function render$N(_ctx, _cache) {
|
|
@@ -2367,7 +2367,7 @@ function render$N(_ctx, _cache) {
|
|
|
2367
2367
|
onClick: _cache[0] || (_cache[0] = function() {
|
|
2368
2368
|
return _ctx.handleClick && _ctx.handleClick(...arguments);
|
|
2369
2369
|
})
|
|
2370
|
-
}, [createElementVNode("div", _hoisted_1$
|
|
2370
|
+
}, [createElementVNode("div", _hoisted_1$z, [withDirectives((openBlock(), createElementBlock("div", {
|
|
2371
2371
|
class: normalizeClass(["var-checkbox__action", [_ctx.checked ? "var-checkbox--checked" : "var-checkbox--unchecked", _ctx.errorMessage || _ctx.checkboxGroupErrorMessage ? "var-checkbox--error" : null, _ctx.formDisabled || _ctx.disabled ? "var-checkbox--disabled" : null]]),
|
|
2372
2372
|
style: normalizeStyle({
|
|
2373
2373
|
color: _ctx.checked ? _ctx.checkedColor : _ctx.uncheckedColor
|
|
@@ -2559,12 +2559,12 @@ var props$G = {
|
|
|
2559
2559
|
type: Function
|
|
2560
2560
|
}
|
|
2561
2561
|
};
|
|
2562
|
-
var _hoisted_1$
|
|
2562
|
+
var _hoisted_1$y = {
|
|
2563
2563
|
class: "var-checkbox-group__wrap"
|
|
2564
2564
|
};
|
|
2565
2565
|
function render$M(_ctx, _cache) {
|
|
2566
2566
|
var _component_var_form_details = resolveComponent("var-form-details");
|
|
2567
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2567
|
+
return openBlock(), createElementBlock("div", _hoisted_1$y, [createElementVNode("div", {
|
|
2568
2568
|
class: normalizeClass(["var-checkbox-group", ["var-checkbox-group--" + _ctx.direction]])
|
|
2569
2569
|
}, [renderSlot(_ctx.$slots, "default")], 2), createVNode(_component_var_form_details, {
|
|
2570
2570
|
"error-message": _ctx.errorMessage
|
|
@@ -2979,11 +2979,11 @@ var props$D = {
|
|
|
2979
2979
|
type: Function
|
|
2980
2980
|
}
|
|
2981
2981
|
};
|
|
2982
|
-
var _hoisted_1$
|
|
2982
|
+
var _hoisted_1$x = {
|
|
2983
2983
|
class: "var-collapse"
|
|
2984
2984
|
};
|
|
2985
2985
|
function render$J(_ctx, _cache) {
|
|
2986
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2986
|
+
return openBlock(), createElementBlock("div", _hoisted_1$x, [renderSlot(_ctx.$slots, "default")]);
|
|
2987
2987
|
}
|
|
2988
2988
|
var Collapse = defineComponent({
|
|
2989
2989
|
render: render$J,
|
|
@@ -3119,13 +3119,13 @@ var props$C = {
|
|
|
3119
3119
|
default: false
|
|
3120
3120
|
}
|
|
3121
3121
|
};
|
|
3122
|
-
var _hoisted_1$
|
|
3122
|
+
var _hoisted_1$w = {
|
|
3123
3123
|
class: "var-collapse-item-header__title"
|
|
3124
3124
|
};
|
|
3125
3125
|
var _hoisted_2$n = {
|
|
3126
3126
|
class: "var-collapse-item-header__icon"
|
|
3127
3127
|
};
|
|
3128
|
-
var _hoisted_3$
|
|
3128
|
+
var _hoisted_3$e = {
|
|
3129
3129
|
class: "var-collapse-item__wrap"
|
|
3130
3130
|
};
|
|
3131
3131
|
function render$I(_ctx, _cache) {
|
|
@@ -3139,7 +3139,7 @@ function render$I(_ctx, _cache) {
|
|
|
3139
3139
|
}, [createElementVNode("div", {
|
|
3140
3140
|
class: "var-collapse-item-header",
|
|
3141
3141
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.toggle())
|
|
3142
|
-
}, [createElementVNode("div", _hoisted_1$
|
|
3142
|
+
}, [createElementVNode("div", _hoisted_1$w, [renderSlot(_ctx.$slots, "title", {}, () => [createTextVNode(toDisplayString(_ctx.title), 1)])]), createElementVNode("div", _hoisted_2$n, [renderSlot(_ctx.$slots, "icon", {}, () => [createVNode(_component_var_icon, {
|
|
3143
3143
|
name: _ctx.icon,
|
|
3144
3144
|
transition: 250,
|
|
3145
3145
|
class: normalizeClass({
|
|
@@ -3153,7 +3153,7 @@ function render$I(_ctx, _cache) {
|
|
|
3153
3153
|
onTransitionend: _cache[1] || (_cache[1] = function() {
|
|
3154
3154
|
return _ctx.transitionend && _ctx.transitionend(...arguments);
|
|
3155
3155
|
})
|
|
3156
|
-
}, [createElementVNode("div", _hoisted_3$
|
|
3156
|
+
}, [createElementVNode("div", _hoisted_3$e, [renderSlot(_ctx.$slots, "default")])], 544), [[vShow, _ctx.show]])], 2);
|
|
3157
3157
|
}
|
|
3158
3158
|
var CollapseItem = defineComponent({
|
|
3159
3159
|
render: render$I,
|
|
@@ -3265,11 +3265,11 @@ var SECOND = 1e3;
|
|
|
3265
3265
|
var MINUTE = 60 * SECOND;
|
|
3266
3266
|
var HOUR = 60 * MINUTE;
|
|
3267
3267
|
var DAY = 24 * HOUR;
|
|
3268
|
-
var _hoisted_1$
|
|
3268
|
+
var _hoisted_1$v = {
|
|
3269
3269
|
class: "var-countdown"
|
|
3270
3270
|
};
|
|
3271
3271
|
function render$H(_ctx, _cache) {
|
|
3272
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
3272
|
+
return openBlock(), createElementBlock("div", _hoisted_1$v, [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(_ctx.timeData)), () => [createTextVNode(toDisplayString(_ctx.showTime), 1)])]);
|
|
3273
3273
|
}
|
|
3274
3274
|
var Countdown = defineComponent({
|
|
3275
3275
|
render: render$H,
|
|
@@ -5717,7 +5717,7 @@ var props$A = {
|
|
|
5717
5717
|
};
|
|
5718
5718
|
var SPEED = 100;
|
|
5719
5719
|
var DELAY = 600;
|
|
5720
|
-
var _hoisted_1$
|
|
5720
|
+
var _hoisted_1$u = {
|
|
5721
5721
|
class: "var-counter var--box"
|
|
5722
5722
|
};
|
|
5723
5723
|
var _hoisted_2$m = ["inputmode", "readonly", "disabled"];
|
|
@@ -5725,7 +5725,7 @@ function render$G(_ctx, _cache) {
|
|
|
5725
5725
|
var _component_var_icon = resolveComponent("var-icon");
|
|
5726
5726
|
var _component_var_form_details = resolveComponent("var-form-details");
|
|
5727
5727
|
var _directive_ripple = resolveDirective("ripple");
|
|
5728
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
5728
|
+
return openBlock(), createElementBlock("div", _hoisted_1$u, [createElementVNode("div", mergeProps({
|
|
5729
5729
|
class: ["var-counter__controller var-elevation--2", [_ctx.disabled || _ctx.formDisabled ? "var-counter--disabled" : null, _ctx.errorMessage ? "var-counter--error" : null]],
|
|
5730
5730
|
style: {
|
|
5731
5731
|
background: _ctx.color ? _ctx.color : void 0
|
|
@@ -6523,6 +6523,10 @@ var props$z = {
|
|
|
6523
6523
|
type: Boolean,
|
|
6524
6524
|
default: false
|
|
6525
6525
|
},
|
|
6526
|
+
touchable: {
|
|
6527
|
+
type: Boolean,
|
|
6528
|
+
default: true
|
|
6529
|
+
},
|
|
6526
6530
|
onChange: {
|
|
6527
6531
|
type: Function
|
|
6528
6532
|
},
|
|
@@ -6530,13 +6534,13 @@ var props$z = {
|
|
|
6530
6534
|
type: Function
|
|
6531
6535
|
}
|
|
6532
6536
|
};
|
|
6533
|
-
var _hoisted_1$
|
|
6537
|
+
var _hoisted_1$t = {
|
|
6534
6538
|
class: "var-picker-header"
|
|
6535
6539
|
};
|
|
6536
6540
|
function render$F(_ctx, _cache) {
|
|
6537
6541
|
var _component_var_icon = resolveComponent("var-icon");
|
|
6538
6542
|
var _component_var_button = resolveComponent("var-button");
|
|
6539
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
6543
|
+
return openBlock(), createElementBlock("div", _hoisted_1$t, [createVNode(_component_var_button, {
|
|
6540
6544
|
round: "",
|
|
6541
6545
|
text: "",
|
|
6542
6546
|
style: {
|
|
@@ -6618,6 +6622,8 @@ var PanelHeader = defineComponent({
|
|
|
6618
6622
|
return pack.value.lang === "zh-CN" ? previewYear + " " + monthName : monthName + " " + previewYear;
|
|
6619
6623
|
});
|
|
6620
6624
|
var checkDate = (checkType) => {
|
|
6625
|
+
if (checkType === "prev" && props2.disabled.left || checkType === "next" && props2.disabled.right)
|
|
6626
|
+
return;
|
|
6621
6627
|
emit("check-date", checkType);
|
|
6622
6628
|
reverse.value = checkType === "prev";
|
|
6623
6629
|
forwardOrBackNum.value += checkType === "prev" ? -1 : 1;
|
|
@@ -6648,7 +6654,7 @@ function _extends$8() {
|
|
|
6648
6654
|
}
|
|
6649
6655
|
dayjs.extend(isSameOrBefore);
|
|
6650
6656
|
dayjs.extend(isSameOrAfter);
|
|
6651
|
-
var _hoisted_1$
|
|
6657
|
+
var _hoisted_1$s = {
|
|
6652
6658
|
class: "var-month-picker__panel"
|
|
6653
6659
|
};
|
|
6654
6660
|
var _hoisted_2$l = {
|
|
@@ -6657,7 +6663,8 @@ var _hoisted_2$l = {
|
|
|
6657
6663
|
function render$E(_ctx, _cache) {
|
|
6658
6664
|
var _component_panel_header = resolveComponent("panel-header");
|
|
6659
6665
|
var _component_var_button = resolveComponent("var-button");
|
|
6660
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
6666
|
+
return openBlock(), createElementBlock("div", _hoisted_1$s, [createElementVNode("div", _hoisted_2$l, [createVNode(_component_panel_header, {
|
|
6667
|
+
ref: "headerEl",
|
|
6661
6668
|
type: "month",
|
|
6662
6669
|
date: _ctx.preview,
|
|
6663
6670
|
disabled: _ctx.panelBtnDisabled,
|
|
@@ -6677,7 +6684,7 @@ function render$E(_ctx, _cache) {
|
|
|
6677
6684
|
"var-month-picker-cover": "",
|
|
6678
6685
|
ripple: false
|
|
6679
6686
|
}, _extends$8({}, _ctx.buttonProps(month.index)), {
|
|
6680
|
-
onClick: (
|
|
6687
|
+
onClick: (event) => _ctx.chooseMonth(month, event)
|
|
6681
6688
|
}), {
|
|
6682
6689
|
default: withCtx(() => [createTextVNode(toDisplayString(_ctx.getMonthAbbr(month.index)), 1)]),
|
|
6683
6690
|
_: 2
|
|
@@ -6723,6 +6730,7 @@ var MonthPickerPanel = defineComponent({
|
|
|
6723
6730
|
var [currentYear, currentMonth] = props2.current.split("-");
|
|
6724
6731
|
var reverse = ref(false);
|
|
6725
6732
|
var panelKey = ref(0);
|
|
6733
|
+
var headerEl = ref(null);
|
|
6726
6734
|
var panelBtnDisabled = reactive({
|
|
6727
6735
|
left: false,
|
|
6728
6736
|
right: false
|
|
@@ -6833,15 +6841,20 @@ var MonthPickerPanel = defineComponent({
|
|
|
6833
6841
|
};
|
|
6834
6842
|
var isCover = textColorOrCover().startsWith("var-date-picker");
|
|
6835
6843
|
return {
|
|
6836
|
-
disabled,
|
|
6837
6844
|
outline: computeOutline(),
|
|
6838
6845
|
text: computeText(),
|
|
6839
6846
|
color: !computeText() ? color : "",
|
|
6840
6847
|
textColor: isCover ? "" : textColorOrCover(),
|
|
6841
|
-
"var-date-picker-color-cover": isCover
|
|
6848
|
+
"var-date-picker-color-cover": isCover,
|
|
6849
|
+
class: {
|
|
6850
|
+
"var-month-picker__button-disabled": disabled
|
|
6851
|
+
}
|
|
6842
6852
|
};
|
|
6843
6853
|
};
|
|
6844
|
-
var chooseMonth = (month) => {
|
|
6854
|
+
var chooseMonth = (month, event) => {
|
|
6855
|
+
var buttonEl = event.currentTarget;
|
|
6856
|
+
if (buttonEl.classList.contains("var-month-picker__button-disabled"))
|
|
6857
|
+
return;
|
|
6845
6858
|
emit("choose-month", month);
|
|
6846
6859
|
};
|
|
6847
6860
|
var checkDate = (checkType) => {
|
|
@@ -6849,6 +6862,9 @@ var MonthPickerPanel = defineComponent({
|
|
|
6849
6862
|
panelKey.value += checkType === "prev" ? -1 : 1;
|
|
6850
6863
|
emit("check-preview", "year", checkType);
|
|
6851
6864
|
};
|
|
6865
|
+
var forwardRef = (checkType) => {
|
|
6866
|
+
headerEl.value.checkDate(checkType);
|
|
6867
|
+
};
|
|
6852
6868
|
watch(() => props2.preview.previewYear, (year) => {
|
|
6853
6869
|
var {
|
|
6854
6870
|
componentProps: {
|
|
@@ -6866,9 +6882,11 @@ var MonthPickerPanel = defineComponent({
|
|
|
6866
6882
|
return {
|
|
6867
6883
|
pack,
|
|
6868
6884
|
MONTH_LIST,
|
|
6885
|
+
headerEl,
|
|
6869
6886
|
reverse,
|
|
6870
6887
|
panelKey,
|
|
6871
6888
|
panelBtnDisabled,
|
|
6889
|
+
forwardRef,
|
|
6872
6890
|
buttonProps,
|
|
6873
6891
|
getMonthAbbr,
|
|
6874
6892
|
chooseMonth,
|
|
@@ -6876,12 +6894,12 @@ var MonthPickerPanel = defineComponent({
|
|
|
6876
6894
|
};
|
|
6877
6895
|
}
|
|
6878
6896
|
});
|
|
6879
|
-
var _hoisted_1$
|
|
6897
|
+
var _hoisted_1$r = {
|
|
6880
6898
|
class: "var-year-picker__panel"
|
|
6881
6899
|
};
|
|
6882
6900
|
var _hoisted_2$k = ["onClick"];
|
|
6883
6901
|
function render$D(_ctx, _cache) {
|
|
6884
|
-
return openBlock(), createElementBlock("ul", _hoisted_1$
|
|
6902
|
+
return openBlock(), createElementBlock("ul", _hoisted_1$r, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.yearList, (year) => {
|
|
6885
6903
|
return openBlock(), createElementBlock("li", {
|
|
6886
6904
|
key: year,
|
|
6887
6905
|
class: normalizeClass([year === _ctx.toNumber(_ctx.preview) ? "var-year-picker__panel--active" : null]),
|
|
@@ -6974,13 +6992,13 @@ function _extends$7() {
|
|
|
6974
6992
|
}
|
|
6975
6993
|
dayjs.extend(isSameOrBefore);
|
|
6976
6994
|
dayjs.extend(isSameOrAfter);
|
|
6977
|
-
var _hoisted_1$
|
|
6995
|
+
var _hoisted_1$q = {
|
|
6978
6996
|
class: "var-day-picker__panel"
|
|
6979
6997
|
};
|
|
6980
6998
|
var _hoisted_2$j = {
|
|
6981
6999
|
class: "var-day-picker__content"
|
|
6982
7000
|
};
|
|
6983
|
-
var _hoisted_3$
|
|
7001
|
+
var _hoisted_3$d = {
|
|
6984
7002
|
class: "var-day-picker__head"
|
|
6985
7003
|
};
|
|
6986
7004
|
var _hoisted_4$8 = {
|
|
@@ -6989,7 +7007,8 @@ var _hoisted_4$8 = {
|
|
|
6989
7007
|
function render$C(_ctx, _cache) {
|
|
6990
7008
|
var _component_panel_header = resolveComponent("panel-header");
|
|
6991
7009
|
var _component_var_button = resolveComponent("var-button");
|
|
6992
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
7010
|
+
return openBlock(), createElementBlock("div", _hoisted_1$q, [createElementVNode("div", _hoisted_2$j, [createVNode(_component_panel_header, {
|
|
7011
|
+
ref: "headerEl",
|
|
6993
7012
|
type: "day",
|
|
6994
7013
|
date: _ctx.preview,
|
|
6995
7014
|
disabled: _ctx.panelBtnDisabled,
|
|
@@ -7000,7 +7019,7 @@ function render$C(_ctx, _cache) {
|
|
|
7000
7019
|
}, {
|
|
7001
7020
|
default: withCtx(() => [(openBlock(), createElementBlock("div", {
|
|
7002
7021
|
key: _ctx.panelKey
|
|
7003
|
-
}, [createElementVNode("ul", _hoisted_3$
|
|
7022
|
+
}, [createElementVNode("ul", _hoisted_3$d, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.sortWeekList, (week) => {
|
|
7004
7023
|
return openBlock(), createElementBlock("li", {
|
|
7005
7024
|
key: week.index
|
|
7006
7025
|
}, toDisplayString(_ctx.getDayAbbr(week.index)), 1);
|
|
@@ -7016,7 +7035,7 @@ function render$C(_ctx, _cache) {
|
|
|
7016
7035
|
round: "",
|
|
7017
7036
|
ripple: false
|
|
7018
7037
|
}, _extends$7({}, _ctx.buttonProps(day)), {
|
|
7019
|
-
onClick: (
|
|
7038
|
+
onClick: (event) => _ctx.chooseDay(day, event)
|
|
7020
7039
|
}), {
|
|
7021
7040
|
default: withCtx(() => [createTextVNode(toDisplayString(_ctx.filterDay(day)), 1)]),
|
|
7022
7041
|
_: 2
|
|
@@ -7063,6 +7082,7 @@ var DayPickerPanel = defineComponent({
|
|
|
7063
7082
|
var days = ref([]);
|
|
7064
7083
|
var reverse = ref(false);
|
|
7065
7084
|
var panelKey = ref(0);
|
|
7085
|
+
var headerEl = ref(null);
|
|
7066
7086
|
var panelBtnDisabled = reactive({
|
|
7067
7087
|
left: false,
|
|
7068
7088
|
right: false
|
|
@@ -7220,11 +7240,13 @@ var DayPickerPanel = defineComponent({
|
|
|
7220
7240
|
};
|
|
7221
7241
|
var isCover = textColorOrCover().startsWith("var-date-picker");
|
|
7222
7242
|
return {
|
|
7223
|
-
disabled,
|
|
7224
7243
|
text: computeText(),
|
|
7225
7244
|
outline: computeOutline(),
|
|
7226
7245
|
textColor: isCover ? "" : textColorOrCover(),
|
|
7227
|
-
"var-date-picker-color-cover": isCover
|
|
7246
|
+
"var-date-picker-color-cover": isCover,
|
|
7247
|
+
class: {
|
|
7248
|
+
"var-day-picker__button-disabled": disabled
|
|
7249
|
+
}
|
|
7228
7250
|
};
|
|
7229
7251
|
};
|
|
7230
7252
|
var checkDate = (checkType) => {
|
|
@@ -7232,9 +7254,15 @@ var DayPickerPanel = defineComponent({
|
|
|
7232
7254
|
panelKey.value += checkType === "prev" ? -1 : 1;
|
|
7233
7255
|
emit("check-preview", "month", checkType);
|
|
7234
7256
|
};
|
|
7235
|
-
var chooseDay = (day) => {
|
|
7257
|
+
var chooseDay = (day, event) => {
|
|
7258
|
+
var buttonEl = event.currentTarget;
|
|
7259
|
+
if (buttonEl.classList.contains("var-day-picker__button-disabled"))
|
|
7260
|
+
return;
|
|
7236
7261
|
emit("choose-day", day);
|
|
7237
7262
|
};
|
|
7263
|
+
var forwardRef = (checkType) => {
|
|
7264
|
+
headerEl.value.checkDate(checkType);
|
|
7265
|
+
};
|
|
7238
7266
|
onMounted(() => {
|
|
7239
7267
|
initDate();
|
|
7240
7268
|
initHeader();
|
|
@@ -7246,9 +7274,11 @@ var DayPickerPanel = defineComponent({
|
|
|
7246
7274
|
return {
|
|
7247
7275
|
days,
|
|
7248
7276
|
reverse,
|
|
7277
|
+
headerEl,
|
|
7249
7278
|
panelKey,
|
|
7250
7279
|
sortWeekList,
|
|
7251
7280
|
panelBtnDisabled,
|
|
7281
|
+
forwardRef,
|
|
7252
7282
|
filterDay,
|
|
7253
7283
|
getDayAbbr,
|
|
7254
7284
|
checkDate,
|
|
@@ -7257,9 +7287,6 @@ var DayPickerPanel = defineComponent({
|
|
|
7257
7287
|
};
|
|
7258
7288
|
}
|
|
7259
7289
|
});
|
|
7260
|
-
var _hoisted_1$q = {
|
|
7261
|
-
class: "var-date-picker-body"
|
|
7262
|
-
};
|
|
7263
7290
|
function render$B(_ctx, _cache) {
|
|
7264
7291
|
var _component_year_picker_panel = resolveComponent("year-picker-panel");
|
|
7265
7292
|
var _component_month_picker_panel = resolveComponent("month-picker-panel");
|
|
@@ -7309,16 +7336,28 @@ function render$B(_ctx, _cache) {
|
|
|
7309
7336
|
}, _ctx.slotProps)), () => [createTextVNode(toDisplayString(_ctx.getDateTitle), 1)])]))];
|
|
7310
7337
|
}),
|
|
7311
7338
|
_: 3
|
|
7312
|
-
}, 8, ["name"])], 2)], 4), createElementVNode("div",
|
|
7339
|
+
}, 8, ["name"])], 2)], 4), createElementVNode("div", {
|
|
7340
|
+
class: "var-date-picker-body",
|
|
7341
|
+
onTouchstart: _cache[2] || (_cache[2] = function() {
|
|
7342
|
+
return _ctx.handleTouchstart && _ctx.handleTouchstart(...arguments);
|
|
7343
|
+
}),
|
|
7344
|
+
onTouchmove: _cache[3] || (_cache[3] = function() {
|
|
7345
|
+
return _ctx.handleTouchmove && _ctx.handleTouchmove(...arguments);
|
|
7346
|
+
}),
|
|
7347
|
+
onTouchend: _cache[4] || (_cache[4] = function() {
|
|
7348
|
+
return _ctx.handleTouchend && _ctx.handleTouchend(...arguments);
|
|
7349
|
+
})
|
|
7350
|
+
}, [createVNode(Transition, {
|
|
7313
7351
|
name: "var-date-picker-panel-fade"
|
|
7314
7352
|
}, {
|
|
7315
|
-
default: withCtx(() => [_ctx.
|
|
7353
|
+
default: withCtx(() => [_ctx.getPanelType === "year" ? (openBlock(), createBlock(_component_year_picker_panel, {
|
|
7316
7354
|
key: 0,
|
|
7317
7355
|
"component-props": _ctx.componentProps,
|
|
7318
7356
|
preview: _ctx.previewYear,
|
|
7319
7357
|
onChooseYear: _ctx.getChooseYear
|
|
7320
|
-
}, null, 8, ["component-props", "preview", "onChooseYear"])) :
|
|
7358
|
+
}, null, 8, ["component-props", "preview", "onChooseYear"])) : _ctx.getPanelType === "month" ? (openBlock(), createBlock(_component_month_picker_panel, {
|
|
7321
7359
|
key: 1,
|
|
7360
|
+
ref: "monthPanelEl",
|
|
7322
7361
|
current: _ctx.currentDate,
|
|
7323
7362
|
choose: _ctx.getChoose,
|
|
7324
7363
|
preview: _ctx.getPreview,
|
|
@@ -7326,8 +7365,9 @@ function render$B(_ctx, _cache) {
|
|
|
7326
7365
|
"component-props": _ctx.componentProps,
|
|
7327
7366
|
onChooseMonth: _ctx.getChooseMonth,
|
|
7328
7367
|
onCheckPreview: _ctx.checkPreview
|
|
7329
|
-
}, null, 8, ["current", "choose", "preview", "click-year", "component-props", "onChooseMonth", "onCheckPreview"])) :
|
|
7368
|
+
}, null, 8, ["current", "choose", "preview", "click-year", "component-props", "onChooseMonth", "onCheckPreview"])) : _ctx.getPanelType === "date" ? (openBlock(), createBlock(_component_day_picker_panel, {
|
|
7330
7369
|
key: 2,
|
|
7370
|
+
ref: "dayPanelEl",
|
|
7331
7371
|
current: _ctx.currentDate,
|
|
7332
7372
|
choose: _ctx.getChoose,
|
|
7333
7373
|
preview: _ctx.getPreview,
|
|
@@ -7337,7 +7377,7 @@ function render$B(_ctx, _cache) {
|
|
|
7337
7377
|
onCheckPreview: _ctx.checkPreview
|
|
7338
7378
|
}, null, 8, ["current", "choose", "preview", "component-props", "click-month", "onChooseDay", "onCheckPreview"])) : createCommentVNode("v-if", true)]),
|
|
7339
7379
|
_: 1
|
|
7340
|
-
})])], 2);
|
|
7380
|
+
})], 32)], 2);
|
|
7341
7381
|
}
|
|
7342
7382
|
var DatePicker = defineComponent({
|
|
7343
7383
|
render: render$B,
|
|
@@ -7349,6 +7389,10 @@ var DatePicker = defineComponent({
|
|
|
7349
7389
|
},
|
|
7350
7390
|
props: props$z,
|
|
7351
7391
|
setup(props2) {
|
|
7392
|
+
var startX = 0;
|
|
7393
|
+
var startY = 0;
|
|
7394
|
+
var checkType = "";
|
|
7395
|
+
var touchDirection;
|
|
7352
7396
|
var currentDate = dayjs().format("YYYY-MM-D");
|
|
7353
7397
|
var [currentYear, currentMonth] = currentDate.split("-");
|
|
7354
7398
|
var monthDes = MONTH_LIST.find((month) => month.index === currentMonth);
|
|
@@ -7365,6 +7409,8 @@ var DatePicker = defineComponent({
|
|
|
7365
7409
|
var chooseDays = ref([]);
|
|
7366
7410
|
var chooseRangeMonth = ref([]);
|
|
7367
7411
|
var chooseRangeDay = ref([]);
|
|
7412
|
+
var monthPanelEl = ref(null);
|
|
7413
|
+
var dayPanelEl = ref(null);
|
|
7368
7414
|
var componentProps = reactive({
|
|
7369
7415
|
allowedDates: props2.allowedDates,
|
|
7370
7416
|
type: props2.type,
|
|
@@ -7427,6 +7473,18 @@ var DatePicker = defineComponent({
|
|
|
7427
7473
|
return chooseMonth.value.index + "-" + showDay + " " + weekName.slice(0, 3);
|
|
7428
7474
|
return weekName.slice(0, 3) + ", " + monthName.slice(0, 3) + " " + chooseDay.value;
|
|
7429
7475
|
});
|
|
7476
|
+
var getPanelType = computed(() => {
|
|
7477
|
+
if (isYearPanel.value)
|
|
7478
|
+
return "year";
|
|
7479
|
+
if (props2.type === "month" || isMonthPanel.value)
|
|
7480
|
+
return "month";
|
|
7481
|
+
if (props2.type === "date")
|
|
7482
|
+
return "date";
|
|
7483
|
+
return "";
|
|
7484
|
+
});
|
|
7485
|
+
var isUntouchable = computed(() => {
|
|
7486
|
+
return !props2.touchable || ["", "year"].includes(getPanelType.value);
|
|
7487
|
+
});
|
|
7430
7488
|
var slotProps = computed(() => {
|
|
7431
7489
|
var _chooseMonth$value, _chooseDay$value, _chooseYear$value, _chooseMonth$value$in, _chooseMonth$value2;
|
|
7432
7490
|
var weekIndex = dayjs(chooseYear.value + "-" + ((_chooseMonth$value = chooseMonth.value) == null ? void 0 : _chooseMonth$value.index) + "-" + chooseDay.value).day();
|
|
@@ -7454,6 +7512,40 @@ var DatePicker = defineComponent({
|
|
|
7454
7512
|
isMonthPanel.value = false;
|
|
7455
7513
|
}
|
|
7456
7514
|
};
|
|
7515
|
+
var handleTouchstart = (event) => {
|
|
7516
|
+
if (isUntouchable.value)
|
|
7517
|
+
return;
|
|
7518
|
+
var {
|
|
7519
|
+
clientX,
|
|
7520
|
+
clientY
|
|
7521
|
+
} = event.touches[0];
|
|
7522
|
+
startX = clientX;
|
|
7523
|
+
startY = clientY;
|
|
7524
|
+
};
|
|
7525
|
+
var getDirection = (x, y) => {
|
|
7526
|
+
return x >= y && x > 20 ? "x" : "y";
|
|
7527
|
+
};
|
|
7528
|
+
var handleTouchmove = (event) => {
|
|
7529
|
+
if (isUntouchable.value)
|
|
7530
|
+
return;
|
|
7531
|
+
var {
|
|
7532
|
+
clientX,
|
|
7533
|
+
clientY
|
|
7534
|
+
} = event.touches[0];
|
|
7535
|
+
var x = clientX - startX;
|
|
7536
|
+
var y = clientY - startY;
|
|
7537
|
+
touchDirection = getDirection(Math.abs(x), Math.abs(y));
|
|
7538
|
+
checkType = x > 0 ? "prev" : "next";
|
|
7539
|
+
};
|
|
7540
|
+
var handleTouchend = () => {
|
|
7541
|
+
if (isUntouchable.value || touchDirection !== "x")
|
|
7542
|
+
return;
|
|
7543
|
+
var componentRef = getPanelType.value === "month" ? monthPanelEl : dayPanelEl;
|
|
7544
|
+
nextTickFrame(() => {
|
|
7545
|
+
componentRef.value.forwardRef(checkType);
|
|
7546
|
+
resetState();
|
|
7547
|
+
});
|
|
7548
|
+
};
|
|
7457
7549
|
var updateRange = (date, type) => {
|
|
7458
7550
|
var rangeDate = type === "month" ? chooseRangeMonth : chooseRangeDay;
|
|
7459
7551
|
rangeDate.value = rangeDone.value ? [date, date] : [rangeDate.value[0], date];
|
|
@@ -7540,8 +7632,8 @@ var DatePicker = defineComponent({
|
|
|
7540
7632
|
isYearPanel.value = false;
|
|
7541
7633
|
isMonthPanel.value = true;
|
|
7542
7634
|
};
|
|
7543
|
-
var checkPreview = (type,
|
|
7544
|
-
var changeValue =
|
|
7635
|
+
var checkPreview = (type, checkType2) => {
|
|
7636
|
+
var changeValue = checkType2 === "prev" ? -1 : 1;
|
|
7545
7637
|
if (type === "year") {
|
|
7546
7638
|
previewYear.value = "" + (toNumber(previewYear.value) + changeValue);
|
|
7547
7639
|
} else {
|
|
@@ -7608,6 +7700,12 @@ var DatePicker = defineComponent({
|
|
|
7608
7700
|
previewMonth.value = monthDes2;
|
|
7609
7701
|
previewYear.value = yearValue;
|
|
7610
7702
|
};
|
|
7703
|
+
var resetState = () => {
|
|
7704
|
+
startY = 0;
|
|
7705
|
+
startX = 0;
|
|
7706
|
+
checkType = "";
|
|
7707
|
+
touchDirection = void 0;
|
|
7708
|
+
};
|
|
7611
7709
|
watch(() => props2.modelValue, (value) => {
|
|
7612
7710
|
if (!checkValue() || invalidFormatDate(value) || !value)
|
|
7613
7711
|
return;
|
|
@@ -7626,7 +7724,10 @@ var DatePicker = defineComponent({
|
|
|
7626
7724
|
}, {
|
|
7627
7725
|
immediate: true
|
|
7628
7726
|
});
|
|
7727
|
+
watch(getPanelType, resetState);
|
|
7629
7728
|
return {
|
|
7729
|
+
monthPanelEl,
|
|
7730
|
+
dayPanelEl,
|
|
7630
7731
|
reverse,
|
|
7631
7732
|
currentDate,
|
|
7632
7733
|
chooseMonth,
|
|
@@ -7637,12 +7738,16 @@ var DatePicker = defineComponent({
|
|
|
7637
7738
|
isMonthPanel,
|
|
7638
7739
|
getMonthTitle,
|
|
7639
7740
|
getDateTitle,
|
|
7741
|
+
getPanelType,
|
|
7640
7742
|
getChoose,
|
|
7641
7743
|
getPreview,
|
|
7642
7744
|
componentProps,
|
|
7643
7745
|
slotProps,
|
|
7644
7746
|
formatRange,
|
|
7645
7747
|
clickEl,
|
|
7748
|
+
handleTouchstart,
|
|
7749
|
+
handleTouchmove,
|
|
7750
|
+
handleTouchend,
|
|
7646
7751
|
getChooseDay,
|
|
7647
7752
|
getChooseMonth,
|
|
7648
7753
|
getChooseYear,
|
|
@@ -9054,6 +9159,9 @@ var _hoisted_2$f = {
|
|
|
9054
9159
|
key: 0,
|
|
9055
9160
|
class: "var-image-preview__indicators"
|
|
9056
9161
|
};
|
|
9162
|
+
var _hoisted_3$c = {
|
|
9163
|
+
class: "var-image-preview__extra"
|
|
9164
|
+
};
|
|
9057
9165
|
function render$u(_ctx, _cache) {
|
|
9058
9166
|
var _component_var_swipe_item = resolveComponent("var-swipe-item");
|
|
9059
9167
|
var _component_var_swipe = resolveComponent("var-swipe");
|
|
@@ -9130,7 +9238,7 @@ function render$u(_ctx, _cache) {
|
|
|
9130
9238
|
name: "close-circle",
|
|
9131
9239
|
"var-image-preview-cover": "",
|
|
9132
9240
|
onClick: _ctx.close
|
|
9133
|
-
}, null, 8, ["onClick"])) : createCommentVNode("v-if", true)])]),
|
|
9241
|
+
}, null, 8, ["onClick"])) : createCommentVNode("v-if", true)]), createElementVNode("div", _hoisted_3$c, [renderSlot(_ctx.$slots, "extra")])]),
|
|
9134
9242
|
_: 3
|
|
9135
9243
|
}, 8, ["show", "lock-scroll", "teleport", "onOpen", "onClose", "onClosed", "onOpened", "onRouteChange"]);
|
|
9136
9244
|
}
|
|
@@ -9764,7 +9872,6 @@ var IndexBar = defineComponent({
|
|
|
9764
9872
|
indexAnchors,
|
|
9765
9873
|
bindIndexAnchors
|
|
9766
9874
|
} = useIndexAnchors();
|
|
9767
|
-
var scrollEl = ref(null);
|
|
9768
9875
|
var clickedName = ref("");
|
|
9769
9876
|
var scroller2 = ref(null);
|
|
9770
9877
|
var barEl = ref(null);
|
|
@@ -9790,10 +9897,8 @@ var IndexBar = defineComponent({
|
|
|
9790
9897
|
props2.onChange == null ? void 0 : props2.onChange(anchorName);
|
|
9791
9898
|
};
|
|
9792
9899
|
var handleScroll = () => {
|
|
9793
|
-
var
|
|
9794
|
-
|
|
9795
|
-
scrollHeight
|
|
9796
|
-
} = scrollEl.value;
|
|
9900
|
+
var scrollTop = getScrollTop(scroller2.value);
|
|
9901
|
+
var scrollHeight = scroller2.value === window ? document.body.scrollHeight : scroller2.value.scrollHeight;
|
|
9797
9902
|
var {
|
|
9798
9903
|
offsetTop
|
|
9799
9904
|
} = barEl.value;
|
|
@@ -9828,10 +9933,10 @@ var IndexBar = defineComponent({
|
|
|
9828
9933
|
if (!indexAnchor)
|
|
9829
9934
|
return;
|
|
9830
9935
|
var top = indexAnchor.ownTop.value - stickyOffsetTop.value + offsetTop;
|
|
9831
|
-
var left = getScrollLeft(
|
|
9936
|
+
var left = getScrollLeft(scroller2.value);
|
|
9832
9937
|
clickedName.value = anchorName;
|
|
9833
9938
|
emitEvent(anchorName);
|
|
9834
|
-
yield scrollTo(
|
|
9939
|
+
yield scrollTo(scroller2.value, {
|
|
9835
9940
|
left,
|
|
9836
9941
|
top,
|
|
9837
9942
|
animation: easeInOutCubic,
|
|
@@ -9861,15 +9966,13 @@ var IndexBar = defineComponent({
|
|
|
9861
9966
|
});
|
|
9862
9967
|
}));
|
|
9863
9968
|
onMounted(/* @__PURE__ */ _asyncToGenerator$4(function* () {
|
|
9864
|
-
var _scroller$value;
|
|
9865
9969
|
yield doubleRaf();
|
|
9866
9970
|
scroller2.value = getParentScroller(barEl.value);
|
|
9867
|
-
|
|
9868
|
-
(_scroller$value = scroller2.value) == null ? void 0 : _scroller$value.addEventListener("scroll", handleScroll);
|
|
9971
|
+
scroller2.value.addEventListener("scroll", handleScroll);
|
|
9869
9972
|
}));
|
|
9870
9973
|
onBeforeUnmount(() => {
|
|
9871
|
-
var _scroller$
|
|
9872
|
-
(_scroller$
|
|
9974
|
+
var _scroller$value;
|
|
9975
|
+
(_scroller$value = scroller2.value) == null ? void 0 : _scroller$value.removeEventListener("scroll", handleScroll);
|
|
9873
9976
|
});
|
|
9874
9977
|
return {
|
|
9875
9978
|
barEl,
|
|
@@ -16025,6 +16128,10 @@ var props = {
|
|
|
16025
16128
|
rules: {
|
|
16026
16129
|
type: Array
|
|
16027
16130
|
},
|
|
16131
|
+
hideList: {
|
|
16132
|
+
type: Boolean,
|
|
16133
|
+
default: false
|
|
16134
|
+
},
|
|
16028
16135
|
onBeforeRead: {
|
|
16029
16136
|
type: Function
|
|
16030
16137
|
},
|
|
@@ -16093,7 +16200,7 @@ function render(_ctx, _cache) {
|
|
|
16093
16200
|
var _component_var_form_details = resolveComponent("var-form-details");
|
|
16094
16201
|
var _component_var_popup = resolveComponent("var-popup");
|
|
16095
16202
|
var _directive_ripple = resolveDirective("ripple");
|
|
16096
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("div", _hoisted_2, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.
|
|
16203
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("div", _hoisted_2, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.files, (f) => {
|
|
16097
16204
|
return withDirectives((openBlock(), createElementBlock("div", {
|
|
16098
16205
|
class: normalizeClass(["var-uploader__file var-elevation--2", [f.state === "loading" ? "var-uploader--loading" : null]]),
|
|
16099
16206
|
key: f.id,
|
|
@@ -16200,6 +16307,16 @@ var Uploader = defineComponent({
|
|
|
16200
16307
|
validate: v,
|
|
16201
16308
|
resetValidation
|
|
16202
16309
|
} = useValidation();
|
|
16310
|
+
var files = computed(() => {
|
|
16311
|
+
var {
|
|
16312
|
+
modelValue,
|
|
16313
|
+
hideList
|
|
16314
|
+
} = props2;
|
|
16315
|
+
if (hideList) {
|
|
16316
|
+
return [];
|
|
16317
|
+
}
|
|
16318
|
+
return modelValue;
|
|
16319
|
+
});
|
|
16203
16320
|
var preview = (varFile) => {
|
|
16204
16321
|
var {
|
|
16205
16322
|
disabled,
|
|
@@ -16292,8 +16409,8 @@ var Uploader = defineComponent({
|
|
|
16292
16409
|
var limit = Math.min(varFiles2.length, toNumber(maxlength) - modelValue.length);
|
|
16293
16410
|
return varFiles2.slice(0, limit);
|
|
16294
16411
|
};
|
|
16295
|
-
var
|
|
16296
|
-
var varFiles =
|
|
16412
|
+
var files2 = getFiles(event);
|
|
16413
|
+
var varFiles = files2.map(createVarFile);
|
|
16297
16414
|
varFiles = maxsize != null ? getValidSizeVarFile(varFiles) : varFiles;
|
|
16298
16415
|
varFiles = maxlength != null ? getValidLengthVarFiles(varFiles) : varFiles;
|
|
16299
16416
|
var resolvedVarFiles = yield Promise.all(getResolvers(varFiles));
|
|
@@ -16381,6 +16498,7 @@ var Uploader = defineComponent({
|
|
|
16381
16498
|
deep: true
|
|
16382
16499
|
});
|
|
16383
16500
|
return {
|
|
16501
|
+
files,
|
|
16384
16502
|
showPreview,
|
|
16385
16503
|
currentPreview,
|
|
16386
16504
|
errorMessage,
|
|
@@ -16488,9 +16606,9 @@ var skeleton = "";
|
|
|
16488
16606
|
var SkeletonSfc = "";
|
|
16489
16607
|
var slider = "";
|
|
16490
16608
|
var SliderSfc = "";
|
|
16491
|
-
var SnackbarSfc = "";
|
|
16492
16609
|
var snackbar = "";
|
|
16493
16610
|
var coreSfc = "";
|
|
16611
|
+
var SnackbarSfc = "";
|
|
16494
16612
|
var space = "";
|
|
16495
16613
|
var step = "";
|
|
16496
16614
|
var StepSfc = "";
|