@nutui/nutui 3.1.12-beta.1 → 3.1.14

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 (131) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/README.md +139 -37
  3. package/dist/nutui.d.ts +9 -2
  4. package/dist/nutui.es.js +4830 -2950
  5. package/dist/nutui.umd.js +4910 -2953
  6. package/dist/packages/_es/ActionSheet.js +12 -13
  7. package/dist/packages/_es/Address.js +64 -77
  8. package/dist/packages/_es/Avatar.js +5 -4
  9. package/dist/packages/_es/BackTop.js +109 -72
  10. package/dist/packages/_es/Badge.js +5 -4
  11. package/dist/packages/_es/Barrage.js +57 -63
  12. package/dist/packages/_es/Button.js +6 -5
  13. package/dist/packages/_es/Calendar.js +18 -27
  14. package/dist/packages/_es/Card.js +8 -7
  15. package/dist/packages/_es/Cascader.js +547 -0
  16. package/dist/packages/_es/Cell.js +13 -5
  17. package/dist/packages/_es/CellGroup.js +14 -7
  18. package/dist/packages/_es/Checkbox.js +3 -3
  19. package/dist/packages/_es/CheckboxGroup.js +4 -9
  20. package/dist/packages/_es/CircleProgress.js +46 -142
  21. package/dist/packages/_es/Col.js +5 -4
  22. package/dist/packages/_es/Collapse.js +10 -35
  23. package/dist/packages/_es/CollapseItem.js +35 -80
  24. package/dist/packages/_es/CountDown.js +7 -10
  25. package/dist/packages/_es/CountUp.js +33 -34
  26. package/dist/packages/_es/DatePicker.js +219 -451
  27. package/dist/packages/_es/Dialog.js +98 -46
  28. package/dist/packages/_es/Divider.js +6 -5
  29. package/dist/packages/_es/Drag.js +50 -76
  30. package/dist/packages/_es/Elevator.js +53 -81
  31. package/dist/packages/_es/Empty.js +74 -0
  32. package/dist/packages/_es/FixedNav.js +9 -8
  33. package/dist/packages/_es/Form.js +23 -9
  34. package/dist/packages/_es/FormItem.js +5 -4
  35. package/dist/packages/_es/Grid.js +12 -0
  36. package/dist/packages/_es/GridItem.js +149 -0
  37. package/dist/packages/_es/Icon.js +40 -6
  38. package/dist/packages/_es/ImagePreview.js +158 -44
  39. package/dist/packages/_es/Indicator.js +66 -0
  40. package/dist/packages/_es/InfiniteLoading.js +109 -95
  41. package/dist/packages/_es/Input.js +21 -22
  42. package/dist/packages/_es/InputNumber.js +18 -24
  43. package/dist/packages/_es/Layout.js +2 -2
  44. package/dist/packages/_es/Menu.js +14 -16
  45. package/dist/packages/_es/MenuItem.js +11 -9
  46. package/dist/packages/_es/Navbar.js +7 -7
  47. package/dist/packages/_es/NoticeBar.js +31 -46
  48. package/dist/packages/_es/Notify.js +166 -30
  49. package/dist/packages/_es/NumberKeyboard.js +7 -9
  50. package/dist/packages/_es/OverLay.js +29 -22
  51. package/dist/packages/_es/Pagination.js +9 -8
  52. package/dist/packages/_es/Picker.js +447 -61
  53. package/dist/packages/_es/Popover.js +34 -161
  54. package/dist/packages/_es/Popup.js +77 -17
  55. package/dist/packages/_es/Price.js +7 -18
  56. package/dist/packages/_es/Progress.js +12 -23
  57. package/dist/packages/_es/Radio.js +3 -3
  58. package/dist/packages/_es/RadioGroup.js +2 -2
  59. package/dist/packages/_es/Range.js +31 -38
  60. package/dist/packages/_es/Rate.js +35 -17
  61. package/dist/packages/_es/Row.js +5 -4
  62. package/dist/packages/_es/SearchBar.js +5 -7
  63. package/dist/packages/_es/ShortPassword.js +59 -89
  64. package/dist/packages/_es/Signature.js +71 -70
  65. package/dist/packages/_es/Skeleton.js +138 -0
  66. package/dist/packages/_es/Sku.js +43 -53
  67. package/dist/packages/_es/Step.js +8 -10
  68. package/dist/packages/_es/Steps.js +2 -2
  69. package/dist/packages/_es/Swipe.js +28 -43
  70. package/dist/packages/_es/Swiper.js +418 -17
  71. package/dist/packages/_es/SwiperItem.js +39 -14
  72. package/dist/packages/_es/Switch.js +47 -16
  73. package/dist/packages/_es/TabPane.js +5 -4
  74. package/dist/packages/_es/Tabbar.js +5 -4
  75. package/dist/packages/_es/TabbarItem.js +9 -8
  76. package/dist/packages/_es/Table.js +191 -0
  77. package/dist/packages/_es/Tabs.js +21 -23
  78. package/dist/packages/_es/Tag.js +6 -5
  79. package/dist/packages/_es/TextArea.js +12 -16
  80. package/dist/packages/_es/TimeDetail.js +5 -7
  81. package/dist/packages/_es/TimePannel.js +5 -7
  82. package/dist/packages/_es/TimeSelect.js +7 -12
  83. package/dist/packages/_es/Toast.js +178 -46
  84. package/dist/packages/_es/Uploader.js +149 -109
  85. package/dist/packages/_es/Video.js +405 -0
  86. package/dist/packages/_es/common.js +136 -0
  87. package/dist/packages/_es/component.js +1 -1
  88. package/dist/packages/_es/index.js +7 -58
  89. package/dist/packages/_es/index2.js +58 -43
  90. package/dist/packages/_es/index3.js +28 -411
  91. package/dist/packages/_es/plugin-vue_export-helper.js +13 -0
  92. package/dist/packages/_es/pxCheck.js +1 -1
  93. package/dist/packages/_es/raf.js +1 -1
  94. package/dist/packages/_es/util.js +1 -1
  95. package/dist/packages/cascader/index.scss +81 -0
  96. package/dist/packages/cellgroup/index.scss +9 -0
  97. package/dist/packages/dialog/index.scss +17 -0
  98. package/dist/packages/drag/index.scss +4 -0
  99. package/dist/packages/empty/index.scss +33 -0
  100. package/dist/packages/fixednav/index.scss +6 -1
  101. package/dist/packages/formitem/index.scss +4 -1
  102. package/dist/packages/grid/index.scss +10 -0
  103. package/dist/packages/griditem/index.scss +92 -0
  104. package/dist/packages/icon/index.scss +2 -1
  105. package/dist/packages/indicator/index.scss +48 -0
  106. package/dist/packages/numberkeyboard/index.scss +1 -1
  107. package/dist/packages/popover/index.scss +2 -2
  108. package/dist/packages/rate/index.scss +1 -0
  109. package/dist/packages/skeleton/index.scss +57 -0
  110. package/dist/packages/table/index.scss +81 -0
  111. package/dist/packages/tabs/index.scss +16 -0
  112. package/dist/packages/textarea/index.scss +1 -0
  113. package/dist/packages/timedetail/index.scss +1 -2
  114. package/dist/packages/timeselect/index.scss +3 -0
  115. package/dist/packages/toast/index.scss +6 -0
  116. package/dist/style.css +1 -1
  117. package/dist/style.es.js +2 -1
  118. package/dist/styles/font/config.json +2 -1
  119. package/dist/styles/font/demo_index.html +26 -3
  120. package/dist/styles/font/iconfont.css +7 -3
  121. package/dist/styles/font/iconfont.js +31 -32
  122. package/dist/styles/font/iconfont.json +7 -0
  123. package/dist/styles/font/iconfont.ttf +0 -0
  124. package/dist/styles/font/iconfont.woff +0 -0
  125. package/dist/styles/font/iconfont.woff2 +0 -0
  126. package/dist/styles/themes/default.scss +40 -33
  127. package/dist/styles/variables.scss +54 -1
  128. package/package.json +2 -3
  129. package/dist/packages/_es/commonProps.js +0 -30
  130. package/dist/packages/_es/index.taro.vue_vue&type=script&lang.js +0 -44
  131. package/dist/packages/_es/use-lock-scroll.js +0 -23
