@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.
Files changed (245) hide show
  1. package/es/action-sheet/ActionSheet.js +29 -27
  2. package/es/app-bar/AppBar.js +32 -27
  3. package/es/back-top/BackTop.js +9 -2
  4. package/es/badge/Badge.js +22 -14
  5. package/es/bottom-navigation/BottomNavigation.js +167 -0
  6. package/es/bottom-navigation/BottomNavigationSfc.css +0 -0
  7. package/es/bottom-navigation/BottomNavigationSfc.less +0 -0
  8. package/es/bottom-navigation/bottomNavigation.css +1 -0
  9. package/es/bottom-navigation/bottomNavigation.less +49 -0
  10. package/es/bottom-navigation/index.js +8 -0
  11. package/es/bottom-navigation/props.js +40 -0
  12. package/es/bottom-navigation/provide.js +17 -0
  13. package/es/bottom-navigation/style/index.js +4 -0
  14. package/es/bottom-navigation/style/less.js +4 -0
  15. package/es/bottom-navigation-item/BottomNavigationItem.js +122 -0
  16. package/es/bottom-navigation-item/BottomNavigationItemSfc.css +0 -0
  17. package/es/bottom-navigation-item/BottomNavigationItemSfc.less +0 -0
  18. package/es/bottom-navigation-item/bottomNavigationItem.css +1 -0
  19. package/es/bottom-navigation-item/bottomNavigationItem.less +78 -0
  20. package/es/bottom-navigation-item/index.js +8 -0
  21. package/es/bottom-navigation-item/props.js +22 -0
  22. package/es/bottom-navigation-item/provide.js +21 -0
  23. package/es/bottom-navigation-item/style/index.js +6 -0
  24. package/es/bottom-navigation-item/style/less.js +6 -0
  25. package/es/button/Button.js +12 -5
  26. package/es/card/Card.js +33 -28
  27. package/es/cell/Cell.js +26 -15
  28. package/es/checkbox/Checkbox.js +28 -26
  29. package/es/checkbox-group/CheckboxGroup.js +21 -25
  30. package/es/chip/Chip.js +16 -7
  31. package/es/chip/chip.css +1 -1
  32. package/es/chip/chip.less +11 -11
  33. package/es/col/Col.js +12 -5
  34. package/es/collapse/Collapse.js +15 -12
  35. package/es/collapse-item/CollapseItem.js +31 -30
  36. package/es/collapse-item/collapseItem.css +1 -1
  37. package/es/collapse-item/collapseItem.less +16 -16
  38. package/es/countdown/Countdown.js +14 -11
  39. package/es/counter/Counter.js +30 -27
  40. package/es/date-picker/DatePicker.js +28 -23
  41. package/es/date-picker/date-picker.css +1 -1
  42. package/es/date-picker/date-picker.less +22 -20
  43. package/es/date-picker/src/day-picker-panel.js +41 -34
  44. package/es/date-picker/src/month-picker-panel.js +27 -21
  45. package/es/date-picker/src/panel-header.js +16 -11
  46. package/es/date-picker/src/year-picker-panel.js +17 -9
  47. package/es/dialog/Dialog.js +36 -40
  48. package/es/divider/Divider.js +16 -12
  49. package/es/form/Form.js +11 -8
  50. package/es/form-details/FormDetails.js +27 -22
  51. package/es/icon/Icon.js +8 -1
  52. package/es/icon/icon.css +1 -1
  53. package/es/image/Image.js +19 -12
  54. package/es/image-preview/ImagePreview.js +35 -34
  55. package/es/index-anchor/IndexAnchor.js +8 -1
  56. package/es/index-bar/IndexBar.js +22 -20
  57. package/es/index.js +10 -0
  58. package/es/input/Input.js +45 -44
  59. package/es/lazy/index.js +2 -1
  60. package/es/less.js +2 -0
  61. package/es/list/List.js +39 -38
  62. package/es/loading/Loading.js +31 -23
  63. package/es/loading/loading.css +1 -1
  64. package/es/loading/loading.less +32 -32
  65. package/es/menu/Menu.js +12 -10
  66. package/es/option/Option.js +16 -11
  67. package/es/pagination/Pagination.js +34 -44
  68. package/es/pagination/pagination.css +1 -1
  69. package/es/pagination/pagination.less +8 -8
  70. package/es/picker/Picker.js +51 -47
  71. package/es/popup/Popup.js +9 -5
  72. package/es/progress/Progress.js +44 -35
  73. package/es/progress/progress.css +1 -1
  74. package/es/progress/progress.less +12 -12
  75. package/es/pull-refresh/PullRefresh.js +13 -10
  76. package/es/radio/Radio.js +25 -25
  77. package/es/radio-group/RadioGroup.js +19 -19
  78. package/es/rate/Rate.js +27 -25
  79. package/es/ripple/index.js +6 -2
  80. package/es/row/Row.js +11 -4
  81. package/es/select/Select.js +53 -54
  82. package/es/skeleton/Skeleton.js +70 -81
  83. package/es/slider/Slider.js +44 -40
  84. package/es/slider/slider.css +1 -1
  85. package/es/slider/slider.less +5 -5
  86. package/es/snackbar/Snackbar.js +9 -5
  87. package/es/snackbar/core.js +20 -26
  88. package/es/snackbar/snackbar.css +1 -1
  89. package/es/snackbar/snackbar.less +66 -68
  90. package/es/space/Space.js +8 -3
  91. package/es/step/Step.js +25 -23
  92. package/es/step/step.css +1 -1
  93. package/es/step/step.less +10 -10
  94. package/es/steps/Steps.js +12 -5
  95. package/es/sticky/Sticky.js +14 -7
  96. package/es/style-provider/StyleProvider.js +6 -2
  97. package/es/style.css +1 -1
  98. package/es/style.js +2 -0
  99. package/es/swipe/Swipe.js +22 -16
  100. package/es/swipe-item/SwipeItem.js +9 -4
  101. package/es/switch/Switch.js +25 -23
  102. package/es/switch/switch.css +1 -1
  103. package/es/switch/switch.less +2 -2
  104. package/es/tab/Tab.js +8 -1
  105. package/es/tab-item/TabItem.js +8 -1
  106. package/es/table/Table.js +27 -20
  107. package/es/tabs/Tabs.js +16 -11
  108. package/es/tabs-items/TabsItems.js +10 -5
  109. package/es/themes/dark/bottomNavigation.js +4 -0
  110. package/es/themes/dark/bottomNavigationItem.js +3 -0
  111. package/es/themes/dark/index.js +3 -1
  112. package/es/time-picker/TimePicker.js +47 -38
  113. package/es/time-picker/clock.js +26 -22
  114. package/es/time-picker/timePicker.css +1 -1
  115. package/es/time-picker/timePicker.less +11 -11
  116. package/es/umdIndex.js +10 -0
  117. package/es/uploader/Uploader.js +62 -57
  118. package/es/utils/components.js +35 -0
  119. package/es/varlet.esm.js +2082 -1527
  120. package/highlight/attributes.json +48 -0
  121. package/highlight/tags.json +20 -0
  122. package/highlight/web-types.json +155 -1
  123. package/lib/action-sheet/ActionSheet.js +30 -26
  124. package/lib/app-bar/AppBar.js +31 -24
  125. package/lib/back-top/BackTop.js +11 -2
  126. package/lib/badge/Badge.js +23 -13
  127. package/lib/bottom-navigation/BottomNavigation.js +183 -0
  128. package/lib/bottom-navigation/BottomNavigationSfc.css +0 -0
  129. package/lib/bottom-navigation/BottomNavigationSfc.less +0 -0
  130. package/lib/bottom-navigation/bottomNavigation.css +1 -0
  131. package/lib/bottom-navigation/bottomNavigation.less +49 -0
  132. package/lib/bottom-navigation/index.js +17 -0
  133. package/lib/bottom-navigation/props.js +45 -0
  134. package/lib/bottom-navigation/provide.js +27 -0
  135. package/lib/bottom-navigation/style/index.js +4 -0
  136. package/lib/bottom-navigation/style/less.js +4 -0
  137. package/lib/bottom-navigation-item/BottomNavigationItem.js +140 -0
  138. package/lib/bottom-navigation-item/BottomNavigationItemSfc.css +0 -0
  139. package/lib/bottom-navigation-item/BottomNavigationItemSfc.less +0 -0
  140. package/lib/bottom-navigation-item/bottomNavigationItem.css +1 -0
  141. package/lib/bottom-navigation-item/bottomNavigationItem.less +78 -0
  142. package/lib/bottom-navigation-item/index.js +17 -0
  143. package/lib/bottom-navigation-item/props.js +27 -0
  144. package/lib/bottom-navigation-item/provide.js +28 -0
  145. package/lib/bottom-navigation-item/style/index.js +6 -0
  146. package/lib/bottom-navigation-item/style/less.js +6 -0
  147. package/lib/button/Button.js +13 -4
  148. package/lib/card/Card.js +34 -27
  149. package/lib/cell/Cell.js +26 -13
  150. package/lib/checkbox/Checkbox.js +26 -23
  151. package/lib/checkbox-group/CheckboxGroup.js +19 -22
  152. package/lib/chip/Chip.js +18 -7
  153. package/lib/chip/chip.css +1 -1
  154. package/lib/chip/chip.less +11 -11
  155. package/lib/col/Col.js +14 -5
  156. package/lib/collapse/Collapse.js +15 -10
  157. package/lib/collapse-item/CollapseItem.js +31 -28
  158. package/lib/collapse-item/collapseItem.css +1 -1
  159. package/lib/collapse-item/collapseItem.less +16 -16
  160. package/lib/countdown/Countdown.js +14 -10
  161. package/lib/counter/Counter.js +29 -26
  162. package/lib/date-picker/DatePicker.js +30 -23
  163. package/lib/date-picker/date-picker.css +1 -1
  164. package/lib/date-picker/date-picker.less +22 -20
  165. package/lib/date-picker/src/day-picker-panel.js +41 -32
  166. package/lib/date-picker/src/month-picker-panel.js +27 -19
  167. package/lib/date-picker/src/panel-header.js +16 -9
  168. package/lib/date-picker/src/year-picker-panel.js +19 -9
  169. package/lib/dialog/Dialog.js +36 -38
  170. package/lib/divider/Divider.js +16 -10
  171. package/lib/form/Form.js +11 -6
  172. package/lib/form-details/FormDetails.js +27 -20
  173. package/lib/icon/Icon.js +10 -1
  174. package/lib/icon/icon.css +1 -1
  175. package/lib/image/Image.js +20 -11
  176. package/lib/image-preview/ImagePreview.js +35 -33
  177. package/lib/index-anchor/IndexAnchor.js +10 -1
  178. package/lib/index-bar/IndexBar.js +24 -20
  179. package/lib/index.js +6 -0
  180. package/lib/input/Input.js +45 -43
  181. package/lib/lazy/index.js +3 -1
  182. package/lib/less.js +2 -0
  183. package/lib/list/List.js +39 -36
  184. package/lib/loading/Loading.js +33 -23
  185. package/lib/loading/loading.css +1 -1
  186. package/lib/loading/loading.less +32 -32
  187. package/lib/menu/Menu.js +12 -9
  188. package/lib/option/Option.js +16 -9
  189. package/lib/pagination/Pagination.js +36 -44
  190. package/lib/pagination/pagination.css +1 -1
  191. package/lib/pagination/pagination.less +8 -8
  192. package/lib/picker/Picker.js +51 -46
  193. package/lib/popup/Popup.js +9 -4
  194. package/lib/progress/Progress.js +45 -34
  195. package/lib/progress/progress.css +1 -1
  196. package/lib/progress/progress.less +12 -12
  197. package/lib/pull-refresh/PullRefresh.js +14 -10
  198. package/lib/radio/Radio.js +23 -22
  199. package/lib/radio-group/RadioGroup.js +17 -16
  200. package/lib/rate/Rate.js +27 -24
  201. package/lib/ripple/index.js +7 -2
  202. package/lib/row/Row.js +12 -3
  203. package/lib/select/Select.js +53 -53
  204. package/lib/skeleton/Skeleton.js +69 -78
  205. package/lib/slider/Slider.js +42 -38
  206. package/lib/slider/slider.css +1 -1
  207. package/lib/slider/slider.less +5 -5
  208. package/lib/snackbar/Snackbar.js +9 -4
  209. package/lib/snackbar/core.js +20 -25
  210. package/lib/snackbar/snackbar.css +1 -1
  211. package/lib/snackbar/snackbar.less +66 -68
  212. package/lib/space/Space.js +9 -3
  213. package/lib/step/Step.js +26 -22
  214. package/lib/step/step.css +1 -1
  215. package/lib/step/step.less +10 -10
  216. package/lib/steps/Steps.js +13 -4
  217. package/lib/sticky/Sticky.js +15 -6
  218. package/lib/style-provider/StyleProvider.js +8 -2
  219. package/lib/style.css +1 -1
  220. package/lib/style.js +2 -0
  221. package/lib/swipe/Swipe.js +23 -16
  222. package/lib/swipe-item/SwipeItem.js +10 -3
  223. package/lib/switch/Switch.js +23 -20
  224. package/lib/switch/switch.css +1 -1
  225. package/lib/switch/switch.less +2 -2
  226. package/lib/tab/Tab.js +10 -1
  227. package/lib/tab-item/TabItem.js +10 -1
  228. package/lib/table/Table.js +27 -18
  229. package/lib/tabs/Tabs.js +18 -11
  230. package/lib/tabs-items/TabsItems.js +11 -4
  231. package/lib/themes/dark/bottomNavigation.js +9 -0
  232. package/lib/themes/dark/bottomNavigationItem.js +8 -0
  233. package/lib/themes/dark/index.js +5 -1
  234. package/lib/time-picker/TimePicker.js +49 -38
  235. package/lib/time-picker/clock.js +26 -20
  236. package/lib/time-picker/timePicker.css +1 -1
  237. package/lib/time-picker/timePicker.less +11 -11
  238. package/lib/uploader/Uploader.js +60 -55
  239. package/lib/utils/components.js +39 -0
  240. package/package.json +4 -4
  241. package/types/bottomNavigation.d.ts +19 -0
  242. package/types/bottomNavigationItem.d.ts +16 -0
  243. package/types/global.d.ts +2 -0
  244. package/types/index.d.ts +2 -0
  245. 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", _hoisted_1, [(0, _vue.renderSlot)(_ctx.$slots, "default"), (0, _vue.createElementVNode)("ul", {
