@varlet/ui 1.27.15 → 1.27.17
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/collapse-item/CollapseItem.js +11 -2
- package/es/input/Input.js +26 -6
- package/es/select/Select.js +12 -6
- package/es/select/select.css +1 -1
- package/es/select/select.less +1 -0
- package/es/skeleton/Skeleton.js +6 -4
- package/es/slider/Slider.js +3 -3
- package/es/snackbar/snackbar.css +1 -1
- package/es/snackbar/snackbar.less +0 -4
- package/es/style.css +1 -1
- package/es/utils/shared.js +1 -9
- package/es/varlet.esm.js +49 -30
- package/highlight/attributes.json +1 -1
- package/highlight/web-types.json +2 -2
- package/lib/collapse-item/CollapseItem.js +11 -2
- package/lib/input/Input.js +26 -6
- package/lib/select/Select.js +11 -5
- package/lib/select/select.css +1 -1
- package/lib/select/select.less +1 -0
- package/lib/skeleton/Skeleton.js +6 -4
- package/lib/slider/Slider.js +2 -2
- package/lib/snackbar/snackbar.css +1 -1
- package/lib/snackbar/snackbar.less +0 -4
- package/lib/style.css +1 -1
- package/lib/utils/shared.js +4 -14
- package/package.json +5 -5
- package/types/button.d.ts +2 -2
- package/types/card.d.ts +2 -2
- package/types/cell.d.ts +2 -2
- package/types/icon.d.ts +2 -2
- package/types/input.d.ts +1 -1
- package/types/list.d.ts +2 -2
- package/types/switch.d.ts +2 -2
- package/types/varComponent.d.ts +5 -0
- package/umd/varlet.js +4 -4
package/es/utils/shared.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { removeItem } from '@varlet/shared';
|
|
1
2
|
export var isHTMLSupportImage = val => {
|
|
2
3
|
if (val == null) {
|
|
3
4
|
return false;
|
|
@@ -12,15 +13,6 @@ export var isHTMLSupportVideo = val => {
|
|
|
12
13
|
|
|
13
14
|
return val.startsWith('data:video') || /\.(mp4|webm|ogg)$/.test(val);
|
|
14
15
|
};
|
|
15
|
-
export var removeItem = (arr, item) => {
|
|
16
|
-
if (arr.length) {
|
|
17
|
-
var index = arr.indexOf(item);
|
|
18
|
-
|
|
19
|
-
if (index > -1) {
|
|
20
|
-
return arr.splice(index, 1);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
16
|
export var createCache = max => {
|
|
25
17
|
var cache = [];
|
|
26
18
|
return {
|
package/es/varlet.esm.js
CHANGED
|
@@ -31,7 +31,7 @@ const toNumber = (val) => {
|
|
|
31
31
|
return Number(val);
|
|
32
32
|
return val;
|
|
33
33
|
};
|
|
34
|
-
const removeItem
|
|
34
|
+
const removeItem = (arr, item) => {
|
|
35
35
|
if (arr.length) {
|
|
36
36
|
const index = arr.indexOf(item);
|
|
37
37
|
if (index > -1) {
|
|
@@ -406,7 +406,7 @@ function useAtChildrenCounter(key) {
|
|
|
406
406
|
sortInstances();
|
|
407
407
|
};
|
|
408
408
|
var clear2 = (instance) => {
|
|
409
|
-
removeItem
|
|
409
|
+
removeItem(instances, instance);
|
|
410
410
|
};
|
|
411
411
|
provide(key, {
|
|
412
412
|
collect,
|
|
@@ -448,7 +448,7 @@ function useChildren(key) {
|
|
|
448
448
|
childProviders.push(childProvider);
|
|
449
449
|
};
|
|
450
450
|
var clear2 = (childProvider) => {
|
|
451
|
-
removeItem
|
|
451
|
+
removeItem(childProviders, childProvider);
|
|
452
452
|
};
|
|
453
453
|
var bindChildren = (parentProvider) => {
|
|
454
454
|
provide(key, _extends$e({
|
|
@@ -1196,14 +1196,6 @@ var isHTMLSupportVideo = (val) => {
|
|
|
1196
1196
|
}
|
|
1197
1197
|
return val.startsWith("data:video") || /\.(mp4|webm|ogg)$/.test(val);
|
|
1198
1198
|
};
|
|
1199
|
-
var removeItem = (arr, item) => {
|
|
1200
|
-
if (arr.length) {
|
|
1201
|
-
var index = arr.indexOf(item);
|
|
1202
|
-
if (index > -1) {
|
|
1203
|
-
return arr.splice(index, 1);
|
|
1204
|
-
}
|
|
1205
|
-
}
|
|
1206
|
-
};
|
|
1207
1199
|
var createCache = (max2) => {
|
|
1208
1200
|
var cache = [];
|
|
1209
1201
|
return {
|
|
@@ -3916,13 +3908,19 @@ var CollapseItem = defineComponent({
|
|
|
3916
3908
|
var closePanel = () => {
|
|
3917
3909
|
if (!contentEl.value)
|
|
3918
3910
|
return;
|
|
3919
|
-
|
|
3911
|
+
var {
|
|
3912
|
+
offsetHeight
|
|
3913
|
+
} = contentEl.value;
|
|
3914
|
+
contentEl.value.style.height = offsetHeight + "px";
|
|
3915
|
+
requestAnimationFrame(() => {
|
|
3916
|
+
contentEl.value.style.height = 0 + "px";
|
|
3917
|
+
});
|
|
3920
3918
|
};
|
|
3921
3919
|
var transitionend = () => {
|
|
3922
3920
|
if (!isShow.value) {
|
|
3923
3921
|
show.value = false;
|
|
3924
|
-
contentEl.value.style.height = "";
|
|
3925
3922
|
}
|
|
3923
|
+
contentEl.value.style.height = "";
|
|
3926
3924
|
};
|
|
3927
3925
|
var collapseItemProvider = {
|
|
3928
3926
|
index,
|
|
@@ -9183,7 +9181,7 @@ function _add() {
|
|
|
9183
9181
|
return _add.apply(this, arguments);
|
|
9184
9182
|
}
|
|
9185
9183
|
function clear(el) {
|
|
9186
|
-
removeItem
|
|
9184
|
+
removeItem(lazyElements, el);
|
|
9187
9185
|
lazyElements.length === 0 && unbindEvents();
|
|
9188
9186
|
}
|
|
9189
9187
|
function diff(el, binding) {
|
|
@@ -10888,7 +10886,7 @@ function render$q(_ctx, _cache) {
|
|
|
10888
10886
|
var _component_var_form_details = resolveComponent("var-form-details");
|
|
10889
10887
|
return openBlock(), createElementBlock("div", {
|
|
10890
10888
|
class: normalizeClass(_ctx.classes(_ctx.n(), "var--box", [_ctx.disabled, _ctx.n("--disabled")])),
|
|
10891
|
-
onClick: _cache[
|
|
10889
|
+
onClick: _cache[10] || (_cache[10] = function() {
|
|
10892
10890
|
return _ctx.handleClick && _ctx.handleClick(...arguments);
|
|
10893
10891
|
})
|
|
10894
10892
|
}, [createElementVNode("div", {
|
|
@@ -10930,6 +10928,9 @@ function render$q(_ctx, _cache) {
|
|
|
10930
10928
|
}),
|
|
10931
10929
|
onChange: _cache[3] || (_cache[3] = function() {
|
|
10932
10930
|
return _ctx.handleChange && _ctx.handleChange(...arguments);
|
|
10931
|
+
}),
|
|
10932
|
+
onTouchstart: _cache[4] || (_cache[4] = function() {
|
|
10933
|
+
return _ctx.handleTouchstart && _ctx.handleTouchstart(...arguments);
|
|
10933
10934
|
})
|
|
10934
10935
|
}, "\n ", 46, _hoisted_1$9)) : (openBlock(), createElementBlock("input", {
|
|
10935
10936
|
key: 2,
|
|
@@ -10945,17 +10946,20 @@ function render$q(_ctx, _cache) {
|
|
|
10945
10946
|
color: _ctx.textColor,
|
|
10946
10947
|
caretColor: !_ctx.errorMessage ? _ctx.focusColor : void 0
|
|
10947
10948
|
}),
|
|
10948
|
-
onFocus: _cache[
|
|
10949
|
+
onFocus: _cache[5] || (_cache[5] = function() {
|
|
10949
10950
|
return _ctx.handleFocus && _ctx.handleFocus(...arguments);
|
|
10950
10951
|
}),
|
|
10951
|
-
onBlur: _cache[
|
|
10952
|
+
onBlur: _cache[6] || (_cache[6] = function() {
|
|
10952
10953
|
return _ctx.handleBlur && _ctx.handleBlur(...arguments);
|
|
10953
10954
|
}),
|
|
10954
|
-
onInput: _cache[
|
|
10955
|
+
onInput: _cache[7] || (_cache[7] = function() {
|
|
10955
10956
|
return _ctx.handleInput && _ctx.handleInput(...arguments);
|
|
10956
10957
|
}),
|
|
10957
|
-
onChange: _cache[
|
|
10958
|
+
onChange: _cache[8] || (_cache[8] = function() {
|
|
10958
10959
|
return _ctx.handleChange && _ctx.handleChange(...arguments);
|
|
10960
|
+
}),
|
|
10961
|
+
onTouchstart: _cache[9] || (_cache[9] = function() {
|
|
10962
|
+
return _ctx.handleTouchstart && _ctx.handleTouchstart(...arguments);
|
|
10959
10963
|
})
|
|
10960
10964
|
}, null, 46, _hoisted_2$5)), createElementVNode("label", {
|
|
10961
10965
|
class: normalizeClass(_ctx.classes("var--ellipsis", [_ctx.isFocus, _ctx.n("--focus")], [_ctx.errorMessage, _ctx.n("--error")], [_ctx.textarea, _ctx.n("textarea-placeholder"), _ctx.n("placeholder")], _ctx.computePlaceholderState(), [!_ctx.hint, _ctx.n("--placeholder-non-hint")])),
|
|
@@ -11097,6 +11101,16 @@ var Input = defineComponent({
|
|
|
11097
11101
|
validateWithTrigger("onClick");
|
|
11098
11102
|
};
|
|
11099
11103
|
var withTrim = (value) => props2.modelModifiers.trim ? value.trim() : value;
|
|
11104
|
+
var handleTouchstart = (e) => {
|
|
11105
|
+
var {
|
|
11106
|
+
disabled,
|
|
11107
|
+
readonly
|
|
11108
|
+
} = props2;
|
|
11109
|
+
if (form != null && form.disabled.value || form != null && form.readonly.value || disabled || readonly) {
|
|
11110
|
+
return;
|
|
11111
|
+
}
|
|
11112
|
+
e.stopPropagation();
|
|
11113
|
+
};
|
|
11100
11114
|
var reset = () => {
|
|
11101
11115
|
call(props2["onUpdate:modelValue"], "");
|
|
11102
11116
|
resetValidation();
|
|
@@ -11137,6 +11151,7 @@ var Input = defineComponent({
|
|
|
11137
11151
|
handleChange,
|
|
11138
11152
|
handleClear,
|
|
11139
11153
|
handleClick,
|
|
11154
|
+
handleTouchstart,
|
|
11140
11155
|
validate,
|
|
11141
11156
|
resetValidation,
|
|
11142
11157
|
reset,
|
|
@@ -13976,17 +13991,19 @@ var Select = defineComponent({
|
|
|
13976
13991
|
var {
|
|
13977
13992
|
body
|
|
13978
13993
|
} = document;
|
|
13994
|
+
var bodyScrollHeight = body.scrollHeight;
|
|
13979
13995
|
nextTick(() => {
|
|
13980
|
-
var _menuEl$value
|
|
13996
|
+
var _menuEl$value;
|
|
13981
13997
|
var {
|
|
13982
|
-
offsetTop: menuOffsetTop,
|
|
13983
13998
|
offsetHeight: menuOffsetHeight
|
|
13984
13999
|
} = (_menuEl$value = menuEl.value) == null ? void 0 : _menuEl$value.parentElement;
|
|
13985
|
-
var
|
|
13986
|
-
if (
|
|
14000
|
+
var wrapOffsetTop = getTop$1(wrapEl.value);
|
|
14001
|
+
if (wrapOffsetTop + offsetY.value < 0) {
|
|
13987
14002
|
offsetY.value = getOffsetY();
|
|
13988
|
-
|
|
13989
|
-
|
|
14003
|
+
}
|
|
14004
|
+
if (menuOffsetHeight + wrapOffsetTop + offsetY.value > bodyScrollHeight) {
|
|
14005
|
+
offsetY.value -= menuOffsetHeight - getOffsetY();
|
|
14006
|
+
}
|
|
13990
14007
|
});
|
|
13991
14008
|
};
|
|
13992
14009
|
watch(() => props2.multiple, () => {
|
|
@@ -14105,7 +14122,8 @@ function render$e(_ctx, _cache) {
|
|
|
14105
14122
|
})
|
|
14106
14123
|
}, [createElementVNode("div", {
|
|
14107
14124
|
class: normalizeClass(_ctx.n("--animation"))
|
|
14108
|
-
}, null, 2)], 6)) : createCommentVNode("v-if", true),
|
|
14125
|
+
}, null, 2)], 6)) : createCommentVNode("v-if", true), _ctx.avatar || _ctx.title || _ctx.toNumber(_ctx.rows) > 0 ? (openBlock(), createElementBlock("div", {
|
|
14126
|
+
key: 1,
|
|
14109
14127
|
class: normalizeClass(_ctx.n("article"))
|
|
14110
14128
|
}, [_ctx.avatar ? (openBlock(), createElementBlock("div", {
|
|
14111
14129
|
key: 0,
|
|
@@ -14116,7 +14134,8 @@ function render$e(_ctx, _cache) {
|
|
|
14116
14134
|
})
|
|
14117
14135
|
}, [createElementVNode("div", {
|
|
14118
14136
|
class: normalizeClass(_ctx.n("--animation"))
|
|
14119
|
-
}, null, 2)], 6)) : createCommentVNode("v-if", true),
|
|
14137
|
+
}, null, 2)], 6)) : createCommentVNode("v-if", true), _ctx.title || _ctx.toNumber(_ctx.rows) > 0 ? (openBlock(), createElementBlock("div", {
|
|
14138
|
+
key: 1,
|
|
14120
14139
|
class: normalizeClass(_ctx.n("section"))
|
|
14121
14140
|
}, [_ctx.title ? (openBlock(), createElementBlock("div", {
|
|
14122
14141
|
key: 0,
|
|
@@ -14136,7 +14155,7 @@ function render$e(_ctx, _cache) {
|
|
|
14136
14155
|
}, [createElementVNode("div", {
|
|
14137
14156
|
class: normalizeClass(_ctx.n("--animation"))
|
|
14138
14157
|
}, null, 2)], 6);
|
|
14139
|
-
}), 128))], 2)], 2)], 2)) : createCommentVNode("v-if", true), _ctx.loading && _ctx.fullscreen ? (openBlock(), createElementBlock("div", {
|
|
14158
|
+
}), 128))], 2)) : createCommentVNode("v-if", true)], 2)) : createCommentVNode("v-if", true)], 2)) : createCommentVNode("v-if", true), _ctx.loading && _ctx.fullscreen ? (openBlock(), createElementBlock("div", {
|
|
14140
14159
|
key: 2,
|
|
14141
14160
|
class: normalizeClass(_ctx.n("fullscreen")),
|
|
14142
14161
|
style: normalizeStyle({
|
|
@@ -14285,8 +14304,8 @@ function render$d(_ctx, _cache) {
|
|
|
14285
14304
|
left: item.value + "%",
|
|
14286
14305
|
zIndex: _ctx.thumbsProps[item.enumValue].active ? 1 : void 0
|
|
14287
14306
|
}),
|
|
14288
|
-
onTouchstart: ($event) => _ctx.start($event, item.enumValue),
|
|
14289
|
-
onTouchmove: ($event) => _ctx.move($event, item.enumValue),
|
|
14307
|
+
onTouchstart: withModifiers(($event) => _ctx.start($event, item.enumValue), ["stop"]),
|
|
14308
|
+
onTouchmove: withModifiers(($event) => _ctx.move($event, item.enumValue), ["stop"]),
|
|
14290
14309
|
onTouchend: ($event) => _ctx.end(item.enumValue),
|
|
14291
14310
|
onTouchcancel: ($event) => _ctx.end(item.enumValue)
|
|
14292
14311
|
}, [renderSlot(_ctx.$slots, "button", {
|
|
@@ -849,7 +849,7 @@
|
|
|
849
849
|
},
|
|
850
850
|
"var-input/type": {
|
|
851
851
|
"type": "string",
|
|
852
|
-
"description": "输入框类型, 可选值为 `text` `password` `number` 默认值:text"
|
|
852
|
+
"description": "输入框类型, 可选值为 `text` `password` `number` `tel` 默认值:text"
|
|
853
853
|
},
|
|
854
854
|
"var-input/maxlength": {
|
|
855
855
|
"type": "string | number",
|
package/highlight/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"framework": "vue",
|
|
4
|
-
"version": "1.27.
|
|
4
|
+
"version": "1.27.16",
|
|
5
5
|
"name": "VARLET",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -2537,7 +2537,7 @@
|
|
|
2537
2537
|
},
|
|
2538
2538
|
{
|
|
2539
2539
|
"name": "type",
|
|
2540
|
-
"description": "输入框类型, 可选值为 `text` `password` `number`",
|
|
2540
|
+
"description": "输入框类型, 可选值为 `text` `password` `number` `tel`",
|
|
2541
2541
|
"default": "text",
|
|
2542
2542
|
"value": {
|
|
2543
2543
|
"type": "string",
|
|
@@ -124,14 +124,23 @@ var _default = (0, _vue.defineComponent)({
|
|
|
124
124
|
|
|
125
125
|
var closePanel = () => {
|
|
126
126
|
if (!contentEl.value) return;
|
|
127
|
-
|
|
127
|
+
var {
|
|
128
|
+
offsetHeight
|
|
129
|
+
} = contentEl.value;
|
|
130
|
+
contentEl.value.style.height = offsetHeight + 'px';
|
|
131
|
+
(0, _elements.requestAnimationFrame)(() => {
|
|
132
|
+
;
|
|
133
|
+
contentEl.value.style.height = 0 + 'px';
|
|
134
|
+
});
|
|
128
135
|
};
|
|
129
136
|
|
|
130
137
|
var transitionend = () => {
|
|
131
138
|
if (!isShow.value) {
|
|
132
139
|
show.value = false;
|
|
133
|
-
contentEl.value.style.height = '';
|
|
134
140
|
}
|
|
141
|
+
|
|
142
|
+
;
|
|
143
|
+
contentEl.value.style.height = '';
|
|
135
144
|
};
|
|
136
145
|
|
|
137
146
|
var collapseItemProvider = {
|
package/lib/input/Input.js
CHANGED
|
@@ -38,7 +38,7 @@ function render(_ctx, _cache) {
|
|
|
38
38
|
|
|
39
39
|
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
40
40
|
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), 'var--box', [_ctx.disabled, _ctx.n('--disabled')])),
|
|
41
|
-
onClick: _cache[
|
|
41
|
+
onClick: _cache[10] || (_cache[10] = function () {
|
|
42
42
|
return _ctx.handleClick && _ctx.handleClick(...arguments);
|
|
43
43
|
})
|
|
44
44
|
}, [(0, _vue.createElementVNode)("div", {
|
|
@@ -84,6 +84,9 @@ function render(_ctx, _cache) {
|
|
|
84
84
|
}),
|
|
85
85
|
onChange: _cache[3] || (_cache[3] = function () {
|
|
86
86
|
return _ctx.handleChange && _ctx.handleChange(...arguments);
|
|
87
|
+
}),
|
|
88
|
+
onTouchstart: _cache[4] || (_cache[4] = function () {
|
|
89
|
+
return _ctx.handleTouchstart && _ctx.handleTouchstart(...arguments);
|
|
87
90
|
})
|
|
88
91
|
}, "\n ", 46
|
|
89
92
|
/* CLASS, STYLE, PROPS, HYDRATE_EVENTS */
|
|
@@ -101,17 +104,20 @@ function render(_ctx, _cache) {
|
|
|
101
104
|
color: _ctx.textColor,
|
|
102
105
|
caretColor: !_ctx.errorMessage ? _ctx.focusColor : undefined
|
|
103
106
|
}),
|
|
104
|
-
onFocus: _cache[
|
|
107
|
+
onFocus: _cache[5] || (_cache[5] = function () {
|
|
105
108
|
return _ctx.handleFocus && _ctx.handleFocus(...arguments);
|
|
106
109
|
}),
|
|
107
|
-
onBlur: _cache[
|
|
110
|
+
onBlur: _cache[6] || (_cache[6] = function () {
|
|
108
111
|
return _ctx.handleBlur && _ctx.handleBlur(...arguments);
|
|
109
112
|
}),
|
|
110
|
-
onInput: _cache[
|
|
113
|
+
onInput: _cache[7] || (_cache[7] = function () {
|
|
111
114
|
return _ctx.handleInput && _ctx.handleInput(...arguments);
|
|
112
115
|
}),
|
|
113
|
-
onChange: _cache[
|
|
116
|
+
onChange: _cache[8] || (_cache[8] = function () {
|
|
114
117
|
return _ctx.handleChange && _ctx.handleChange(...arguments);
|
|
118
|
+
}),
|
|
119
|
+
onTouchstart: _cache[9] || (_cache[9] = function () {
|
|
120
|
+
return _ctx.handleTouchstart && _ctx.handleTouchstart(...arguments);
|
|
115
121
|
})
|
|
116
122
|
}, null, 46
|
|
117
123
|
/* CLASS, STYLE, PROPS, HYDRATE_EVENTS */
|
|
@@ -293,7 +299,20 @@ var _default = (0, _vue.defineComponent)({
|
|
|
293
299
|
validateWithTrigger('onClick');
|
|
294
300
|
};
|
|
295
301
|
|
|
296
|
-
var withTrim = value => props.modelModifiers.trim ? value.trim() : value;
|
|
302
|
+
var withTrim = value => props.modelModifiers.trim ? value.trim() : value;
|
|
303
|
+
|
|
304
|
+
var handleTouchstart = e => {
|
|
305
|
+
var {
|
|
306
|
+
disabled,
|
|
307
|
+
readonly
|
|
308
|
+
} = props;
|
|
309
|
+
|
|
310
|
+
if (form != null && form.disabled.value || form != null && form.readonly.value || disabled || readonly) {
|
|
311
|
+
return;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
e.stopPropagation();
|
|
315
|
+
}; // expose
|
|
297
316
|
|
|
298
317
|
|
|
299
318
|
var reset = () => {
|
|
@@ -345,6 +364,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
345
364
|
handleChange,
|
|
346
365
|
handleClear,
|
|
347
366
|
handleClick,
|
|
367
|
+
handleTouchstart,
|
|
348
368
|
validate,
|
|
349
369
|
resetValidation,
|
|
350
370
|
reset,
|
package/lib/select/Select.js
CHANGED
|
@@ -477,16 +477,22 @@ var _default = (0, _vue.defineComponent)({
|
|
|
477
477
|
var {
|
|
478
478
|
body
|
|
479
479
|
} = document;
|
|
480
|
+
var bodyScrollHeight = body.scrollHeight;
|
|
480
481
|
(0, _vue.nextTick)(() => {
|
|
481
|
-
var _menuEl$value
|
|
482
|
+
var _menuEl$value;
|
|
482
483
|
|
|
483
484
|
var {
|
|
484
|
-
offsetTop: menuOffsetTop,
|
|
485
485
|
offsetHeight: menuOffsetHeight
|
|
486
486
|
} = (_menuEl$value = menuEl.value) == null ? void 0 : _menuEl$value.parentElement;
|
|
487
|
-
var
|
|
488
|
-
|
|
489
|
-
if (
|
|
487
|
+
var wrapOffsetTop = (0, _elements.getTop)(wrapEl.value);
|
|
488
|
+
|
|
489
|
+
if (wrapOffsetTop + offsetY.value < 0) {
|
|
490
|
+
offsetY.value = getOffsetY();
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
if (menuOffsetHeight + wrapOffsetTop + offsetY.value > bodyScrollHeight) {
|
|
494
|
+
offsetY.value -= menuOffsetHeight - getOffsetY();
|
|
495
|
+
}
|
|
490
496
|
});
|
|
491
497
|
};
|
|
492
498
|
|
package/lib/select/select.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --select-select-text-color: #555; --select-select-padding: 5px 0; --select-error-color: var(--color-danger); --select-blur-color: #888; --select-focus-color: var(--color-primary); --select-scroller-background: #fff; --select-scroller-padding: 6px 0; --select-scroller-max-height: 278px; --select-placeholder-size: 16px; --select-icon-padding: 16px 0 0; --select-icon-size: 20px; --select-chip-margin: 5px 5px 0; --select-line-size: 1px; --select-line-spread-size: 2px; --select-arrow-size: 20px; --select-disabled-color: var(--color-text-disabled);}.var-select-footer-margin-enter-from,.var-select-footer-margin-leave-to { opacity: 0; margin-top: 2px !important;}.var-select-footer-margin-enter-active,.var-select-footer-margin-leave-active { transition: 0.2s all var(--cubic-bezier);}.var-select { width: 100%; color: var(--select-select-text-color);}.var-select__controller { width: 100%; display: flex; position: relative;}.var-select__menu[var-select-cover] { flex-grow: 1; background: transparent;}.var-select__chip[var-select-cover] { margin: var(--select-chip-margin);}.var-select__scroller { max-height: var(--select-scroller-max-height); background: var(--select-scroller-background); padding: var(--select-scroller-padding); overflow-y: auto;}.var-select__wrap { position: relative; display: flex; flex-direction: column; padding-top: var(--select-placeholder-size);}.var-select__icon { display: flex; align-items: center; padding: var(--select-icon-padding); font-size: 20px;}.var-select__placeholder { position: absolute; top: 50%; left: 0; width: 100%; transform-origin: left; transition-property: top, transform, width; transition-duration: 0.3s; transform: translate(0, calc(-50% + var(--select-placeholder-size) / 2)) scale(1); font-size: var(--select-placeholder-size); color: var(--select-blur-color);}.var-select__select { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 32px; padding: var(--select-select-padding); outline: none; border: none; font-size: inherit; color: var(--select-select-text-color); word-break: break-all;}.var-select__arrow[var-select-cover] { flex-shrink: 0; font-size: var(--select-arrow-size);}.var-select__line { width: 100%; height: var(--select-line-size); background: var(--select-blur-color);}.var-select__dot { width: 100%; height: var(--select-line-spread-size); background: var(--select-focus-color); transform: scaleX(0); transform-origin: center; transition: transform 0.3s var(--cubic-bezier);}.var-select--placeholder-hint { top: 0; width: 133.33%; transform: translate(0, 0) scale(0.75);}.var-select--placeholder-non-hint { top: 50%; transform: translate(0, -50%) scale(1);}.var-select--non-hint { padding-top: 0;}.var-select--placeholder-hidden { visibility: hidden;}.var-select--focus { color: var(--select-focus-color);}.var-select--spread { transform: scaleX(1);}.var-select--disabled { color: var(--select-disabled-color);}.var-select--error { color: var(--select-error-color);}.var-select--line-disabled { background: var(--select-disabled-color);}.var-select--line-error { background: var(--select-error-color);}.var-select--arrow-rotate { transform: rotate(180deg);}
|
|
1
|
+
:root { --select-select-text-color: #555; --select-select-padding: 5px 0; --select-error-color: var(--color-danger); --select-blur-color: #888; --select-focus-color: var(--color-primary); --select-scroller-background: #fff; --select-scroller-padding: 6px 0; --select-scroller-max-height: 278px; --select-placeholder-size: 16px; --select-icon-padding: 16px 0 0; --select-icon-size: 20px; --select-chip-margin: 5px 5px 0; --select-line-size: 1px; --select-line-spread-size: 2px; --select-arrow-size: 20px; --select-disabled-color: var(--color-text-disabled);}.var-select-footer-margin-enter-from,.var-select-footer-margin-leave-to { opacity: 0; margin-top: 2px !important;}.var-select-footer-margin-enter-active,.var-select-footer-margin-leave-active { transition: 0.2s all var(--cubic-bezier);}.var-select { width: 100%; color: var(--select-select-text-color);}.var-select__controller { width: 100%; display: flex; position: relative;}.var-select__menu[var-select-cover] { flex-grow: 1; background: transparent;}.var-select__chip[var-select-cover] { margin: var(--select-chip-margin);}.var-select__scroller { max-height: var(--select-scroller-max-height); background: var(--select-scroller-background); padding: var(--select-scroller-padding); overflow-y: auto;}.var-select__wrap { position: relative; display: flex; flex-direction: column; padding-top: var(--select-placeholder-size);}.var-select__icon { display: flex; align-items: center; padding: var(--select-icon-padding); font-size: 20px;}.var-select__placeholder { position: absolute; top: 50%; left: 0; width: 100%; transform-origin: left; transition-property: top, transform, width; transition-duration: 0.3s; transform: translate(0, calc(-50% + var(--select-placeholder-size) / 2)) scale(1); font-size: var(--select-placeholder-size); color: var(--select-blur-color);}.var-select__select { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 32px; padding: var(--select-select-padding); outline: none; border: none; font-size: inherit; color: var(--select-select-text-color); word-break: break-all; overflow-x: hidden;}.var-select__arrow[var-select-cover] { flex-shrink: 0; font-size: var(--select-arrow-size);}.var-select__line { width: 100%; height: var(--select-line-size); background: var(--select-blur-color);}.var-select__dot { width: 100%; height: var(--select-line-spread-size); background: var(--select-focus-color); transform: scaleX(0); transform-origin: center; transition: transform 0.3s var(--cubic-bezier);}.var-select--placeholder-hint { top: 0; width: 133.33%; transform: translate(0, 0) scale(0.75);}.var-select--placeholder-non-hint { top: 50%; transform: translate(0, -50%) scale(1);}.var-select--non-hint { padding-top: 0;}.var-select--placeholder-hidden { visibility: hidden;}.var-select--focus { color: var(--select-focus-color);}.var-select--spread { transform: scaleX(1);}.var-select--disabled { color: var(--select-disabled-color);}.var-select--error { color: var(--select-error-color);}.var-select--line-disabled { background: var(--select-disabled-color);}.var-select--line-error { background: var(--select-error-color);}.var-select--arrow-rotate { transform: rotate(180deg);}
|
package/lib/select/select.less
CHANGED
package/lib/skeleton/Skeleton.js
CHANGED
|
@@ -42,7 +42,8 @@ function render(_ctx, _cache) {
|
|
|
42
42
|
/* CLASS */
|
|
43
43
|
)], 6
|
|
44
44
|
/* CLASS, STYLE */
|
|
45
|
-
)) : (0, _vue.createCommentVNode)("v-if", true), (0, _vue.
|
|
45
|
+
)) : (0, _vue.createCommentVNode)("v-if", true), _ctx.avatar || _ctx.title || _ctx.toNumber(_ctx.rows) > 0 ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
46
|
+
key: 1,
|
|
46
47
|
class: (0, _vue.normalizeClass)(_ctx.n('article'))
|
|
47
48
|
}, [_ctx.avatar ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
48
49
|
key: 0,
|
|
@@ -57,7 +58,8 @@ function render(_ctx, _cache) {
|
|
|
57
58
|
/* CLASS */
|
|
58
59
|
)], 6
|
|
59
60
|
/* CLASS, STYLE */
|
|
60
|
-
)) : (0, _vue.createCommentVNode)("v-if", true), (0, _vue.
|
|
61
|
+
)) : (0, _vue.createCommentVNode)("v-if", true), _ctx.title || _ctx.toNumber(_ctx.rows) > 0 ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
62
|
+
key: 1,
|
|
61
63
|
class: (0, _vue.normalizeClass)(_ctx.n('section'))
|
|
62
64
|
}, [_ctx.title ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
63
65
|
key: 0,
|
|
@@ -89,9 +91,9 @@ function render(_ctx, _cache) {
|
|
|
89
91
|
/* KEYED_FRAGMENT */
|
|
90
92
|
))], 2
|
|
91
93
|
/* CLASS */
|
|
92
|
-
)], 2
|
|
94
|
+
)) : (0, _vue.createCommentVNode)("v-if", true)], 2
|
|
93
95
|
/* CLASS */
|
|
94
|
-
)], 2
|
|
96
|
+
)) : (0, _vue.createCommentVNode)("v-if", true)], 2
|
|
95
97
|
/* CLASS */
|
|
96
98
|
)) : (0, _vue.createCommentVNode)("v-if", true), _ctx.loading && _ctx.fullscreen ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
97
99
|
key: 2,
|
package/lib/slider/Slider.js
CHANGED
|
@@ -77,8 +77,8 @@ function render(_ctx, _cache) {
|
|
|
77
77
|
left: item.value + "%",
|
|
78
78
|
zIndex: _ctx.thumbsProps[item.enumValue].active ? 1 : undefined
|
|
79
79
|
}),
|
|
80
|
-
onTouchstart: $event => _ctx.start($event, item.enumValue),
|
|
81
|
-
onTouchmove: $event => _ctx.move($event, item.enumValue),
|
|
80
|
+
onTouchstart: (0, _vue.withModifiers)($event => _ctx.start($event, item.enumValue), ["stop"]),
|
|
81
|
+
onTouchmove: (0, _vue.withModifiers)($event => _ctx.move($event, item.enumValue), ["stop"]),
|
|
82
82
|
onTouchend: $event => _ctx.end(item.enumValue),
|
|
83
83
|
onTouchcancel: $event => _ctx.end(item.enumValue)
|
|
84
84
|
}, [(0, _vue.renderSlot)(_ctx.$slots, "button", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --snackbar-width: 256px; --snackbar-color: rgba(255, 255, 255, 0.87); --snackbar-border-radius: 4px; --snackbar-background: #333; --snackbar-font-size: var(--font-size-md); --snackbar-margin: 6px 24px; --snackbar-border-color: currentColor; --snackbar-success-background: var(--color-success); --snackbar-info-background: var(--color-info); --snackbar-error-background: var(--color-danger); --snackbar-warning-background: var(--color-warning); --snackbar-content-padding: 14px 16px; --snackbar-action-margin: 0 16px 0 0;}.var-transition-group { position: fixed; left: 0; right: 0; top: 0; bottom: 0; pointer-events: none;}.var-pointer-auto { pointer-events: auto;}.var-snackbar { display: flex; justify-content: center; align-items: baseline; left: 0; right: 0; bottom: 0; transition: all 0.15s var(--cubic-bezier);}.var-snackbar__transition { top: 0; position: fixed;}.var-snackbar__transition .var-snackbar__wrapper { position: absolute;}.var-snackbar__transition .var-snackbar__wrapper-top { top: 5%;}.var-snackbar__transition .var-snackbar__wrapper-center { top: 45%;}.var-snackbar__transition .var-snackbar__wrapper-bottom { bottom: 5%;}.var-snackbar__wrapper { width: var(--snackbar-width); display: flex; border-radius: var(--snackbar-border-radius); color: var(--snackbar-color); background: var(--snackbar-background); font-size: var(--snackbar-font-size); margin: var(--snackbar-margin); align-items: center; border-color: var(--snackbar-border-color); pointer-events: auto; transition: 0.3s var(--cubic-bezier);}.var-snackbar__wrapper-success { background: var(--snackbar-success-background);}.var-snackbar__wrapper-info { background: var(--snackbar-info-background);}.var-snackbar__wrapper-warning { background: var(--snackbar-warning-background);}.var-snackbar__wrapper-error { background: var(--snackbar-error-background);}.var-snackbar__content { flex-grow: 1; padding: var(--snackbar-content-padding);}.var-snackbar__action { margin: var(--snackbar-action-margin); display: flex;}.var-snackbar__vertical { flex-direction: column; align-items: flex-start;}.var-snackbar__vertical .var-snackbar__action { align-self: flex-end; margin-bottom: 8px;}.var-snackbar-fade-
|
|
1
|
+
:root { --snackbar-width: 256px; --snackbar-color: rgba(255, 255, 255, 0.87); --snackbar-border-radius: 4px; --snackbar-background: #333; --snackbar-font-size: var(--font-size-md); --snackbar-margin: 6px 24px; --snackbar-border-color: currentColor; --snackbar-success-background: var(--color-success); --snackbar-info-background: var(--color-info); --snackbar-error-background: var(--color-danger); --snackbar-warning-background: var(--color-warning); --snackbar-content-padding: 14px 16px; --snackbar-action-margin: 0 16px 0 0;}.var-transition-group { position: fixed; left: 0; right: 0; top: 0; bottom: 0; pointer-events: none;}.var-pointer-auto { pointer-events: auto;}.var-snackbar { display: flex; justify-content: center; align-items: baseline; left: 0; right: 0; bottom: 0; transition: all 0.15s var(--cubic-bezier);}.var-snackbar__transition { top: 0; position: fixed;}.var-snackbar__transition .var-snackbar__wrapper { position: absolute;}.var-snackbar__transition .var-snackbar__wrapper-top { top: 5%;}.var-snackbar__transition .var-snackbar__wrapper-center { top: 45%;}.var-snackbar__transition .var-snackbar__wrapper-bottom { bottom: 5%;}.var-snackbar__wrapper { width: var(--snackbar-width); display: flex; border-radius: var(--snackbar-border-radius); color: var(--snackbar-color); background: var(--snackbar-background); font-size: var(--snackbar-font-size); margin: var(--snackbar-margin); align-items: center; border-color: var(--snackbar-border-color); pointer-events: auto; transition: 0.3s var(--cubic-bezier);}.var-snackbar__wrapper-success { background: var(--snackbar-success-background);}.var-snackbar__wrapper-info { background: var(--snackbar-info-background);}.var-snackbar__wrapper-warning { background: var(--snackbar-warning-background);}.var-snackbar__wrapper-error { background: var(--snackbar-error-background);}.var-snackbar__content { flex-grow: 1; padding: var(--snackbar-content-padding);}.var-snackbar__action { margin: var(--snackbar-action-margin); display: flex;}.var-snackbar__vertical { flex-direction: column; align-items: flex-start;}.var-snackbar__vertical .var-snackbar__action { align-self: flex-end; margin-bottom: 8px;}.var-snackbar-fade-enter-from,.var-snackbar-fade-leave-to { opacity: 0; transform: translateY(-30px);}
|