@nutui/nutui 3.1.10 → 3.1.12-beta.1

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 (109) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/nutui.d.ts +5 -1
  3. package/dist/nutui.es.js +4041 -3518
  4. package/dist/nutui.umd.js +4084 -3627
  5. package/dist/packages/_es/ActionSheet.js +13 -12
  6. package/dist/packages/_es/Address.js +63 -49
  7. package/dist/packages/_es/Avatar.js +4 -5
  8. package/dist/packages/_es/BackTop.js +72 -109
  9. package/dist/packages/_es/Badge.js +4 -5
  10. package/dist/packages/_es/Barrage.js +63 -57
  11. package/dist/packages/_es/Button.js +5 -6
  12. package/dist/packages/_es/Calendar.js +27 -18
  13. package/dist/packages/_es/Card.js +104 -0
  14. package/dist/packages/_es/Cell.js +5 -13
  15. package/dist/packages/_es/CellGroup.js +4 -5
  16. package/dist/packages/_es/Checkbox.js +3 -3
  17. package/dist/packages/_es/CheckboxGroup.js +9 -4
  18. package/dist/packages/_es/CircleProgress.js +142 -46
  19. package/dist/packages/_es/Col.js +4 -5
  20. package/dist/packages/_es/Collapse.js +35 -10
  21. package/dist/packages/_es/CollapseItem.js +80 -35
  22. package/dist/packages/_es/CountDown.js +7 -5
  23. package/dist/packages/_es/CountUp.js +34 -31
  24. package/dist/packages/_es/DatePicker.js +451 -219
  25. package/dist/packages/_es/Dialog.js +13 -87
  26. package/dist/packages/_es/Divider.js +5 -6
  27. package/dist/packages/_es/Drag.js +76 -50
  28. package/dist/packages/_es/Elevator.js +81 -52
  29. package/dist/packages/_es/FixedNav.js +8 -9
  30. package/dist/packages/_es/Form.js +137 -0
  31. package/dist/packages/_es/FormItem.js +109 -0
  32. package/dist/packages/_es/Icon.js +6 -40
  33. package/dist/packages/_es/ImagePreview.js +23 -21
  34. package/dist/packages/_es/InfiniteLoading.js +95 -109
  35. package/dist/packages/_es/Input.js +22 -21
  36. package/dist/packages/_es/InputNumber.js +24 -18
  37. package/dist/packages/_es/Layout.js +2 -2
  38. package/dist/packages/_es/Menu.js +89 -171
  39. package/dist/packages/_es/MenuItem.js +155 -18
  40. package/dist/packages/_es/Navbar.js +7 -7
  41. package/dist/packages/_es/NoticeBar.js +39 -26
  42. package/dist/packages/_es/Notify.js +30 -166
  43. package/dist/packages/_es/NumberKeyboard.js +10 -6
  44. package/dist/packages/_es/OverLay.js +22 -29
  45. package/dist/packages/_es/Pagination.js +8 -9
  46. package/dist/packages/_es/Picker.js +61 -447
  47. package/dist/packages/_es/Popover.js +146 -25
  48. package/dist/packages/_es/Popup.js +18 -39
  49. package/dist/packages/_es/Price.js +18 -7
  50. package/dist/packages/_es/Progress.js +23 -12
  51. package/dist/packages/_es/Radio.js +20 -7
  52. package/dist/packages/_es/RadioGroup.js +7 -3
  53. package/dist/packages/_es/Range.js +38 -59
  54. package/dist/packages/_es/Rate.js +16 -20
  55. package/dist/packages/_es/Row.js +4 -5
  56. package/dist/packages/_es/SearchBar.js +7 -5
  57. package/dist/packages/_es/ShortPassword.js +89 -59
  58. package/dist/packages/_es/Signature.js +70 -71
  59. package/dist/packages/_es/Sku.js +508 -0
  60. package/dist/packages/_es/Step.js +10 -8
  61. package/dist/packages/_es/Steps.js +2 -2
  62. package/dist/packages/_es/Swipe.js +42 -27
  63. package/dist/packages/_es/Swiper.js +17 -418
  64. package/dist/packages/_es/SwiperItem.js +14 -39
  65. package/dist/packages/_es/Switch.js +4 -5
  66. package/dist/packages/_es/TabPane.js +4 -5
  67. package/dist/packages/_es/Tabbar.js +4 -5
  68. package/dist/packages/_es/TabbarItem.js +8 -9
  69. package/dist/packages/_es/Tabs.js +23 -17
  70. package/dist/packages/_es/Tag.js +5 -6
  71. package/dist/packages/_es/TextArea.js +16 -12
  72. package/dist/packages/_es/TimeDetail.js +7 -5
  73. package/dist/packages/_es/TimePannel.js +7 -5
  74. package/dist/packages/_es/TimeSelect.js +12 -7
  75. package/dist/packages/_es/Toast.js +41 -163
  76. package/dist/packages/_es/Uploader.js +210 -164
  77. package/dist/packages/_es/commonProps.js +30 -0
  78. package/dist/packages/_es/component.js +1 -1
  79. package/dist/packages/_es/index.js +1 -1
  80. package/dist/packages/_es/index.taro.vue_vue&type=script&lang.js +44 -0
  81. package/dist/packages/_es/index2.js +44 -8
  82. package/dist/packages/_es/index3.js +419 -0
  83. package/dist/packages/_es/pxCheck.js +1 -1
  84. package/dist/packages/_es/raf.js +1 -1
  85. package/dist/packages/_es/use-lock-scroll.js +23 -0
  86. package/dist/packages/_es/util.js +47 -0
  87. package/dist/packages/button/index.scss +9 -0
  88. package/dist/packages/card/index.scss +97 -0
  89. package/dist/packages/checkbox/index.scss +1 -1
  90. package/dist/packages/form/index.scss +2 -0
  91. package/dist/packages/formitem/index.scss +60 -0
  92. package/dist/packages/menu/index.scss +32 -60
  93. package/dist/packages/menuitem/index.scss +36 -99
  94. package/dist/packages/numberkeyboard/index.scss +1 -1
  95. package/dist/packages/progress/index.scss +2 -0
  96. package/dist/packages/radio/index.scss +32 -4
  97. package/dist/packages/radiogroup/index.scss +20 -0
  98. package/dist/packages/sku/index.scss +147 -0
  99. package/dist/packages/switch/index.scss +1 -1
  100. package/dist/packages/uploader/index.scss +95 -8
  101. package/dist/style.css +1 -1
  102. package/dist/style.es.js +1 -2
  103. package/dist/styles/mixins/index.scss +0 -4
  104. package/dist/styles/themes/default.scss +34 -30
  105. package/dist/styles/variables.scss +45 -3
  106. package/package.json +3 -2
  107. package/dist/packages/_es/Video.js +0 -405
  108. package/dist/packages/_es/plugin-vue_export-helper.js +0 -12
  109. package/dist/packages/_es/style.css +0 -160