31
- class: "var-index-bar__anchor-list",
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)(["var-index-bar__anchor-item", {
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
- , _hoisted_2);
52
+ , _hoisted_1);
49
53
  }), 128
50
54
  /* KEYED_FRAGMENT */
51
- ))], 4
52
- /* STYLE */
53
- )], 512
54
- /* NEED_PATCH */
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
- props.onChange == null ? void 0 : props.onChange(anchorName);
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) props.onClick == null ? void 0 : props.onClick(anchorName);
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
- var _scroller$value;
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,
@@ -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
- key: 0,
27
- class: "var-input__autocomplete"
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)(["var-input var--box", [_ctx.disabled ? 'var-input--disabled' : null]]),
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)(["var-input__controller", [_ctx.isFocus ? 'var-input--focus' : null, _ctx.errorMessage ? 'var-input--error' : null, _ctx.formDisabled || _ctx.disabled ? 'var-input--disabled' : null]]),
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)(["var-input__icon", [!_ctx.hint ? 'var-input--non-hint' : null]])
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)(["var-input__wrap", [!_ctx.hint ? 'var-input--non-hint' : null]])
54
- }, [_ctx.type === 'password' ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("input", _hoisted_1)) : (0, _vue.createCommentVNode)("v-if", true), _ctx.textarea ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("textarea", {
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)(["var-input__input var-input--textarea", [_ctx.formDisabled || _ctx.disabled ? 'var-input--disabled' : null, _ctx.errorMessage ? 'var-input--caret-error' : null]]),
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 : null,
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
- , _hoisted_2)) : ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("input", {
90
+ , _hoisted_1)) : ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("input", {
85
91
  key: 2,
86
- class: (0, _vue.normalizeClass)(["var-input__input", [_ctx.formDisabled || _ctx.disabled ? 'var-input--disabled' : null, _ctx.errorMessage ? 'var-input--caret-error' : null]]),
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 : null
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
- , _hoisted_3)), (0, _vue.createElementVNode)("label", {
113
- class: (0, _vue.normalizeClass)(["var--ellipsis", [_ctx.isFocus ? 'var-input--focus' : null, _ctx.errorMessage ? 'var-input--error' : null, _ctx.textarea ? 'var-input__textarea-placeholder' : 'var-input__placeholder', _ctx.computePlaceholderState(), !_ctx.hint ? 'var-input--placeholder-non-hint' : null]]),
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
- , _hoisted_4)], 2
126
+ , _hoisted_3)], 2
121
127
  /* CLASS */
