@varlet/ui 1.26.8 → 1.27.0-alpha.1649242923701
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 +29 -27
- package/es/app-bar/AppBar.js +32 -27
- package/es/back-top/BackTop.js +9 -2
- package/es/badge/Badge.js +22 -14
- package/es/bottom-navigation/BottomNavigation.js +167 -0
- package/es/bottom-navigation/BottomNavigationSfc.css +0 -0
- package/es/bottom-navigation/BottomNavigationSfc.less +0 -0
- package/es/bottom-navigation/bottomNavigation.css +1 -0
- package/es/bottom-navigation/bottomNavigation.less +49 -0
- package/es/bottom-navigation/index.js +8 -0
- package/es/bottom-navigation/props.js +40 -0
- package/es/bottom-navigation/provide.js +17 -0
- package/es/bottom-navigation/style/index.js +4 -0
- package/es/bottom-navigation/style/less.js +4 -0
- package/es/bottom-navigation-item/BottomNavigationItem.js +122 -0
- package/es/bottom-navigation-item/BottomNavigationItemSfc.css +0 -0
- package/es/bottom-navigation-item/BottomNavigationItemSfc.less +0 -0
- package/es/bottom-navigation-item/bottomNavigationItem.css +1 -0
- package/es/bottom-navigation-item/bottomNavigationItem.less +78 -0
- package/es/bottom-navigation-item/index.js +8 -0
- package/es/bottom-navigation-item/props.js +22 -0
- package/es/bottom-navigation-item/provide.js +21 -0
- package/es/bottom-navigation-item/style/index.js +6 -0
- package/es/bottom-navigation-item/style/less.js +6 -0
- package/es/button/Button.js +12 -5
- package/es/card/Card.js +33 -28
- package/es/cell/Cell.js +26 -15
- package/es/checkbox/Checkbox.js +28 -26
- package/es/checkbox-group/CheckboxGroup.js +21 -25
- package/es/chip/Chip.js +16 -7
- package/es/chip/chip.css +1 -1
- package/es/chip/chip.less +11 -11
- package/es/col/Col.js +12 -5
- package/es/collapse/Collapse.js +15 -12
- package/es/collapse-item/CollapseItem.js +31 -30
- package/es/collapse-item/collapseItem.css +1 -1
- package/es/collapse-item/collapseItem.less +16 -16
- package/es/countdown/Countdown.js +14 -11
- package/es/counter/Counter.js +30 -27
- package/es/date-picker/DatePicker.js +28 -23
- package/es/date-picker/date-picker.css +1 -1
- package/es/date-picker/date-picker.less +22 -20
- package/es/date-picker/src/day-picker-panel.js +41 -34
- package/es/date-picker/src/month-picker-panel.js +27 -21
- package/es/date-picker/src/panel-header.js +16 -11
- package/es/date-picker/src/year-picker-panel.js +17 -9
- package/es/dialog/Dialog.js +36 -40
- package/es/divider/Divider.js +16 -12
- package/es/form/Form.js +11 -8
- package/es/form-details/FormDetails.js +27 -22
- package/es/icon/Icon.js +8 -1
- package/es/icon/icon.css +1 -1
- package/es/image/Image.js +19 -12
- package/es/image-preview/ImagePreview.js +35 -34
- package/es/index-anchor/IndexAnchor.js +8 -1
- package/es/index-bar/IndexBar.js +22 -20
- package/es/index.js +10 -0
- package/es/input/Input.js +45 -44
- package/es/lazy/index.js +2 -1
- package/es/less.js +2 -0
- package/es/list/List.js +39 -38
- package/es/loading/Loading.js +31 -23
- package/es/loading/loading.css +1 -1
- package/es/loading/loading.less +32 -32
- package/es/menu/Menu.js +12 -10
- package/es/option/Option.js +16 -11
- package/es/pagination/Pagination.js +34 -44
- package/es/pagination/pagination.css +1 -1
- package/es/pagination/pagination.less +8 -8
- package/es/picker/Picker.js +51 -47
- package/es/popup/Popup.js +9 -5
- package/es/progress/Progress.js +44 -35
- package/es/progress/progress.css +1 -1
- package/es/progress/progress.less +12 -12
- package/es/pull-refresh/PullRefresh.js +13 -10
- package/es/radio/Radio.js +25 -25
- package/es/radio-group/RadioGroup.js +19 -19
- package/es/rate/Rate.js +27 -25
- package/es/ripple/index.js +6 -2
- package/es/row/Row.js +11 -4
- package/es/select/Select.js +53 -54
- package/es/skeleton/Skeleton.js +70 -81
- package/es/slider/Slider.js +44 -40
- package/es/slider/slider.css +1 -1
- package/es/slider/slider.less +5 -5
- package/es/snackbar/Snackbar.js +9 -5
- package/es/snackbar/core.js +20 -26
- package/es/snackbar/snackbar.css +1 -1
- package/es/snackbar/snackbar.less +66 -68
- package/es/space/Space.js +8 -3
- package/es/step/Step.js +25 -23
- package/es/step/step.css +1 -1
- package/es/step/step.less +10 -10
- package/es/steps/Steps.js +12 -5
- package/es/sticky/Sticky.js +14 -7
- package/es/style-provider/StyleProvider.js +6 -2
- package/es/style.css +1 -1
- package/es/style.js +2 -0
- package/es/swipe/Swipe.js +22 -16
- package/es/swipe-item/SwipeItem.js +9 -4
- package/es/switch/Switch.js +25 -23
- package/es/switch/switch.css +1 -1
- package/es/switch/switch.less +2 -2
- package/es/tab/Tab.js +8 -1
- package/es/tab-item/TabItem.js +8 -1
- package/es/table/Table.js +27 -20
- package/es/tabs/Tabs.js +16 -11
- package/es/tabs-items/TabsItems.js +10 -5
- package/es/themes/dark/bottomNavigation.js +4 -0
- package/es/themes/dark/bottomNavigationItem.js +3 -0
- package/es/themes/dark/index.js +3 -1
- package/es/time-picker/TimePicker.js +47 -38
- package/es/time-picker/clock.js +26 -22
- package/es/time-picker/timePicker.css +1 -1
- package/es/time-picker/timePicker.less +11 -11
- package/es/umdIndex.js +10 -0
- package/es/uploader/Uploader.js +62 -57
- package/es/utils/components.js +35 -0
- package/es/varlet.esm.js +2082 -1527
- package/highlight/attributes.json +48 -0
- package/highlight/tags.json +20 -0
- package/highlight/web-types.json +155 -1
- package/lib/action-sheet/ActionSheet.js +30 -26
- package/lib/app-bar/AppBar.js +31 -24
- package/lib/back-top/BackTop.js +11 -2
- package/lib/badge/Badge.js +23 -13
- package/lib/bottom-navigation/BottomNavigation.js +183 -0
- package/lib/bottom-navigation/BottomNavigationSfc.css +0 -0
- package/lib/bottom-navigation/BottomNavigationSfc.less +0 -0
- package/lib/bottom-navigation/bottomNavigation.css +1 -0
- package/lib/bottom-navigation/bottomNavigation.less +49 -0
- package/lib/bottom-navigation/index.js +17 -0
- package/lib/bottom-navigation/props.js +45 -0
- package/lib/bottom-navigation/provide.js +27 -0
- package/lib/bottom-navigation/style/index.js +4 -0
- package/lib/bottom-navigation/style/less.js +4 -0
- package/lib/bottom-navigation-item/BottomNavigationItem.js +140 -0
- package/lib/bottom-navigation-item/BottomNavigationItemSfc.css +0 -0
- package/lib/bottom-navigation-item/BottomNavigationItemSfc.less +0 -0
- package/lib/bottom-navigation-item/bottomNavigationItem.css +1 -0
- package/lib/bottom-navigation-item/bottomNavigationItem.less +78 -0
- package/lib/bottom-navigation-item/index.js +17 -0
- package/lib/bottom-navigation-item/props.js +27 -0
- package/lib/bottom-navigation-item/provide.js +28 -0
- package/lib/bottom-navigation-item/style/index.js +6 -0
- package/lib/bottom-navigation-item/style/less.js +6 -0
- package/lib/button/Button.js +13 -4
- package/lib/card/Card.js +34 -27
- package/lib/cell/Cell.js +26 -13
- package/lib/checkbox/Checkbox.js +26 -23
- package/lib/checkbox-group/CheckboxGroup.js +19 -22
- package/lib/chip/Chip.js +18 -7
- package/lib/chip/chip.css +1 -1
- package/lib/chip/chip.less +11 -11
- package/lib/col/Col.js +14 -5
- package/lib/collapse/Collapse.js +15 -10
- package/lib/collapse-item/CollapseItem.js +31 -28
- package/lib/collapse-item/collapseItem.css +1 -1
- package/lib/collapse-item/collapseItem.less +16 -16
- package/lib/countdown/Countdown.js +14 -10
- package/lib/counter/Counter.js +29 -26
- package/lib/date-picker/DatePicker.js +30 -23
- package/lib/date-picker/date-picker.css +1 -1
- package/lib/date-picker/date-picker.less +22 -20
- package/lib/date-picker/src/day-picker-panel.js +41 -32
- package/lib/date-picker/src/month-picker-panel.js +27 -19
- package/lib/date-picker/src/panel-header.js +16 -9
- package/lib/date-picker/src/year-picker-panel.js +19 -9
- package/lib/dialog/Dialog.js +36 -38
- package/lib/divider/Divider.js +16 -10
- package/lib/form/Form.js +11 -6
- package/lib/form-details/FormDetails.js +27 -20
- package/lib/icon/Icon.js +10 -1
- package/lib/icon/icon.css +1 -1
- package/lib/image/Image.js +20 -11
- package/lib/image-preview/ImagePreview.js +35 -33
- package/lib/index-anchor/IndexAnchor.js +10 -1
- package/lib/index-bar/IndexBar.js +24 -20
- package/lib/index.js +6 -0
- package/lib/input/Input.js +45 -43
- package/lib/lazy/index.js +3 -1
- package/lib/less.js +2 -0
- package/lib/list/List.js +39 -36
- package/lib/loading/Loading.js +33 -23
- package/lib/loading/loading.css +1 -1
- package/lib/loading/loading.less +32 -32
- package/lib/menu/Menu.js +12 -9
- package/lib/option/Option.js +16 -9
- package/lib/pagination/Pagination.js +36 -44
- package/lib/pagination/pagination.css +1 -1
- package/lib/pagination/pagination.less +8 -8
- package/lib/picker/Picker.js +51 -46
- package/lib/popup/Popup.js +9 -4
- package/lib/progress/Progress.js +45 -34
- package/lib/progress/progress.css +1 -1
- package/lib/progress/progress.less +12 -12
- package/lib/pull-refresh/PullRefresh.js +14 -10
- package/lib/radio/Radio.js +23 -22
- package/lib/radio-group/RadioGroup.js +17 -16
- package/lib/rate/Rate.js +27 -24
- package/lib/ripple/index.js +7 -2
- package/lib/row/Row.js +12 -3
- package/lib/select/Select.js +53 -53
- package/lib/skeleton/Skeleton.js +69 -78
- package/lib/slider/Slider.js +42 -38
- package/lib/slider/slider.css +1 -1
- package/lib/slider/slider.less +5 -5
- package/lib/snackbar/Snackbar.js +9 -4
- package/lib/snackbar/core.js +20 -25
- package/lib/snackbar/snackbar.css +1 -1
- package/lib/snackbar/snackbar.less +66 -68
- package/lib/space/Space.js +9 -3
- package/lib/step/Step.js +26 -22
- package/lib/step/step.css +1 -1
- package/lib/step/step.less +10 -10
- package/lib/steps/Steps.js +13 -4
- package/lib/sticky/Sticky.js +15 -6
- package/lib/style-provider/StyleProvider.js +8 -2
- package/lib/style.css +1 -1
- package/lib/style.js +2 -0
- package/lib/swipe/Swipe.js +23 -16
- package/lib/swipe-item/SwipeItem.js +10 -3
- package/lib/switch/Switch.js +23 -20
- package/lib/switch/switch.css +1 -1
- package/lib/switch/switch.less +2 -2
- package/lib/tab/Tab.js +10 -1
- package/lib/tab-item/TabItem.js +10 -1
- package/lib/table/Table.js +27 -18
- package/lib/tabs/Tabs.js +18 -11
- package/lib/tabs-items/TabsItems.js +11 -4
- package/lib/themes/dark/bottomNavigation.js +9 -0
- package/lib/themes/dark/bottomNavigationItem.js +8 -0
- package/lib/themes/dark/index.js +5 -1
- package/lib/time-picker/TimePicker.js +49 -38
- package/lib/time-picker/clock.js +26 -20
- package/lib/time-picker/timePicker.css +1 -1
- package/lib/time-picker/timePicker.less +11 -11
- package/lib/uploader/Uploader.js +60 -55
- package/lib/utils/components.js +39 -0
- package/package.json +4 -4
- package/types/bottomNavigation.d.ts +19 -0
- package/types/bottomNavigationItem.d.ts +16 -0
- package/types/global.d.ts +2 -0
- package/types/index.d.ts +2 -0
- package/umd/varlet.js +4 -4
package/lib/picker/Picker.js
CHANGED
|
@@ -18,25 +18,22 @@ var _elements = require("../utils/elements");
|
|
|
18
18
|
|
|
19
19
|
var _locale = require("../locale");
|
|
20
20
|
|
|
21
|
+
var _components = require("../utils/components");
|
|
22
|
+
|
|
21
23
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
24
|
|
|
25
|
+
var {
|
|
26
|
+
n,
|
|
27
|
+
classes
|
|
28
|
+
} = (0, _components.createNamespace)('picker');
|
|
23
29
|
var MOMENTUM_RECORD_TIME = 300;
|
|
24
30
|
var MOMENTUM_ALLOW_DISTANCE = 15;
|
|
25
31
|
var sid = 0;
|
|
26
32
|
|
|
27
33
|
var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
|
|
28
34
|
|
|
29
|
-
var _hoisted_1 =
|
|
30
|
-
|
|
31
|
-
};
|
|
32
|
-
var _hoisted_2 = {
|
|
33
|
-
class: "var-picker__title"
|
|
34
|
-
};
|
|
35
|
-
var _hoisted_3 = ["onTouchstart", "onTouchmove", "onTouchend"];
|
|
36
|
-
var _hoisted_4 = ["onTransitionend"];
|
|
37
|
-
var _hoisted_5 = {
|
|
38
|
-
class: "var-picker__text"
|
|
39
|
-
};
|
|
35
|
+
var _hoisted_1 = ["onTouchstart", "onTouchmove", "onTouchend"];
|
|
36
|
+
var _hoisted_2 = ["onTransitionend"];
|
|
40
37
|
|
|
41
38
|
function render(_ctx, _cache) {
|
|
42
39
|
var _component_var_button = (0, _vue.resolveComponent)("var-button");
|
|
@@ -53,14 +50,16 @@ function render(_ctx, _cache) {
|
|
|
53
50
|
show: _ctx.show,
|
|
54
51
|
'onUpdate:show': _ctx.handlePopupUpdateShow,
|
|
55
52
|
position: 'bottom',
|
|
56
|
-
class: '
|
|
53
|
+
class: _ctx.n('popup')
|
|
57
54
|
} : null, {
|
|
58
55
|
"var-picker-cover": ""
|
|
59
56
|
}), {
|
|
60
57
|
default: (0, _vue.withCtx)(() => [(0, _vue.createElementVNode)("div", (0, _vue.mergeProps)({
|
|
61
|
-
class:
|
|
62
|
-
}, _ctx.$attrs), [(0, _vue.createElementVNode)("div",
|
|
63
|
-
class:
|
|
58
|
+
class: _ctx.n()
|
|
59
|
+
}, _ctx.$attrs), [(0, _vue.createElementVNode)("div", {
|
|
60
|
+
class: (0, _vue.normalizeClass)(_ctx.n('toolbar'))
|
|
61
|
+
}, [(0, _vue.renderSlot)(_ctx.$slots, "cancel", {}, () => [(0, _vue.createVNode)(_component_var_button, {
|
|
62
|
+
class: (0, _vue.normalizeClass)(_ctx.n('cancel-button')),
|
|
64
63
|
"var-picker-cover": "",
|
|
65
64
|
text: "",
|
|
66
65
|
"text-color": _ctx.cancelButtonTextColor,
|
|
@@ -74,10 +73,12 @@ function render(_ctx, _cache) {
|
|
|
74
73
|
|
|
75
74
|
}, 8
|
|
76
75
|
/* PROPS */
|
|
77
|
-
, ["text-color", "onClick"])]), (0, _vue.renderSlot)(_ctx.$slots, "title", {}, () => [(0, _vue.createElementVNode)("div",
|
|
78
|
-
|
|
76
|
+
, ["class", "text-color", "onClick"])]), (0, _vue.renderSlot)(_ctx.$slots, "title", {}, () => [(0, _vue.createElementVNode)("div", {
|
|
77
|
+
class: (0, _vue.normalizeClass)(_ctx.n('title'))
|
|
78
|
+
}, (0, _vue.toDisplayString)(_ctx.dt(_ctx.title, _ctx.pack.pickerTitle)), 3
|
|
79
|
+
/* TEXT, CLASS */
|
|
79
80
|
)]), (0, _vue.renderSlot)(_ctx.$slots, "confirm", {}, () => [(0, _vue.createVNode)(_component_var_button, {
|
|
80
|
-
class:
|
|
81
|
+
class: (0, _vue.normalizeClass)(_ctx.n('confirm-button')),
|
|
81
82
|
text: "",
|
|
82
83
|
"var-picker-cover": "",
|
|
83
84
|
"text-color": _ctx.confirmButtonTextColor,
|
|
@@ -91,20 +92,22 @@ function render(_ctx, _cache) {
|
|
|
91
92
|
|
|
92
93
|
}, 8
|
|
93
94
|
/* PROPS */
|
|
94
|
-
, ["text-color", "onClick"])])]
|
|
95
|
-
|
|
95
|
+
, ["class", "text-color", "onClick"])])], 2
|
|
96
|
+
/* CLASS */
|
|
97
|
+
), (0, _vue.createElementVNode)("div", {
|
|
98
|
+
class: (0, _vue.normalizeClass)(_ctx.n('columns')),
|
|
96
99
|
style: (0, _vue.normalizeStyle)({
|
|
97
100
|
height: _ctx.columnHeight + "px"
|
|
98
101
|
})
|
|
99
102
|
}, [((0, _vue.openBlock)(true), (0, _vue.createElementBlock)(_vue.Fragment, null, (0, _vue.renderList)(_ctx.scrollColumns, c => {
|
|
100
103
|
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
101
|
-
class:
|
|
104
|
+
class: (0, _vue.normalizeClass)(_ctx.n('column')),
|
|
102
105
|
key: c.id,
|
|
103
106
|
onTouchstart: $event => _ctx.handleTouchstart($event, c),
|
|
104
107
|
onTouchmove: (0, _vue.withModifiers)($event => _ctx.handleTouchmove($event, c), ["prevent"]),
|
|
105
108
|
onTouchend: $event => _ctx.handleTouchend($event, c)
|
|
106
109
|
}, [(0, _vue.createElementVNode)("div", {
|
|
107
|
-
class:
|
|
110
|
+
class: (0, _vue.normalizeClass)(_ctx.n('scroller')),
|
|
108
111
|
ref_for: true,
|
|
109
112
|
ref: el => _ctx.getScrollEl(el, c),
|
|
110
113
|
style: (0, _vue.normalizeStyle)({
|
|
@@ -115,42 +118,44 @@ function render(_ctx, _cache) {
|
|
|
115
118
|
onTransitionend: $event => _ctx.handleTransitionend(c)
|
|
116
119
|
}, [((0, _vue.openBlock)(true), (0, _vue.createElementBlock)(_vue.Fragment, null, (0, _vue.renderList)(c.column.texts, t => {
|
|
117
120
|
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
118
|
-
class:
|
|
121
|
+
class: (0, _vue.normalizeClass)(_ctx.n('option')),
|
|
119
122
|
style: (0, _vue.normalizeStyle)({
|
|
120
123
|
height: _ctx.optionHeight + "px"
|
|
121
124
|
}),
|
|
122
125
|
key: t
|
|
123
|
-
}, [(0, _vue.createElementVNode)("div",
|
|
124
|
-
|
|
125
|
-
)
|
|
126
|
-
/*
|
|
126
|
+
}, [(0, _vue.createElementVNode)("div", {
|
|
127
|
+
class: (0, _vue.normalizeClass)(_ctx.n('text'))
|
|
128
|
+
}, (0, _vue.toDisplayString)(t), 3
|
|
129
|
+
/* TEXT, CLASS */
|
|
130
|
+
)], 6
|
|
131
|
+
/* CLASS, STYLE */
|
|
127
132
|
);
|
|
128
133
|
}), 128
|
|
129
134
|
/* KEYED_FRAGMENT */
|
|
130
|
-
))],
|
|
131
|
-
/* STYLE, PROPS, HYDRATE_EVENTS */
|
|
132
|
-
,
|
|
133
|
-
/* PROPS, HYDRATE_EVENTS */
|
|
134
|
-
,
|
|
135
|
+
))], 46
|
|
136
|
+
/* CLASS, STYLE, PROPS, HYDRATE_EVENTS */
|
|
137
|
+
, _hoisted_2)], 42
|
|
138
|
+
/* CLASS, PROPS, HYDRATE_EVENTS */
|
|
139
|
+
, _hoisted_1);
|
|
135
140
|
}), 128
|
|
136
141
|
/* KEYED_FRAGMENT */
|
|
137
142
|
)), (0, _vue.createElementVNode)("div", {
|
|
138
|
-
class:
|
|
143
|
+
class: (0, _vue.normalizeClass)(_ctx.n('picked')),
|
|
139
144
|
style: (0, _vue.normalizeStyle)({
|
|
140
145
|
top: _ctx.center + "px",
|
|
141
146
|
height: _ctx.optionHeight + "px"
|
|
142
147
|
})
|
|
143
|
-
}, null,
|
|
144
|
-
/* STYLE */
|
|
148
|
+
}, null, 6
|
|
149
|
+
/* CLASS, STYLE */
|
|
145
150
|
), (0, _vue.createElementVNode)("div", {
|
|
146
|
-
class:
|
|
151
|
+
class: (0, _vue.normalizeClass)(_ctx.n('mask')),
|
|
147
152
|
style: (0, _vue.normalizeStyle)({
|
|
148
153
|
backgroundSize: "100% " + (_ctx.columnHeight - _ctx.optionHeight) / 2 + "px"
|
|
149
154
|
})
|
|
150
|
-
}, null,
|
|
151
|
-
/* STYLE */
|
|
152
|
-
)],
|
|
153
|
-
/* STYLE */
|
|
155
|
+
}, null, 6
|
|
156
|
+
/* CLASS, STYLE */
|
|
157
|
+
)], 6
|
|
158
|
+
/* CLASS, STYLE */
|
|
154
159
|
)], 16
|
|
155
160
|
/* FULL_PROPS */
|
|
156
161
|
)]),
|
|
@@ -185,9 +190,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
185
190
|
};
|
|
186
191
|
|
|
187
192
|
var handlePopupUpdateShow = value => {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
(_props$onUpdateShow = props['onUpdate:show']) == null ? void 0 : _props$onUpdateShow.call(props, value);
|
|
193
|
+
(0, _components.call)(props['onUpdate:show'], value);
|
|
191
194
|
};
|
|
192
195
|
|
|
193
196
|
var limitTranslate = scrollColumn => {
|
|
@@ -372,7 +375,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
372
375
|
}
|
|
373
376
|
|
|
374
377
|
prevIndexes = [...indexes];
|
|
375
|
-
|
|
378
|
+
(0, _components.call)(onChange, texts, indexes);
|
|
376
379
|
};
|
|
377
380
|
|
|
378
381
|
var stopScroll = () => {
|
|
@@ -403,7 +406,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
403
406
|
indexes
|
|
404
407
|
} = getPicked();
|
|
405
408
|
prevIndexes = [...indexes];
|
|
406
|
-
|
|
409
|
+
(0, _components.call)(props.onConfirm, texts, indexes);
|
|
407
410
|
}; // expose
|
|
408
411
|
|
|
409
412
|
|
|
@@ -414,7 +417,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
414
417
|
indexes
|
|
415
418
|
} = getPicked();
|
|
416
419
|
prevIndexes = [...indexes];
|
|
417
|
-
|
|
420
|
+
(0, _components.call)(props.onCancel, texts, indexes);
|
|
418
421
|
};
|
|
419
422
|
|
|
420
423
|
(0, _vue.watch)(() => props.columns, newValue => {
|
|
@@ -427,6 +430,8 @@ var _default = (0, _vue.defineComponent)({
|
|
|
427
430
|
immediate: true
|
|
428
431
|
});
|
|
429
432
|
return {
|
|
433
|
+
n,
|
|
434
|
+
classes,
|
|
430
435
|
pack: _locale.pack,
|
|
431
436
|
optionHeight,
|
|
432
437
|
optionCount,
|
package/lib/popup/Popup.js
CHANGED
|
@@ -23,6 +23,11 @@ function _isSlot(s) {
|
|
|
23
23
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0, _vue.isVNode)(s);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
var {
|
|
27
|
+
n,
|
|
28
|
+
classes
|
|
29
|
+
} = (0, _components.createNamespace)('popup');
|
|
30
|
+
|
|
26
31
|
var _default = (0, _vue.defineComponent)({
|
|
27
32
|
name: 'VarPopup',
|
|
28
33
|
inheritAttrs: false,
|
|
@@ -69,11 +74,11 @@ var _default = (0, _vue.defineComponent)({
|
|
|
69
74
|
|
|
70
75
|
var renderOverlay = () => {
|
|
71
76
|
var {
|
|
72
|
-
overlayClass,
|
|
77
|
+
overlayClass = '',
|
|
73
78
|
overlayStyle
|
|
74
79
|
} = props;
|
|
75
80
|
return (0, _vue.createVNode)("div", {
|
|
76
|
-
"class":
|
|
81
|
+
"class": classes(n('overlay'), overlayClass),
|
|
77
82
|
"style": _extends({
|
|
78
83
|
zIndex: zIndex.value - 1
|
|
79
84
|
}, overlayStyle),
|
|
@@ -83,7 +88,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
83
88
|
|
|
84
89
|
var renderContent = () => {
|
|
85
90
|
return (0, _vue.createVNode)("div", (0, _vue.mergeProps)({
|
|
86
|
-
"class":
|
|
91
|
+
"class": classes(n('content'), 'var-elevation--3', n("--" + props.position)),
|
|
87
92
|
"style": {
|
|
88
93
|
zIndex: zIndex.value
|
|
89
94
|
}
|
|
@@ -105,7 +110,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
105
110
|
"onAfterLeave": onClosed
|
|
106
111
|
}, {
|
|
107
112
|
default: () => [(0, _vue.withDirectives)((0, _vue.createVNode)("div", {
|
|
108
|
-
"class":
|
|
113
|
+
"class": classes('var--box', n()),
|
|
109
114
|
"style": {
|
|
110
115
|
zIndex: zIndex.value - 2
|
|
111
116
|
}
|
package/lib/progress/Progress.js
CHANGED
|
@@ -10,35 +10,40 @@ var _props = require("./props");
|
|
|
10
10
|
|
|
11
11
|
var _shared = require("../utils/shared");
|
|
12
12
|
|
|
13
|
+
var _components = require("../utils/components");
|
|
14
|
+
|
|
15
|
+
var {
|
|
16
|
+
n,
|
|
17
|
+
classes
|
|
18
|
+
} = (0, _components.createNamespace)('progress');
|
|
19
|
+
|
|
13
20
|
var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
|
|
14
21
|
|
|
15
|
-
var _hoisted_1 =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
var _hoisted_2 = {
|
|
19
|
-
key: 0,
|
|
20
|
-
class: "var-progress-linear"
|
|
21
|
-
};
|
|
22
|
-
var _hoisted_3 = ["viewBox"];
|
|
23
|
-
var _hoisted_4 = ["cx", "cy", "r", "stroke-width"];
|
|
24
|
-
var _hoisted_5 = ["cx", "cy", "r", "stroke-width"];
|
|
22
|
+
var _hoisted_1 = ["viewBox"];
|
|
23
|
+
var _hoisted_2 = ["cx", "cy", "r", "stroke-width"];
|
|
24
|
+
var _hoisted_3 = ["cx", "cy", "r", "stroke-width"];
|
|
25
25
|
|
|
26
26
|
function render(_ctx, _cache) {
|
|
27
|
-
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div",
|
|
28
|
-
class:
|
|
27
|
+
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
28
|
+
class: (0, _vue.normalizeClass)(_ctx.n())
|
|
29
|
+
}, [_ctx.mode === 'linear' ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
30
|
+
key: 0,
|
|
31
|
+
class: (0, _vue.normalizeClass)(_ctx.n('linear'))
|
|
32
|
+
}, [(0, _vue.createElementVNode)("div", (0, _vue.mergeProps)({
|
|
33
|
+
class: _ctx.n('linear-block'),
|
|
29
34
|
style: {
|
|
30
35
|
height: _ctx.lineWidth + "px"
|
|
31
36
|
}
|
|
32
37
|
}, _ctx.$attrs), [_ctx.track ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
33
38
|
key: 0,
|
|
34
|
-
class:
|
|
39
|
+
class: (0, _vue.normalizeClass)(_ctx.n('linear-background')),
|
|
35
40
|
style: (0, _vue.normalizeStyle)({
|
|
36
41
|
background: _ctx.trackColor
|
|
37
42
|
})
|
|
38
|
-
}, null,
|
|
39
|
-
/* STYLE */
|
|
43
|
+
}, null, 6
|
|
44
|
+
/* CLASS, STYLE */
|
|
40
45
|
)) : (0, _vue.createCommentVNode)("v-if", true), (0, _vue.createElementVNode)("div", {
|
|
41
|
-
class: (0, _vue.normalizeClass)(
|
|
46
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('linear-certain'), [_ctx.ripple, _ctx.n('linear-ripple')])),
|
|
42
47
|
style: (0, _vue.normalizeStyle)({
|
|
43
48
|
background: _ctx.color,
|
|
44
49
|
width: _ctx.linearProps.width
|
|
@@ -49,27 +54,29 @@ function render(_ctx, _cache) {
|
|
|
49
54
|
/* FULL_PROPS */
|
|
50
55
|
), _ctx.label ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", (0, _vue.mergeProps)({
|
|
51
56
|
key: 0,
|
|
52
|
-
class:
|
|
57
|
+
class: _ctx.n('linear-label')
|
|
53
58
|
}, _ctx.$attrs), [(0, _vue.renderSlot)(_ctx.$slots, "default", {}, () => [(0, _vue.createTextVNode)((0, _vue.toDisplayString)(_ctx.linearProps.roundValue), 1
|
|
54
59
|
/* TEXT */
|
|
55
60
|
)])], 16
|
|
56
61
|
/* FULL_PROPS */
|
|
57
|
-
)) : (0, _vue.createCommentVNode)("v-if", true)]
|
|
62
|
+
)) : (0, _vue.createCommentVNode)("v-if", true)], 2
|
|
63
|
+
/* CLASS */
|
|
64
|
+
)) : (0, _vue.createCommentVNode)("v-if", true), _ctx.mode === 'circle' ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
58
65
|
key: 1,
|
|
59
|
-
class:
|
|
66
|
+
class: (0, _vue.normalizeClass)(_ctx.n('circle')),
|
|
60
67
|
style: (0, _vue.normalizeStyle)({
|
|
61
68
|
width: _ctx.size + "px",
|
|
62
69
|
height: _ctx.size + "px"
|
|
63
70
|
})
|
|
64
71
|
}, [((0, _vue.openBlock)(), (0, _vue.createElementBlock)("svg", {
|
|
65
|
-
class:
|
|
72
|
+
class: (0, _vue.normalizeClass)(_ctx.n('circle-svg')),
|
|
66
73
|
style: (0, _vue.normalizeStyle)({
|
|
67
74
|
transform: "rotate(" + (_ctx.rotate - 90) + "deg)"
|
|
68
75
|
}),
|
|
69
76
|
viewBox: _ctx.circleProps.viewBox
|
|
70
77
|
}, [_ctx.track ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("circle", {
|
|
71
78
|
key: 0,
|
|
72
|
-
class:
|
|
79
|
+
class: (0, _vue.normalizeClass)(_ctx.n('circle-background')),
|
|
73
80
|
cx: _ctx.size / 2,
|
|
74
81
|
cy: _ctx.size / 2,
|
|
75
82
|
r: _ctx.circleProps.radius,
|
|
@@ -79,10 +86,10 @@ function render(_ctx, _cache) {
|
|
|
79
86
|
strokeDasharray: _ctx.circleProps.perimeter,
|
|
80
87
|
stroke: _ctx.trackColor
|
|
81
88
|
})
|
|
82
|
-
}, null,
|
|
83
|
-
/* STYLE, PROPS */
|
|
84
|
-
,
|
|
85
|
-
class:
|
|
89
|
+
}, null, 14
|
|
90
|
+
/* CLASS, STYLE, PROPS */
|
|
91
|
+
, _hoisted_2)) : (0, _vue.createCommentVNode)("v-if", true), (0, _vue.createElementVNode)("circle", {
|
|
92
|
+
class: (0, _vue.normalizeClass)(_ctx.n('circle-certain')),
|
|
86
93
|
cx: _ctx.size / 2,
|
|
87
94
|
cy: _ctx.size / 2,
|
|
88
95
|
r: _ctx.circleProps.radius,
|
|
@@ -92,20 +99,22 @@ function render(_ctx, _cache) {
|
|
|
92
99
|
strokeDasharray: _ctx.circleProps.strokeDasharray,
|
|
93
100
|
stroke: _ctx.color
|
|
94
101
|
})
|
|
95
|
-
}, null,
|
|
96
|
-
/* STYLE, PROPS */
|
|
97
|
-
,
|
|
98
|
-
/* STYLE, PROPS */
|
|
99
|
-
,
|
|
102
|
+
}, null, 14
|
|
103
|
+
/* CLASS, STYLE, PROPS */
|
|
104
|
+
, _hoisted_3)], 14
|
|
105
|
+
/* CLASS, STYLE, PROPS */
|
|
106
|
+
, _hoisted_1)), _ctx.label ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", (0, _vue.mergeProps)({
|
|
100
107
|
key: 0,
|
|
101
|
-
class:
|
|
108
|
+
class: _ctx.n('circle-label')
|
|
102
109
|
}, _ctx.$attrs), [(0, _vue.renderSlot)(_ctx.$slots, "default", {}, () => [(0, _vue.createTextVNode)((0, _vue.toDisplayString)(_ctx.circleProps.roundValue), 1
|
|
103
110
|
/* TEXT */
|
|
104
111
|
)])], 16
|
|
105
112
|
/* FULL_PROPS */
|
|
106
|
-
)) : (0, _vue.createCommentVNode)("v-if", true)],
|
|
107
|
-
/* STYLE */
|
|
108
|
-
)) : (0, _vue.createCommentVNode)("v-if", true)]
|
|
113
|
+
)) : (0, _vue.createCommentVNode)("v-if", true)], 6
|
|
114
|
+
/* CLASS, STYLE */
|
|
115
|
+
)) : (0, _vue.createCommentVNode)("v-if", true)], 2
|
|
116
|
+
/* CLASS */
|
|
117
|
+
);
|
|
109
118
|
}
|
|
110
119
|
|
|
111
120
|
var _default = (0, _vue.defineComponent)({
|
|
@@ -144,6 +153,8 @@ var _default = (0, _vue.defineComponent)({
|
|
|
144
153
|
};
|
|
145
154
|
});
|
|
146
155
|
return {
|
|
156
|
+
n,
|
|
157
|
+
classes,
|
|
147
158
|
linearProps,
|
|
148
159
|
circleProps
|
|
149
160
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --progress-font-size: var(--font-size-sm); --progress-ripple-color: #fff; --progress-track-color: #d8d8d8; --progress-background: var(--color-primary);}.var-progress { position: relative; font-size: var(--progress-font-size);}.var-
|
|
1
|
+
:root { --progress-font-size: var(--font-size-sm); --progress-ripple-color: #fff; --progress-track-color: #d8d8d8; --progress-background: var(--color-primary);}.var-progress { position: relative; font-size: var(--progress-font-size);}.var-progress__linear { display: flex; align-items: center;}.var-progress__linear-block { flex: 1; position: relative; overflow: hidden;}.var-progress__linear-background,.var-progress__linear-certain { width: 100%; height: 100%;}.var-progress__linear-ripple::after { position: absolute; width: 0; background-color: var(--progress-ripple-color); height: 100%; opacity: 0; animation: ripple 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite; content: '';}.var-progress__linear-background { background-color: var(--progress-track-color);}.var-progress__linear-certain { position: absolute; background-color: var(--progress-background); top: 0; left: 0; transition: all 0.2s, background-color 0.8s;}.var-progress__linear-label { margin-left: 8px; flex: 0;}@keyframes ripple { 0% { width: 0; opacity: 0.1; } 20% { width: 0; opacity: 0.5; } 80% { width: 100%; opacity: 0; }}.var-progress__circle { position: relative;}.var-progress__circle-background { stroke: var(--progress-track-color);}.var-progress__circle-certain { transition: all 0.2s; stroke: var(--progress-background); position: absolute;}.var-progress__circle-label { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);}
|
|
@@ -14,23 +14,23 @@
|
|
|
14
14
|
position: relative;
|
|
15
15
|
font-size: var(--progress-font-size);
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
&__linear {
|
|
18
18
|
display: flex;
|
|
19
19
|
align-items: center;
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
&-block {
|
|
22
22
|
flex: 1;
|
|
23
23
|
position: relative;
|
|
24
24
|
overflow: hidden;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
&-background,
|
|
28
|
+
&-certain {
|
|
29
29
|
width: 100%;
|
|
30
30
|
height: 100%;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
&-ripple {
|
|
34
34
|
&::after {
|
|
35
35
|
position: absolute;
|
|
36
36
|
width: 0;
|
|
@@ -42,11 +42,11 @@
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
&-background {
|
|
46
46
|
background-color: var(--progress-track-color);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
&-certain {
|
|
50
50
|
position: absolute;
|
|
51
51
|
background-color: var(--progress-background);
|
|
52
52
|
top: 0;
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
transition: all 0.2s, background-color 0.8s;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
&-label {
|
|
58
58
|
margin-left: 8px;
|
|
59
59
|
flex: 0;
|
|
60
60
|
}
|
|
@@ -75,20 +75,20 @@
|
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
&__circle {
|
|
79
79
|
position: relative;
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
&-background {
|
|
82
82
|
stroke: var(--progress-track-color);
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
&-certain {
|
|
86
86
|
transition: all 0.2s;
|
|
87
87
|
stroke: var(--progress-background);
|
|
88
88
|
position: absolute;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
&-label {
|
|
92
92
|
position: absolute;
|
|
93
93
|
left: 50%;
|
|
94
94
|
top: 50%;
|
|
@@ -14,8 +14,14 @@ var _props = require("./props");
|
|
|
14
14
|
|
|
15
15
|
var _shared = require("../utils/shared");
|
|
16
16
|
|
|
17
|
+
var _components = require("../utils/components");
|
|
18
|
+
|
|
17
19
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
20
|
|
|
21
|
+
var {
|
|
22
|
+
n,
|
|
23
|
+
classes
|
|
24
|
+
} = (0, _components.createNamespace)('pull-refresh');
|
|
19
25
|
var MAX_DISTANCE = 100;
|
|
20
26
|
var CONTROL_POSITION = -50;
|
|
21
27
|
var scroller;
|
|
@@ -25,7 +31,7 @@ function render(_ctx, _cache) {
|
|
|
25
31
|
|
|
26
32
|
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
27
33
|
ref: "freshNode",
|
|
28
|
-
class:
|
|
34
|
+
class: (0, _vue.normalizeClass)(_ctx.n()),
|
|
29
35
|
onTouchstart: _cache[0] || (_cache[0] = function () {
|
|
30
36
|
return _ctx.touchStart && _ctx.touchStart(...arguments);
|
|
31
37
|
}),
|
|
@@ -39,19 +45,19 @@ function render(_ctx, _cache) {
|
|
|
39
45
|
return _ctx.touchEnd && _ctx.touchEnd(...arguments);
|
|
40
46
|
})
|
|
41
47
|
}, [(0, _vue.createElementVNode)("div", {
|
|
42
|
-
class: (0, _vue.normalizeClass)(
|
|
48
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('control'), 'var-elevation--2', [_ctx.isSuccess, _ctx.n('control-success')])),
|
|
43
49
|
style: (0, _vue.normalizeStyle)(_ctx.controlStyle)
|
|
44
50
|
}, [(0, _vue.createVNode)(_component_var_icon, {
|
|
45
51
|
name: _ctx.iconName,
|
|
46
52
|
transition: 200,
|
|
47
|
-
class: (0, _vue.normalizeClass)(_ctx.
|
|
53
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('icon'), [_ctx.refreshStatus === 'loading', _ctx.n('animation')])),
|
|
48
54
|
"var-pull-refresh-cover": ""
|
|
49
55
|
}, null, 8
|
|
50
56
|
/* PROPS */
|
|
51
57
|
, ["name", "class"])], 6
|
|
52
58
|
/* CLASS, STYLE */
|
|
53
|
-
), (0, _vue.renderSlot)(_ctx.$slots, "default")],
|
|
54
|
-
/*
|
|
59
|
+
), (0, _vue.renderSlot)(_ctx.$slots, "default")], 34
|
|
60
|
+
/* CLASS, HYDRATE_EVENTS */
|
|
55
61
|
);
|
|
56
62
|
}
|
|
57
63
|
|
|
@@ -71,10 +77,6 @@ var _default = (0, _vue.defineComponent)({
|
|
|
71
77
|
var refreshStatus = (0, _vue.ref)('default');
|
|
72
78
|
var isEnd = (0, _vue.ref)(false);
|
|
73
79
|
var isTouchable = (0, _vue.computed)(() => refreshStatus.value !== 'loading' && refreshStatus.value !== 'success' && !props.disabled);
|
|
74
|
-
var iconClass = (0, _vue.computed)(() => ({
|
|
75
|
-
'var-pull-refresh__icon': true,
|
|
76
|
-
'var-pull-refresh__animation': refreshStatus.value === 'loading'
|
|
77
|
-
}));
|
|
78
80
|
var controlStyle = (0, _vue.computed)(() => ({
|
|
79
81
|
transform: "translate3d(0px, " + distance.value + "px, 0px) translate(-50%, 0)",
|
|
80
82
|
transition: isEnd.value ? "transform " + props.animationDuration + "ms" : undefined,
|
|
@@ -142,12 +144,14 @@ var _default = (0, _vue.defineComponent)({
|
|
|
142
144
|
scroller = (0, _elements.getParentScroller)(freshNode.value);
|
|
143
145
|
});
|
|
144
146
|
return {
|
|
147
|
+
n,
|
|
148
|
+
classes,
|
|
149
|
+
refreshStatus,
|
|
145
150
|
freshNode,
|
|
146
151
|
touchStart,
|
|
147
152
|
touchMove,
|
|
148
153
|
touchEnd,
|
|
149
154
|
iconName,
|
|
150
|
-
iconClass,
|
|
151
155
|
controlStyle,
|
|
152
156
|
isSuccess
|
|
153
157
|
};
|