@@ -1,13 +1,49 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.10 Fri Nov 05 2021 19:52:49 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.11 Wed Nov 24 2021 14:54:38 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { getCurrentInstance } from "vue";
7
- function useExpose(apis) {
8
- const instance = getCurrentInstance();
9
- if (instance) {
10
- Object.assign(instance.proxy, apis);
11
- }
6
+ import { unref } from "vue";
7
+ function isWindow(val) {
8
+ return val === window;
12
9
  }
13
- export { useExpose as u };
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
+ });
46
+ }
47
+ });
48
+ };
49
+ export { useTaroRect as u };
@@ -0,0 +1,419 @@
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
+ /*!
24
+ * @nutui/nutui v3.1.11 Wed Nov 24 2021 14:54:38 GMT+0800 (中国标准时间)
25
+ * (c) 2021 @jdf2e.
26
+ * Released under the MIT License.
27
+ */
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
+ });
123
+ }
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));
157
+ };
158
+ }
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
206
+ }
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 };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.10 Fri Nov 05 2021 19:52:49 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.11 Wed Nov 24 2021 14:54:38 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.10 Fri Nov 05 2021 19:52:49 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.11 Wed Nov 24 2021 14:54:38 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -0,0 +1,23 @@
1
+ /*!
2
+ * @nutui/nutui v3.1.11 Wed Nov 24 2021 14:54:38 GMT+0800 (中国标准时间)
3
+ * (c) 2021 @jdf2e.
4
+ * Released under the MIT License.
5
+ */
6
+ let count = 0;
7
+ const CLSNAME = "nut-overflow-hidden";
8
+ const useLockScroll = (isLock) => {
9
+ const lock = () => {
10
+ if (isLock()) {
11
+ !count && document.body.classList.add(CLSNAME);
12
+ count++;
13
+ }
14
+ };
15
+ const unlock = () => {
16
+ if (isLock() && count) {
17
+ count--;
18
+ !count && document.body.classList.remove(CLSNAME);
19
+ }
20
+ };
21
+ return [lock, unlock];
22
+ };
23
+ export { useLockScroll as u };
@@ -0,0 +1,47 @@
1
+ /*!
2
+ * @nutui/nutui v3.1.11 Wed Nov 24 2021 14:54:38 GMT+0800 (中国标准时间)
3
+ * (c) 2021 @jdf2e.
4
+ * Released under the MIT License.
5
+ */
6
+ const TypeOfFun = (value) => {
7
+ if (value === null) {
8
+ return "null";
9
+ }
10
+ const type = typeof value;
11
+ if (type === "undefined" || type === "string") {
12
+ return type;
13
+ }
14
+ const typeString = toString.call(value);
15
+ switch (typeString) {
16
+ case "[object Array]":
17
+ return "array";
18
+ case "[object Date]":
19
+ return "date";
20
+ case "[object Boolean]":
21
+ return "boolean";
22
+ case "[object Number]":
23
+ return "number";
24
+ case "[object Function]":
25
+ return "function";
26
+ case "[object RegExp]":
27
+ return "regexp";
28
+ case "[object Object]":
29
+ if (value.nodeType !== void 0) {
30
+ if (value.nodeType == 3) {
31
+ return /\S/.test(value.nodeValue) ? "textnode" : "whitespace";
32
+ } else {
33
+ return "element";
34
+ }
35
+ } else {
36
+ return "object";
37
+ }
38
+ default:
39
+ return "unknow";
40
+ }
41
+ };
42
+ const isFunction = (val) => typeof val === "function";
43
+ const isObject = (val) => val !== null && typeof val === "object";
44
+ const isPromise = (val) => {
45
+ return isObject(val) && isFunction(val.then) && isFunction(val.catch);
46
+ };
47
+ export { TypeOfFun as T, isPromise as i };
@@ -14,6 +14,9 @@
14
14
  appearance: none;