122
128
  ), (0, _vue.createElementVNode)("div", {
123
- class: (0, _vue.normalizeClass)(["var-input__icon", [!_ctx.hint ? 'var-input--non-hint' : null]])
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: "var-input__clear-icon",
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)(["var-input__line", [_ctx.formDisabled || _ctx.disabled ? 'var-input--line-disabled' : null, _ctx.errorMessage ? 'var-input--line-error' : null]]),
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)(["var-input__dot", [_ctx.isFocus ? 'var-input--spread' : null, _ctx.formDisabled || _ctx.disabled ? 'var-input--line-disabled' : null, _ctx.errorMessage ? 'var-input--line-error' : null]]),
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 'var-input--placeholder-hidden';
227
+ return n('--placeholder-hidden');
222
228
  }
223
229
 
224
230
  if (hint && (!(0, _shared.isEmpty)(modelValue) || isFocus.value)) {
225
- return 'var-input--placeholder-hint';
231
+ return n('--placeholder-hint');
226
232
  }
227
233
  };
228
234
 
229
235
  var handleFocus = e => {
230
236
  isFocus.value = true;
231
- props.onFocus == null ? void 0 : props.onFocus(e);
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
- props.onBlur == null ? void 0 : props.onBlur(e);
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
- (_props$onUpdateModel = props['onUpdate:modelValue']) == null ? void 0 : _props$onUpdateModel.call(props, value);
248
- props.onInput == null ? void 0 : props.onInput(value, e);
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
- props.onChange == null ? void 0 : props.onChange(value, e);
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
- (_props$onUpdateModel2 = props['onUpdate:modelValue']) == null ? void 0 : _props$onUpdateModel2.call(props, '');
275
- onClear == null ? void 0 : onClear('');
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
- onClick == null ? void 0 : onClick(e);
291
+ (0, _components.call)(onClick, e);
290
292
  validateWithTrigger('onClick');
291
293
  }; // expose