@@ -1,49 +1,64 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.11 Wed Nov 24 2021 14:54:38 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.14 Wed Dec 22 2021 20:49:10 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { unref } from "vue";
7
- function isWindow(val) {
8
- return val === window;
6
+ import { ref } from "vue";
7
+ const MIN_DISTANCE = 10;
8
+ function getDirection(x, y) {
9
+ if (x > y && x > MIN_DISTANCE) {
10
+ return "horizontal";
11
+ }
12
+ if (y > x && y > MIN_DISTANCE) {
13
+ return "vertical";
14
+ }
15
+ return "";
9
16
  }
10
- const useTaroRect = (elementRef, Taro) => {
11
- let element = unref(elementRef);
12
- return new Promise((resolve) => {
13
- if (Taro.getEnv() === "WEB") {
14
- if (element && element.$el) {
15
- element = element.$el;
16
- }
17
- if (isWindow(element)) {
18
- const width = element.innerWidth;
19
- const height = element.innerHeight;
20
- resolve({
21
- top: 0,
22
- left: 0,
23
- right: width,
24
- bottom: height,
25
- width,
26
- height
27
- });
28
- }
29
- if (element && element.getBoundingClientRect) {
30
- resolve(element.getBoundingClientRect());
31
- }
32
- resolve({
33
- top: 0,
34
- left: 0,
35
- right: 0,
36
- bottom: 0,
37
- width: 0,
38
- height: 0
39
- });
40
- } else {
41
- const query = Taro.createSelectorQuery();
42
- query.select(`#${element.id}`).boundingClientRect();
43
- query.exec(function(res) {
44
- resolve(res[0]);
45
- });
17
+ function useTouch() {
18
+ const startX = ref(0);
19
+ const startY = ref(0);
20
+ const deltaX = ref(0);
21
+ const deltaY = ref(0);
22
+ const offsetX = ref(0);
23
+ const offsetY = ref(0);
24
+ const direction = ref("");
25
+ const isVertical = () => direction.value === "vertical";
26
+ const isHorizontal = () => direction.value === "horizontal";
27
+ const reset = () => {
28
+ deltaX.value = 0;
29
+ deltaY.value = 0;
30
+ offsetX.value = 0;
31
+ offsetY.value = 0;
32
+ direction.value = "";
33
+ };
34
+ const start = (event) => {
35
+ reset();
36
+ startX.value = event.touches[0].clientX;
37
+ startY.value = event.touches[0].clientY;
38
+ };
39
+ const move = (event) => {
40
+ const touch = event.touches[0];
41
+ deltaX.value = touch.clientX - startX.value;
42
+ deltaY.value = touch.clientY - startY.value;
43
+ offsetX.value = Math.abs(deltaX.value);
44
+ offsetY.value = Math.abs(deltaY.value);
45
+ if (!direction.value) {
46
+ direction.value = getDirection(offsetX.value, offsetY.value);
46
47
  }
47
- });
48
- };
49
- export { useTaroRect as u };
48
+ };
49
+ return {
50
+ move,
51
+ start,
52
+ reset,
53
+ startX,
54
+ startY,
55
+ deltaX,
56
+ deltaY,
57
+ offsetX,
58
+ offsetY,
59
+ direction,
60
+ isVertical,
61
+ isHorizontal
62
+ };
63
+ }
64
+ export { useTouch as u };
@@ -1,419 +1,36 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- var __require = typeof require !== "undefined" ? require : (x) => {
21
- throw new Error('Dynamic require of "' + x + '" is not supported');
22
- };
23
1
  /*!
24
- * @nutui/nutui v3.1.11 Wed Nov 24 2021 14:54:38 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.14 Wed Dec 22 2021 20:49:10 GMT+0800 (中国标准时间)
25
3
  * (c) 2021 @jdf2e.
26
4
  * Released under the MIT License.
27
5
  */
28
- import { computed, watch, onDeactivated, onBeforeUnmount, onMounted, onActivated, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, withModifiers, normalizeStyle, renderSlot, vShow, h, reactive, onBeforeMount, toRefs, resolveComponent, Teleport, createCommentVNode, createVNode, createElementBlock } from "vue";
29
- import { u as useLockScroll } from "./use-lock-scroll.js";
30
- import { c as createComponent } from "./component.js";
31
- import { p as pxCheck } from "./pxCheck.js";
32
- const { componentName: componentName$2, create: create$2 } = createComponent("overlay");
33
- const overlayProps = {
34
- visible: {
35
- type: Boolean,
36
- default: false
37
- },
38
- zIndex: {
39
- type: [Number, String],
40
- default: 2e3
41
- },
42
- duration: {
43
- type: [Number, String],
44
- default: 0.3
45
- },
46
- overlayClass: {
47
- type: String,
48
- default: ""
49
- },
50
- lockScroll: {
51
- type: Boolean,
52
- default: true
53
- },
54
- overlayStyle: {
55
- type: Object
56
- },
57
- closeOnClickOverlay: {
58
- type: Boolean,
59
- default: true
60
- }
61
- };
62
- var _sfc_main$2 = create$2({
63
- props: overlayProps,
64
- emits: ["click", "update:visible"],
65
- setup(props, { emit }) {
66
- const classes = computed(() => {
67
- const prefixCls = componentName$2;
68
- return {
69
- [prefixCls]: true,
70
- [props.overlayClass]: true
71
- };
72
- });
73
- watch(() => props.visible, (value) => {
74
- value ? lock() : unlock();
75
- });
76
- const lock = () => {
77
- if (props.lockScroll && props.visible) {
78
- document.body.classList.add("nut-overflow-hidden");
79
- }
80
- };
81
- const unlock = () => {
82
- document.body.classList.remove("nut-overflow-hidden");
83
- };
84
- onDeactivated(unlock);
85
- onBeforeUnmount(unlock);
86
- onMounted(lock);
87
- onActivated(lock);
88
- const style = computed(() => {
89
- return __spreadValues({
90
- animationDuration: `${props.duration}s`,
91
- zIndex: props.zIndex
92
- }, props.overlayStyle);
93
- });
94
- const touchmove = (e) => {
95
- if (props.lockScroll)
96
- e.preventDefault();
97
- };
98
- const onClick = (e) => {
99
- emit("click", e);
100
- if (props.closeOnClickOverlay) {
101
- emit("update:visible", false);
102
- }
103
- };
104
- return { classes, style, touchmove, onClick };
105
- }
106
- });
107
- function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
108
- return openBlock(), createBlock(Transition, { name: "overlay-fade" }, {
109
- default: withCtx(() => [
110
- withDirectives(createElementVNode("view", {
111
- class: normalizeClass(_ctx.classes),
112
- onTouchmove: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.touchmove && _ctx.touchmove(...args), ["stop"])),
113
- onClick: _cache[1] || (_cache[1] = (...args) => _ctx.onClick && _ctx.onClick(...args)),
114
- style: normalizeStyle(_ctx.style)
115
- }, [
116
- renderSlot(_ctx.$slots, "default")
117
- ], 38), [
118
- [vShow, _ctx.visible]
119
- ])
120
- ]),
121
- _: 3
122
- });
6
+ import { unref } from "vue";
7
+ function isWindow(val) {
8
+ return val === window;
123
9
  }
