@nutui/nutui 4.0.11 → 4.0.12

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 (158) hide show
  1. package/dist/nutui.es.js +1 -1
  2. package/dist/nutui.js +2 -2
  3. package/dist/nutui.umd.js +1 -1
  4. package/dist/packages/_es/ActionSheet.js +111 -78
  5. package/dist/packages/_es/Address.js +375 -250
  6. package/dist/packages/_es/AddressList.js +354 -269
  7. package/dist/packages/_es/Animate.js +58 -41
  8. package/dist/packages/_es/Audio.js +197 -128
  9. package/dist/packages/_es/AudioOperate.js +71 -60
  10. package/dist/packages/_es/Avatar.js +89 -66
  11. package/dist/packages/_es/AvatarGroup.js +31 -23
  12. package/dist/packages/_es/Backtop.js +99 -59
  13. package/dist/packages/_es/Badge.js +47 -36
  14. package/dist/packages/_es/Barrage.js +147 -68
  15. package/dist/packages/_es/Button.js +66 -47
  16. package/dist/packages/_es/Calendar.js +157 -135
  17. package/dist/packages/_es/CalendarItem.js +6 -6
  18. package/dist/packages/_es/Card.js +56 -42
  19. package/dist/packages/_es/Cascader.js +474 -315
  20. package/dist/packages/_es/Category.js +39 -29
  21. package/dist/packages/_es/CategoryPane.js +83 -57
  22. package/dist/packages/_es/Cell.js +71 -56
  23. package/dist/packages/_es/CellGroup.js +27 -19
  24. package/dist/packages/_es/Checkbox.js +156 -109
  25. package/dist/packages/_es/CheckboxGroup.js +59 -38
  26. package/dist/packages/_es/CircleProgress.js +96 -67
  27. package/dist/packages/_es/Col.js +31 -23
  28. package/dist/packages/_es/Collapse.js +58 -33
  29. package/dist/packages/_es/CollapseItem.js +108 -78
  30. package/dist/packages/_es/Comment.js +279 -207
  31. package/dist/packages/_es/ConfigProvider.js +55 -37
  32. package/dist/packages/_es/Countdown.js +212 -100
  33. package/dist/packages/_es/Countup.js +445 -232
  34. package/dist/packages/_es/DatePicker.js +265 -162
  35. package/dist/packages/_es/Dialog.js +213 -161
  36. package/dist/packages/_es/Divider.js +57 -42
  37. package/dist/packages/_es/Drag.js +153 -70
  38. package/dist/packages/_es/Ecard.js +104 -64
  39. package/dist/packages/_es/Elevator.js +219 -143
  40. package/dist/packages/_es/Ellipsis.js +178 -95
  41. package/dist/packages/_es/Empty.js +39 -23
  42. package/dist/packages/_es/FixedNav.js +116 -93
  43. package/dist/packages/_es/Form.js +178 -107
  44. package/dist/packages/_es/FormItem.js +61 -48
  45. package/dist/packages/_es/Grid.js +6 -5
  46. package/dist/packages/_es/GridItem.js +84 -58
  47. package/dist/packages/_es/Image.js +130 -90
  48. package/dist/packages/_es/ImagePreview.js +412 -256
  49. package/dist/packages/_es/Indicator.js +34 -30
  50. package/dist/packages/_es/InfiniteLoading.js +136 -83
  51. package/dist/packages/_es/Input.js +264 -160
  52. package/dist/packages/_es/InputNumber.js +117 -81
  53. package/dist/packages/_es/Interceptor-956b24fc.js +29 -0
  54. package/dist/packages/_es/Invoice.js +130 -104
  55. package/dist/packages/_es/Layout.js +4 -3
  56. package/dist/packages/_es/List.js +215 -117
  57. package/dist/packages/_es/Menu.js +150 -95
  58. package/dist/packages/_es/MenuItem.js +154 -109
  59. package/dist/packages/_es/Navbar.js +119 -103
  60. package/dist/packages/_es/Noticebar.js +312 -197
  61. package/dist/packages/_es/Notify.js +166 -110
  62. package/dist/packages/_es/NumberKeyboard.js +202 -127
  63. package/dist/packages/_es/Overlay.js +80 -52
  64. package/dist/packages/_es/Pagination.js +100 -70
  65. package/dist/packages/_es/Picker.js +437 -275
  66. package/dist/packages/_es/Popover.js +225 -122
  67. package/dist/packages/_es/Popup.js +4 -4
  68. package/dist/packages/_es/Price.js +82 -44
  69. package/dist/packages/_es/Progress.js +79 -63
  70. package/dist/packages/_es/PullRefresh.js +173 -95
  71. package/dist/packages/_es/Radio.js +4 -4
  72. package/dist/packages/_es/RadioGroup.js +3 -3
  73. package/dist/packages/_es/Range.js +347 -204
  74. package/dist/packages/_es/Rate.js +141 -92
  75. package/dist/packages/_es/Row.js +27 -21
  76. package/dist/packages/_es/Searchbar.js +174 -123
  77. package/dist/packages/_es/ShortPassword.js +93 -69
  78. package/dist/packages/_es/SideNavbar.js +80 -49
  79. package/dist/packages/_es/SideNavbarItem.js +32 -22
  80. package/dist/packages/_es/Signature.js +146 -83
  81. package/dist/packages/_es/Skeleton.js +130 -110
  82. package/dist/packages/_es/Sku.js +343 -250
  83. package/dist/packages/_es/Step.js +86 -59
  84. package/dist/packages/_es/Steps.js +31 -26
  85. package/dist/packages/_es/Sticky.js +4 -4
  86. package/dist/packages/_es/SubSideNavbar.js +74 -52
  87. package/dist/packages/_es/Swipe.js +155 -83
  88. package/dist/packages/_es/Swiper.js +311 -174
  89. package/dist/packages/_es/SwiperItem.js +44 -28
  90. package/dist/packages/_es/Switch.js +68 -55
  91. package/dist/packages/_es/TabPane.js +41 -30
  92. package/dist/packages/_es/Tabbar.js +52 -41
  93. package/dist/packages/_es/TabbarItem.js +82 -61
  94. package/dist/packages/_es/Table.js +165 -109
  95. package/dist/packages/_es/Tabs.js +388 -240
  96. package/dist/packages/_es/Tag.js +61 -44
  97. package/dist/packages/_es/Textarea.js +124 -80
  98. package/dist/packages/_es/TimeDetail.js +76 -49
  99. package/dist/packages/_es/TimePannel.js +48 -34
  100. package/dist/packages/_es/TimeSelect.js +68 -47
  101. package/dist/packages/_es/Toast.js +218 -144
  102. package/dist/packages/_es/Tour.js +192 -138
  103. package/dist/packages/_es/TrendArrow.js +77 -57
  104. package/dist/packages/_es/Uploader.js +359 -234
  105. package/dist/packages/_es/Video.js +316 -191
  106. package/dist/packages/_es/Watermark.js +117 -84
  107. package/dist/packages/_es/_plugin-vue_export-helper-cc2b3d55.js +10 -0
  108. package/dist/packages/_es/common-b9a5e726.js +145 -0
  109. package/dist/packages/_es/component-81a4c1d0.js +145 -0
  110. package/dist/packages/_es/index-29892cda.js +33 -0
  111. package/dist/packages/_es/index-43c34ac6.js +30 -0
  112. package/dist/packages/_es/index-54d03fc1.js +8 -0
  113. package/dist/packages/_es/index-79c5dc33.js +10 -0
  114. package/dist/packages/_es/index-7a7385e4.js +67 -0
  115. package/dist/packages/_es/index-87422be8.js +942 -0
  116. package/dist/packages/_es/index-da0a7662.js +259 -0
  117. package/dist/packages/_es/index.vue_vue_type_script_lang-22dfc112.js +46 -0
  118. package/dist/packages/_es/index.vue_vue_type_script_lang-a8856969.js +97 -0
  119. package/dist/packages/_es/index.vue_vue_type_script_lang-cc5c4086.js +151 -0
  120. package/dist/packages/_es/mountComponent-8b24c346.js +39 -0
  121. package/dist/packages/_es/pxCheck-c6b9f6b7.js +6 -0
  122. package/dist/packages/_es/raf-729dad54.js +25 -0
  123. package/dist/packages/_es/renderIcon-3d0fd47c.js +9 -0
  124. package/dist/packages/locale/lang/baseLang-3a8457ac.js +5 -0
  125. package/dist/packages/locale/lang/en-US.js +39 -36
  126. package/dist/packages/locale/lang/id-ID.js +39 -36
  127. package/dist/packages/locale/lang/index.js +44 -22
  128. package/dist/packages/locale/lang/zh-CN.js +38 -35
  129. package/dist/packages/locale/lang/zh-TW.js +38 -35
  130. package/dist/resolver/index.js +26 -1
  131. package/dist/resolver/index.mjs +17 -14
  132. package/dist/smartips/web-types.json +1 -1
  133. package/dist/style.css +1 -1
  134. package/dist/styles/themes/default.scss +48 -48
  135. package/dist/styles/themes/jdb.scss +48 -48
  136. package/dist/styles/themes/jddkh.scss +48 -48
  137. package/dist/styles/themes/jdt.scss +48 -48
  138. package/dist/types/index.d.ts +1 -1
  139. package/package.json +3 -4
  140. package/dist/packages/_es/Interceptor-6e26b757.js +0 -18
  141. package/dist/packages/_es/_plugin-vue_export-helper-dad06003.js +0 -9
  142. package/dist/packages/_es/common-d218746f.js +0 -116
  143. package/dist/packages/_es/component-234624bc.js +0 -89
  144. package/dist/packages/_es/index-14dfadc4.js +0 -561
  145. package/dist/packages/_es/index-192a3ef6.js +0 -29
  146. package/dist/packages/_es/index-360c5092.js +0 -210
  147. package/dist/packages/_es/index-496e6e05.js +0 -24
  148. package/dist/packages/_es/index-50eed3d9.js +0 -7
  149. package/dist/packages/_es/index-53ec2d4d.js +0 -34
  150. package/dist/packages/_es/index-fadb0974.js +0 -8
  151. package/dist/packages/_es/index.vue_vue_type_script_lang-1139b29a.js +0 -43
  152. package/dist/packages/_es/index.vue_vue_type_script_lang-43b774dd.js +0 -77
  153. package/dist/packages/_es/index.vue_vue_type_script_lang-f44c159d.js +0 -110
  154. package/dist/packages/_es/mountComponent-6d4ff200.js +0 -23
  155. package/dist/packages/_es/pxCheck-38173291.js +0 -4
  156. package/dist/packages/_es/raf-a74f1a06.js +0 -16
  157. package/dist/packages/_es/renderIcon-47498b32.js +0 -5
  158. package/dist/packages/locale/lang/baseLang-0bdc6353.js +0 -5