292
294
 
293
295
 
294
296
  var reset = () => {
295
- var _props$onUpdateModel3;
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
- bindForm == null ? void 0 : bindForm(inputProvider);
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
- defaultLazyOptions.filter == null ? void 0 : defaultLazyOptions.filter(el._lazy);
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 _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
28
-
29
- var _hoisted_1 = {
30
- class: "var-list var--box",
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", _hoisted_1, [(0, _vue.renderSlot)(_ctx.$slots, "default"), _ctx.loading ? (0, _vue.renderSlot)(_ctx.$slots, "loading", {
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", _hoisted_2, [(0, _vue.createElementVNode)("div", _hoisted_3, (0, _vue.toDisplayString)(_ctx.dt(_ctx.loadingText, _ctx.pack.listLoadingText)), 1
55
- /* TEXT */
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
- })])]) : (0, _vue.createCommentVNode)("v-if", true), _ctx.finished ? (0, _vue.renderSlot)(_ctx.$slots, "finished", {
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", _hoisted_4, (0, _vue.toDisplayString)(_ctx.dt(_ctx.finishedText, _ctx.pack.listFinishedText)), 1
62
- /* TEXT */
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: "var-list__error",
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
- )])), [[_directive_ripple]])]) : (0, _vue.createCommentVNode)("v-if", true), (0, _vue.createElementVNode)("div", _hoisted_5, null, 512
73
- /* NEED_PATCH */
74
- )], 512
75
- /* NEED_PATCH */
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
- var _props$onUpdateError, _props$onUpdateLoadi;
97
-
98
- (_props$onUpdateError = props['onUpdate:error']) == null ? void 0 : _props$onUpdateError.call(props, false);
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
 