15
15
  user-select: none;
16
16
  touch-action: manipulation;
17
+
18
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
19
+ -webkit-tap-highlight-color: transparent;
17
20
  .text {
18
21
  margin-left: 5px;
19
22
  }
@@ -130,6 +133,12 @@
130
133
  padding: 0 $padding-xs;
131
134
  font-size: $font-size-1;
132
135
  }
136
+ &--mini {
137
+ height: $button-mini-height;
138
+ line-height: 1.2;
139
+ padding: 0 $padding-xs;
140
+ font-size: $font-size-1;
141
+ }
133
142
 
134
143
  &--block {
135
144
  display: block;
@@ -0,0 +1,97 @@
1
+ .nut-card {
2
+ width: 100%;
3
+ display: flex;
4
+
5
+ .nut-card__left {
6
+ width: 120px;
7
+ height: 120px;
8
+ flex-shrink: 0;
9
+
10
+ > img {
11
+ display: block;
12
+ width: 100%;
13
+ height: 100%;
14
+ }
15
+ }
16
+
17
+ .nut-card__right {
18
+ flex: 1;
19
+ padding: 0 10px 8px;
20
+
21
+ .nut-card__right__title {
22
+ display: -webkit-box;
23
+ -webkit-box-orient: vertical;
24
+ -webkit-line-clamp: 2;
25
+ overflow: hidden;
26
+ word-break: break-all;
27
+ line-height: 1.5;
28
+ font-size: 14px;
29
+ }
30
+
31
+ .nut-card__right__price {
32
+ display: flex;
33
+ align-items: center;
34
+ height: 18px;
35
+ line-height: 18px;
36
+ margin-top: 9px;
37
+
38
+ .nut-price {
39
+ .nut-price--symbol-large {
40
+ font-size: 12px;
41
+ }
42
+
43
+ .nut-price--large {
44
+ font-size: 18px;
45
+ }
46
+
47
+ .nut-price--decimal-large {
48
+ font-size: 12px;
49
+ }
50
+ }
51
+
52
+ .nut-card__right__price__origin {
53
+ &.nut-price {
54
+ margin-left: 2px;
55
+ color: #d2a448;
56
+
57
+ .nut-price--symbol-large {
58
+ font-size: 12px;
59
+ }
60
+
61
+ .nut-price--large {
62
+ font-size: 12px;
63
+ }
64
+
65
+ .nut-price--decimal-large {
66
+ font-size: 12px;
67
+ }
68
+ }
69
+ }
70
+ }
71
+
72
+ .nut-card__right__other {
73
+ display: flex;
74
+ align-items: center;
75
+ padding: 5px 0 2px;
76
+ .nut-tag {
77
+ border: none;
78
+ padding: 0 2px;
79
+ margin-right: 5px;
80
+ font-size: $card-font-size-0;
81
+ }
82
+ }
83
+
84
+ .nut-card__right__shop {
85
+ display: flex;
86
+ justify-content: space-between;
87
+ align-items: center;
88
+
89
+ .nut-card__right__shop__name {
90
+ line-height: 1.5;
91
+ color: #999;
92
+ font-size: 12px;
93
+ padding-top: 4px;
94
+ }
95
+ }
96
+ }
97
+ }
@@ -10,7 +10,7 @@
10
10
  }
11
11
  &__label {
12
12
  margin-left: 15px;
13
- font-size: 16px;
13
+ font-size: 14px;
14
14
  color: $checkbox-label-color;
15
15
  &--disabled {
16
16
  color: $checkbox-label-disable-color;
@@ -0,0 +1,2 @@
1
+ .nut-form {
2
+ }