@nutui/nutui 4.1.0 → 4.1.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 (51) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +27 -70
  3. package/dist/nutui.es.js +4 -2
  4. package/dist/nutui.js +5225 -5175
  5. package/dist/nutui.umd.js +1 -1
  6. package/dist/packages/_es/Animate.js +37 -39
  7. package/dist/packages/_es/Card.js +26 -27
  8. package/dist/packages/_es/CircleProgress.js +8 -17
  9. package/dist/packages/_es/Empty.js +26 -29
  10. package/dist/packages/_es/Indicator.js +17 -18
  11. package/dist/packages/_es/Price.js +2 -2
  12. package/dist/packages/_es/Progress.js +20 -23
  13. package/dist/packages/_es/Swipe.js +64 -39
  14. package/dist/packages/_es/SwipeGroup.js +39 -0
  15. package/dist/packages/_es/Tabs.js +8 -3
  16. package/dist/packages/_es/Tag.js +30 -25
  17. package/dist/packages/_es/Uploader.js +30 -38
  18. package/dist/packages/button/index.scss +14 -0
  19. package/dist/packages/progress/index.scss +6 -0
  20. package/dist/packages/swipe/index.scss +1 -0
  21. package/dist/packages/swipegroup/index.mjs +4 -0
  22. package/dist/packages/swipegroup/index.scss +0 -0
  23. package/dist/packages/swipegroup/style.mjs +2 -0
  24. package/dist/smartips/web-types.json +27 -18
  25. package/dist/style.css +1 -1
  26. package/dist/styles/themes/default.scss +52 -51
  27. package/dist/styles/themes/jdb.scss +52 -51
  28. package/dist/styles/themes/jddkh.scss +52 -51
  29. package/dist/styles/themes/jdt.scss +52 -51
  30. package/dist/types/__VUE/animate/index.vue.d.ts +14 -3
  31. package/dist/types/__VUE/animate/type.d.ts +1 -1
  32. package/dist/types/__VUE/card/index.vue.d.ts +22 -3
  33. package/dist/types/__VUE/circleprogress/index.vue.d.ts +7 -10
  34. package/dist/types/__VUE/circleprogress/types.d.ts +1 -0
  35. package/dist/types/__VUE/empty/index.vue.d.ts +11 -4
  36. package/dist/types/__VUE/empty/types.d.ts +1 -0
  37. package/dist/types/__VUE/indicator/index.vue.d.ts +7 -9
  38. package/dist/types/__VUE/indicator/types.d.ts +1 -0
  39. package/dist/types/__VUE/price/index.vue.d.ts +8 -6
  40. package/dist/types/__VUE/price/types.d.ts +2 -0
  41. package/dist/types/__VUE/progress/index.vue.d.ts +10 -10
  42. package/dist/types/__VUE/progress/types.d.ts +2 -0
  43. package/dist/types/__VUE/swipe/index.vue.d.ts +4 -4
  44. package/dist/types/__VUE/swipegroup/index.vue.d.ts +26 -0
  45. package/dist/types/__VUE/tag/index.vue.d.ts +5 -4
  46. package/dist/types/__VUE/uploader/index.vue.d.ts +0 -3
  47. package/dist/types/index.d.ts +2 -1
  48. package/dist/types/utils/unit.d.ts +1 -0
  49. package/dist/types/utils/useTaroRect/index.d.ts +1 -0
  50. package/package.json +1 -1
  51. /package/dist/types/__VUE/tag/{type.d.ts → types.d.ts} +0 -0
@@ -18,11 +18,11 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { u as useTouch } from "./index-7a7385e4.js";
21
- import { computed, ref, reactive, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot } from "vue";
21
+ import { ref, computed, inject, watch, reactive, openBlock, createElementBlock, normalizeStyle, createElementVNode, renderSlot } from "vue";
22
22
  import { c as createComponent } from "./component-0fbad28e.js";
23
23
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
24
24
  import "../locale/lang";
