@varlet/ui 2.20.5 → 2.20.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/es/field-decorator/FieldDecorator.mjs +9 -8
- package/es/icon/icon.css +1 -1
- package/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/input/Input.mjs +3 -0
- package/es/picker/Picker.mjs +18 -3
- package/es/select/Select.mjs +3 -0
- package/es/snackbar/core.mjs +4 -3
- package/es/style.css +1 -1
- package/es/swipe/Swipe.mjs +3 -6
- package/es/themes/dark/bottomNavigationItem.mjs +2 -1
- package/es/varlet.esm.js +1430 -1415
- package/highlight/web-types.en-US.json +9 -1
- package/highlight/web-types.zh-CN.json +9 -1
- package/lib/style.css +1 -1
- package/lib/varlet.cjs.js +41 -20
- package/package.json +9 -9
- package/types/input.d.ts +1 -0
- package/types/select.d.ts +1 -0
- package/umd/varlet.js +5 -5
package/lib/varlet.cjs.js
CHANGED
|
@@ -13890,13 +13890,14 @@ function __render__$M(_ctx, _cache) {
|
|
|
13890
13890
|
class: vue.normalizeClass(_ctx.classes(_ctx.n("icon"), [!_ctx.hint, _ctx.n("--icon-non-hint")]))
|
|
13891
13891
|
},
|
|
13892
13892
|
[
|
|
13893
|
-
_ctx.clearable && !_ctx.isEmpty(_ctx.value) ?
|
|
13894
|
-
|
|
13895
|
-
|
|
13896
|
-
|
|
13897
|
-
|
|
13898
|
-
|
|
13899
|
-
|
|
13893
|
+
_ctx.clearable && !_ctx.isEmpty(_ctx.value) ? vue.renderSlot(_ctx.$slots, "clear-icon", { key: 0 }, () => [
|
|
13894
|
+
vue.createVNode(_component_var_icon, {
|
|
13895
|
+
class: vue.normalizeClass(_ctx.n("clear-icon")),
|
|
13896
|
+
"var-field-decorator-cover": "",
|
|
13897
|
+
name: "close-circle",
|
|
13898
|
+
onClick: _ctx.handleClear
|
|
13899
|
+
}, null, 8, ["class", "onClick"])
|
|
13900
|
+
]) : vue.createCommentVNode("v-if", true),
|
|
13900
13901
|
vue.renderSlot(_ctx.$slots, "append-icon")
|
|
13901
13902
|
],
|
|
13902
13903
|
2
|
|
@@ -14883,10 +14884,6 @@ const __sfc__$J = vue.defineComponent({
|
|
|
14883
14884
|
function stopAutoplay() {
|
|
14884
14885
|
timer && clearTimeout(timer);
|
|
14885
14886
|
}
|
|
14886
|
-
function setTrackTranslate(value) {
|
|
14887
|
-
trackTranslate.value = value;
|
|
14888
|
-
dispatchSwipeItems();
|
|
14889
|
-
}
|
|
14890
14887
|
function handleTouchstart(event) {
|
|
14891
14888
|
return __async$7(this, null, function* () {
|
|
14892
14889
|
if (length.value <= 1 || !props2.touchable) {
|
|
@@ -14908,7 +14905,8 @@ const __sfc__$J = vue.defineComponent({
|
|
|
14908
14905
|
return;
|
|
14909
14906
|
}
|
|
14910
14907
|
preventDefault(event);
|
|
14911
|
-
|
|
14908
|
+
trackTranslate.value += vertical2 ? moveY.value : moveX.value;
|
|
14909
|
+
dispatchSwipeItems();
|
|
14912
14910
|
}
|
|
14913
14911
|
function handleTouchend() {
|
|
14914
14912
|
if (!touching.value) {
|
|
@@ -14924,7 +14922,7 @@ const __sfc__$J = vue.defineComponent({
|
|
|
14924
14922
|
const quickSwiping = performance.now() - startTime.value <= SWIPE_DELAY && offset2 >= SWIPE_OFFSET;
|
|
14925
14923
|
const swipeIndex = quickSwiping ? positive ? getSwipeIndex(index.value + 1) : getSwipeIndex(index.value - 1) : getSwipeIndex();
|
|
14926
14924
|
lockDuration.value = false;
|
|
14927
|
-
|
|
14925
|
+
trackTranslate.value = swipeIndex * -size.value;
|
|
14928
14926
|
const prevIndex = index.value;
|
|
14929
14927
|
index.value = swipeIndexToIndex(swipeIndex);
|
|
14930
14928
|
startAutoplay();
|
|
@@ -15996,6 +15994,9 @@ function __render__$D(_ctx, _cache) {
|
|
|
15996
15994
|
onClear: _ctx.handleClear
|
|
15997
15995
|
})),
|
|
15998
15996
|
vue.createSlots({
|
|
15997
|
+
"clear-icon": vue.withCtx(() => [
|
|
15998
|
+
vue.renderSlot(_ctx.$slots, "clear-icon")
|
|
15999
|
+
]),
|
|
15999
16000
|
"append-icon": vue.withCtx(() => [
|
|
16000
16001
|
vue.renderSlot(_ctx.$slots, "append-icon")
|
|
16001
16002
|
]),
|
|
@@ -18343,7 +18344,16 @@ const __sfc__$v = vue.defineComponent({
|
|
|
18343
18344
|
let prevIndexes = [];
|
|
18344
18345
|
buildScrollColumns();
|
|
18345
18346
|
vue.watch(() => props2.columns, buildScrollColumns, { deep: true });
|
|
18346
|
-
vue.watch(
|
|
18347
|
+
vue.watch(
|
|
18348
|
+
() => modelValue.value,
|
|
18349
|
+
() => {
|
|
18350
|
+
if (props2.cascade && props2.modelValue.length) {
|
|
18351
|
+
buildScrollColumns();
|
|
18352
|
+
} else {
|
|
18353
|
+
updateScrollColumnsIndex();
|
|
18354
|
+
}
|
|
18355
|
+
}
|
|
18356
|
+
);
|
|
18347
18357
|
function getOptionKey(key) {
|
|
18348
18358
|
const keyMap = {
|
|
18349
18359
|
text: props2.textKey,
|
|
@@ -18400,6 +18410,10 @@ const __sfc__$v = vue.defineComponent({
|
|
|
18400
18410
|
scrolling: false
|
|
18401
18411
|
};
|
|
18402
18412
|
scrollColumns2.push(scrollColumn);
|
|
18413
|
+
if (props2.modelValue.length) {
|
|
18414
|
+
const index = children.findIndex((option) => modelValue.value[scrollColumns2.length - 1] === getValue(option));
|
|
18415
|
+
scrollColumn.index = index === -1 ? 0 : index;
|
|
18416
|
+
}
|
|
18403
18417
|
scrollTo2(scrollColumn);
|
|
18404
18418
|
createChildren(scrollColumns2, (_a = scrollColumn.column[scrollColumn.index][getOptionKey("children")]) != null ? _a : []);
|
|
18405
18419
|
}
|
|
@@ -18411,7 +18425,9 @@ const __sfc__$v = vue.defineComponent({
|
|
|
18411
18425
|
}
|
|
18412
18426
|
function buildScrollColumns() {
|
|
18413
18427
|
scrollColumns.value = props2.cascade ? normalizeCascadeMode(props2.columns) : normalizeNormalMode(props2.columns);
|
|
18414
|
-
|
|
18428
|
+
if (!props2.cascade) {
|
|
18429
|
+
updateScrollColumnsIndex();
|
|
18430
|
+
}
|
|
18415
18431
|
}
|
|
18416
18432
|
function updateScrollColumnsIndex() {
|
|
18417
18433
|
scrollColumns.value.forEach((scrollColumn, idx) => {
|
|
@@ -18523,7 +18539,7 @@ const __sfc__$v = vue.defineComponent({
|
|
|
18523
18539
|
if (isSamePicked()) {
|
|
18524
18540
|
return;
|
|
18525
18541
|
}
|
|
18526
|
-
if (cascade) {
|
|
18542
|
+
if (cascade && !props2.modelValue.length) {
|
|
18527
18543
|
rebuildChildren(scrollColumn);
|
|
18528
18544
|
}
|
|
18529
18545
|
const hasScrolling = scrollColumns.value.some((scrollColumn2) => scrollColumn2.scrolling);
|
|
@@ -20287,6 +20303,9 @@ function __render__$g(_ctx, _cache) {
|
|
|
20287
20303
|
onClear: _ctx.handleClear
|
|
20288
20304
|
})),
|
|
20289
20305
|
vue.createSlots({
|
|
20306
|
+
"clear-icon": vue.withCtx(() => [
|
|
20307
|
+
vue.renderSlot(_ctx.$slots, "clear-icon")
|
|
20308
|
+
]),
|
|
20290
20309
|
"append-icon": vue.withCtx(() => [
|
|
20291
20310
|
vue.renderSlot(_ctx.$slots, "append-icon")
|
|
20292
20311
|
]),
|
|
@@ -21486,9 +21505,10 @@ function __render__$d(_ctx, _cache) {
|
|
|
21486
21505
|
2
|
|
21487
21506
|
/* CLASS */
|
|
21488
21507
|
),
|
|
21489
|
-
vue.
|
|
21508
|
+
_ctx.$slots.action ? (vue.openBlock(), vue.createElementBlock(
|
|
21490
21509
|
"div",
|
|
21491
21510
|
{
|
|
21511
|
+
key: 0,
|
|
21492
21512
|
class: vue.normalizeClass(_ctx.n("action"))
|
|
21493
21513
|
},
|
|
21494
21514
|
[
|
|
@@ -21496,7 +21516,7 @@ function __render__$d(_ctx, _cache) {
|
|
|
21496
21516
|
],
|
|
21497
21517
|
2
|
|
21498
21518
|
/* CLASS */
|
|
21499
|
-
)
|
|
21519
|
+
)) : vue.createCommentVNode("v-if", true)
|
|
21500
21520
|
],
|
|
21501
21521
|
6
|
|
21502
21522
|
/* CLASS, STYLE */
|
|
@@ -23201,7 +23221,8 @@ var stdin_default$l = {
|
|
|
23201
23221
|
"--bottom-navigation-border-color": "#444"
|
|
23202
23222
|
};
|
|
23203
23223
|
var stdin_default$k = {
|
|
23204
|
-
"--bottom-navigation-item-active-background-color": "#272727"
|
|
23224
|
+
"--bottom-navigation-item-active-background-color": "#272727",
|
|
23225
|
+
"--bottom-navigation-item-inactive-color": "#BFBFBF"
|
|
23205
23226
|
};
|
|
23206
23227
|
var stdin_default$j = {
|
|
23207
23228
|
"--menu-background-color": "#272727"
|
|
@@ -24944,7 +24965,7 @@ withInstall(stdin_default$1);
|
|
|
24944
24965
|
withPropsDefaultsSetter(stdin_default$1, props);
|
|
24945
24966
|
const _WatermarkComponent = stdin_default$1;
|
|
24946
24967
|
var stdin_default = stdin_default$1;
|
|
24947
|
-
const version = "2.20.
|
|
24968
|
+
const version = "2.20.7";
|
|
24948
24969
|
function install(app) {
|
|
24949
24970
|
stdin_default$3k.install && app.use(stdin_default$3k);
|
|
24950
24971
|
stdin_default$3i.install && app.use(stdin_default$3i);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varlet/ui",
|
|
3
|
-
"version": "2.20.
|
|
3
|
+
"version": "2.20.7",
|
|
4
4
|
"description": "A material like components library",
|
|
5
5
|
"main": "lib/varlet.cjs.js",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -48,12 +48,12 @@
|
|
|
48
48
|
"@popperjs/core": "^2.11.6",
|
|
49
49
|
"dayjs": "^1.10.4",
|
|
50
50
|
"decimal.js": "^10.2.1",
|
|
51
|
-
"@varlet/
|
|
52
|
-
"@varlet/
|
|
53
|
-
"@varlet/shared": "2.20.
|
|
51
|
+
"@varlet/use": "2.20.7",
|
|
52
|
+
"@varlet/icons": "2.20.7",
|
|
53
|
+
"@varlet/shared": "2.20.7"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@vue/runtime-core": "3.4.
|
|
56
|
+
"@vue/runtime-core": "3.4.3",
|
|
57
57
|
"@vue/test-utils": "2.4.1",
|
|
58
58
|
"@types/lodash-es": "^4.17.6",
|
|
59
59
|
"@types/node": "^18.7.18",
|
|
@@ -64,11 +64,11 @@
|
|
|
64
64
|
"live-server": "^1.2.1",
|
|
65
65
|
"lodash-es": "^4.17.21",
|
|
66
66
|
"typescript": "^5.1.5",
|
|
67
|
-
"vue": "3.4.
|
|
67
|
+
"vue": "3.4.3",
|
|
68
68
|
"vue-router": "4.2.0",
|
|
69
|
-
"@varlet/ui": "2.20.
|
|
70
|
-
"@varlet/cli": "2.20.
|
|
71
|
-
"@varlet/touch-emulator": "2.20.
|
|
69
|
+
"@varlet/ui": "2.20.7",
|
|
70
|
+
"@varlet/cli": "2.20.7",
|
|
71
|
+
"@varlet/touch-emulator": "2.20.7"
|
|
72
72
|
},
|
|
73
73
|
"scripts": {
|
|
74
74
|
"dev": "varlet-cli dev",
|
package/types/input.d.ts
CHANGED