@@ -1,15 +1,16 @@
1
- import { resolveComponent as g, openBlock as t, createElementBlock as l, createElementVNode as i, createCommentVNode as m, normalizeClass as d, toDisplayString as p, renderSlot as $, createVNode as y, ref as C, watch as T, onMounted as S, Fragment as v, renderList as b, createBlock as I, computed as O, withCtx as z, normalizeStyle as E, createTextVNode as F } from "vue";
2
- import { c as w } from "./component-234624bc.js";
3
- import { Right as R, Fabulous as H, Comment as A, MoreX as M } from "@nutui/icons-vue";
4
- import N from "./Rate.js";
5
- import { _ } from "./_plugin-vue_export-helper-dad06003.js";
1
+ import { resolveComponent, openBlock, createElementBlock, createElementVNode, createCommentVNode, normalizeClass, toDisplayString, renderSlot, createVNode, ref, watch, onMounted, Fragment, renderList, createBlock, computed, withCtx, normalizeStyle, createTextVNode } from "vue";
2
+ import { c as createComponent } from "./component-81a4c1d0.js";
3
+ import { Right, Fabulous, Comment, MoreX } from "@nutui/icons-vue";
4
+ import Rate from "./Rate.js";
5
+ import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
6
6
  import "../locale/lang";
