@varlet/ui 1.21.0 → 1.22.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/action-sheet/ActionSheet.js +15 -19
- package/es/app-bar/AppBar.js +14 -19
- package/es/back-top/BackTop.js +7 -10
- package/es/badge/Badge.js +7 -12
- package/es/button/Button.js +14 -13
- package/es/card/Card.js +19 -23
- package/es/cell/Cell.js +14 -19
- package/es/checkbox/Checkbox.js +14 -19
- package/es/checkbox-group/CheckboxGroup.js +6 -11
- package/es/chip/Chip.js +8 -11
- package/es/col/Col.js +8 -11
- package/es/collapse/Collapse.js +5 -10
- package/es/collapse-item/CollapseItem.js +16 -21
- package/es/countdown/Countdown.js +5 -10
- package/es/counter/Counter.js +18 -22
- package/es/date-picker/DatePicker.js +22 -27
- package/es/date-picker/src/day-picker-panel.js +11 -16
- package/es/date-picker/src/month-picker-panel.js +9 -14
- package/es/date-picker/src/panel-header.js +12 -17
- package/es/date-picker/src/year-picker-panel.js +11 -15
- package/es/dialog/Dialog.js +12 -17
- package/es/divider/Divider.js +8 -13
- package/es/form/Form.js +5 -10
- package/es/form-details/FormDetails.js +6 -11
- package/es/icon/Icon.js +6 -9
- package/es/icon/icon.less +1 -1
- package/es/image/Image.js +23 -21
- package/es/image-preview/ImagePreview.js +20 -24
- package/es/index-anchor/IndexAnchor.js +4 -7
- package/es/index-bar/IndexBar.js +15 -19
- package/es/input/Input.js +33 -37
- package/es/list/List.js +10 -15
- package/es/loading/Loading.js +21 -24
- package/es/menu/Menu.js +9 -12
- package/es/option/Option.js +16 -21
- package/es/picker/Picker.js +33 -36
- package/es/popup/Popup.js +14 -17
- package/es/progress/Progress.js +30 -32
- package/es/pull-refresh/PullRefresh.js +12 -15
- package/es/radio/Radio.js +14 -19
- package/es/radio-group/RadioGroup.js +6 -11
- package/es/rate/Rate.js +12 -16
- package/es/row/Row.js +7 -10
- package/es/select/Select.js +42 -47
- package/es/skeleton/Skeleton.js +41 -39
- package/es/slider/Slider.js +32 -36
- package/es/snackbar/Snackbar.js +8 -11
- package/es/snackbar/core.js +14 -19
- package/es/snackbar/style/index.js +1 -1
- package/es/snackbar/style/less.js +1 -1
- package/es/step/Step.js +23 -28
- package/es/steps/Steps.js +6 -9
- package/es/sticky/Sticky.js +10 -13
- package/es/swipe/Swipe.js +20 -24
- package/es/swipe-item/SwipeItem.js +6 -9
- package/es/switch/Switch.js +16 -21
- package/es/tab/Tab.js +8 -11
- package/es/tab-item/TabItem.js +5 -8
- package/es/tabs/Tabs.js +10 -13
- package/es/tabs-items/TabsItems.js +4 -7
- package/es/time-picker/TimePicker.js +31 -36
- package/es/time-picker/clock.js +14 -19
- package/es/uploader/Uploader.js +31 -31
- package/package.json +4 -4
- package/umd/varlet.js +2 -1
package/es/dialog/Dialog.js
CHANGED
|
@@ -4,11 +4,9 @@ import { props } from './props';
|
|
|
4
4
|
import { defineComponent, ref, watch } from 'vue';
|
|
5
5
|
import { dt } from '../utils/shared';
|
|
6
6
|
import { pack } from '../locale';
|
|
7
|
-
import { renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode,
|
|
7
|
+
import { renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, resolveComponent as _resolveComponent, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, mergeProps as _mergeProps, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
8
8
|
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
_pushScopeId("");
|
|
9
|
+
var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
|
|
12
10
|
|
|
13
11
|
var _hoisted_1 = {
|
|
14
12
|
class: "var-dialog__title"
|
|
@@ -16,10 +14,7 @@ var _hoisted_1 = {
|
|
|
16
14
|
var _hoisted_2 = {
|
|
17
15
|
class: "var-dialog__actions"
|
|
18
16
|
};
|
|
19
|
-
|
|
20
|
-
_popScopeId();
|
|
21
|
-
|
|
22
|
-
export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
17
|
+
export function render(_ctx, _cache) {
|
|
23
18
|
var _component_var_button = _resolveComponent("var-button");
|
|
24
19
|
|
|
25
20
|
var _component_var_popup = _resolveComponent("var-popup");
|
|
@@ -41,20 +36,20 @@ export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
|
41
36
|
onRouteChange: _ctx.onRouteChange,
|
|
42
37
|
onClickOverlay: _ctx.handleClickOverlay
|
|
43
38
|
}, {
|
|
44
|
-
default:
|
|
39
|
+
default: _withCtx(() => [_createElementVNode("div", _mergeProps({
|
|
45
40
|
class: "var--box var-dialog"
|
|
46
|
-
}, _ctx.$attrs), [
|
|
41
|
+
}, _ctx.$attrs), [_createElementVNode("div", _hoisted_1, [_renderSlot(_ctx.$slots, "title", {}, () => [_createTextVNode(_toDisplayString(_ctx.dt(_ctx.title, _ctx.pack.dialogTitle)), 1
|
|
47
42
|
/* TEXT */
|
|
48
|
-
)])]),
|
|
43
|
+
)])]), _createElementVNode("div", {
|
|
49
44
|
class: "var-dialog__message",
|
|
50
|
-
style: {
|
|
45
|
+
style: _normalizeStyle({
|
|
51
46
|
textAlign: _ctx.messageAlign
|
|
52
|
-
}
|
|
47
|
+
})
|
|
53
48
|
}, [_renderSlot(_ctx.$slots, "default", {}, () => [_createTextVNode(_toDisplayString(_ctx.message), 1
|
|
54
49
|
/* TEXT */
|
|
55
50
|
)])], 4
|
|
56
51
|
/* STYLE */
|
|
57
|
-
),
|
|
52
|
+
), _createElementVNode("div", _hoisted_2, [_ctx.cancelButton ? (_openBlock(), _createBlock(_component_var_button, {
|
|
58
53
|
key: 0,
|
|
59
54
|
class: "var-dialog__button var-dialog__cancel-button",
|
|
60
55
|
"var-dialog-cover": "",
|
|
@@ -63,7 +58,7 @@ export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
|
63
58
|
color: _ctx.cancelButtonColor,
|
|
64
59
|
onClick: _ctx.cancel
|
|
65
60
|
}, {
|
|
66
|
-
default:
|
|
61
|
+
default: _withCtx(() => [_createTextVNode(_toDisplayString(_ctx.dt(_ctx.cancelButtonText, _ctx.pack.dialogCancelButtonText)), 1
|
|
67
62
|
/* TEXT */
|
|
68
63
|
)]),
|
|
69
64
|
_: 1
|
|
@@ -80,7 +75,7 @@ export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
|
80
75
|
color: _ctx.confirmButtonColor,
|
|
81
76
|
onClick: _ctx.confirm
|
|
82
77
|
}, {
|
|
83
|
-
default:
|
|
78
|
+
default: _withCtx(() => [_createTextVNode(_toDisplayString(_ctx.dt(_ctx.confirmButtonText, _ctx.pack.dialogConfirmButtonText)), 1
|
|
84
79
|
/* TEXT */
|
|
85
80
|
)]),
|
|
86
81
|
_: 1
|
|
@@ -97,7 +92,7 @@ export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
|
97
92
|
}, 8
|
|
98
93
|
/* PROPS */
|
|
99
94
|
, ["show", "overlay", "overlay-class", "overlay-style", "lock-scroll", "close-on-click-overlay", "teleport", "onOpen", "onClose", "onClosed", "onOpened", "onRouteChange", "onClickOverlay"]);
|
|
100
|
-
}
|
|
95
|
+
}
|
|
101
96
|
export default defineComponent({
|
|
102
97
|
render,
|
|
103
98
|
name: 'VarDialog',
|
package/es/divider/Divider.js
CHANGED
|
@@ -4,29 +4,24 @@ import { defineComponent, computed, reactive, onMounted, onUpdated, toRefs } fro
|
|
|
4
4
|
import { toSizeUnit } from '../utils/elements';
|
|
5
5
|
import { isBool, toNumber } from '../utils/shared';
|
|
6
6
|
import { props } from './props';
|
|
7
|
-
import { renderSlot as _renderSlot, toDisplayString as _toDisplayString, openBlock as _openBlock,
|
|
7
|
+
import { renderSlot as _renderSlot, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
8
8
|
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
_pushScopeId("");
|
|
9
|
+
var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
|
|
12
10
|
|
|
13
11
|
var _hoisted_1 = {
|
|
14
12
|
key: 0,
|
|
15
13
|
class: "var-divider__text"
|
|
16
14
|
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class: ["var-divider var--box", [_ctx.vertical ? 'var-divider--vertical' : null, _ctx.withText ? 'var-divider--with-text' : null, _ctx.isInset ? 'var-divider--inset' : null, _ctx.dashed ? 'var-divider--dashed' : null]],
|
|
23
|
-
style: _ctx.style
|
|
24
|
-
}, [_renderSlot(_ctx.$slots, "default", {}, () => [_ctx.description ? (_openBlock(), _createBlock("span", _hoisted_1, _toDisplayString(_ctx.description), 1
|
|
15
|
+
export function render(_ctx, _cache) {
|
|
16
|
+
return _openBlock(), _createElementBlock("div", {
|
|
17
|
+
class: _normalizeClass(["var-divider var--box", [_ctx.vertical ? 'var-divider--vertical' : null, _ctx.withText ? 'var-divider--with-text' : null, _ctx.isInset ? 'var-divider--inset' : null, _ctx.dashed ? 'var-divider--dashed' : null]]),
|
|
18
|
+
style: _normalizeStyle(_ctx.style)
|
|
19
|
+
}, [_renderSlot(_ctx.$slots, "default", {}, () => [_ctx.description ? (_openBlock(), _createElementBlock("span", _hoisted_1, _toDisplayString(_ctx.description), 1
|
|
25
20
|
/* TEXT */
|
|
26
21
|
)) : _createCommentVNode("v-if", true)])], 6
|
|
27
22
|
/* CLASS, STYLE */
|
|
28
23
|
);
|
|
29
|
-
}
|
|
24
|
+
}
|
|
30
25
|
export default defineComponent({
|
|
31
26
|
render,
|
|
32
27
|
name: 'VarDivider',
|
package/es/form/Form.js
CHANGED
|
@@ -5,21 +5,16 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|
|
5
5
|
import { defineComponent, computed } from 'vue';
|
|
6
6
|
import { props } from './props';
|
|
7
7
|
import { useFormItems } from './provide';
|
|
8
|
-
import { renderSlot as _renderSlot, openBlock as _openBlock,
|
|
8
|
+
import { renderSlot as _renderSlot, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
9
9
|
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
_pushScopeId("");
|
|
10
|
+
var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
|
|
13
11
|
|
|
14
12
|
var _hoisted_1 = {
|
|
15
13
|
class: "var-form"
|
|
16
14
|
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
21
|
-
return _openBlock(), _createBlock("div", _hoisted_1, [_renderSlot(_ctx.$slots, "default")]);
|
|
22
|
-
});
|
|
15
|
+
export function render(_ctx, _cache) {
|
|
16
|
+
return _openBlock(), _createElementBlock("div", _hoisted_1, [_renderSlot(_ctx.$slots, "default")]);
|
|
17
|
+
}
|
|
23
18
|
export default defineComponent({
|
|
24
19
|
render,
|
|
25
20
|
name: 'VarForm',
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { defineComponent } from 'vue';
|
|
2
2
|
import { props } from './props';
|
|
3
|
-
import { toDisplayString as _toDisplayString,
|
|
3
|
+
import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, Transition as _Transition, withCtx as _withCtx, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
_pushScopeId("");
|
|
5
|
+
var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
|
|
8
6
|
|
|
9
7
|
var _hoisted_1 = {
|
|
10
8
|
key: 0,
|
|
@@ -16,23 +14,20 @@ var _hoisted_2 = {
|
|
|
16
14
|
var _hoisted_3 = {
|
|
17
15
|
class: "var-form-details__length"
|
|
18
16
|
};
|
|
19
|
-
|
|
20
|
-
_popScopeId();
|
|
21
|
-
|
|
22
|
-
export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
17
|
+
export function render(_ctx, _cache) {
|
|
23
18
|
return _openBlock(), _createBlock(_Transition, {
|
|
24
19
|
name: "var-form-details"
|
|
25
20
|
}, {
|
|
26
|
-
default:
|
|
21
|
+
default: _withCtx(() => [_ctx.errorMessage || _ctx.maxlengthText ? (_openBlock(), _createElementBlock("div", _hoisted_1, [_createElementVNode("div", _hoisted_2, _toDisplayString(_ctx.errorMessage), 1
|
|
27
22
|
/* TEXT */
|
|
28
|
-
),
|
|
23
|
+
), _createElementVNode("div", _hoisted_3, _toDisplayString(_ctx.maxlengthText), 1
|
|
29
24
|
/* TEXT */
|
|
30
25
|
)])) : _createCommentVNode("v-if", true)]),
|
|
31
26
|
_: 1
|
|
32
27
|
/* STABLE */
|
|
33
28
|
|
|
34
29
|
});
|
|
35
|
-
}
|
|
30
|
+
}
|
|
36
31
|
export default defineComponent({
|
|
37
32
|
render,
|
|
38
33
|
name: 'VarFormDetails',
|
package/es/icon/Icon.js
CHANGED
|
@@ -6,26 +6,23 @@ import { defineComponent, watch, ref, nextTick } from 'vue';
|
|
|
6
6
|
import { isURL, toNumber } from '../utils/shared';
|
|
7
7
|
import { props } from './props';
|
|
8
8
|
import { toSizeUnit } from '../utils/elements';
|
|
9
|
-
import { resolveDynamicComponent as _resolveDynamicComponent,
|
|
10
|
-
|
|
11
|
-
var _withId = /*#__PURE__*/_withScopeId("");
|
|
12
|
-
|
|
13
|
-
export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
9
|
+
import { resolveDynamicComponent as _resolveDynamicComponent, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createBlock as _createBlock } from "vue";
|
|
10
|
+
export function render(_ctx, _cache) {
|
|
14
11
|
return _openBlock(), _createBlock(_resolveDynamicComponent(_ctx.isURL(_ctx.name) ? 'img' : 'i'), {
|
|
15
|
-
class: ["var-icon", [_ctx.namespace + "--set", _ctx.isURL(_ctx.name) ? 'var-icon__image' : _ctx.namespace + "-" + _ctx.nextName, _ctx.shrinking ? 'var-icon--shrinking' : null]],
|
|
16
|
-
style: {
|
|
12
|
+
class: _normalizeClass(["var-icon", [_ctx.namespace + "--set", _ctx.isURL(_ctx.name) ? 'var-icon__image' : _ctx.namespace + "-" + _ctx.nextName, _ctx.shrinking ? 'var-icon--shrinking' : null]]),
|
|
13
|
+
style: _normalizeStyle({
|
|
17
14
|
color: _ctx.color,
|
|
18
15
|
transition: "all " + _ctx.toNumber(_ctx.transition) + "ms",
|
|
19
16
|
width: _ctx.isURL(_ctx.name) ? _ctx.toSizeUnit(_ctx.size) : null,
|
|
20
17
|
height: _ctx.isURL(_ctx.name) ? _ctx.toSizeUnit(_ctx.size) : null,
|
|
21
18
|
fontSize: _ctx.toSizeUnit(_ctx.size)
|
|
22
|
-
},
|
|
19
|
+
}),
|
|
23
20
|
src: _ctx.isURL(_ctx.name) ? _ctx.nextName : null,
|
|
24
21
|
onClick: _ctx.onClick
|
|
25
22
|
}, null, 8
|
|
26
23
|
/* PROPS */
|
|
27
24
|
, ["class", "style", "src", "onClick"]);
|
|
28
|
-
}
|
|
25
|
+
}
|
|
29
26
|
export default defineComponent({
|
|
30
27
|
render,
|
|
31
28
|
name: 'VarIcon',
|
package/es/icon/icon.less
CHANGED
package/es/image/Image.js
CHANGED
|
@@ -3,55 +3,57 @@ import Lazy from '../lazy';
|
|
|
3
3
|
import { defineComponent } from 'vue';
|
|
4
4
|
import { props } from './props';
|
|
5
5
|
import { toSizeUnit } from '../utils/elements';
|
|
6
|
-
import { resolveDirective as _resolveDirective, withDirectives as _withDirectives, openBlock as _openBlock,
|
|
6
|
+
import { normalizeStyle as _normalizeStyle, resolveDirective as _resolveDirective, withDirectives as _withDirectives, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
var _hoisted_1 = ["alt", "lazy-error", "lazy-loading"];
|
|
11
|
+
var _hoisted_2 = ["alt", "src"];
|
|
12
|
+
export function render(_ctx, _cache) {
|
|
11
13
|
var _directive_lazy = _resolveDirective("lazy");
|
|
12
14
|
|
|
13
15
|
var _directive_ripple = _resolveDirective("ripple");
|
|
14
16
|
|
|
15
|
-
return _withDirectives((_openBlock(),
|
|
16
|
-
class: ["var-image var--box", [!_ctx.block ? 'var--inline-block' : null]],
|
|
17
|
-
style: {
|
|
17
|
+
return _withDirectives((_openBlock(), _createElementBlock("div", {
|
|
18
|
+
class: _normalizeClass(["var-image var--box", [!_ctx.block ? 'var--inline-block' : null]]),
|
|
19
|
+
style: _normalizeStyle({
|
|
18
20
|
width: _ctx.toSizeUnit(_ctx.width),
|
|
19
21
|
height: _ctx.toSizeUnit(_ctx.height),
|
|
20
22
|
'border-radius': _ctx.toSizeUnit(_ctx.radius)
|
|
21
|
-
}
|
|
22
|
-
}, [_ctx.lazy ? _withDirectives((_openBlock(),
|
|
23
|
+
})
|
|
24
|
+
}, [_ctx.lazy ? _withDirectives((_openBlock(), _createElementBlock("img", {
|
|
23
25
|
key: 0,
|
|
24
26
|
class: "var-image__image",
|
|
25
27
|
alt: _ctx.alt,
|
|
26
28
|
"lazy-error": _ctx.error,
|
|
27
29
|
"lazy-loading": _ctx.loading,
|
|
28
|
-
style: {
|
|
30
|
+
style: _normalizeStyle({
|
|
29
31
|
objectFit: _ctx.fit
|
|
30
|
-
},
|
|
31
|
-
onLoad: _cache[
|
|
32
|
-
onError: _cache[
|
|
33
|
-
onClick: _cache[
|
|
32
|
+
}),
|
|
33
|
+
onLoad: _cache[0] || (_cache[0] = (...args) => _ctx.handleLoad && _ctx.handleLoad(...args)),
|
|
34
|
+
onError: _cache[1] || (_cache[1] = (...args) => _ctx.handleError && _ctx.handleError(...args)),
|
|
35
|
+
onClick: _cache[2] || (_cache[2] = (...args) => _ctx.onClick && _ctx.onClick(...args))
|
|
34
36
|
}, null, 44
|
|
35
37
|
/* STYLE, PROPS, HYDRATE_EVENTS */
|
|
36
|
-
,
|
|
38
|
+
, _hoisted_1)), [[_directive_lazy, _ctx.src]]) : (_openBlock(), _createElementBlock("img", {
|
|
37
39
|
key: 1,
|
|
38
40
|
class: "var-image__image",
|
|
39
41
|
alt: _ctx.alt,
|
|
40
|
-
style: {
|
|
42
|
+
style: _normalizeStyle({
|
|
41
43
|
objectFit: _ctx.fit
|
|
42
|
-
},
|
|
44
|
+
}),
|
|
43
45
|
src: _ctx.src,
|
|
44
|
-
onLoad: _cache[
|
|
45
|
-
onError: _cache[
|
|
46
|
-
onClick: _cache[
|
|
46
|
+
onLoad: _cache[3] || (_cache[3] = (...args) => _ctx.handleLoad && _ctx.handleLoad(...args)),
|
|
47
|
+
onError: _cache[4] || (_cache[4] = (...args) => _ctx.handleError && _ctx.handleError(...args)),
|
|
48
|
+
onClick: _cache[5] || (_cache[5] = (...args) => _ctx.onClick && _ctx.onClick(...args))
|
|
47
49
|
}, null, 44
|
|
48
50
|
/* STYLE, PROPS, HYDRATE_EVENTS */
|
|
49
|
-
,
|
|
51
|
+
, _hoisted_2))], 6
|
|
50
52
|
/* CLASS, STYLE */
|
|
51
53
|
)), [[_directive_ripple, {
|
|
52
54
|
disabled: !_ctx.ripple
|
|
53
55
|
}]]);
|
|
54
|
-
}
|
|
56
|
+
}
|
|
55
57
|
export default defineComponent({
|
|
56
58
|
render,
|
|
57
59
|
name: 'VarImage',
|
|
@@ -8,20 +8,16 @@ import { toNumber } from '../utils/shared';
|
|
|
8
8
|
var DISTANCE_OFFSET = 12;
|
|
9
9
|
var EVENT_DELAY = 200;
|
|
10
10
|
var ANIMATION_DURATION = 200;
|
|
11
|
-
import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock,
|
|
11
|
+
import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, resolveComponent as _resolveComponent, withCtx as _withCtx, createBlock as _createBlock, renderSlot as _renderSlot, toDisplayString as _toDisplayString, createCommentVNode as _createCommentVNode, mergeProps as _mergeProps, createVNode as _createVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
var _hoisted_1 = {
|
|
15
|
+
var _hoisted_1 = ["src", "alt"];
|
|
16
|
+
var _hoisted_2 = {
|
|
18
17
|
key: 0,
|
|
19
18
|
class: "var-image-preview__indicators"
|
|
20
19
|
};
|
|
21
|
-
|
|
22
|
-
_popScopeId();
|
|
23
|
-
|
|
24
|
-
export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
20
|
+
export function render(_ctx, _cache) {
|
|
25
21
|
var _component_var_swipe_item = _resolveComponent("var-swipe-item");
|
|
26
22
|
|
|
27
23
|
var _component_var_swipe = _resolveComponent("var-swipe");
|
|
@@ -45,7 +41,7 @@ export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
|
45
41
|
onOpened: _ctx.onOpened,
|
|
46
42
|
onRouteChange: _ctx.onRouteChange
|
|
47
43
|
}, {
|
|
48
|
-
default:
|
|
44
|
+
default: _withCtx(() => [_createVNode(_component_var_swipe, _mergeProps({
|
|
49
45
|
class: "var-image-preview__swipe",
|
|
50
46
|
"var-image-preview-cover": "",
|
|
51
47
|
touchable: _ctx.canSwipe,
|
|
@@ -54,29 +50,29 @@ export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
|
54
50
|
loop: _ctx.loop,
|
|
55
51
|
onChange: _ctx.onChange
|
|
56
52
|
}, _ctx.$attrs), {
|
|
57
|
-
default:
|
|
53
|
+
default: _withCtx(() => [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.images, image => {
|
|
58
54
|
return _openBlock(), _createBlock(_component_var_swipe_item, {
|
|
59
55
|
class: "var-image-preview__swipe-item",
|
|
60
56
|
"var-image-preview-cover": "",
|
|
61
57
|
key: image
|
|
62
58
|
}, {
|
|
63
|
-
default:
|
|
59
|
+
default: _withCtx(() => [_createElementVNode("div", {
|
|
64
60
|
class: "var-image-preview__zoom-container",
|
|
65
|
-
style: {
|
|
61
|
+
style: _normalizeStyle({
|
|
66
62
|
transform: "scale(" + _ctx.scale + ") translate(" + _ctx.translateX + "px, " + _ctx.translateY + "px)",
|
|
67
63
|
transitionTimingFunction: _ctx.transitionTimingFunction,
|
|
68
64
|
transitionDuration: _ctx.transitionDuration
|
|
69
|
-
},
|
|
70
|
-
onTouchstart: _cache[
|
|
71
|
-
onTouchmove: _cache[
|
|
72
|
-
onTouchend: _cache[
|
|
73
|
-
}, [
|
|
65
|
+
}),
|
|
66
|
+
onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.handleTouchstart && _ctx.handleTouchstart(...args)),
|
|
67
|
+
onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.handleTouchmove && _ctx.handleTouchmove(...args)),
|
|
68
|
+
onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.handleTouchend && _ctx.handleTouchend(...args))
|
|
69
|
+
}, [_createElementVNode("img", {
|
|
74
70
|
class: "var-image-preview__image",
|
|
75
71
|
src: image,
|
|
76
72
|
alt: image
|
|
77
73
|
}, null, 8
|
|
78
74
|
/* PROPS */
|
|
79
|
-
,
|
|
75
|
+
, _hoisted_1)], 36
|
|
80
76
|
/* STYLE, HYDRATE_EVENTS */
|
|
81
77
|
)]),
|
|
82
78
|
_: 2
|
|
@@ -88,17 +84,17 @@ export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
|
88
84
|
}), 128
|
|
89
85
|
/* KEYED_FRAGMENT */
|
|
90
86
|
))]),
|
|
91
|
-
indicator:
|
|
87
|
+
indicator: _withCtx(({
|
|
92
88
|
index,
|
|
93
89
|
length
|
|
94
90
|
}) => [_renderSlot(_ctx.$slots, "indicator", {
|
|
95
91
|
index: index,
|
|
96
92
|
length: length
|
|
97
|
-
}, () => [_ctx.indicator && _ctx.images.length > 1 ? (_openBlock(),
|
|
93
|
+
}, () => [_ctx.indicator && _ctx.images.length > 1 ? (_openBlock(), _createElementBlock("div", _hoisted_2, _toDisplayString(index + 1) + " / " + _toDisplayString(length), 1
|
|
98
94
|
/* TEXT */
|
|
99
95
|
)) : _createCommentVNode("v-if", true)])]),
|
|
100
|
-
_:
|
|
101
|
-
/*
|
|
96
|
+
_: 3
|
|
97
|
+
/* FORWARDED */
|
|
102
98
|
|
|
103
99
|
}, 16
|
|
104
100
|
/* FULL_PROPS */
|
|
@@ -117,7 +113,7 @@ export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
|
117
113
|
}, 8
|
|
118
114
|
/* PROPS */
|
|
119
115
|
, ["show", "lock-scroll", "teleport", "onOpen", "onClose", "onClosed", "onOpened", "onRouteChange"]);
|
|
120
|
-
}
|
|
116
|
+
}
|
|
121
117
|
export default defineComponent({
|
|
122
118
|
render,
|
|
123
119
|
name: 'VarImagePreview',
|
|
@@ -2,11 +2,8 @@ import { computed, defineComponent, ref, Transition } from 'vue';
|
|
|
2
2
|
import Sticky from '../sticky';
|
|
3
3
|
import { useIndexBar } from './provide';
|
|
4
4
|
import { props } from './props';
|
|
5
|
-
import { renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, mergeProps as _mergeProps,
|
|
6
|
-
|
|
7
|
-
var _withId = /*#__PURE__*/_withScopeId("");
|
|
8
|
-
|
|
9
|
-
export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
5
|
+
import { renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, mergeProps as _mergeProps, createElementVNode as _createElementVNode, resolveDynamicComponent as _resolveDynamicComponent, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock } from "vue";
|
|
6
|
+
export function render(_ctx, _cache) {
|
|
10
7
|
return _openBlock(), _createBlock(_resolveDynamicComponent(_ctx.sticky ? 'var-sticky' : _ctx.Transition), {
|
|
11
8
|
"offset-top": _ctx.sticky ? _ctx.stickyOffsetTop : null,
|
|
12
9
|
"z-index": _ctx.sticky ? _ctx.zIndex : null,
|
|
@@ -14,7 +11,7 @@ export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
|
14
11
|
"css-mode": _ctx.cssMode,
|
|
15
12
|
ref: "anchorEl"
|
|
16
13
|
}, {
|
|
17
|
-
default:
|
|
14
|
+
default: _withCtx(() => [_createElementVNode("div", _mergeProps({
|
|
18
15
|
class: "var-index-anchor"
|
|
19
16
|
}, _ctx.$attrs), [_renderSlot(_ctx.$slots, "default", {}, () => [_createTextVNode(_toDisplayString(_ctx.name), 1
|
|
20
17
|
/* TEXT */
|
|
@@ -27,7 +24,7 @@ export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
|
27
24
|
}, 8
|
|
28
25
|
/* PROPS */
|
|
29
26
|
, ["offset-top", "z-index", "disabled", "css-mode"]);
|
|
30
|
-
}
|
|
27
|
+
}
|
|
31
28
|
export default defineComponent({
|
|
32
29
|
render,
|
|
33
30
|
name: 'VarIndexAnchor',
|
package/es/index-bar/IndexBar.js
CHANGED
|
@@ -7,39 +7,35 @@ import { easeInOutCubic, isPlainObject, toNumber } from '../utils/shared';
|
|
|
7
7
|
import { getParentScroller, getScrollLeft, nextTickFrame, requestAnimationFrame, scrollTo as varScrollTo } from '../utils/elements';
|
|
8
8
|
import { useIndexAnchors } from './provide';
|
|
9
9
|
import { props } from './props';
|
|
10
|
-
import { renderSlot as _renderSlot, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock,
|
|
10
|
+
import { renderSlot as _renderSlot, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
11
11
|
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
_pushScopeId("");
|
|
12
|
+
var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
|
|
15
13
|
|
|
16
14
|
var _hoisted_1 = {
|
|
17
15
|
class: "var-index-bar",
|
|
18
16
|
ref: "barEl"
|
|
19
17
|
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
24
|
-
return _openBlock(), _createBlock("div", _hoisted_1, [_renderSlot(_ctx.$slots, "default"), _createVNode("ul", {
|
|
18
|
+
var _hoisted_2 = ["onClick"];
|
|
19
|
+
export function render(_ctx, _cache) {
|
|
20
|
+
return _openBlock(), _createElementBlock("div", _hoisted_1, [_renderSlot(_ctx.$slots, "default"), _createElementVNode("ul", {
|
|
25
21
|
class: "var-index-bar__anchor-list",
|
|
26
|
-
style: {
|
|
22
|
+
style: _normalizeStyle({
|
|
27
23
|
zIndex: _ctx.zIndex + 2,
|
|
28
24
|
display: _ctx.hideList ? 'none' : 'block'
|
|
29
|
-
}
|
|
30
|
-
}, [(_openBlock(true),
|
|
31
|
-
return _openBlock(),
|
|
25
|
+
})
|
|
26
|
+
}, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.anchorNameList, anchorName => {
|
|
27
|
+
return _openBlock(), _createElementBlock("li", {
|
|
32
28
|
key: anchorName,
|
|
33
|
-
class: ["var-index-bar__anchor-item", {
|
|
29
|
+
class: _normalizeClass(["var-index-bar__anchor-item", {
|
|
34
30
|
'var-index-bar__anchor-item--active': _ctx.active === anchorName
|
|
35
|
-
}],
|
|
36
|
-
style: {
|
|
31
|
+
}]),
|
|
32
|
+
style: _normalizeStyle({
|
|
37
33
|
color: _ctx.active === anchorName && _ctx.highlightColor ? _ctx.highlightColor : ''
|
|
38
|
-
},
|
|
34
|
+
}),
|
|
39
35
|
onClick: $event => _ctx.anchorClick(anchorName)
|
|
40
36
|
}, _toDisplayString(anchorName), 15
|
|
41
37
|
/* TEXT, CLASS, STYLE, PROPS */
|
|
42
|
-
,
|
|
38
|
+
, _hoisted_2);
|
|
43
39
|
}), 128
|
|
44
40
|
/* KEYED_FRAGMENT */
|
|
45
41
|
))], 4
|
|
@@ -47,7 +43,7 @@ export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
|
47
43
|
)], 512
|
|
48
44
|
/* NEED_PATCH */
|
|
49
45
|
);
|
|
50
|
-
}
|
|
46
|
+
}
|
|
51
47
|
export default defineComponent({
|
|
52
48
|
render,
|
|
53
49
|
name: 'VarIndexBar',
|