@@ -10,17 +10,16 @@ var _props = require("./props");
10
10
 
11
11
  var _shared = require("../utils/shared");
12
12
 
13
- var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
13
+ var _components = require("../utils/components");
14
+
15
+ var {
16
+ n,
17
+ classes
18
+ } = (0, _components.createNamespace)('loading');
14
19
 
15
- var _hoisted_1 = {
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 _hoisted_3 = /*#__PURE__*/_withScopeId(() => /*#__PURE__*/(0, _vue.createElementVNode)("svg", {
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 _hoisted_4 = [_hoisted_3];
33
+ var _hoisted_2 = [_hoisted_1];
35
34
 
36
35
  function render(_ctx, _cache) {
37
- return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", _hoisted_1, [_ctx.$slots.default ? ((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)(["var-loading__content", [_ctx.loading ? 'var-loading__content--active' : null]])
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)(["var--box var-loading__body", [_ctx.$slots.default ? 'var-loading__inside' : null]])
45
- }, [_ctx.type === 'circle' ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", _hoisted_2, [(0, _vue.createElementVNode)("span", {
46
- class: "var-loading__circle-block",
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
- }, _hoisted_4, 4
53
- /* STYLE */
54
- )])) : (0, _vue.createCommentVNode)("v-if", true), ((0, _vue.openBlock)(true), (0, _vue.createElementBlock)(_vue.Fragment, null, (0, _vue.renderList)(_ctx.loadingTypeDict, (nums, key) => {
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)("var-loading__" + key + " var-loading__" + key + "-" + _ctx.size)
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)("var-loading__" + key + "-item var-loading__" + key + "-item-" + _ctx.size)
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)(["var-loading__description", "var-loading__description--" + _ctx.size]),
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 (!(slots.default != null && slots.default())) return true;
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