@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
|
@@ -14,21 +14,27 @@ var _provide = require("./provide");
|
|
|
14
14
|
|
|
15
15
|
var _props = require("./props");
|
|
16
16
|
|
|
17
|
+
var _components = require("../utils/components");
|
|
18
|
+
|
|
17
19
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
18
20
|
|
|
19
21
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
20
22
|
|
|
23
|
+
var {
|
|
24
|
+
n,
|
|
25
|
+
classes
|
|
26
|
+
} = (0, _components.createNamespace)('index-bar');
|
|
27
|
+
|
|
21
28
|
var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
|
|
22
29
|
|
|
23
|
-
var _hoisted_1 =
|
|
24
|
-
class: "var-index-bar",
|
|
25
|
-
ref: "barEl"
|
|
26
|
-
};
|
|
27
|
-
var _hoisted_2 = ["onClick"];
|
|
30
|
+
var _hoisted_1 = ["onClick"];
|
|
28
31
|
|
|
29
32
|
function render(_ctx, _cache) {
|
|
30
|
-
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div",
|
|
31
|
-
class:
|
|
33
|
+
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
34
|
+
class: (0, _vue.normalizeClass)(_ctx.n()),
|
|
35
|
+
ref: "barEl"
|
|
36
|
+
}, [(0, _vue.renderSlot)(_ctx.$slots, "default"), (0, _vue.createElementVNode)("ul", {
|
|
37
|
+
class: (0, _vue.normalizeClass)(_ctx.n('anchor-list')),
|
|
32
38
|
style: (0, _vue.normalizeStyle)({
|
|
33
39
|
zIndex: _ctx.toNumber(_ctx.zIndex) + 2,
|
|
34
40
|
display: _ctx.hideList ? 'none' : 'block'
|
|
@@ -36,22 +42,20 @@ function render(_ctx, _cache) {
|
|
|
36
42
|
}, [((0, _vue.openBlock)(true), (0, _vue.createElementBlock)(_vue.Fragment, null, (0, _vue.renderList)(_ctx.anchorNameList, anchorName => {
|
|
37
43
|
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("li", {
|
|
38
44
|
key: anchorName,
|
|
39
|
-
class: (0, _vue.normalizeClass)([
|
|
40
|
-
'var-index-bar__anchor-item--active': _ctx.active === anchorName
|
|
41
|
-
}]),
|
|
45
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('anchor-item'), [_ctx.active === anchorName, _ctx.n('anchor-item--active')])),
|
|
42
46
|
style: (0, _vue.normalizeStyle)({
|
|
43
47
|
color: _ctx.active === anchorName && _ctx.highlightColor ? _ctx.highlightColor : ''
|
|
44
48
|
}),
|
|
45
49
|
onClick: $event => _ctx.anchorClick(anchorName)
|
|
46
50
|
}, (0, _vue.toDisplayString)(anchorName), 15
|
|
47
51
|
/* TEXT, CLASS, STYLE, PROPS */
|
|
48
|
-
,
|
|
52
|
+
, _hoisted_1);
|
|
49
53
|
}), 128
|
|
50
54
|
/* KEYED_FRAGMENT */
|
|
51
|
-
))],
|
|
52
|
-
/* STYLE */
|
|
53
|
-
)],
|
|
54
|
-
/*
|
|
55
|
+
))], 6
|
|
56
|
+
/* CLASS, STYLE */
|
|
57
|
+
)], 2
|
|
58
|
+
/* CLASS */
|
|
55
59
|
);
|
|
56
60
|
}
|
|
57
61
|
|
|
@@ -88,7 +92,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
88
92
|
var anchorName = (0, _shared.isPlainObject)(anchor) ? anchor.name.value : anchor;
|
|
89
93
|
if (anchorName === active.value || anchorName === undefined) return;
|
|
90
94
|
active.value = anchorName;
|
|
91
|
-
|
|
95
|
+
(0, _components.call)(props.onChange, anchorName);
|
|
92
96
|
};
|
|
93
97
|
|
|
94
98
|
var handleScroll = () => {
|
|
@@ -118,7 +122,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
118
122
|
var {
|
|
119
123
|
offsetTop
|
|
120
124
|
} = barEl.value;
|
|
121
|
-
if (manualCall)
|
|
125
|
+
if (manualCall) (0, _components.call)(props.onClick, anchorName);
|
|
122
126
|
if (anchorName === active.value) return;
|
|
123
127
|
var indexAnchor = indexAnchors.find(_ref2 => {
|
|
124
128
|
var {
|
|
@@ -169,11 +173,11 @@ var _default = (0, _vue.defineComponent)({
|
|
|
169
173
|
scroller.value.addEventListener('scroll', handleScroll);
|
|
170
174
|
}));
|
|
171
175
|
(0, _vue.onBeforeUnmount)(() => {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
(_scroller$value = scroller.value) == null ? void 0 : _scroller$value.removeEventListener('scroll', handleScroll);
|
|
176
|
+
(0, _components.call)(scroller.value.removeEventListener, 'scroll', handleScroll);
|
|
175
177
|
});
|
|
176
178
|
return {
|
|
179
|
+
n,
|
|
180
|
+
classes,
|
|
177
181
|
barEl,
|
|
178
182
|
active,
|
|
179
183
|
zIndex,
|
package/lib/index.js
CHANGED
|
@@ -2,6 +2,8 @@ var ActionSheet = require('./action-sheet')['default']
|
|
|
2
2
|
var AppBar = require('./app-bar')['default']
|
|
3
3
|
var BackTop = require('./back-top')['default']
|
|
4
4
|
var Badge = require('./badge')['default']
|
|
5
|
+
var BottomNavigation = require('./bottom-navigation')['default']
|
|
6
|
+
var BottomNavigationItem = require('./bottom-navigation-item')['default']
|
|
5
7
|
var Button = require('./button')['default']
|
|
6
8
|
var Card = require('./card')['default']
|
|
7
9
|
var Cell = require('./cell')['default']
|
|
@@ -67,6 +69,8 @@ function install(app) {
|
|
|
67
69
|
AppBar.install && app.use(AppBar)
|
|
68
70
|
BackTop.install && app.use(BackTop)
|
|
69
71
|
Badge.install && app.use(Badge)
|
|
72
|
+
BottomNavigation.install && app.use(BottomNavigation)
|
|
73
|
+
BottomNavigationItem.install && app.use(BottomNavigationItem)
|
|
70
74
|
Button.install && app.use(Button)
|
|
71
75
|
Card.install && app.use(Card)
|
|
72
76
|
Cell.install && app.use(Cell)
|
|
@@ -134,6 +138,8 @@ module.exports = {
|
|
|
134
138
|
AppBar,
|
|
135
139
|
BackTop,
|
|
136
140
|
Badge,
|
|
141
|
+
BottomNavigation,
|
|
142
|
+
BottomNavigationItem,
|
|
137
143
|
Button,
|
|
138
144
|
Card,
|
|
139
145
|
Cell,
|
package/lib/input/Input.js
CHANGED
|
@@ -20,15 +20,16 @@ var _provide = require("../form/provide");
|
|
|
20
20
|
|
|
21
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
22
|
|
|
23
|
+
var {
|
|
24
|
+
n,
|
|
25
|
+
classes
|
|
26
|
+
} = (0, _components.createNamespace)('input');
|
|
27
|
+
|
|
23
28
|
var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
|
|
24
29
|
|
|
25
|
-
var _hoisted_1 =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
};
|
|
29
|
-
var _hoisted_2 = ["id", "disabled", "type", "value", "maxlength", "rows"];
|
|
30
|
-
var _hoisted_3 = ["id", "disabled", "type", "value", "maxlength"];
|
|
31
|
-
var _hoisted_4 = ["for"];
|
|
30
|
+
var _hoisted_1 = ["id", "disabled", "type", "value", "maxlength", "rows"];
|
|
31
|
+
var _hoisted_2 = ["id", "disabled", "type", "value", "maxlength"];
|
|
32
|
+
var _hoisted_3 = ["for"];
|
|
32
33
|
|
|
33
34
|
function render(_ctx, _cache) {
|
|
34
35
|
var _component_var_icon = (0, _vue.resolveComponent)("var-icon");
|
|
@@ -36,24 +37,29 @@ function render(_ctx, _cache) {
|
|
|
36
37
|
var _component_var_form_details = (0, _vue.resolveComponent)("var-form-details");
|
|
37
38
|
|
|
38
39
|
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
39
|
-
class: (0, _vue.normalizeClass)(
|
|
40
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), 'var--box', [_ctx.disabled, _ctx.n('--disabled')])),
|
|
40
41
|
onClick: _cache[8] || (_cache[8] = function () {
|
|
41
42
|
return _ctx.handleClick && _ctx.handleClick(...arguments);
|
|
42
43
|
})
|
|
43
44
|
}, [(0, _vue.createElementVNode)("div", {
|
|
44
|
-
class: (0, _vue.normalizeClass)(
|
|
45
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('controller'), [_ctx.isFocus, _ctx.n('--focus')], [_ctx.errorMessage, _ctx.n('--error')], [_ctx.formDisabled || _ctx.disabled, _ctx.n('--disabled')])),
|
|
45
46
|
style: (0, _vue.normalizeStyle)({
|
|
46
47
|
color: !_ctx.errorMessage ? _ctx.isFocus ? _ctx.focusColor : _ctx.blurColor : undefined
|
|
47
48
|
})
|
|
48
49
|
}, [(0, _vue.createElementVNode)("div", {
|
|
49
|
-
class: (0, _vue.normalizeClass)(
|
|
50
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('icon'), [!_ctx.hint, _ctx.n('--non-hint')]))
|
|
50
51
|
}, [(0, _vue.renderSlot)(_ctx.$slots, "prepend-icon")], 2
|
|
51
52
|
/* CLASS */
|
|
52
53
|
), (0, _vue.createElementVNode)("div", {
|
|
53
|
-
class: (0, _vue.normalizeClass)(
|
|
54
|
-
}, [_ctx.type === 'password' ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("input",
|
|
54
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('wrap'), [!_ctx.hint, _ctx.n('--non-hint')]))
|
|
55
|
+
}, [_ctx.type === 'password' ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("input", {
|
|
56
|
+
key: 0,
|
|
57
|
+
class: (0, _vue.normalizeClass)(_ctx.n('autocomplete'))
|
|
58
|
+
}, null, 2
|
|
59
|
+
/* CLASS */
|
|
60
|
+
)) : (0, _vue.createCommentVNode)("v-if", true), _ctx.textarea ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("textarea", {
|
|
55
61
|
key: 1,
|
|
56
|
-
class: (0, _vue.normalizeClass)(
|
|
62
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('input'), _ctx.n('--textarea'), [_ctx.formDisabled || _ctx.disabled, _ctx.n('--disabled')], [_ctx.errorMessage, _ctx.n('--caret-error')])),
|
|
57
63
|
ref: "el",
|
|
58
64
|
autocomplete: "new-password",
|
|
59
65
|
id: _ctx.id,
|
|
@@ -64,7 +70,7 @@ function render(_ctx, _cache) {
|
|
|
64
70
|
rows: _ctx.rows,
|
|
65
71
|
style: (0, _vue.normalizeStyle)({
|
|
66
72
|
color: _ctx.textColor,
|
|
67
|
-
caretColor: !_ctx.errorMessage ? _ctx.focusColor :
|
|
73
|
+
caretColor: !_ctx.errorMessage ? _ctx.focusColor : undefined,
|
|
68
74
|
resize: _ctx.resize ? 'vertical' : 'none'
|
|
69
75
|
}),
|
|
70
76
|
onFocus: _cache[0] || (_cache[0] = function () {
|
|
@@ -81,9 +87,9 @@ function render(_ctx, _cache) {
|
|
|
81
87
|
})
|
|
82
88
|
}, "\n ", 46
|
|
83
89
|
/* CLASS, STYLE, PROPS, HYDRATE_EVENTS */
|
|
84
|
-
,
|
|
90
|
+
, _hoisted_1)) : ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("input", {
|
|
85
91
|
key: 2,
|
|
86
|
-
class: (0, _vue.normalizeClass)(
|
|
92
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('input'), [_ctx.formDisabled || _ctx.disabled, _ctx.n('--disabled')], [_ctx.errorMessage, _ctx.n('--caret-error')])),
|
|
87
93
|
ref: "el",
|
|
88
94
|
autocomplete: "new-password",
|
|
89
95
|
id: _ctx.id,
|
|
@@ -93,7 +99,7 @@ function render(_ctx, _cache) {
|
|
|
93
99
|
maxlength: _ctx.maxlength,
|
|
94
100
|
style: (0, _vue.normalizeStyle)({
|
|
95
101
|
color: _ctx.textColor,
|
|
96
|
-
caretColor: !_ctx.errorMessage ? _ctx.focusColor :
|
|
102
|
+
caretColor: !_ctx.errorMessage ? _ctx.focusColor : undefined
|
|
97
103
|
}),
|
|
98
104
|
onFocus: _cache[4] || (_cache[4] = function () {
|
|
99
105
|
return _ctx.handleFocus && _ctx.handleFocus(...arguments);
|
|
@@ -109,39 +115,39 @@ function render(_ctx, _cache) {
|
|
|
109
115
|
})
|
|
110
116
|
}, null, 46
|
|
111
117
|
/* CLASS, STYLE, PROPS, HYDRATE_EVENTS */
|
|
112
|
-
,
|
|
113
|
-
class: (0, _vue.normalizeClass)(
|
|
118
|
+
, _hoisted_2)), (0, _vue.createElementVNode)("label", {
|
|
119
|
+
class: (0, _vue.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')])),
|
|
114
120
|
style: (0, _vue.normalizeStyle)({
|
|
115
121
|
color: !_ctx.errorMessage ? _ctx.isFocus ? _ctx.focusColor : _ctx.blurColor : undefined
|
|
116
122
|
}),
|
|
117
123
|
for: _ctx.id
|
|
118
124
|
}, (0, _vue.toDisplayString)(_ctx.placeholder), 15
|
|
119
125
|
/* TEXT, CLASS, STYLE, PROPS */
|
|
120
|
-
,
|
|
126
|
+
, _hoisted_3)], 2
|
|
121
127
|
/* CLASS */
|
|
122
128
|
), (0, _vue.createElementVNode)("div", {
|
|
123
|
-
class: (0, _vue.normalizeClass)(
|
|
129
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('icon'), [!_ctx.hint, _ctx.n('--non-hint')]))
|
|
124
130
|
}, [(0, _vue.renderSlot)(_ctx.$slots, "append-icon", {}, () => [_ctx.clearable && !_ctx.isEmpty(_ctx.modelValue) ? ((0, _vue.openBlock)(), (0, _vue.createBlock)(_component_var_icon, {
|
|
125
131
|
key: 0,
|
|
126
|
-
class:
|
|
132
|
+
class: (0, _vue.normalizeClass)(_ctx.n('clear-icon')),
|
|
127
133
|
"var-input-cover": "",
|
|
128
134
|
name: "close-circle",
|
|
129
135
|
size: "14px",
|
|
130
136
|
onClick: _ctx.handleClear
|
|
131
137
|
}, null, 8
|
|
132
138
|
/* PROPS */
|
|
133
|
-
, ["onClick"])) : (0, _vue.createCommentVNode)("v-if", true)])], 2
|
|
139
|
+
, ["class", "onClick"])) : (0, _vue.createCommentVNode)("v-if", true)])], 2
|
|
134
140
|
/* CLASS */
|
|
135
141
|
)], 6
|
|
136
142
|
/* CLASS, STYLE */
|
|
137
143
|
), _ctx.line ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
138
144
|
key: 0,
|
|
139
|
-
class: (0, _vue.normalizeClass)(
|
|
145
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('line'), [_ctx.formDisabled || _ctx.disabled, _ctx.n('--line-disabled')], [_ctx.errorMessage, _ctx.n('--line-error')])),
|
|
140
146
|
style: (0, _vue.normalizeStyle)({
|
|
141
147
|
background: !_ctx.errorMessage ? _ctx.blurColor : undefined
|
|
142
148
|
})
|
|
143
149
|
}, [(0, _vue.createElementVNode)("div", {
|
|
144
|
-
class: (0, _vue.normalizeClass)(
|
|
150
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('dot'), [_ctx.isFocus, _ctx.n('--spread')], [_ctx.formDisabled || _ctx.disabled, _ctx.n('--line-disabled')], [_ctx.errorMessage, _ctx.n('--line-error')])),
|
|
145
151
|
style: (0, _vue.normalizeStyle)({
|
|
146
152
|
background: !_ctx.errorMessage ? _ctx.focusColor : undefined
|
|
147
153
|
})
|
|
@@ -218,34 +224,32 @@ var _default = (0, _vue.defineComponent)({
|
|
|
218
224
|
} = props;
|
|
219
225
|
|
|
220
226
|
if (!hint && !(0, _shared.isEmpty)(modelValue)) {
|
|
221
|
-
return '
|
|
227
|
+
return n('--placeholder-hidden');
|
|
222
228
|
}
|
|
223
229
|
|
|
224
230
|
if (hint && (!(0, _shared.isEmpty)(modelValue) || isFocus.value)) {
|
|
225
|
-
return '
|
|
231
|
+
return n('--placeholder-hint');
|
|
226
232
|
}
|
|
227
233
|
};
|
|
228
234
|
|
|
229
235
|
var handleFocus = e => {
|
|
230
236
|
isFocus.value = true;
|
|
231
|
-
|
|
237
|
+
(0, _components.call)(props.onFocus, e);
|
|
232
238
|
validateWithTrigger('onFocus');
|
|
233
239
|
};
|
|
234
240
|
|
|
235
241
|
var handleBlur = e => {
|
|
236
242
|
isFocus.value = false;
|
|
237
|
-
|
|
243
|
+
(0, _components.call)(props.onBlur, e);
|
|
238
244
|
validateWithTrigger('onBlur');
|
|
239
245
|
};
|
|
240
246
|
|
|
241
247
|
var handleInput = e => {
|
|
242
|
-
var _props$onUpdateModel;
|
|
243
|
-
|
|
244
248
|
var {
|
|
245
249
|
value
|
|
246
250
|
} = e.target;
|
|
247
|
-
(
|
|
248
|
-
|
|
251
|
+
(0, _components.call)(props['onUpdate:modelValue'], value);
|
|
252
|
+
(0, _components.call)(props.onInput, value, e);
|
|
249
253
|
validateWithTrigger('onInput');
|
|
250
254
|
};
|
|
251
255
|
|
|
@@ -253,13 +257,11 @@ var _default = (0, _vue.defineComponent)({
|
|
|
253
257
|
var {
|
|
254
258
|
value
|
|
255
259
|
} = e.target;
|
|
256
|
-
|
|
260
|
+
(0, _components.call)(props.onChange, value, e);
|
|
257
261
|
validateWithTrigger('onChange');
|
|
258
262
|
};
|
|
259
263
|
|
|
260
264
|
var handleClear = () => {
|
|
261
|
-
var _props$onUpdateModel2;
|
|
262
|
-
|
|
263
265
|
var {
|
|
264
266
|
disabled,
|
|
265
267
|
readonly,
|
|
@@ -271,8 +273,8 @@ var _default = (0, _vue.defineComponent)({
|
|
|
271
273
|
return;
|
|
272
274
|
}
|
|
273
275
|
|
|
274
|
-
(
|
|
275
|
-
|
|
276
|
+
(0, _components.call)(props['onUpdate:modelValue'], '');
|
|
277
|
+
(0, _components.call)(onClear, '');
|
|
276
278
|
validateWithTrigger('onClear');
|
|
277
279
|
};
|
|
278
280
|
|
|
@@ -286,15 +288,13 @@ var _default = (0, _vue.defineComponent)({
|
|
|
286
288
|
return;
|
|
287
289
|
}
|
|
288
290
|
|
|
289
|
-
|
|
291
|
+
(0, _components.call)(onClick, e);
|
|
290
292
|
validateWithTrigger('onClick');
|
|
291
293
|
}; // expose
|
|
292
294
|
|
|
293
295
|
|
|
294
296
|
var reset = () => {
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
(_props$onUpdateModel3 = props['onUpdate:modelValue']) == null ? void 0 : _props$onUpdateModel3.call(props, '');
|
|
297
|
+
(0, _components.call)(props['onUpdate:modelValue'], '');
|
|
298
298
|
resetValidation();
|
|
299
299
|
}; // expose
|
|
300
300
|
|
|
@@ -318,7 +318,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
318
318
|
validate,
|
|
319
319
|
resetValidation
|
|
320
320
|
};
|
|
321
|
-
|
|
321
|
+
(0, _components.call)(bindForm, inputProvider);
|
|
322
322
|
return {
|
|
323
323
|
el,
|
|
324
324
|
id,
|
|
@@ -327,6 +327,8 @@ var _default = (0, _vue.defineComponent)({
|
|
|
327
327
|
maxlengthText,
|
|
328
328
|
formDisabled: form == null ? void 0 : form.disabled,
|
|
329
329
|
formReadonly: form == null ? void 0 : form.readonly,
|
|
330
|
+
n,
|
|
331
|
+
classes,
|
|
330
332
|
isEmpty: _shared.isEmpty,
|
|
331
333
|
computePlaceholderState,
|
|
332
334
|
handleFocus,
|
package/lib/lazy/index.js
CHANGED
|
@@ -7,6 +7,8 @@ var _elements = require("../utils/elements");
|
|
|
7
7
|
|
|
8
8
|
var _shared = require("../utils/shared");
|
|
9
9
|
|
|
10
|
+
var _components = require("../utils/components");
|
|
11
|
+
|
|
10
12
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
11
13
|
|
|
12
14
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
@@ -103,7 +105,7 @@ function createLazy(el, binding) {
|
|
|
103
105
|
attemptLock: false
|
|
104
106
|
}, lazyOptions);
|
|
105
107
|
setSRC(el, PIXEL);
|
|
106
|
-
|
|
108
|
+
(0, _components.call)(defaultLazyOptions.filter, el._lazy);
|
|
107
109
|
}
|
|
108
110
|
|
|
109
111
|
function createImage(el, attemptSRC) {
|
package/lib/less.js
CHANGED
|
@@ -2,6 +2,8 @@ require('./action-sheet/style/less')
|
|
|
2
2
|
require('./app-bar/style/less')
|
|
3
3
|
require('./back-top/style/less')
|
|
4
4
|
require('./badge/style/less')
|
|
5
|
+
require('./bottom-navigation/style/less')
|
|
6
|
+
require('./bottom-navigation-item/style/less')
|
|
5
7
|
require('./button/style/less')
|
|
6
8
|
require('./card/style/less')
|
|
7
9
|
require('./cell/style/less')
|
package/lib/list/List.js
CHANGED
|
@@ -16,6 +16,8 @@ var _props = require("./props");
|
|
|
16
16
|
|
|
17
17
|
var _shared = require("../utils/shared");
|
|
18
18
|
|
|
19
|
+
var _components = require("../utils/components");
|
|
20
|
+
|
|
19
21
|
var _locale = require("../locale");
|
|
20
22
|
|
|
21
23
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -24,55 +26,56 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
|
|
|
24
26
|
|
|
25
27
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
26
28
|
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
ref: "listEl"
|
|
32
|
-
};
|
|
33
|
-
var _hoisted_2 = {
|
|
34
|
-
class: "var-list__loading"
|
|
35
|
-
};
|
|
36
|
-
var _hoisted_3 = {
|
|
37
|
-
class: "var-list__loading-text"
|
|
38
|
-
};
|
|
39
|
-
var _hoisted_4 = {
|
|
40
|
-
class: "var-list__finished"
|
|
41
|
-
};
|
|
42
|
-
var _hoisted_5 = {
|
|
43
|
-
class: "var-list__detector",
|
|
44
|
-
ref: "detectorEl"
|
|
45
|
-
};
|
|
29
|
+
var {
|
|
30
|
+
n,
|
|
31
|
+
classes
|
|
32
|
+
} = (0, _components.createNamespace)('list');
|
|
46
33
|
|
|
47
34
|
function render(_ctx, _cache) {
|
|
48
35
|
var _component_var_loading = (0, _vue.resolveComponent)("var-loading");
|
|
49
36
|
|
|
50
37
|
var _directive_ripple = (0, _vue.resolveDirective)("ripple");
|
|
51
38
|
|
|
52
|
-
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div",
|
|
39
|
+
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
40
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), 'var--box')),
|
|
41
|
+
ref: "listEl"
|
|
42
|
+
}, [(0, _vue.renderSlot)(_ctx.$slots, "default"), _ctx.loading ? (0, _vue.renderSlot)(_ctx.$slots, "loading", {
|
|
53
43
|
key: 0
|
|
54
|
-
}, () => [(0, _vue.createElementVNode)("div",
|
|
55
|
-
|
|
44
|
+
}, () => [(0, _vue.createElementVNode)("div", {
|
|
45
|
+
class: (0, _vue.normalizeClass)(_ctx.n('loading'))
|
|
46
|
+
}, [(0, _vue.createElementVNode)("div", {
|
|
47
|
+
class: (0, _vue.normalizeClass)(_ctx.n('loading-text'))
|
|
48
|
+
}, (0, _vue.toDisplayString)(_ctx.dt(_ctx.loadingText, _ctx.pack.listLoadingText)), 3
|
|
49
|
+
/* TEXT, CLASS */
|
|
56
50
|
), (0, _vue.createVNode)(_component_var_loading, {
|
|
57
51
|
size: "mini",
|
|
58
52
|
radius: 10
|
|
59
|
-
})]
|
|
53
|
+
})], 2
|
|
54
|
+
/* CLASS */
|
|
55
|
+
)]) : (0, _vue.createCommentVNode)("v-if", true), _ctx.finished ? (0, _vue.renderSlot)(_ctx.$slots, "finished", {
|
|
60
56
|
key: 1
|
|
61
|
-
}, () => [(0, _vue.createElementVNode)("div",
|
|
62
|
-
|
|
57
|
+
}, () => [(0, _vue.createElementVNode)("div", {
|
|
58
|
+
class: (0, _vue.normalizeClass)(_ctx.n('finished'))
|
|
59
|
+
}, (0, _vue.toDisplayString)(_ctx.dt(_ctx.finishedText, _ctx.pack.listFinishedText)), 3
|
|
60
|
+
/* TEXT, CLASS */
|
|
63
61
|
)]) : (0, _vue.createCommentVNode)("v-if", true), _ctx.error ? (0, _vue.renderSlot)(_ctx.$slots, "error", {
|
|
64
62
|
key: 2
|
|
65
63
|
}, () => [(0, _vue.withDirectives)(((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
66
|
-
class:
|
|
64
|
+
class: (0, _vue.normalizeClass)(_ctx.n('error')),
|
|
67
65
|
onClick: _cache[0] || (_cache[0] = function () {
|
|
68
66
|
return _ctx.load && _ctx.load(...arguments);
|
|
69
67
|
})
|
|
70
68
|
}, [(0, _vue.createTextVNode)((0, _vue.toDisplayString)(_ctx.dt(_ctx.errorText, _ctx.pack.listErrorText)), 1
|
|
71
69
|
/* TEXT */
|
|
72
|
-
)]
|
|
73
|
-
/*
|
|
74
|
-
)],
|
|
75
|
-
|
|
70
|
+
)], 2
|
|
71
|
+
/* CLASS */
|
|
72
|
+
)), [[_directive_ripple]])]) : (0, _vue.createCommentVNode)("v-if", true), (0, _vue.createElementVNode)("div", {
|
|
73
|
+
class: (0, _vue.normalizeClass)(_ctx.n('detector')),
|
|
74
|
+
ref: "detectorEl"
|
|
75
|
+
}, null, 2
|
|
76
|
+
/* CLASS */
|
|
77
|
+
)], 2
|
|
78
|
+
/* CLASS */
|
|
76
79
|
);
|
|
77
80
|
}
|
|
78
81
|
|
|
@@ -93,11 +96,9 @@ var _default = (0, _vue.defineComponent)({
|
|
|
93
96
|
var scroller;
|
|
94
97
|
|
|
95
98
|
var load = () => {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
(
|
|
99
|
-
(_props$onUpdateLoadi = props['onUpdate:loading']) == null ? void 0 : _props$onUpdateLoadi.call(props, true);
|
|
100
|
-
props.onLoad == null ? void 0 : props.onLoad();
|
|
99
|
+
(0, _components.call)(props['onUpdate:error'], false);
|
|
100
|
+
(0, _components.call)(props['onUpdate:loading'], true);
|
|
101
|
+
(0, _components.call)(props.onLoad);
|
|
101
102
|
};
|
|
102
103
|
|
|
103
104
|
var isReachBottom = () => {
|
|
@@ -145,7 +146,9 @@ var _default = (0, _vue.defineComponent)({
|
|
|
145
146
|
dt: _shared.dt,
|
|
146
147
|
isNumber: _shared.isNumber,
|
|
147
148
|
load,
|
|
148
|
-
check
|
|
149
|
+
check,
|
|
150
|
+
n,
|
|
151
|
+
classes
|
|
149
152
|
};
|
|
150
153
|
}
|
|
151
154
|
|
package/lib/loading/Loading.js
CHANGED
|
@@ -10,17 +10,16 @@ var _props = require("./props");
|
|
|
10
10
|
|
|
11
11
|
var _shared = require("../utils/shared");
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _components = require("../utils/components");
|
|
14
|
+
|
|
15
|
+
var {
|
|
16
|
+
n,
|
|
17
|
+
classes
|
|
18
|
+
} = (0, _components.createNamespace)('loading');
|
|
14
19
|
|
|
15
|
-
var
|
|
16
|
-
class: "var-loading"
|
|
17
|
-
};
|
|
18
|
-
var _hoisted_2 = {
|
|
19
|
-
key: 0,
|
|
20
|
-
class: "var-loading__circle"
|
|
21
|
-
};
|
|
20
|
+
var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
|
|
22
21
|
|
|
23
|
-
var
|
|
22
|
+
var _hoisted_1 = /*#__PURE__*/_withScopeId(() => /*#__PURE__*/(0, _vue.createElementVNode)("svg", {
|
|
24
23
|
viewBox: "25 25 50 50"
|
|
25
24
|
}, [/*#__PURE__*/(0, _vue.createElementVNode)("circle", {
|
|
26
25
|
cx: "50",
|
|
@@ -31,39 +30,46 @@ var _hoisted_3 = /*#__PURE__*/_withScopeId(() => /*#__PURE__*/(0, _vue.createEle
|
|
|
31
30
|
/* HOISTED */
|
|
32
31
|
));
|
|
33
32
|
|
|
34
|
-
var
|
|
33
|
+
var _hoisted_2 = [_hoisted_1];
|
|
35
34
|
|
|
36
35
|
function render(_ctx, _cache) {
|
|
37
|
-
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div",
|
|
36
|
+
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
37
|
+
class: (0, _vue.normalizeClass)(_ctx.n())
|
|
38
|
+
}, [_ctx.$slots.default ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
38
39
|
key: 0,
|
|
39
|
-
class: (0, _vue.normalizeClass)(
|
|
40
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('content'), [_ctx.loading, _ctx.n('content--active')]))
|
|
40
41
|
}, [(0, _vue.renderSlot)(_ctx.$slots, "default")], 2
|
|
41
42
|
/* CLASS */
|
|
42
43
|
)) : (0, _vue.createCommentVNode)("v-if", true), _ctx.isShow ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
43
44
|
key: 1,
|
|
44
|
-
class: (0, _vue.normalizeClass)(
|
|
45
|
-
}, [_ctx.type === 'circle' ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div",
|
|
46
|
-
|
|
45
|
+
class: (0, _vue.normalizeClass)(_ctx.classes('var--box', _ctx.n('body'), [_ctx.$slots.default, _ctx.n('inside')]))
|
|
46
|
+
}, [_ctx.type === 'circle' ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
47
|
+
key: 0,
|
|
48
|
+
class: (0, _vue.normalizeClass)(_ctx.n('circle'))
|
|
49
|
+
}, [(0, _vue.createElementVNode)("span", {
|
|
50
|
+
class: (0, _vue.normalizeClass)(_ctx.n('circle-block')),
|
|
47
51
|
style: (0, _vue.normalizeStyle)({
|
|
48
52
|
width: _ctx.getRadius * 2 + 'px',
|
|
49
53
|
height: _ctx.getRadius * 2 + 'px',
|
|
50
54
|
color: _ctx.color
|
|
51
55
|
})
|
|
52
|
-
},
|
|
53
|
-
/* STYLE */
|
|
54
|
-
)]
|
|
56
|
+
}, _hoisted_2, 6
|
|
57
|
+
/* CLASS, STYLE */
|
|
58
|
+
)], 2
|
|
59
|
+
/* CLASS */
|
|
60
|
+
)) : (0, _vue.createCommentVNode)("v-if", true), ((0, _vue.openBlock)(true), (0, _vue.createElementBlock)(_vue.Fragment, null, (0, _vue.renderList)(_ctx.loadingTypeDict, (nums, key) => {
|
|
55
61
|
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)(_vue.Fragment, {
|
|
56
62
|
key: key
|
|
57
63
|
}, [_ctx.type === key ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
58
64
|
key: 0,
|
|
59
|
-
class: (0, _vue.normalizeClass)(
|
|
65
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(key), _ctx.n(key + "--" + _ctx.size)))
|
|
60
66
|
}, [((0, _vue.openBlock)(true), (0, _vue.createElementBlock)(_vue.Fragment, null, (0, _vue.renderList)(nums, num => {
|
|
61
67
|
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
62
68
|
key: num + key,
|
|
63
69
|
style: (0, _vue.normalizeStyle)({
|
|
64
70
|
backgroundColor: _ctx.color
|
|
65
71
|
}),
|
|
66
|
-
class: (0, _vue.normalizeClass)(
|
|
72
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(key + "-item"), _ctx.n(key + "-item--" + _ctx.size)))
|
|
67
73
|
}, null, 6
|
|
68
74
|
/* CLASS, STYLE */
|
|
69
75
|
);
|
|
@@ -78,7 +84,7 @@ function render(_ctx, _cache) {
|
|
|
78
84
|
/* KEYED_FRAGMENT */
|
|
79
85
|
)), _ctx.$slots.description || _ctx.description ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
80
86
|
key: 1,
|
|
81
|
-
class: (0, _vue.normalizeClass)(
|
|
87
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('description'), _ctx.n("description--" + _ctx.size))),
|
|
82
88
|
style: (0, _vue.normalizeStyle)({
|
|
83
89
|
color: _ctx.color
|
|
84
90
|
})
|
|
@@ -88,7 +94,9 @@ function render(_ctx, _cache) {
|
|
|
88
94
|
/* CLASS, STYLE */
|
|
89
95
|
)) : (0, _vue.createCommentVNode)("v-if", true)], 2
|
|
90
96
|
/* CLASS */
|
|
91
|
-
)) : (0, _vue.createCommentVNode)("v-if", true)]
|
|
97
|
+
)) : (0, _vue.createCommentVNode)("v-if", true)], 2
|
|
98
|
+
/* CLASS */
|
|
99
|
+
);
|
|
92
100
|
}
|
|
93
101
|
|
|
94
102
|
var _default = (0, _vue.defineComponent)({
|
|
@@ -116,10 +124,12 @@ var _default = (0, _vue.defineComponent)({
|
|
|
116
124
|
return props.radius ? (0, _shared.toNumber)(props.radius) : sizeDict[props.size];
|
|
117
125
|
});
|
|
118
126
|
var isShow = (0, _vue.computed)(() => {
|
|
119
|
-
if (!(
|
|
127
|
+
if (!(0, _components.call)(slots.default)) return true;
|
|
120
128
|
return props.loading;
|
|
121
129
|
});
|
|
122
130
|
return {
|
|
131
|
+
n,
|
|
132
|
+
classes,
|
|
123
133
|
loadingTypeDict,
|
|
124
134
|
getRadius,
|
|
125
135
|
isShow
|