124
- _sfc_main$2.render = _sfc_render$1;
125
- const { componentName: componentName$1, create: create$1 } = createComponent("icon");
126
- var _sfc_main$1 = create$1({
127
- props: {
128
- name: { type: String, default: "" },
129
- size: { type: [String, Number], default: "" },
130
- classPrefix: { type: String, default: "nut-icon" },
131
- fontClassName: { type: String, default: "nutui-iconfont" },
132
- color: { type: String, default: "" },
133
- tag: { type: String, default: "i" }
134
- },
135
- emits: ["click"],
136
- setup(props, { emit, slots }) {
137
- const handleClick = (event) => {
138
- emit("click", event);
139
- };
140
- const isImage = () => {
141
- return props.name ? props.name.indexOf("/") !== -1 : false;
142
- };
143
- return () => {
144
- var _a;
145
- const _isImage = isImage();
146
- return h(_isImage ? "img" : props.tag, {
147
- class: _isImage ? `${componentName$1}__img` : `${props.fontClassName} ${componentName$1} ${props.classPrefix}-${props.name}`,
148
- style: {
149
- color: props.color,
150
- fontSize: pxCheck(props.size),
151
- width: pxCheck(props.size),
152
- height: pxCheck(props.size)
153
- },
154
- onClick: handleClick,
155
- src: _isImage ? props.name : ""
156
- }, (_a = slots.default) == null ? void 0 : _a.call(slots));
10
+ const useRect = (elementRef) => {
11
+ const element = unref(elementRef);
12
+ if (isWindow(element)) {
13
+ const width = element.innerWidth;
14
+ const height = element.innerHeight;
15
+ return {
16
+ top: 0,
17
+ left: 0,
18
+ right: width,
19
+ bottom: height,
20
+ width,
21
+ height
157
22
  };
158
23
  }
159
- });
160
- const { componentName, create } = createComponent("popup");
161
- let _zIndex = 2e3;
162
- const popupProps = __spreadProps(__spreadValues({}, overlayProps), {
163
- position: {
164
- type: String,
165
- default: "center"
166
- },
167
- transition: String,
168
- style: {
169
- type: Object
170
- },
171
- popClass: {
172
- type: String,
173
- default: ""
174
- },
175
- closeable: {
176
- type: Boolean,
177
- default: false
178
- },
179
- closeIconPosition: {
180
- type: String,
181
- default: "top-right"
182
- },
183
- closeIcon: {
184
- type: String,
185
- default: "close"
186
- },
187
- destroyOnClose: {
188
- type: Boolean,
189
- default: true
190
- },
191
- teleport: {
192
- type: [String, Element],
193
- default: "body"
194
- },
195
- overlay: {
196
- type: Boolean,
197
- default: true
198
- },
199
- round: {
200
- type: Boolean,
201
- default: false
202
- },
203
- isWrapTeleport: {
204
- type: Boolean,
205
- default: true
24
+ if (element && element.getBoundingClientRect) {
25
+ return element.getBoundingClientRect();
206
26
  }
207
- });
208
- var _sfc_main = create({
209
- components: {
210
- [_sfc_main$2.name]: _sfc_main$2,
211
- [_sfc_main$1.name]: _sfc_main$1
212
- },
213
- props: __spreadValues({}, popupProps),
214
- emits: ["click", "click-close-icon", "open", "close", "opend", "closed", "update:visible", "click-overlay"],
215
- setup(props, { emit }) {
216
- const state = reactive({
217
- zIndex: props.zIndex ? props.zIndex : _zIndex,
218
- showSlot: true,
219
- transitionName: `popup-fade-${props.position}`,
220
- overLayCount: 1,
221
- keepAlive: false
222
- });
223
- const [lockScroll, unlockScroll] = useLockScroll(() => props.lockScroll);
224
- const classes = computed(() => {
225
- const prefixCls = componentName;
226
- return {
227
- [prefixCls]: true,
228
- ["round"]: props.round,
229
- [`popup-${props.position}`]: true,
230
- [props.popClass]: true
231
- };
232
- });
233
- const popStyle = computed(() => {
234
- return __spreadValues({
235
- zIndex: state.zIndex,
236
- animationDuration: props.duration ? `${props.duration}s` : "initial"
237
- }, props.style);
238
- });
239
- const open = () => {
240
- if (!props.visible) {
241
- if (props.zIndex !== void 0) {
242
- _zIndex = Number(props.zIndex);
243
- }
244
- emit("update:visible", true);
245
- lockScroll();
246
- state.zIndex = ++_zIndex;
247
- }
248
- if (props.destroyOnClose) {
249
- state.showSlot = true;
250
- }
251
- emit("open");
252
- };
253
- const close = () => {
254
- if (props.visible) {
255
- unlockScroll();
256
- emit("update:visible", false);
257
- if (props.destroyOnClose) {
258
- setTimeout(() => {
259
- state.showSlot = false;
260
- emit("close");
261
- }, +props.duration * 1e3);
262
- }
263
- }
264
- };
265
- const onClick = (e) => {
266
- emit("click", e);
267
- };
268
- const onClickCloseIcon = (e) => {
269
- emit("click-close-icon", e);
270
- close();
271
- };
272
- const onClickOverlay = (e) => {
273
- if (props.closeOnClickOverlay) {
274
- emit("click-overlay", e);
275
- close();
276
- }
277
- };
278
- const onOpened = (e) => {
279
- emit("opend", e);
280
- };
281
- const onClosed = (e) => {
282
- emit("closed", e);
283
- };
284
- onMounted(() => {
285
- props.transition ? state.transitionName = props.transition : state.transitionName = `popup-slide-${props.position}`;
286
- props.visible && open();
287
- });
288
- onBeforeUnmount(() => {
289
- props.visible && close();
290
- });
291
- onBeforeMount(() => {
292
- if (props.visible) {
293
- unlockScroll();
294
- }
295
- });
296
- onActivated(() => {
297
- if (state.keepAlive) {
298
- emit("update:visible", true);
299
- state.keepAlive = false;
300
- }
301
- });
302
- onDeactivated(() => {
303
- if (props.visible) {
304
- close();
305
- state.keepAlive = true;
306
- }
307
- });
308
- watch(() => props.visible, (value) => {
309
- if (value) {
310
- open();
311
- } else {
312
- close();
313
- }
314
- });
315
- watch(() => props.position, (value) => {
316
- value === "center" ? state.transitionName = "popup-fade" : state.transitionName = `popup-slide-${value}`;
317
- });
318
- return __spreadProps(__spreadValues({}, toRefs(state)), {
319
- popStyle,
320
- classes,
321
- onClick,
322
- onClickCloseIcon,
323
- onClickOverlay,
324
- onOpened,
325
- onClosed
326
- });
327
- }
328
- });
329
- const _hoisted_1 = { key: 1 };
330
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
331
- const _component_nut_overlay = resolveComponent("nut-overlay");
332
- const _component_nut_icon = resolveComponent("nut-icon");
333
- return _ctx.isWrapTeleport ? (openBlock(), createBlock(Teleport, {
334
- key: 0,
335
- to: _ctx.teleport
336
- }, [
337
- _ctx.overlay ? (openBlock(), createBlock(_component_nut_overlay, {
338
- key: 0,
339
- visible: _ctx.visible,
340
- "close-on-click-overlay": _ctx.closeOnClickOverlay,
341
- class: normalizeClass(_ctx.overlayClass),
342
- style: normalizeStyle(_ctx.overlayStyle),
343
- "z-index": _ctx.zIndex,
344
- "lock-scroll": _ctx.lockScroll,
345
- duration: _ctx.duration,
346
- onClick: _ctx.onClickOverlay
347
- }, null, 8, ["visible", "close-on-click-overlay", "class", "style", "z-index", "lock-scroll", "duration", "onClick"])) : createCommentVNode("", true),
348
- createVNode(Transition, {
349
- name: _ctx.transitionName,
350
- onAfterEnter: _ctx.onOpened,
351
- onAfterLeave: _ctx.onClosed
352
- }, {
353
- default: withCtx(() => [
354
- withDirectives(createElementVNode("view", {
355
- class: normalizeClass(_ctx.classes),
356
- style: normalizeStyle(_ctx.popStyle),
357
- onClick: _cache[1] || (_cache[1] = (...args) => _ctx.onClick && _ctx.onClick(...args))
358
- }, [
359
- _ctx.showSlot ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("", true),
360
- _ctx.closeable ? (openBlock(), createElementBlock("view", {
361
- key: 1,
362
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClickCloseIcon && _ctx.onClickCloseIcon(...args)),
363
- class: normalizeClass(["nutui-popup__close-icon", "nutui-popup__close-icon--" + _ctx.closeIconPosition])
364
- }, [
365
- createVNode(_component_nut_icon, {
366
- name: _ctx.closeIcon,
367
- size: "12px"
368
- }, null, 8, ["name"])
369
- ], 2)) : createCommentVNode("", true)
370
- ], 6), [
371
- [vShow, _ctx.visible]
372
- ])
373
- ]),
374
- _: 3
375
- }, 8, ["name", "onAfterEnter", "onAfterLeave"])
376
- ], 8, ["to"])) : (openBlock(), createElementBlock("view", _hoisted_1, [
377
- _ctx.overlay ? (openBlock(), createBlock(_component_nut_overlay, {
378
- key: 0,
379
- visible: _ctx.visible,
380
- "close-on-click-overlay": _ctx.closeOnClickOverlay,
381
- class: normalizeClass(_ctx.overlayClass),
382
- style: normalizeStyle(_ctx.overlayStyle),
383
- "z-index": _ctx.zIndex,
384
- "lock-scroll": _ctx.lockScroll,
385
- duration: _ctx.duration,
386
- onClick: _ctx.onClickOverlay
387
- }, null, 8, ["visible", "close-on-click-overlay", "class", "style", "z-index", "lock-scroll", "duration", "onClick"])) : createCommentVNode("", true),
388
- createVNode(Transition, {
389
- name: _ctx.transitionName,
390
- onAfterEnter: _ctx.onOpened,
391
- onAfterLeave: _ctx.onClosed
392
- }, {
393
- default: withCtx(() => [
394
- withDirectives(createElementVNode("view", {
395
- class: normalizeClass(_ctx.classes),
396
- style: normalizeStyle(_ctx.popStyle),
397
- onClick: _cache[3] || (_cache[3] = (...args) => _ctx.onClick && _ctx.onClick(...args))
398
- }, [
399
- _ctx.showSlot ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("", true),
400
- _ctx.closeable ? (openBlock(), createElementBlock("view", {
401
- key: 1,
402
- onClick: _cache[2] || (_cache[2] = (...args) => _ctx.onClickCloseIcon && _ctx.onClickCloseIcon(...args)),
403
- class: normalizeClass(["nutui-popup__close-icon", "nutui-popup__close-icon--" + _ctx.closeIconPosition])
404
- }, [
405
- createVNode(_component_nut_icon, {
406
- name: _ctx.closeIcon,
407
- size: "12px"
408
- }, null, 8, ["name"])
409
- ], 2)) : createCommentVNode("", true)
410
- ], 6), [
411
- [vShow, _ctx.visible]
412
- ])
413
- ]),
414
- _: 3
415
- }, 8, ["name", "onAfterEnter", "onAfterLeave"])
416
- ]));
417
- }
418
- _sfc_main.render = _sfc_render;
419
- export { _sfc_main$1 as _, _sfc_main as a, popupProps as p };
27
+ return {
28
+ top: 0,
29
+ left: 0,
30
+ right: 0,
31
+ bottom: 0,
32
+ width: 0,
33
+ height: 0
34
+ };
35
+ };
36
+ export { useRect as u };
@@ -0,0 +1,13 @@
1
+ /*!
2
+ * @nutui/nutui v3.1.14 Wed Dec 22 2021 20:49:10 GMT+0800 (中国标准时间)
3
+ * (c) 2021 @jdf2e.
4
+ * Released under the MIT License.
5
+ */
6
+ var _export_sfc = (sfc, props) => {
7
+ const target = sfc.__vccOpts || sfc;
8
+ for (const [key, val] of props) {
9
+ target[key] = val;
10
+ }
11
+ return target;
12
+ };
13
+ export { _export_sfc as _ };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.11 Wed Nov 24 2021 14:54:38 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.14 Wed Dec 22 2021 20:49:10 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.11 Wed Nov 24 2021 14:54:38 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.14 Wed Dec 22 2021 20:49:10 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.11 Wed Nov 24 2021 14:54:38 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.14 Wed Dec 22 2021 20:49:10 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -0,0 +1,81 @@
1
+ .nut-cascader {
2
+ width: 100%;
3
+ font-size: $nut-cascader-font-size;
4
+ line-height: $nut-cascader-line-height;
5
+
6
+ .nut-tabpane {
7
+ padding: 0;
8
+ }
9
+
10
+ .nut-tabs__titles-item {
11
+ flex: initial;
12
+ min-width: auto;
13
+ padding: $nut-cascader-tabs-item-padding;
14
+ white-space: nowrap;
15
+ }
16
+
17
+ .nut-tabs__titles {
18
+ padding: $nut-cascader-tabs-item-padding;
19
+ background: #fff;
20
+ }
21
+
22
+ &__bar {
23
+ display: flex;
24
+ justify-content: center;
25
+ align-items: center;
26
+ padding: $nut-cascader-bar-padding;
27
+ text-align: center;
28
+ font-weight: bold;
29
+ line-height: $nut-cascader-bar-line-height;
30
+ color: $nut-cascader-bar-color;
31
+ font-size: $nut-cascader-bar-font-size;
32
+ }
33
+
34
+ &-pane {
35
+ display: block;
36
+ padding: 0;
37
+ margin: 0;
38
+ width: 100%;
39
+ padding-top: 10px;
40
+ height: 342px;
41
+ overflow-y: auto;
42
+ -webkit-overflow-scrolling: touch;
43
+ }
44
+
45
+ &-item {
46
+ display: flex;
47
+ align-items: center;
48
+ padding: $nut-cascader-item-padding;
49
+ margin: 0;
50
+ cursor: pointer;
51
+ font-size: $nut-cascader-item-font-size;
52
+ color: $nut-cascader-item-color;
53
+
54
+ &__title {
55
+ flex: 1;
56
+ }
57
+
58
+ &__icon-check {
59
+ margin-left: 10px;
60
+ visibility: hidden;
61
+ }
62
+
63
+ &__icon-loading {
64
+ margin-left: 10px;
65
+ }
66
+
67
+ &.active:not(.disabled) {
68
+ color: $nut-cascader-item-active-color;
69
+ }
70
+
71
+ &.active &__icon-check {
72
+ visibility: visible;
73
+ color: $nut-cascader-item-active-color;
74
+ }
75
+
76
+ &.disabled {
77
+ opacity: 0.6;
78
+ cursor: not-allowed;
79
+ }
80
+ }
81
+ }
@@ -9,6 +9,15 @@
9
9
  margin-top: 30px;
10
10
  margin-bottom: 10px;
11
11
  }
12
+ &__desc {
13
+ display: inherit;
14
+ padding: $cell-group-desc-padding;
15
+ color: $cell-group-desc-color;
16
+ font-size: $cell-group-desc-font-size;
17
+ line-height: $cell-group-desc-line-height;
18
+ margin-top: 10px;
19
+ margin-bottom: 10px;
20
+ }
12
21
  &__warp {
13
22
  display: inherit;
14
23
  border-radius: $cell-border-radius;