25
- const { componentName, create } = createComponent("swipe");
25
+ const { create } = createComponent("swipe");
26
26
  const _sfc_main = create({
27
27
  props: {
28
28
  name: {
@@ -42,25 +42,32 @@ const _sfc_main = create({
42
42
  default: false
43
43
  }
44
44
  },
45
- emits: ["open", "close"],
45
+ emits: ["open", "close", "click"],
46
46
  setup(props, { emit }) {
47
- const classes = computed(() => {
48
- const prefixCls = componentName;
49
- return {
50
- [prefixCls]: true
51
- };
52
- });
53
47
  const getRefWidth = (ref2) => {
54
48
  var _a;
55
- return ((_a = ref2.value) == null ? void 0 : _a.clientWidth) || 0;
49
+ return ((_a = ref2.value) == null ? void 0 : _a.getBoundingClientRect().width) || 0;
56
50
  };
51
+ const lockClick = ref(false);
57
52
  const leftRef = ref(), leftRefWidth = computed(() => {
58
53
  return getRefWidth(leftRef);
59
54
  });
60
55
  const rightRef = ref(), rightRefWidth = computed(() => {
61
56
  return getRefWidth(rightRef);
62
57
  });
63
- let opened = false;
58
+ const parent = inject("swipeGroup", null);
59
+ watch(
60
+ () => {
61
+ var _a;
62
+ return (_a = parent == null ? void 0 : parent.name) == null ? void 0 : _a.value;
63
+ },
64
+ (name) => {
65
+ if (props.name !== name && parent && parent.lock) {
66
+ close();
67
+ }
68
+ }
69
+ );
70
+ const opened = ref(false);
64
71
  let position = "";
65
72
  let oldPosition = "";
66
73
  const state = reactive({
@@ -68,7 +75,8 @@ const _sfc_main = create({
68
75
  moving: false
69
76
  });
70
77
  const open = (p = "") => {
71
- opened = true;
78
+ parent && parent.update(props.name);
79
+ opened.value = true;
72
80
  if (p) {
73
81
  state.offset = p === "left" ? -rightRefWidth.value : leftRefWidth.value;
74
82
  }
@@ -79,11 +87,21 @@ const _sfc_main = create({
79
87
  };
80
88
  const close = () => {
81
89
  state.offset = 0;
82
- opened = false;
83
- emit("close", {
84
- name: props.name,
85
- position
86
- });
90
+ if (opened.value) {
91
+ opened.value = false;
92
+ emit("close", {
93
+ name: props.name,
94
+ position
95
+ });
96
+ }
97
+ };
98
+ const onClick = (e, position2, lock) => {
99
+ if (lock) {
100
+ e.stopPropagation();
101
+ } else {
102
+ close();
103
+ }
104
+ emit("click", position2);
87
105
  };
88
106
  const touchStyle = computed(() => {
89
107
  return {
@@ -95,14 +113,14 @@ const _sfc_main = create({
95
113
  let offset = deltaX;
96
114
  switch (position) {
97
115
  case "left":
98
- if (opened && oldPosition === position) {
116
+ if (opened.value && oldPosition === position) {
99
117
  offset = -rightRefWidth.value;
100
118
  } else {
101
119
  offset = Math.abs(deltaX) > rightRefWidth.value ? -rightRefWidth.value : deltaX;
102
120
  }
103
121
  break;
104
122
  case "right":
105
- if (opened && oldPosition === position) {
123
+ if (opened.value && oldPosition === position) {
106
124
  offset = leftRefWidth.value;
107
125
  } else {
108
126
  offset = Math.abs(deltaX) > leftRefWidth.value ? leftRefWidth.value : deltaX;
@@ -123,6 +141,7 @@ const _sfc_main = create({
123
141
  return;
124
142
  touch.move(event);
125
143
  if (touch.isHorizontal()) {
144
+ lockClick.value = true;
126
145
  state.moving = true;
127
146
  setoffset(touch.deltaX.value);
128
147
  if (props.touchMovePreventDefault) {
@@ -155,48 +174,54 @@ const _sfc_main = create({
155
174
  }
156
175
  break;
157
176
  }
177
+ setTimeout(() => {
178
+ lockClick.value = false;
179
+ }, 0);
158
180
  }
159
181
  }
160
182
  };
161
183
  return __spreadProps(__spreadValues({
162
- classes,
163
184
  touchStyle
164
185
  }, touchMethods), {
165
186
  leftRef,
166
187
  rightRef,
167
188
  open,
168
- close
189
+ close,
190
+ onClick,
191
+ lockClick
169
192
  });
170
193
  }
171
194
  });
172
- const _hoisted_1 = {
173
- class: "nut-swipe__left",
174
- ref: "leftRef"
175
- };
176
- const _hoisted_2 = { class: "nut-swipe__content" };
177
- const _hoisted_3 = {
178
- class: "nut-swipe__right",
179
- ref: "rightRef"
180
- };
181
195
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
182
196
  return openBlock(), createElementBlock("view", {
183
- class: normalizeClass(_ctx.classes),
197
+ class: "nut-swipe",
184
198
  style: normalizeStyle(_ctx.touchStyle),
185
- onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.onTouchStart && _ctx.onTouchStart(...args)),
186
- onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.onTouchMove && _ctx.onTouchMove(...args)),
187
- onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.onTouchEnd && _ctx.onTouchEnd(...args)),
188
- onTouchcancel: _cache[3] || (_cache[3] = (...args) => _ctx.onTouchEnd && _ctx.onTouchEnd(...args))
199
+ onTouchstart: _cache[3] || (_cache[3] = (...args) => _ctx.onTouchStart && _ctx.onTouchStart(...args)),
200
+ onTouchmove: _cache[4] || (_cache[4] = (...args) => _ctx.onTouchMove && _ctx.onTouchMove(...args)),
201
+ onTouchend: _cache[5] || (_cache[5] = (...args) => _ctx.onTouchEnd && _ctx.onTouchEnd(...args)),
202
+ onTouchcancel: _cache[6] || (_cache[6] = (...args) => _ctx.onTouchEnd && _ctx.onTouchEnd(...args))
189
203
  }, [
190
- createElementVNode("view", _hoisted_1, [
204
+ createElementVNode("view", {
205
+ class: "nut-swipe__left",
206
+ ref: "leftRef",
207
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.onClick($event, "left", true))
208
+ }, [
191
209
  renderSlot(_ctx.$slots, "left")
192
210
  ], 512),
193
- createElementVNode("view", _hoisted_2, [
211
+ createElementVNode("view", {
212
+ class: "nut-swipe__content",
213
+ onClick: _cache[1] || (_cache[1] = ($event) => _ctx.onClick($event, "content", _ctx.lockClick))
214
+ }, [
194
215
  renderSlot(_ctx.$slots, "default")
195
216
  ]),
196
- createElementVNode("view", _hoisted_3, [
217
+ createElementVNode("view", {
218
+ class: "nut-swipe__right",
219
+ ref: "rightRef",
220
+ onClick: _cache[2] || (_cache[2] = ($event) => _ctx.onClick($event, "right", true))
221
+ }, [
197
222
  renderSlot(_ctx.$slots, "right")
198
223
  ], 512)
199
- ], 38);
224
+ ], 36);
200
225
  }
201
226
  const Swipe = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
202
227
  export {
@@ -0,0 +1,39 @@
1
+ import { ref, provide, openBlock, createElementBlock, renderSlot } from "vue";
2
+ import { c as createComponent } from "./component-0fbad28e.js";
3
+ import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
4
+ import "../locale/lang";
5
+ const { create } = createComponent("swipe-group");
6
+ const _sfc_main = create({
7
+ props: {
8
+ lock: {
9
+ type: Boolean,
10
+ default: false
11
+ }
12
+ },
13
+ setup(props) {
14
+ const swipeGroupRef = ref(null);
15
+ const name = ref("");
16
+ const update = (n) => {
17
+ name.value = n;
18
+ };
19
+ provide("swipeGroup", {
20
+ update,
21
+ lock: props.lock,
22
+ name
23
+ });
24
+ return { swipeGroupRef };
25
+ }
26
+ });
27
+ const _hoisted_1 = {
28
+ class: "nut-swipe-group",
29
+ ref: "swipeGroupRef"
30
+ };
31
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
32
+ return openBlock(), createElementBlock("div", _hoisted_1, [
33
+ renderSlot(_ctx.$slots, "default")
34
+ ], 512);
35
+ }
36
+ const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
37
+ export {
38
+ index as default
39
+ };
@@ -55,9 +55,14 @@ const useTabContentTouch = (props, tabMethods, taro, useTaroRect) => {
55
55
  const initTaroWidth = () => __async(void 0, null, function* () {
56
56
  var _a, _b;
57
57
  if (taro && taro.getEnv() !== taro.ENV_TYPE.WEB) {
58
- let rect = yield useTaroRect(tabsContentRef);
59
- tabsContentRefRect.value.width = rect.width || 0;
60
- tabsContentRefRect.value.height = rect.height || 0;
58
+ useTaroRect(tabsContentRef).then(
59
+ (rect) => {
60
+ tabsContentRefRect.value.width = rect.width || 0;
61
+ tabsContentRefRect.value.height = rect.height || 0;
62
+ },
63
+ () => {
64
+ }
65
+ );
61
66
  } else {
62
67
  tabsContentRefRect.value.width = ((_a = tabsContentRef.value) == null ? void 0 : _a.clientWidth) || 0;
63
68
  tabsContentRefRect.value.height = ((_b = tabsContentRef.value) == null ? void 0 : _b.clientHeight) || 0;
@@ -1,13 +1,19 @@
1
- import { toRefs, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, createBlock, createCommentVNode } from "vue";
1
+ import { computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, createBlock, createCommentVNode } from "vue";
2
2
  import { c as createComponent } from "./component-0fbad28e.js";
3
3
  import { Close } from "@nutui/icons-vue";
4
4
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
5
5
  import "../locale/lang";
6
- const { componentName, create } = createComponent("tag");
6
+ const { create } = createComponent("tag");
7
7
  const _sfc_main = create({
8
8
  props: {
9
- color: { type: String, default: "" },
10
- textColor: { type: String, default: "" },
9
+ color: {
10
+ type: String,
11
+ default: ""
12
+ },
13
+ textColor: {
14
+ type: String,
15
+ default: ""
16
+ },
11
17
  type: {
12
18
  type: String,
13
19
  default: "default"
@@ -34,32 +40,31 @@ const _sfc_main = create({
34
40
  },
35
41
  emits: ["close", "click"],
36
42
  setup(props, { emit }) {
37
- const { type, color, plain, round, mark, textColor } = toRefs(props);
38
43
  const classes = computed(() => {
39
- const prefixCls = componentName;
44
+ const prefixCls = "nut-tag";
40
45
  return {
41
46
  [prefixCls]: true,
42
- [`${prefixCls}--${type.value}`]: type.value,
43
- [`${prefixCls}--plain`]: plain.value,
44
- [`${prefixCls}--round`]: round.value,
45
- [`${prefixCls}--mark`]: mark.value
47
+ [`${prefixCls}--${props.type}`]: props.type,
48
+ [`${prefixCls}--plain`]: props.plain,
49
+ [`${prefixCls}--round`]: props.round,
50
+ [`${prefixCls}--mark`]: props.mark
46
51
  };
47
52
  });
48
- const getStyle = () => {
49
- const style = {};
50
- if (textColor.value) {
51
- style.color = textColor.value;
52
- } else if (color.value && plain.value) {
53
- style.color = color.value;
53
+ const style = computed(() => {
54
+ const style2 = {};
55
+ if (props.textColor) {
56
+ style2.color = props.textColor;
57
+ } else if (props.color && props.plain) {
58
+ style2.color = props.color;
54
59
  }
55
- if (plain.value) {
56
- style.background = "#fff";
57
- style["border-color"] = color.value;
58
- } else if (color.value) {
59
- style.background = color.value;
60
+ if (props.plain) {
61
+ style2.background = "#fff";
62
+ style2["border-color"] = props.color;
63
+ } else if (props.color) {
64
+ style2.background = props.color;
60
65
  }
61
- return style;
62
- };
66
+ return style2;
67
+ });
63
68
  const onClose = (event) => {
64
69
  event.stopPropagation();
65
70
  emit("close", event);
@@ -69,7 +74,7 @@ const _sfc_main = create({
69
74
  };
70
75
  return {
71
76
  classes,
72
- getStyle,
77
+ style,
73
78
  onClose,
74
79
  onClick
75
80
  };
@@ -79,7 +84,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
79
84
  const _component_Close = resolveComponent("Close");
80
85
  return openBlock(), createElementBlock("view", {
81
86
  class: normalizeClass(_ctx.classes),
82
- style: normalizeStyle(_ctx.getStyle()),
87
+ style: normalizeStyle(_ctx.style),
83
88
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
84
89
  }, [
85
90
  renderSlot(_ctx.$slots, "default"),
@@ -4,7 +4,7 @@ var __publicField = (obj, key, value) => {
4
4
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
5
  return value;
6
6
  };
7
- import { ref, watch, computed, h, reactive, resolveComponent, openBlock, createElementBlock, normalizeClass, renderSlot, createBlock, resolveDynamicComponent, createCommentVNode, Fragment, renderList, createElementVNode, toDisplayString, createVNode } from "vue";
7
+ import { ref, watch, h, reactive, resolveComponent, openBlock, createElementBlock, renderSlot, createBlock, resolveDynamicComponent, createCommentVNode, Fragment, renderList, normalizeClass, createElementVNode, toDisplayString, createVNode } from "vue";
8
8
  import { c as createComponent } from "./component-0fbad28e.js";
9
9
  import { f as funInterceptor } from "./Interceptor-c05a39f2.js";
10
10
  import Progress from "./Progress.js";
@@ -90,7 +90,7 @@ class FileItem {
90
90
  __publicField(this, "formData", {});
91
91
  }
92
92
  }
93
- const { componentName, create, translate } = createComponent("uploader");
93
+ const { create, translate } = createComponent("uploader");
94
94
  const _sfc_main = create({
95
95
  components: {
96
96
  [Progress.name]: Progress,
@@ -159,12 +159,6 @@ const _sfc_main = create({
159
159
  fileList.value = props.fileList;
160
160
  }
161
161
  );
162
- const classes = computed(() => {
163
- const prefixCls = componentName;
164
- return {
165
- [prefixCls]: true
166
- };
167
- });
168
162
  const renderInput = () => {
169
163
  let params = {
170
164
  class: `nut-uploader__input`,
@@ -344,7 +338,6 @@ const _sfc_main = create({
344
338
  onChange,
345
339
  onDelete,
346
340
  fileList,
347
- classes,
348
341
  fileItemClick,
349
342
  clearUploadQueue,
350
343
  submit,
@@ -352,34 +345,35 @@ const _sfc_main = create({
352
345
  };
353
346
  }
354
347
  });
355
- const _hoisted_1 = {
348
+ const _hoisted_1 = { class: "nut-uploader" };
349
+ const _hoisted_2 = {
356
350
  key: 0,
357
351
  class: "nut-uploader__slot"
358
352
  };
359
- const _hoisted_2 = {
353
+ const _hoisted_3 = {
360
354
  key: 0,
361
355
  class: "nut-uploader__preview-img"
362
356
  };
363
- const _hoisted_3 = {
357
+ const _hoisted_4 = {
364
358
  key: 0,
365
359
  class: "nut-uploader__preview__progress"
366
360
  };
367
- const _hoisted_4 = { class: "nut-uploader__preview__progress__msg" };
368
- const _hoisted_5 = ["onClick"];
369
- const _hoisted_6 = ["onClick", "src"];
370
- const _hoisted_7 = {
361
+ const _hoisted_5 = { class: "nut-uploader__preview__progress__msg" };
362
+ const _hoisted_6 = ["onClick"];
363
+ const _hoisted_7 = ["onClick", "src"];
364
+ const _hoisted_8 = {
371
365
  key: 3,
372
366
  class: "nut-uploader__preview-img__file"
373
367
  };
374
- const _hoisted_8 = ["onClick"];
375
- const _hoisted_9 = { class: "file__name_tips" };
376
- const _hoisted_10 = { class: "tips" };
377
- const _hoisted_11 = {
368
+ const _hoisted_9 = ["onClick"];
369
+ const _hoisted_10 = { class: "file__name_tips" };
370
+ const _hoisted_11 = { class: "tips" };
371
+ const _hoisted_12 = {
378
372
  key: 1,
379
373
  class: "nut-uploader__preview-list"
380
374
  };
381
- const _hoisted_12 = ["onClick"];
382
- const _hoisted_13 = { class: "file__name_tips" };
375
+ const _hoisted_13 = ["onClick"];
376
+ const _hoisted_14 = { class: "file__name_tips" };
383
377
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
384
378
  const _component_Failure = resolveComponent("Failure");
385
379
  const _component_Loading = resolveComponent("Loading");
@@ -387,10 +381,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
387
381
  const _component_Del = resolveComponent("Del");
388
382
  const _component_nut_progress = resolveComponent("nut-progress");
389
383
  const _component_Photograph = resolveComponent("Photograph");
390
- return openBlock(), createElementBlock("view", {
391
- class: normalizeClass(_ctx.classes)
392
- }, [
393
- _ctx.$slots.default ? (openBlock(), createElementBlock("view", _hoisted_1, [
384
+ return openBlock(), createElementBlock("view", _hoisted_1, [
385
+ _ctx.$slots.default ? (openBlock(), createElementBlock("view", _hoisted_2, [
394
386
  renderSlot(_ctx.$slots, "default"),
395
387
  Number(_ctx.maximum) - _ctx.fileList.length ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.renderInput), {
396
388
  key: 0,
@@ -403,8 +395,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
403
395
  class: normalizeClass(["nut-uploader__preview", [_ctx.listType]]),
404
396
  key: item.uid
405
397
  }, [
406
- _ctx.listType == "picture" && !_ctx.$slots.default ? (openBlock(), createElementBlock("view", _hoisted_2, [
407
- item.status != "success" ? (openBlock(), createElementBlock("view", _hoisted_3, [
398
+ _ctx.listType == "picture" && !_ctx.$slots.default ? (openBlock(), createElementBlock("view", _hoisted_3, [
399
+ item.status != "success" ? (openBlock(), createElementBlock("view", _hoisted_4, [
408
400
  item.status != "ready" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
409
401
  item.status == "error" ? (openBlock(), createBlock(_component_Failure, {
410
402
  key: 0,
@@ -415,7 +407,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
415
407
  color: "#fff"
416
408
  }))
417
409
  ], 64)) : createCommentVNode("", true),
418
- createElementVNode("view", _hoisted_4, toDisplayString(item.message), 1)
410
+ createElementVNode("view", _hoisted_5, toDisplayString(item.message), 1)
419
411
  ])) : createCommentVNode("", true),
420
412
  _ctx.isDeletable ? (openBlock(), createElementBlock("view", {
421
413
  key: 1,
@@ -425,35 +417,35 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
425
417
  renderSlot(_ctx.$slots, "delete-icon", {}, () => [
426
418
  createVNode(_component_Failure)
427
419
  ])
428
- ], 8, _hoisted_5)) : createCommentVNode("", true),
420
+ ], 8, _hoisted_6)) : createCommentVNode("", true),
429
421
  ((_a = item == null ? void 0 : item.type) == null ? void 0 : _a.includes("image")) && item.url ? (openBlock(), createElementBlock("img", {
430
422
  key: 2,
431
423
  class: "nut-uploader__preview-img__c",
432
424
  onClick: ($event) => _ctx.fileItemClick(item),
433
425
  src: item.url
434
- }, null, 8, _hoisted_6)) : (openBlock(), createElementBlock("view", _hoisted_7, [
426
+ }, null, 8, _hoisted_7)) : (openBlock(), createElementBlock("view", _hoisted_8, [
435
427
  createElementVNode("view", {
436
428
  onClick: ($event) => _ctx.fileItemClick(item),
437
429
  class: "nut-uploader__preview-img__file__name"
438
430
  }, [
439
- createElementVNode("view", _hoisted_9, toDisplayString(item.name), 1)
440
- ], 8, _hoisted_8)
431
+ createElementVNode("view", _hoisted_10, toDisplayString(item.name), 1)
432
+ ], 8, _hoisted_9)
441
433
  ])),
442
- createElementVNode("view", _hoisted_10, toDisplayString(item.name), 1)
443
- ])) : _ctx.listType == "list" ? (openBlock(), createElementBlock("view", _hoisted_11, [
434
+ createElementVNode("view", _hoisted_11, toDisplayString(item.name), 1)
435
+ ])) : _ctx.listType == "list" ? (openBlock(), createElementBlock("view", _hoisted_12, [
444
436
  createElementVNode("view", {
445
437
  onClick: ($event) => _ctx.fileItemClick(item),
446
438
  class: normalizeClass(["nut-uploader__preview-img__file__name", [item.status]])
447
439
  }, [
448
440
  createVNode(_component_Link, { class: "nut-uploader__preview-img__file__link" }),
449
- createElementVNode("view", _hoisted_13, toDisplayString(item.name), 1),
441
+ createElementVNode("view", _hoisted_14, toDisplayString(item.name), 1),
450
442
  _ctx.isDeletable ? (openBlock(), createBlock(_component_Del, {
451
443
  key: 0,
452
444
  color: "#808080",
453
445
  class: "nut-uploader__preview-img__file__del",
454
446
  onClick: ($event) => _ctx.onDelete(item, index2)
455
447
  }, null, 8, ["onClick"])) : createCommentVNode("", true)
456
- ], 10, _hoisted_12),
448
+ ], 10, _hoisted_13),
457
449
  item.status == "uploading" ? (openBlock(), createBlock(_component_nut_progress, {
458
450
  key: 0,
459
451
  size: "small",
@@ -473,7 +465,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
473
465
  ]),
474
466
  (openBlock(), createBlock(resolveDynamicComponent(_ctx.renderInput), { onChange: _ctx.onChange }, null, 40, ["onChange"]))
475
467
  ], 2)) : createCommentVNode("", true)
476
- ], 2);
468
+ ]);
477
469
  }
478
470
  const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
479
471
  export {
@@ -59,41 +59,48 @@
59
59
  &--default {
60
60
  color: $button-default-color;
61
61
  background: $button-default-bg-color;
62
+ background-origin: border-box;
62
63
  border: $button-border-width solid $button-default-border-color;
63
64
  }
64
65
 
65
66
  &--primary {
66
67
  color: $button-primary-color;
67
68
  background: $button-primary-background-color;
69
+ background-origin: border-box;
68
70
  border: $button-border-width solid transparent;
69
71
  }
70
72
 
71
73
  &--info {
72
74
  color: $button-info-color;
73
75
  background: $button-info-background-color;
76
+ background-origin: border-box;
74
77
  border: $button-border-width solid transparent;
75
78
  }
76
79
 
77
80
  &--success {
78
81
  color: $button-success-color;
79
82
  background: $button-success-background-color;
83
+ background-origin: border-box;
80
84
  border: $button-border-width solid transparent;
81
85
  }
82
86
 
83
87
  &--danger {
84
88
  color: $button-danger-color;
85
89
  background: $button-danger-background-color;
90
+ background-origin: border-box;
86
91
  border: $button-border-width solid transparent;
87
92
  }
88
93
 
89
94
  &--warning {
90
95
  color: $button-warning-color;
91
96
  background: $button-warning-background-color;
97
+ background-origin: border-box;
92
98
  border: $button-border-width solid transparent;
93
99
  }
94
100
 
95
101
  &--plain {
96
102
  background: $button-plain-background-color;
103
+ background-origin: border-box;
97
104
 
98
105
  &.nut-button--primary {
99
106
  color: $button-primary-border-color;
@@ -176,39 +183,46 @@
176
183
  .nut-button--default:not([disabled]):active {
177
184
  color: $button-default-color;
178
185
  background: $button-default-bg-color;
186
+ background-origin: border-box;
179
187
  border: $button-border-width solid $button-default-border-color;
180
188
  }
181
189
  .nut-button--primary:not([disabled]):active {
182
190
  color: $button-primary-color;
183
191
  background: $button-primary-background-color;
192
+ background-origin: border-box;
184
193
  border: $button-border-width solid transparent;
185
194
  }
186
195
 
187
196
  .nut-button--info:not([disabled]):active {
188
197
  color: $button-info-color;
189
198
  background: $button-info-background-color;
199
+ background-origin: border-box;
190
200
  border: $button-border-width solid transparent;
191
201
  }
192
202
 
193
203
  .nut-button--success:not([disabled]):active {
194
204
  color: $button-success-color;
195
205
  background: $button-success-background-color;
206
+ background-origin: border-box;
196
207
  border: $button-border-width solid transparent;
197
208
  }
198
209
 
199
210
  .nut-button--danger:not([disabled]):active {
200
211
  color: $button-danger-color;
201
212
  background: $button-danger-background-color;
213
+ background-origin: border-box;
202
214
  border: $button-border-width solid transparent;
203
215
  }
204
216
 
205
217
  .nut-button--warning:not([disabled]):active {
206
218
  color: $button-warning-color;
207
219
  background: $button-warning-background-color;
220
+ background-origin: border-box;
208
221
  border: $button-border-width solid transparent;
209
222
  }
210
223
  .nut-button--plain:not([disabled]):active {
211
224
  background: $button-plain-background-color;
225
+ background-origin: border-box;
212
226
  }
213
227
  .nut-button--plain {
214
228
  &.nut-button--primary:not([disabled]):active {
@@ -2,6 +2,7 @@
2
2
  width: 100%;
3
3
  position: relative;
4
4
  display: flex;
5
+ align-items: center;
5
6
  .nut-progress-outer {
6
7
  flex: 1;
7
8
  background-color: $progress-outer-background-color;
@@ -22,6 +23,11 @@
22
23
  justify-content: center;
23
24
  color: #fff;
24
25
  }
26
+ .nut-progress-slot {
27
+ display: flex;
28
+ justify-content: center;
29
+ align-items: center;
30
+ }
25
31
  .nut-active {
26
32
  &:before {
27
33
  content: '';
@@ -1,6 +1,7 @@
1
1
  .nut-swipe {
2
2
  position: relative;
3
3
  display: block;
4
+ cursor: grab;
4
5
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
5
6
  &__left,
6
7
  &__right {
@@ -0,0 +1,4 @@
1
+ import _SwipeGroup from '../_es/SwipeGroup.js';
2
+ const treeshaking = (t) => t;
3
+ const SwipeGroup = treeshaking(_SwipeGroup);
4
+ export { SwipeGroup };
File without changes
@@ -0,0 +1,2 @@
1
+ import '../../styles/reset.css';
2
+ import './index.scss';