7
- import "./renderIcon-47498b32.js";
8
- import "./pxCheck-38173291.js";
9
- import "./index-53ec2d4d.js";
10
- const { componentName: Ve, create: U } = w("comment-header"), j = U({
7
+ import "./renderIcon-3d0fd47c.js";
8
+ import "./pxCheck-c6b9f6b7.js";
9
+ import "./index-7a7385e4.js";
10
+ const { componentName: componentName$3, create: create$3 } = createComponent("comment-header");
11
+ const _sfc_main$3 = create$3({
11
12
  components: {
12
- [N.name]: N
13
+ [Rate.name]: Rate
13
14
  },
14
15
  props: {
15
16
  type: {
@@ -28,83 +29,91 @@ const { componentName: Ve, create: U } = w("comment-header"), j = U({
28
29
  }
29
30
  },
30
31
  emits: ["handleClick"],
31
- setup(e, { emit: n }) {
32
- return { handleClick: () => {
33
- n("handleClick");
34
- } };
32
+ setup(props, { emit }) {
33
+ const handleClick = () => {
34
+ emit("handleClick");
35
+ };
36
+ return { handleClick };
35
37
  }
36
- }), B = { class: "nut-comment-header__user" }, L = { class: "nut-comment-header__user-avter" }, X = ["src"], P = { class: "nut-comment-header__user-score" }, D = {
38
+ });
39
+ const _hoisted_1$3 = { class: "nut-comment-header__user" };
40
+ const _hoisted_2$3 = { class: "nut-comment-header__user-avter" };
41
+ const _hoisted_3$3 = ["src"];
42
+ const _hoisted_4$3 = { class: "nut-comment-header__user-score" };
43
+ const _hoisted_5$1 = {
37
44
  key: 0,
38
45
  class: "nut-comment-header__time"
39
46
  };
40
- function q(e, n, r, u, f, h) {
41
- const s = g("nut-rate");
42
- return t(), l("view", null, [
43
- e.info ? (t(), l("view", {
47
+ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
48
+ const _component_nut_rate = resolveComponent("nut-rate");
49
+ return openBlock(), createElementBlock("view", null, [
50
+ _ctx.info ? (openBlock(), createElementBlock("view", {
44
51
  key: 0,
45
52
  class: "nut-comment-header",
46
- onClick: n[1] || (n[1] = (...o) => e.handleClick && e.handleClick(...o))
53
+ onClick: _cache[1] || (_cache[1] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
47
54
  }, [
48
- i("view", B, [
49
- i("view", L, [
50
- e.info.avatar ? (t(), l("img", {
55
+ createElementVNode("view", _hoisted_1$3, [
56
+ createElementVNode("view", _hoisted_2$3, [
57
+ _ctx.info.avatar ? (openBlock(), createElementBlock("img", {
51
58
  key: 0,
52
- src: e.info.avatar
53
- }, null, 8, X)) : m("", !0)
59
+ src: _ctx.info.avatar
60
+ }, null, 8, _hoisted_3$3)) : createCommentVNode("", true)
54
61
  ]),
55
- e.type == "default" ? (t(), l("view", {
62
+ _ctx.type == "default" ? (openBlock(), createElementBlock("view", {
56
63
  key: 0,
57
- class: d([`nut-comment-header__user-${e.type}`])
64
+ class: normalizeClass([`nut-comment-header__user-${_ctx.type}`])
58
65
  }, [
59
- i("view", {
60
- class: d([`nut-comment-header__user-${e.type}-name`])
66
+ createElementVNode("view", {
67
+ class: normalizeClass([`nut-comment-header__user-${_ctx.type}-name`])
61
68
  }, [
62
- i("span", null, p(e.info.nickName), 1),
63
- $(e.$slots, "labels")
69
+ createElementVNode("span", null, toDisplayString(_ctx.info.nickName), 1),
70
+ renderSlot(_ctx.$slots, "labels")
64
71
  ], 2),
65
- i("view", P, [
66
- y(s, {
67
- modelValue: e.info.score,
68
- "onUpdate:modelValue": n[0] || (n[0] = (o) => e.info.score = o),
72
+ createElementVNode("view", _hoisted_4$3, [
73
+ createVNode(_component_nut_rate, {
74
+ modelValue: _ctx.info.score,
75
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.info.score = $event),
69
76
  size: "12",
70
77
  spacing: "5",
71
78
  readonly: "",
72
- onChange: e.handleClick
79
+ onChange: _ctx.handleClick
73
80
  }, null, 8, ["modelValue", "onChange"])
74
81
  ])
75
- ], 2)) : (t(), l("view", {
82
+ ], 2)) : (openBlock(), createElementBlock("view", {
76
83
  key: 1,
77
- class: d([`nut-comment-header__user-${e.type}`])
84
+ class: normalizeClass([`nut-comment-header__user-${_ctx.type}`])
78
85
  }, [
79
- i("span", {
80
- class: d([`nut-comment-header__user-${e.type}-name`])
81
- }, p(e.info.nickName), 3),
82
- $(e.$slots, "labels")
86
+ createElementVNode("span", {
87
+ class: normalizeClass([`nut-comment-header__user-${_ctx.type}-name`])
88
+ }, toDisplayString(_ctx.info.nickName), 3),
89
+ renderSlot(_ctx.$slots, "labels")
83
90
  ], 2))
84
91
  ]),
85
- e.info.time ? (t(), l("view", D, p(e.info.time), 1)) : m("", !0)
86
- ])) : m("", !0),
87
- e.type == "complex" ? (t(), l("view", {
92
+ _ctx.info.time ? (openBlock(), createElementBlock("view", _hoisted_5$1, toDisplayString(_ctx.info.time), 1)) : createCommentVNode("", true)
93
+ ])) : createCommentVNode("", true),
94
+ _ctx.type == "complex" ? (openBlock(), createElementBlock("view", {
88
95
  key: 1,
89
- class: d([`nut-comment-header__${e.type}-score`])
96
+ class: normalizeClass([`nut-comment-header__${_ctx.type}-score`])
90
97
  }, [
91
- y(s, {
92
- modelValue: e.info.score,
93
- "onUpdate:modelValue": n[2] || (n[2] = (o) => e.info.score = o),
98
+ createVNode(_component_nut_rate, {
99
+ modelValue: _ctx.info.score,
100
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.info.score = $event),
94
101
  size: "12",
95
102
  spacing: "3",
96
103
  readonly: ""
97
104
  }, null, 8, ["modelValue"]),
98
- i("i", {
99
- class: d([`nut-comment-header__${e.type}-score-i`])
105
+ createElementVNode("i", {
106
+ class: normalizeClass([`nut-comment-header__${_ctx.type}-score-i`])
100
107
  }, null, 2),
101
- i("view", {
102
- class: d([`nut-comment-header__${e.type}-score-size`])
103
- }, p(e.info.size), 3)
104
- ], 2)) : m("", !0)
108
+ createElementVNode("view", {
109
+ class: normalizeClass([`nut-comment-header__${_ctx.type}-score-size`])
110
+ }, toDisplayString(_ctx.info.size), 3)
111
+ ], 2)) : createCommentVNode("", true)
105
112
  ]);
106
113
  }
107
- const G = /* @__PURE__ */ _(j, [["render", q]]), { componentName: Te, create: J } = w("comment-images"), K = J({
114
+ const CommentHeader = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]);
115
+ const { componentName: componentName$2, create: create$2 } = createComponent("comment-images");
116
+ const _sfc_main$2 = create$2({
108
117
  props: {
109
118
  type: {
110
119
  type: String,
@@ -120,70 +129,94 @@ const G = /* @__PURE__ */ _(j, [["render", q]]), { componentName: Te, create: J
120
129
  default: () => []
121
130
  }
122
131
  },
123
- components: { Right: R },
132
+ components: { Right },
124
133
  emits: ["click", "clickImages"],
125
- setup(e, { emit: n }) {
126
- const r = C(!1), u = C(1), f = C([]);
127
- return T(
128
- () => [e.videos, e.images],
129
- (s) => {
130
- s[0].length > 0 && s[0].forEach((o) => {
131
- o.type = "video";
132
- }), f.value = s[0].concat(s[1]);
134
+ setup(props, { emit }) {
135
+ const isShowImage = ref(false);
136
+ const initIndex = ref(1);
137
+ const totalImages = ref([]);
138
+ watch(
139
+ () => [props.videos, props.images],
140
+ (value) => {
141
+ if (value[0].length > 0) {
142
+ value[0].forEach((el) => {
143
+ el.type = "video";
144
+ });
145
+ }
146
+ totalImages.value = value[0].concat(value[1]);
133
147
  },
134
- { deep: !0 }
135
- ), S(() => {
136
- e.videos.length > 0 && e.videos.forEach((s) => {
137
- s.type = "video";
138
- }), f.value = e.videos.concat(e.images);
139
- }), { isShowImage: r, initIndex: u, showImages: (s, o) => {
140
- const { videos: c, images: a } = e, k = s == "img" ? o - c.length : o;
141
- n("clickImages", {
142
- type: s,
143
- index: k,
144
- value: s == "img" ? a[k] : c[k]
148
+ { deep: true }
149
+ );
150
+ onMounted(() => {
151
+ if (props.videos.length > 0) {
152
+ props.videos.forEach((el) => {
153
+ el.type = "video";
154
+ });
155
+ }
156
+ totalImages.value = props.videos.concat(props.images);
157
+ });
158
+ const showImages = (type, index2) => {
159
+ const { videos, images } = props;
160
+ const i = type == "img" ? index2 - videos.length : index2;
161
+ emit("clickImages", {
162
+ type,
163
+ index: i,
164
+ value: type == "img" ? images[i] : videos[i]
145
165
  });
146
- }, totalImages: f };
166
+ };
167
+ return { isShowImage, initIndex, showImages, totalImages };
147
168
  }
148
- }), Q = ["onClick"], W = ["src"], Y = /* @__PURE__ */ i("view", { class: "nut-comment-images__play" }, null, -1), Z = ["onClick"], x = ["src"], ee = {
169
+ });
170
+ const _hoisted_1$2 = ["onClick"];
171
+ const _hoisted_2$2 = ["src"];
172
+ const _hoisted_3$2 = /* @__PURE__ */ createElementVNode("view", { class: "nut-comment-images__play" }, null, -1);
173
+ const _hoisted_4$2 = ["onClick"];
174
+ const _hoisted_5 = ["src"];
175
+ const _hoisted_6 = {
149
176
  key: 0,
150
177
  class: "nut-comment-images__mask"
151
178
  };
152
- function oe(e, n, r, u, f, h) {
153
- const s = g("Right");
154
- return t(), l("view", {
155
- class: d(`nut-comment-images nut-comment-images--${e.type}`)
179
+ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
180
+ const _component_Right = resolveComponent("Right");
181
+ return openBlock(), createElementBlock("view", {
182
+ class: normalizeClass(`nut-comment-images nut-comment-images--${_ctx.type}`)
156
183
  }, [
157
- (t(!0), l(v, null, b(e.videos, (o, c) => (t(), l("view", {
158
- class: "nut-comment-images__item nut-comment-images__item--video",
159
- key: o.id,
160
- onClick: (a) => e.showImages("video", c)
161
- }, [
162
- i("img", {
163
- src: o.mainUrl
164
- }, null, 8, W),
165
- Y
166
- ], 8, Q))), 128)),
167
- (t(!0), l(v, null, b(e.images, (o, c) => (t(), l(v, {
168
- key: o.id
169
- }, [
170
- e.type == "multi" && e.videos.length + c < 9 || e.type != "multi" ? (t(), l("view", {
171
- key: 0,
172
- class: "nut-comment-images__item nut-comment-images__item--imgbox",
173
- onClick: (a) => e.showImages("img", c + e.videos.length)
184
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.videos, (itV, index2) => {
185
+ return openBlock(), createElementBlock("view", {
186
+ class: "nut-comment-images__item nut-comment-images__item--video",
187
+ key: itV.id,
188
+ onClick: ($event) => _ctx.showImages("video", index2)
174
189
  }, [
175
- i("img", {
176
- src: o.smallImgUrl ? o.smallImgUrl : o.imgUrl
177
- }, null, 8, x),
178
- e.type == "multi" && e.totalImages.length > 9 && e.videos.length + c > 7 ? (t(), l("view", ee, [
179
- i("span", null, "共 " + p(e.totalImages.length) + " 张", 1),
180
- y(s, { style: { width: "12px" } })
181
- ])) : m("", !0)
182
- ], 8, Z)) : m("", !0)
183
- ], 64))), 128))
190
+ createElementVNode("img", {
191
+ src: itV.mainUrl
192
+ }, null, 8, _hoisted_2$2),
193
+ _hoisted_3$2
194
+ ], 8, _hoisted_1$2);
195
+ }), 128)),
196
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.images, (itI, index2) => {
197
+ return openBlock(), createElementBlock(Fragment, {
198
+ key: itI.id
199
+ }, [
200
+ _ctx.type == "multi" && _ctx.videos.length + index2 < 9 || _ctx.type != "multi" ? (openBlock(), createElementBlock("view", {
201
+ key: 0,
202
+ class: "nut-comment-images__item nut-comment-images__item--imgbox",
203
+ onClick: ($event) => _ctx.showImages("img", index2 + _ctx.videos.length)
204
+ }, [
205
+ createElementVNode("img", {
206
+ src: itI.smallImgUrl ? itI.smallImgUrl : itI.imgUrl
207
+ }, null, 8, _hoisted_5),
208
+ _ctx.type == "multi" && _ctx.totalImages.length > 9 && _ctx.videos.length + index2 > 7 ? (openBlock(), createElementBlock("view", _hoisted_6, [
209
+ createElementVNode("span", null, "共 " + toDisplayString(_ctx.totalImages.length) + " 张", 1),
210
+ createVNode(_component_Right, { style: { "width": "12px" } })
211
+ ])) : createCommentVNode("", true)
212
+ ], 8, _hoisted_4$2)) : createCommentVNode("", true)
213
+ ], 64);
214
+ }), 128))
184
215
  ], 2);
185
216
  }
186
- const ne = /* @__PURE__ */ _(K, [["render", oe]]), { componentName: ze, create: te, translate: se } = w("comment-bottom"), le = te({
217
+ const CommentImages = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
218
+ const { componentName: componentName$1, create: create$1, translate: translate$1 } = createComponent("comment-bottom");
219
+ const _sfc_main$1 = create$1({
187
220
  props: {
188
221
  type: {
189
222
  type: String,
@@ -199,54 +232,75 @@ const ne = /* @__PURE__ */ _(K, [["render", oe]]), { componentName: ze, create:
199
232
  default: ["replay", "like", "more"]
200
233
  }
201
234
  },
202
- components: { Fabulous: H, Comment: A, MoreX: M },
235
+ components: { Fabulous, Comment, MoreX },
203
236
  emits: ["clickOperate", "handleClick"],
204
- setup(e, { emit: n }) {
205
- const r = C(!1), u = C([]);
206
- return S(() => {
207
- const s = ["replay", "like", "more"];
208
- e.operation && e.operation.forEach((o) => {
209
- s.includes(o) && u.value.push(o);
210
- });
211
- }), { showPopver: r, operate: (s) => {
212
- s == "more" && (r.value = !r.value), n("clickOperate", s);
213
- }, mergeOp: u, handleClick: () => {
214
- n("handleClick");
215
- }, translate: se };
237
+ setup(props, { emit }) {
238
+ const showPopver = ref(false);
239
+ const mergeOp = ref([]);
240
+ onMounted(() => {
241
+ const deOp = ["replay", "like", "more"];
242
+ if (props.operation) {
243
+ props.operation.forEach((name) => {
244
+ if (deOp.includes(name)) {
245
+ mergeOp.value.push(name);
246
+ }
247
+ });
248
+ }
249
+ });
250
+ const operate = (type) => {
251
+ if (type == "more") {
252
+ showPopver.value = !showPopver.value;
253
+ }
254
+ emit("clickOperate", type);
255
+ };
256
+ const handleClick = () => {
257
+ emit("handleClick");
258
+ };
259
+ return { showPopver, operate, mergeOp, handleClick, translate: translate$1 };
216
260
  }
217
- }), ie = { class: "nut-comment-bottom" }, ae = { key: 0 }, me = { class: "nut-comment-bottom__cpx" }, re = ["onClick"];
218
- function ce(e, n, r, u, f, h) {
219
- const s = g("Fabulous"), o = g("Comment"), c = g("MoreX");
220
- return t(), l("view", ie, [
221
- i("view", {
222
- onClick: n[0] || (n[0] = (...a) => e.handleClick && e.handleClick(...a)),
261
+ });
262
+ const _hoisted_1$1 = { class: "nut-comment-bottom" };
263
+ const _hoisted_2$1 = { key: 0 };
264
+ const _hoisted_3$1 = { class: "nut-comment-bottom__cpx" };
265
+ const _hoisted_4$1 = ["onClick"];
266
+ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
267
+ const _component_Fabulous = resolveComponent("Fabulous");
268
+ const _component_Comment = resolveComponent("Comment");
269
+ const _component_MoreX = resolveComponent("MoreX");
270
+ return openBlock(), createElementBlock("view", _hoisted_1$1, [
271
+ createElementVNode("view", {
272
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args)),
223
273
  class: "nut-comment-bottom__lable"
224
274
  }, [
225
- e.type != "complex" ? (t(), l("span", ae, p(e.info.size), 1)) : m("", !0)
275
+ _ctx.type != "complex" ? (openBlock(), createElementBlock("span", _hoisted_2$1, toDisplayString(_ctx.info.size), 1)) : createCommentVNode("", true)
226
276
  ]),
227
- i("view", me, [
228
- (t(!0), l(v, null, b(e.mergeOp, (a, k) => (t(), l("view", {
229
- key: k,
230
- class: d(["nut-comment-bottom__cpx-item", `nut-comment-bottom__cpx-item--${a}`]),
231
- onClick: (V) => e.operate(a)
232
- }, [
233
- a != "more" ? (t(), l(v, { key: 0 }, [
234
- i("span", null, p(e.info[a]), 1),
235
- a == "like" ? (t(), I(s, { key: 0 })) : (t(), I(o, { key: 1 }))
236
- ], 64)) : m("", !0),
237
- a == "more" ? (t(), l(v, { key: 1 }, [
238
- y(c),
239
- e.showPopver ? (t(), l("view", {
240
- key: 0,
241
- class: "nut-comment-bottom__cpx-item-popover",
242
- onClick: n[1] || (n[1] = (V) => e.operate("popover"))
243
- }, p(e.translate("complaintsText")), 1)) : m("", !0)
244
- ], 64)) : m("", !0)
245
- ], 10, re))), 128))
277
+ createElementVNode("view", _hoisted_3$1, [
278
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.mergeOp, (name, i) => {
279
+ return openBlock(), createElementBlock("view", {
280
+ key: i,
281
+ class: normalizeClass(["nut-comment-bottom__cpx-item", `nut-comment-bottom__cpx-item--${name}`]),
282
+ onClick: ($event) => _ctx.operate(name)
283
+ }, [
284
+ name != "more" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
285
+ createElementVNode("span", null, toDisplayString(_ctx.info[name]), 1),
286
+ name == "like" ? (openBlock(), createBlock(_component_Fabulous, { key: 0 })) : (openBlock(), createBlock(_component_Comment, { key: 1 }))
287
+ ], 64)) : createCommentVNode("", true),
288
+ name == "more" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
289
+ createVNode(_component_MoreX),
290
+ _ctx.showPopver ? (openBlock(), createElementBlock("view", {
291
+ key: 0,
292
+ class: "nut-comment-bottom__cpx-item-popover",
293
+ onClick: _cache[1] || (_cache[1] = ($event) => _ctx.operate("popover"))
294
+ }, toDisplayString(_ctx.translate("complaintsText")), 1)) : createCommentVNode("", true)
295
+ ], 64)) : createCommentVNode("", true)
296
+ ], 10, _hoisted_4$1);
297
+ }), 128))
246
298
  ])
247
299
  ]);
248
300
  }
249
- const pe = /* @__PURE__ */ _(le, [["render", ce]]), { componentName: ue, create: de, translate: fe } = w("comment"), ke = de({
301
+ const CommentBottom = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
302
+ const { componentName, create, translate } = createComponent("comment");
303
+ const _sfc_main = create({
250
304
  props: {
251
305
  headerType: {
252
306
  type: String,
@@ -260,7 +314,7 @@ const pe = /* @__PURE__ */ _(le, [["render", ce]]), { componentName: ue, create:
260
314
  },
261
315
  ellipsis: {
262
316
  type: [String, Number, Boolean],
263
- default: !1
317
+ default: false
264
318
  },
265
319
  videos: {
266
320
  type: Array,
@@ -288,81 +342,99 @@ const pe = /* @__PURE__ */ _(le, [["render", ce]]), { componentName: ue, create:
288
342
  }
289
343
  },
290
344
  components: {
291
- CommentHeader: G,
292
- CommentImages: ne,
293
- CommentBottom: pe,
294
- Right: R
345
+ CommentHeader,
346
+ CommentImages,
347
+ CommentBottom,
348
+ Right
295
349
  },
296
350
  emits: ["click", "clickImages", "clickOperate"],
297
- setup(e, { emit: n }) {
298
- const r = O(() => ({
299
- [ue]: !0
300
- })), u = O(() => e.ellipsis ? e.ellipsis : e.headerType == "complex" ? 6 : 2);
301
- return { classes: r, conEllipsis: u, clickOperate: (o) => {
302
- n("clickOperate", o);
303
- }, handleClick: () => {
304
- n("click", e.info);
305
- }, clickImages: (o) => {
306
- n("clickImages", o);
307
- }, translate: fe };
351
+ setup(props, { emit }) {
352
+ const classes = computed(() => {
353
+ const prefixCls = componentName;
354
+ return {
355
+ [prefixCls]: true
356
+ };
357
+ });
358
+ const conEllipsis = computed(() => {
359
+ if (props.ellipsis)
360
+ return props.ellipsis;
361
+ return props.headerType == "complex" ? 6 : 2;
362
+ });
363
+ const clickOperate = (t) => {
364
+ emit("clickOperate", t);
365
+ };
366
+ const handleClick = () => {
367
+ emit("click", props.info);
368
+ };
369
+ const clickImages = (value) => {
370
+ emit("clickImages", value);
371
+ };
372
+ return { classes, conEllipsis, clickOperate, handleClick, clickImages, translate };
308
373
  }
309
- }), ge = ["innerHTML"], ye = { class: "nut-comment__follow-title" }, he = { class: "nut-comment__follow-com" }, ve = {
374
+ });
375
+ const _hoisted_1 = ["innerHTML"];
376
+ const _hoisted_2 = { class: "nut-comment__follow-title" };
377
+ const _hoisted_3 = { class: "nut-comment__follow-com" };
378
+ const _hoisted_4 = {
310
379
  key: 0,
311
380
  class: "nut-comment__follow-img"
312
381
  };
313
- function $e(e, n, r, u, f, h) {
314
- const s = g("comment-header"), o = g("comment-images"), c = g("Right"), a = g("comment-bottom");
315
- return e.info && Object.keys(e.info) ? (t(), l("view", {
382
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
383
+ const _component_comment_header = resolveComponent("comment-header");
384
+ const _component_comment_images = resolveComponent("comment-images");
385
+ const _component_Right = resolveComponent("Right");
386
+ const _component_comment_bottom = resolveComponent("comment-bottom");
387
+ return _ctx.info && Object.keys(_ctx.info) ? (openBlock(), createElementBlock("view", {
316
388
  key: 0,
317
- class: d(e.classes)
389
+ class: normalizeClass(_ctx.classes)
318
390
  }, [
319
- y(s, {
320
- type: e.headerType,
321
- info: e.info,
322
- labels: e.labels,
323
- onHandleClick: e.handleClick
391
+ createVNode(_component_comment_header, {
392
+ type: _ctx.headerType,
393
+ info: _ctx.info,
394
+ labels: _ctx.labels,
395
+ onHandleClick: _ctx.handleClick
324
396
  }, {
325
- labels: z(() => [
326
- $(e.$slots, "comment-labels")
397
+ labels: withCtx(() => [
398
+ renderSlot(_ctx.$slots, "comment-labels")
327
399
  ]),
328
400
  _: 3
329
401
  }, 8, ["type", "info", "labels", "onHandleClick"]),
330
- $(e.$slots, "feature"),
331
- i("view", {
402
+ renderSlot(_ctx.$slots, "feature"),
403
+ createElementVNode("view", {
332
404
  class: "nut-comment__main",
333
- style: E(`-webkit-line-clamp:${e.conEllipsis}`),
334
- onClick: n[0] || (n[0] = (...k) => e.handleClick && e.handleClick(...k)),
335
- innerHTML: e.info.content
336
- }, null, 12, ge),
337
- y(o, {
338
- images: e.images,
339
- videos: e.videos,
340
- type: e.imagesRows,
341
- onClickImages: e.clickImages
405
+ style: normalizeStyle(`-webkit-line-clamp:${_ctx.conEllipsis}`),
406
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args)),
407
+ innerHTML: _ctx.info.content
408
+ }, null, 12, _hoisted_1),
409
+ createVNode(_component_comment_images, {
410
+ images: _ctx.images,
411
+ videos: _ctx.videos,
412
+ type: _ctx.imagesRows,
413
+ onClickImages: _ctx.clickImages
342
414
  }, null, 8, ["images", "videos", "type", "onClickImages"]),
343
- e.follow && e.follow.days > 0 ? (t(), l("view", {
415
+ _ctx.follow && _ctx.follow.days > 0 ? (openBlock(), createElementBlock("view", {
344
416
  key: 0,
345
417
  class: "nut-comment__follow",
346
- onClick: n[1] || (n[1] = (...k) => e.handleClick && e.handleClick(...k))
418
+ onClick: _cache[1] || (_cache[1] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
347
419
  }, [
348
- i("view", ye, p(e.translate("additionalReview", e.follow.days)), 1),
349
- i("view", he, p(e.follow.content), 1),
350
- e.follow.images && e.follow.images.length > 0 ? (t(), l("view", ve, [
351
- F(p(e.translate("additionalImages", e.follow.images.length)) + " ", 1),
352
- y(c, { width: "12px" })
353
- ])) : m("", !0)
354
- ])) : m("", !0),
355
- y(a, {
356
- type: e.headerType,
357
- info: e.info,
358
- operation: e.operation,
359
- onClickOperate: e.clickOperate,
360
- onHandleClick: e.handleClick
420
+ createElementVNode("view", _hoisted_2, toDisplayString(_ctx.translate("additionalReview", _ctx.follow.days)), 1),
421
+ createElementVNode("view", _hoisted_3, toDisplayString(_ctx.follow.content), 1),
422
+ _ctx.follow.images && _ctx.follow.images.length > 0 ? (openBlock(), createElementBlock("view", _hoisted_4, [
423
+ createTextVNode(toDisplayString(_ctx.translate("additionalImages", _ctx.follow.images.length)) + " ", 1),
424
+ createVNode(_component_Right, { width: "12px" })
425
+ ])) : createCommentVNode("", true)
426
+ ])) : createCommentVNode("", true),
427
+ createVNode(_component_comment_bottom, {
428
+ type: _ctx.headerType,
429
+ info: _ctx.info,
430
+ operation: _ctx.operation,
431
+ onClickOperate: _ctx.clickOperate,
432
+ onHandleClick: _ctx.handleClick
361
433
  }, null, 8, ["type", "info", "operation", "onClickOperate", "onHandleClick"]),
362
- $(e.$slots, "comment-shop-reply")
363
- ], 2)) : m("", !0);
434
+ renderSlot(_ctx.$slots, "comment-shop-reply")
435
+ ], 2)) : createCommentVNode("", true);
364
436
  }
365
- const Ee = /* @__PURE__ */ _(ke, [["render", $e]]);
437
+ const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
366
438
  export {
367
- Ee as default
439
+ index as default
368
440
  };