@nutui/nutui 3.1.22-beta.3 → 3.1.23-beta.0

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 (207) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/README.md +3 -4
  3. package/dist/nutui.es.js +20426 -4050
  4. package/dist/nutui.umd.js +20529 -4049
  5. package/dist/packages/_es/ActionSheet.js +149 -36
  6. package/dist/packages/_es/Address.js +535 -129
  7. package/dist/packages/_es/AddressList.js +615 -113
  8. package/dist/packages/_es/Animate.js +64 -0
  9. package/dist/packages/_es/Audio.js +257 -72
  10. package/dist/packages/_es/AudioOperate.js +100 -32
  11. package/dist/packages/_es/Avatar.js +162 -54
  12. package/dist/packages/_es/AvatarGroup.js +73 -14
  13. package/dist/packages/_es/BackTop.js +156 -43
  14. package/dist/packages/_es/Badge.js +86 -14
  15. package/dist/packages/_es/Barrage.js +120 -41
  16. package/dist/packages/_es/Button.js +128 -23
  17. package/dist/packages/_es/Calendar.js +246 -24
  18. package/dist/packages/_es/CalendarItem.js +2 -1
  19. package/dist/packages/_es/Card.js +107 -10
  20. package/dist/packages/_es/Cascader.js +496 -179
  21. package/dist/packages/_es/Category.js +58 -15
  22. package/dist/packages/_es/CategoryPane.js +111 -11
  23. package/dist/packages/_es/Cell.js +108 -21
  24. package/dist/packages/_es/CellGroup.js +44 -9
  25. package/dist/packages/_es/Checkbox.js +134 -29
  26. package/dist/packages/_es/CheckboxGroup.js +79 -29
  27. package/dist/packages/_es/CircleProgress.js +150 -28
  28. package/dist/packages/_es/Col.js +56 -14
  29. package/dist/packages/_es/Collapse.js +110 -24
  30. package/dist/packages/_es/CollapseItem.js +252 -80
  31. package/dist/packages/_es/Comment.js +434 -64
  32. package/dist/packages/_es/ConfigProvider.js +25 -0
  33. package/dist/packages/_es/CountDown.js +238 -75
  34. package/dist/packages/_es/CountUp.js +539 -159
  35. package/dist/packages/_es/DatePicker.js +315 -117
  36. package/dist/packages/_es/Dialog.js +289 -79
  37. package/dist/packages/_es/Divider.js +65 -32
  38. package/dist/packages/_es/Drag.js +197 -56
  39. package/dist/packages/_es/Ecard.js +159 -24
  40. package/dist/packages/_es/Elevator.js +255 -77
  41. package/dist/packages/_es/Ellipsis.js +206 -0
  42. package/dist/packages/_es/Empty.js +71 -12
  43. package/dist/packages/_es/FixedNav.js +122 -15
  44. package/dist/packages/_es/Form.js +151 -64
  45. package/dist/packages/_es/FormItem.js +114 -15
  46. package/dist/packages/_es/Grid.js +6 -5
  47. package/dist/packages/_es/GridItem.js +144 -33
  48. package/dist/packages/_es/Icon.js +40 -15
  49. package/dist/packages/_es/Image.js +142 -0
  50. package/dist/packages/_es/ImagePreview.js +547 -84
  51. package/dist/packages/_es/Indicator.js +62 -15
  52. package/dist/packages/_es/InfiniteLoading.js +249 -76
  53. package/dist/packages/_es/Input.js +433 -51
  54. package/dist/packages/_es/InputNumber.js +160 -41
  55. package/dist/packages/_es/Layout.js +5 -4
  56. package/dist/packages/_es/List.js +106 -37
  57. package/dist/packages/_es/Menu.js +168 -29
  58. package/dist/packages/_es/MenuItem.js +173 -34
  59. package/dist/packages/_es/Navbar.js +192 -30
  60. package/dist/packages/_es/NoticeBar.js +380 -93
  61. package/dist/packages/_es/Notify.js +227 -91
  62. package/dist/packages/_es/NumberKeyboard.js +272 -41
  63. package/dist/packages/_es/OldPicker.js +457 -149
  64. package/dist/packages/_es/OverLay.js +98 -40
  65. package/dist/packages/_es/Pagination.js +157 -39
  66. package/dist/packages/_es/Picker.js +460 -148
  67. package/dist/packages/_es/Popover.js +957 -337
  68. package/dist/packages/_es/Popup.js +299 -74
  69. package/dist/packages/_es/Price.js +118 -16
  70. package/dist/packages/_es/Progress.js +146 -14
  71. package/dist/packages/_es/PullRefresh.js +339 -100
  72. package/dist/packages/_es/Radio.js +90 -22
  73. package/dist/packages/_es/RadioGroup.js +37 -8
  74. package/dist/packages/_es/Range.js +408 -102
  75. package/dist/packages/_es/Rate.js +193 -16
  76. package/dist/packages/_es/Row.js +64 -22
  77. package/dist/packages/_es/SearchBar.js +238 -56
  78. package/dist/packages/_es/ShortPassword.js +225 -35
  79. package/dist/packages/_es/SideNavBar.js +81 -43
  80. package/dist/packages/_es/SideNavBarItem.js +46 -11
  81. package/dist/packages/_es/Signature.js +160 -60
  82. package/dist/packages/_es/Skeleton.js +136 -20
  83. package/dist/packages/_es/Sku.js +491 -103
  84. package/dist/packages/_es/Step.js +115 -39
  85. package/dist/packages/_es/Steps.js +53 -18
  86. package/dist/packages/_es/Sticky.js +138 -53
  87. package/dist/packages/_es/SubSideNavBar.js +82 -36
  88. package/dist/packages/_es/Swipe.js +178 -60
  89. package/dist/packages/_es/Swiper.js +433 -121
  90. package/dist/packages/_es/SwiperItem.js +53 -22
  91. package/dist/packages/_es/Switch.js +116 -21
  92. package/dist/packages/_es/TabPane.js +39 -12
  93. package/dist/packages/_es/Tabbar.js +72 -17
  94. package/dist/packages/_es/TabbarItem.js +151 -29
  95. package/dist/packages/_es/Table.js +178 -37
  96. package/dist/packages/_es/Tabs.js +202 -59
  97. package/dist/packages/_es/Tag.js +97 -20
  98. package/dist/packages/_es/TextArea.js +160 -42
  99. package/dist/packages/_es/TimeDetail.js +79 -37
  100. package/dist/packages/_es/TimePannel.js +48 -33
  101. package/dist/packages/_es/TimeSelect.js +112 -15
  102. package/dist/packages/_es/Toast.js +310 -90
  103. package/dist/packages/_es/Uploader.js +455 -120
  104. package/dist/packages/_es/Video.js +332 -93
  105. package/dist/packages/_es/common.js +128 -38
  106. package/dist/packages/_es/component.js +76 -35
  107. package/dist/packages/_es/index.js +6 -5
  108. package/dist/packages/_es/index2.js +30 -9
  109. package/dist/packages/_es/index3.js +8 -6
  110. package/dist/packages/_es/index4.js +64 -13
  111. package/dist/packages/_es/index5.js +783 -130
  112. package/dist/packages/_es/plugin-vue_export-helper.js +8 -7
  113. package/dist/packages/_es/pxCheck.js +5 -3
  114. package/dist/packages/_es/raf.js +15 -8
  115. package/dist/packages/animate/index.scss +299 -0
  116. package/dist/packages/cell/index.scss +7 -1
  117. package/dist/packages/checkbox/index.scss +10 -0
  118. package/dist/packages/configprovider/index.scss +2 -0
  119. package/dist/packages/ellipsis/index.scss +12 -0
  120. package/dist/packages/formitem/index.scss +12 -0
  121. package/dist/packages/griditem/index.scss +11 -0
  122. package/dist/packages/image/index.scss +39 -0
  123. package/dist/packages/imagepreview/index.scss +26 -2
  124. package/dist/packages/input/index.scss +13 -0
  125. package/dist/packages/inputnumber/index.scss +21 -0
  126. package/dist/packages/locale/lang/baseLang.js +3 -3
  127. package/dist/packages/locale/lang/en-US.js +105 -5
  128. package/dist/packages/locale/lang/id-ID.js +105 -5
  129. package/dist/packages/locale/lang/index.js +38 -16
  130. package/dist/packages/locale/lang/zh-CN.js +105 -5
  131. package/dist/packages/locale/lang/zh-TW.js +105 -5
  132. package/dist/packages/menu/index.scss +45 -36
  133. package/dist/packages/menuitem/index.scss +4 -0
  134. package/dist/packages/navbar/index.scss +9 -0
  135. package/dist/packages/pagination/index.scss +19 -0
  136. package/dist/packages/radio/index.scss +18 -0
  137. package/dist/packages/range/index.scss +19 -0
  138. package/dist/packages/rate/index.scss +1 -1
  139. package/dist/packages/searchbar/index.scss +21 -0
  140. package/dist/packages/switch/index.scss +1 -0
  141. package/dist/packages/tabbar/index.scss +5 -0
  142. package/dist/packages/tabbaritem/index.scss +7 -0
  143. package/dist/packages/tabpane/index.scss +5 -0
  144. package/dist/packages/tabs/index.scss +22 -0
  145. package/dist/packages/textarea/index.scss +8 -0
  146. package/dist/smartips/attributes.json +140 -4
  147. package/dist/smartips/tags.json +55 -6
  148. package/dist/smartips/web-types.json +6963 -0
  149. package/dist/style.css +1 -1
  150. package/dist/style.es.js +1 -1
  151. package/dist/styles/font/config.json +3 -1
  152. package/dist/styles/font/demo_index.html +49 -3
  153. package/dist/styles/font/iconfont.css +11 -3
  154. package/dist/styles/font/iconfont.js +15 -15
  155. package/dist/styles/font/iconfont.json +14 -0
  156. package/dist/styles/font/iconfont.ttf +0 -0
  157. package/dist/styles/font/iconfont.woff +0 -0
  158. package/dist/styles/font/iconfont.woff2 +0 -0
  159. package/dist/styles/themes/default.scss +54 -50
  160. package/dist/styles/themes/jdb.scss +54 -50
  161. package/dist/styles/themes/jdt.scss +54 -50
  162. package/dist/styles/variables-jdb.scss +12 -0
  163. package/dist/styles/variables-jdt.scss +12 -0
  164. package/dist/styles/variables.scss +12 -0
  165. package/dist/types/__VUE/actionsheet/index.vue.d.ts +3 -3
  166. package/dist/types/__VUE/address/index.vue.d.ts +7 -7
  167. package/dist/types/__VUE/animate/index.vue.d.ts +48 -0
  168. package/dist/types/__VUE/animate/type.d.ts +6 -0
  169. package/dist/types/__VUE/avatar/index.vue.d.ts +3 -3
  170. package/dist/types/__VUE/calendar/index.vue.d.ts +1 -1
  171. package/dist/types/__VUE/calendaritem/index.vue.d.ts +10 -2
  172. package/dist/types/__VUE/cascader/index.vue.d.ts +2 -2
  173. package/dist/types/__VUE/circleprogress/index.vue.d.ts +2 -2
  174. package/dist/types/__VUE/collapse/index.vue.d.ts +3 -1
  175. package/dist/types/__VUE/configprovider/common.d.ts +20 -0
  176. package/dist/types/__VUE/configprovider/index.vue.d.ts +33 -0
  177. package/dist/types/__VUE/datepicker/index.vue.d.ts +2 -2
  178. package/dist/types/__VUE/dialog/index.vue.d.ts +2 -2
  179. package/dist/types/__VUE/ellipsis/index.vue.d.ts +72 -0
  180. package/dist/types/__VUE/fixednav/index.vue.d.ts +2 -2
  181. package/dist/types/__VUE/grid/index.vue.d.ts +2 -2
  182. package/dist/types/__VUE/image/index.vue.d.ts +105 -0
  183. package/dist/types/__VUE/image/type.d.ts +6 -0
  184. package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +95 -0
  185. package/dist/types/__VUE/imagepreview/index.vue.d.ts +56 -24
  186. package/dist/types/__VUE/menu/index.vue.d.ts +31 -4
  187. package/dist/types/__VUE/menuitem/index.vue.d.ts +12 -3
  188. package/dist/types/__VUE/noticebar/index.vue.d.ts +1 -1
  189. package/dist/types/__VUE/numberkeyboard/index.vue.d.ts +2 -2
  190. package/dist/types/__VUE/oldpicker/index.vue.d.ts +4 -4
  191. package/dist/types/__VUE/picker/index.vue.d.ts +4 -4
  192. package/dist/types/__VUE/popover/index.vue.d.ts +8 -8
  193. package/dist/types/__VUE/popup/index.vue.d.ts +4 -4
  194. package/dist/types/__VUE/range/index.vue.d.ts +1 -1
  195. package/dist/types/__VUE/rate/common.d.ts +149 -0
  196. package/dist/types/__VUE/rate/index.vue.d.ts +17 -7
  197. package/dist/types/__VUE/row/index.vue.d.ts +2 -2
  198. package/dist/types/__VUE/shortpassword/index.vue.d.ts +2 -2
  199. package/dist/types/__VUE/sku/index.vue.d.ts +3 -3
  200. package/dist/types/__VUE/swipe/index.vue.d.ts +2 -2
  201. package/dist/types/__VUE/swiper/index.vue.d.ts +2 -2
  202. package/dist/types/__VUE/switch/index.vue.d.ts +2 -2
  203. package/dist/types/__VUE/timeselect/index.vue.d.ts +3 -2
  204. package/dist/types/__VUE/uploader/uploader.d.ts +1 -0
  205. package/dist/types/index.d.ts +1 -1
  206. package/dist/types/nutui.d.ts +5 -1
  207. package/package.json +5 -4
@@ -1,70 +1,440 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.23-beta.0 Mon Jun 27 2022 17:55:50 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { resolveComponent as e, openBlock as t, createElementBlock as n, createElementVNode as l, createCommentVNode as o, normalizeClass as a, toDisplayString as i, renderSlot as s, createVNode as m, ref as c, watch as r, onMounted as p, Fragment as u, renderList as d, computed as y, withCtx as g, normalizeStyle as k, createTextVNode as f } from "vue";
7
- import { c as v } from "./component.js";
8
- import { _ as h } from "./plugin-vue_export-helper.js";
6
+ import { resolveComponent, openBlock, createElementBlock, createElementVNode, createCommentVNode, normalizeClass, toDisplayString, renderSlot, createVNode, ref, watch, onMounted, Fragment, renderList, computed, withCtx, normalizeStyle, createTextVNode } from "vue";
7
+ import { c as createComponent } from "./component.js";
8
+ import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
9
9
  import "../locale/lang";
10
- const { componentName: _, create: w } = v("comment-header"), C = w({ props: { type: { type: String, default: "default" }, info: { type: Object, default: () => {
11
- } }, labels: { type: Function, default: () => "" } }, components: {}, emits: ["handleClick"], setup: (e2, { emit: t2 }) => ({ handleClick: () => {
12
- t2("handleClick");
13
- } }) }), b = { class: "nut-comment-header__user" }, I = { class: "nut-comment-header__user-avter" }, O = ["src"], $ = { class: "nut-comment-header__user-score" }, x = { key: 0, class: "nut-comment-header__time" };
14
- var j = h(C, [["render", function(c2, r2, p2, u2, d2, y2) {
15
- const g2 = e("nut-rate");
16
- return t(), n("view", null, [c2.info ? (t(), n("view", { key: 0, class: "nut-comment-header", onClick: r2[1] || (r2[1] = (...e2) => c2.handleClick && c2.handleClick(...e2)) }, [l("view", b, [l("view", I, [c2.info.avatar ? (t(), n("img", { key: 0, src: c2.info.avatar }, null, 8, O)) : o("", true)]), c2.type == "default" ? (t(), n("view", { key: 0, class: a([`nut-comment-header__user-${c2.type}`]) }, [l("view", { class: a([`nut-comment-header__user-${c2.type}-name`]) }, [l("span", null, i(c2.info.nickName), 1), s(c2.$slots, "labels")], 2), l("view", $, [m(g2, { modelValue: c2.info.score, "onUpdate:modelValue": r2[0] || (r2[0] = (e2) => c2.info.score = e2), "icon-size": "10", spacing: "5", readOnly: "", onChange: c2.handleClick }, null, 8, ["modelValue", "onChange"])])], 2)) : (t(), n("view", { key: 1, class: a([`nut-comment-header__user-${c2.type}`]) }, [l("span", { class: a([`nut-comment-header__user-${c2.type}-name`]) }, i(c2.info.nickName), 3), s(c2.$slots, "labels")], 2))]), c2.info.time ? (t(), n("view", x, i(c2.info.time), 1)) : o("", true)])) : o("", true), c2.type == "complex" ? (t(), n("view", { key: 1, class: a([`nut-comment-header__${c2.type}-score`]) }, [m(g2, { modelValue: c2.info.score, "onUpdate:modelValue": r2[2] || (r2[2] = (e2) => c2.info.score = e2), "icon-size": "12", spacing: "3" }, null, 8, ["modelValue"]), l("i", { class: a([`nut-comment-header__${c2.type}-score-i`]) }, null, 2), l("view", { class: a([`nut-comment-header__${c2.type}-score-size`]) }, i(c2.info.size), 3)], 2)) : o("", true)]);
17
- }]]);
18
- const { componentName: z, create: H } = v("comment-images"), N = H({ props: { type: { type: String, default: "one" }, videos: { type: Array, default: () => [] }, images: { type: Array, default: () => [] } }, components: {}, emits: ["click", "clickImages"], setup(e2, { emit: t2 }) {
19
- const n2 = c(false), l2 = c(1), o2 = c([]);
20
- r(() => [e2.videos, e2.images], (e3) => {
21
- e3[0].length > 0 && e3[0].forEach((e4) => {
22
- e4.type = "video";
23
- }), o2.value = e3[0].concat(e3[1]);
24
- }, { deep: true }), p(() => {
25
- e2.videos.length > 0 && e2.videos.forEach((e3) => {
26
- e3.type = "video";
27
- }), o2.value = e2.videos.concat(e2.images);
28
- });
29
- return { isShowImage: n2, initIndex: l2, showImages: (n3, l3) => {
30
- const { videos: o3, images: a2 } = e2, i2 = n3 == "img" ? l3 - o3.length : l3;
31
- t2("clickImages", { type: n3, index: i2, value: n3 == "img" ? a2[i2] : o3[i2] });
32
- }, totalImages: o2 };
33
- } }), S = ["onClick"], T = ["src"], A = l("view", { class: "nut-comment-images__play" }, null, -1), U = ["onClick"], V = ["src"], E = { key: 0, class: "nut-comment-images__mask" };
34
- var R = h(N, [["render", function(s2, c2, r2, p2, y2, g2) {
35
- const k2 = e("nut-icon");
36
- return t(), n("view", { class: a(`nut-comment-images nut-comment-images--${s2.type}`) }, [(t(true), n(u, null, d(s2.videos, (e2, o2) => (t(), n("view", { class: "nut-comment-images__item nut-comment-images__item--video", key: e2.id, onClick: (e3) => s2.showImages("video", o2, o2) }, [l("img", { src: e2.mainUrl }, null, 8, T), A], 8, S))), 128)), (t(true), n(u, null, d(s2.images, (e2, a2) => (t(), n(u, { key: e2.id }, [s2.type == "multi" && s2.videos.length + a2 < 9 || s2.type != "multi" ? (t(), n("view", { key: 0, class: "nut-comment-images__item nut-comment-images__item--imgbox", onClick: (e3) => s2.showImages("img", a2 + s2.videos.length) }, [l("img", { src: e2.smallImgUrl ? e2.smallImgUrl : e2.imgUrl }, null, 8, V), s2.type == "multi" && s2.totalImages.length > 9 && s2.videos.length + a2 > 7 ? (t(), n("view", E, [l("span", null, "\u5171 " + i(s2.totalImages.length) + " \u5F20", 1), m(k2, { name: "right", size: "12" })])) : o("", true)], 8, U)) : o("", true)], 64))), 128))], 2);
37
- }]]);
38
- const { componentName: B, create: F, translate: L } = v("comment-bottom"), M = F({ props: { type: { type: String, default: "base" }, info: { type: Object, default: () => {
39
- } }, operation: { type: Array, default: ["replay", "like", "more"] } }, components: {}, emits: ["clickOperate", "handleClick"], setup(e2, { emit: t2 }) {
40
- const n2 = c(false), l2 = c([]);
41
- p(() => {
42
- const t3 = ["replay", "like", "more"];
43
- e2.operation && e2.operation.forEach((e3) => {
44
- t3.includes(e3) && l2.value.push(e3);
10
+ const { componentName: componentName$3, create: create$3 } = createComponent("comment-header");
11
+ const _sfc_main$3 = create$3({
12
+ props: {
13
+ type: {
14
+ type: String,
15
+ default: "default"
16
+ },
17
+ info: {
18
+ type: Object,
19
+ default: () => {
20
+ }
21
+ },
22
+ labels: {
23
+ type: Function,
24
+ default: () => ""
25
+ }
26
+ },
27
+ components: {},
28
+ emits: ["handleClick"],
29
+ setup(props, { emit }) {
30
+ const handleClick = () => {
31
+ emit("handleClick");
32
+ };
33
+ return { handleClick };
34
+ }
35
+ });
36
+ const _hoisted_1$3 = { class: "nut-comment-header__user" };
37
+ const _hoisted_2$3 = { class: "nut-comment-header__user-avter" };
38
+ const _hoisted_3$3 = ["src"];
39
+ const _hoisted_4$3 = { class: "nut-comment-header__user-score" };
40
+ const _hoisted_5$1 = {
41
+ key: 0,
42
+ class: "nut-comment-header__time"
43
+ };
44
+ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
45
+ const _component_nut_rate = resolveComponent("nut-rate");
46
+ return openBlock(), createElementBlock("view", null, [
47
+ _ctx.info ? (openBlock(), createElementBlock("view", {
48
+ key: 0,
49
+ class: "nut-comment-header",
50
+ onClick: _cache[1] || (_cache[1] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
51
+ }, [
52
+ createElementVNode("view", _hoisted_1$3, [
53
+ createElementVNode("view", _hoisted_2$3, [
54
+ _ctx.info.avatar ? (openBlock(), createElementBlock("img", {
55
+ key: 0,
56
+ src: _ctx.info.avatar
57
+ }, null, 8, _hoisted_3$3)) : createCommentVNode("", true)
58
+ ]),
59
+ _ctx.type == "default" ? (openBlock(), createElementBlock("view", {
60
+ key: 0,
61
+ class: normalizeClass([`nut-comment-header__user-${_ctx.type}`])
62
+ }, [
63
+ createElementVNode("view", {
64
+ class: normalizeClass([`nut-comment-header__user-${_ctx.type}-name`])
65
+ }, [
66
+ createElementVNode("span", null, toDisplayString(_ctx.info.nickName), 1),
67
+ renderSlot(_ctx.$slots, "labels")
68
+ ], 2),
69
+ createElementVNode("view", _hoisted_4$3, [
70
+ createVNode(_component_nut_rate, {
71
+ modelValue: _ctx.info.score,
72
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.info.score = $event),
73
+ "icon-size": "10",
74
+ spacing: "5",
75
+ readOnly: "",
76
+ onChange: _ctx.handleClick
77
+ }, null, 8, ["modelValue", "onChange"])
78
+ ])
79
+ ], 2)) : (openBlock(), createElementBlock("view", {
80
+ key: 1,
81
+ class: normalizeClass([`nut-comment-header__user-${_ctx.type}`])
82
+ }, [
83
+ createElementVNode("span", {
84
+ class: normalizeClass([`nut-comment-header__user-${_ctx.type}-name`])
85
+ }, toDisplayString(_ctx.info.nickName), 3),
86
+ renderSlot(_ctx.$slots, "labels")
87
+ ], 2))
88
+ ]),
89
+ _ctx.info.time ? (openBlock(), createElementBlock("view", _hoisted_5$1, toDisplayString(_ctx.info.time), 1)) : createCommentVNode("", true)
90
+ ])) : createCommentVNode("", true),
91
+ _ctx.type == "complex" ? (openBlock(), createElementBlock("view", {
92
+ key: 1,
93
+ class: normalizeClass([`nut-comment-header__${_ctx.type}-score`])
94
+ }, [
95
+ createVNode(_component_nut_rate, {
96
+ modelValue: _ctx.info.score,
97
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.info.score = $event),
98
+ "icon-size": "12",
99
+ spacing: "3"
100
+ }, null, 8, ["modelValue"]),
101
+ createElementVNode("i", {
102
+ class: normalizeClass([`nut-comment-header__${_ctx.type}-score-i`])
103
+ }, null, 2),
104
+ createElementVNode("view", {
105
+ class: normalizeClass([`nut-comment-header__${_ctx.type}-score-size`])
106
+ }, toDisplayString(_ctx.info.size), 3)
107
+ ], 2)) : createCommentVNode("", true)
108
+ ]);
109
+ }
110
+ var CommentHeader = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]);
111
+ const { componentName: componentName$2, create: create$2 } = createComponent("comment-images");
112
+ const _sfc_main$2 = create$2({
113
+ props: {
114
+ type: {
115
+ type: String,
116
+ default: "one"
117
+ },
118
+ videos: {
119
+ type: Array,
120
+ default: () => []
121
+ },
122
+ images: {
123
+ type: Array,
124
+ default: () => []
125
+ }
126
+ },
127
+ components: {},
128
+ emits: ["click", "clickImages"],
129
+ setup(props, { emit }) {
130
+ const isShowImage = ref(false);
131
+ const initIndex = ref(1);
132
+ const totalImages = ref([]);
133
+ watch(() => [props.videos, props.images], (value) => {
134
+ if (value[0].length > 0) {
135
+ value[0].forEach((el) => {
136
+ el.type = "video";
137
+ });
138
+ }
139
+ totalImages.value = value[0].concat(value[1]);
140
+ }, { deep: true });
141
+ onMounted(() => {
142
+ if (props.videos.length > 0) {
143
+ props.videos.forEach((el) => {
144
+ el.type = "video";
145
+ });
146
+ }
147
+ totalImages.value = props.videos.concat(props.images);
45
148
  });
46
- });
47
- return { showPopver: n2, operate: (e3) => {
48
- e3 == "more" && (n2.value = !n2.value), t2("clickOperate", e3);
49
- }, mergeOp: l2, handleClick: () => {
50
- t2("handleClick");
51
- }, translate: L };
52
- } }), P = { class: "nut-comment-bottom" }, q = { key: 0 }, D = { class: "nut-comment-bottom__cpx" }, G = ["onClick"];
53
- var J = h(M, [["render", function(s2, c2, r2, p2, y2, g2) {
54
- const k2 = e("nut-icon");
55
- return t(), n("view", P, [l("view", { onClick: c2[0] || (c2[0] = (...e2) => s2.handleClick && s2.handleClick(...e2)), class: "nut-comment-bottom__lable" }, [s2.type != "complex" ? (t(), n("span", q, i(s2.info.size), 1)) : o("", true)]), l("view", D, [(t(true), n(u, null, d(s2.mergeOp, (e2, r3) => (t(), n("view", { key: r3, class: a(["nut-comment-bottom__cpx-item", `nut-comment-bottom__cpx-item--${e2}`]), onClick: (t2) => s2.operate(e2) }, [e2 != "more" ? (t(), n(u, { key: 0 }, [l("span", null, i(s2.info[e2]), 1), m(k2, { name: e2 == "like" ? "fabulous" : "comment" }, null, 8, ["name"])], 64)) : o("", true), e2 == "more" ? (t(), n(u, { key: 1 }, [m(k2, { name: "more-x" }), s2.showPopver ? (t(), n("view", { key: 0, class: "nut-comment-bottom__cpx-item-popover", onClick: c2[1] || (c2[1] = (e3) => s2.operate("popover")) }, i(s2.translate("complaintsText")), 1)) : o("", true)], 64)) : o("", true)], 10, G))), 128))])]);
56
- }]]);
57
- const { componentName: K, create: Q, translate: W } = v("comment"), X = Q({ props: { headerType: { type: String, default: "default" }, imagesRows: { type: String, default: "one" }, ellipsis: { type: [String, Number, Boolean], default: false }, videos: { type: Array, default: () => [] }, images: { type: Array, default: () => [] }, info: { type: Object, default: () => {
58
- } }, follow: { type: Object, default: () => {
59
- } }, labels: { type: Function, default: () => "" }, operation: { type: Array, default: ["replay", "like", "more"] } }, components: { CommentHeader: j, CommentImages: R, CommentBottom: J }, emits: ["click", "clickImages", "clickOperate"], setup: (e2, { emit: t2 }) => ({ classes: y(() => ({ [K]: true })), conEllipsis: y(() => e2.ellipsis ? e2.ellipsis : e2.headerType == "complex" ? 6 : 2), clickOperate: (e3) => {
60
- t2("clickOperate", e3);
61
- }, handleClick: () => {
62
- t2("click", e2.info);
63
- }, clickImages: (e3) => {
64
- t2("clickImages", e3);
65
- }, translate: W }) }), Y = ["innerHTML"], Z = { class: "nut-comment__follow-title" }, ee = { class: "nut-comment__follow-com" }, te = { key: 0, class: "nut-comment__follow-img" };
66
- var ne = h(X, [["render", function(c2, r2, p2, u2, d2, y2) {
67
- const v2 = e("comment-header"), h2 = e("comment-images"), _2 = e("nut-icon"), w2 = e("comment-bottom");
68
- return c2.info && Object.keys(c2.info) ? (t(), n("view", { key: 0, class: a(c2.classes) }, [m(v2, { type: c2.headerType, info: c2.info, labels: c2.labels, onHandleClick: c2.handleClick }, { labels: g(() => [s(c2.$slots, "comment-labels")]), _: 3 }, 8, ["type", "info", "labels", "onHandleClick"]), s(c2.$slots, "feature"), l("view", { class: "nut-comment__main", style: k(`-webkit-line-clamp:${c2.conEllipsis}`), onClick: r2[0] || (r2[0] = (...e2) => c2.handleClick && c2.handleClick(...e2)), innerHTML: c2.info.content.replace(/\n/g, "<br>") }, null, 12, Y), m(h2, { images: c2.images, videos: c2.videos, type: c2.imagesRows, onClickImages: c2.clickImages }, null, 8, ["images", "videos", "type", "onClickImages"]), c2.follow && c2.follow.days > 0 ? (t(), n("view", { key: 0, class: "nut-comment__follow", onClick: r2[1] || (r2[1] = (...e2) => c2.handleClick && c2.handleClick(...e2)) }, [l("view", Z, [m(_2, { size: "14", name: "joy-smile" }), f(i(c2.translate("additionalReview", c2.follow.days)), 1)]), l("view", ee, i(c2.follow.content), 1), c2.follow.images && c2.follow.images.length > 0 ? (t(), n("view", te, [f(i(c2.translate("additionalImages", c2.follow.images.length)) + " ", 1), m(_2, { size: "12", name: "right" })])) : o("", true)])) : o("", true), m(w2, { type: c2.headerType, info: c2.info, operation: c2.operation, onClickOperate: c2.clickOperate, onHandleClick: c2.handleClick }, null, 8, ["type", "info", "operation", "onClickOperate", "onHandleClick"]), s(c2.$slots, "comment-shop-reply")], 2)) : o("", true);
69
- }]]);
70
- export { ne as default };
149
+ const showImages = (type, index2) => {
150
+ const { videos, images } = props;
151
+ const i = type == "img" ? index2 - videos.length : index2;
152
+ emit("clickImages", {
153
+ type,
154
+ index: i,
155
+ value: type == "img" ? images[i] : videos[i]
156
+ });
157
+ };
158
+ return { isShowImage, initIndex, showImages, totalImages };
159
+ }
160
+ });
161
+ const _hoisted_1$2 = ["onClick"];
162
+ const _hoisted_2$2 = ["src"];
163
+ const _hoisted_3$2 = /* @__PURE__ */ createElementVNode("view", { class: "nut-comment-images__play" }, null, -1);
164
+ const _hoisted_4$2 = ["onClick"];
165
+ const _hoisted_5 = ["src"];
166
+ const _hoisted_6 = {
167
+ key: 0,
168
+ class: "nut-comment-images__mask"
169
+ };
170
+ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
171
+ const _component_nut_icon = resolveComponent("nut-icon");
172
+ return openBlock(), createElementBlock("view", {
173
+ class: normalizeClass(`nut-comment-images nut-comment-images--${_ctx.type}`)
174
+ }, [
175
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.videos, (itV, index2) => {
176
+ return openBlock(), createElementBlock("view", {
177
+ class: "nut-comment-images__item nut-comment-images__item--video",
178
+ key: itV.id,
179
+ onClick: ($event) => _ctx.showImages("video", index2, index2)
180
+ }, [
181
+ createElementVNode("img", {
182
+ src: itV.mainUrl
183
+ }, null, 8, _hoisted_2$2),
184
+ _hoisted_3$2
185
+ ], 8, _hoisted_1$2);
186
+ }), 128)),
187
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.images, (itI, index2) => {
188
+ return openBlock(), createElementBlock(Fragment, {
189
+ key: itI.id
190
+ }, [
191
+ _ctx.type == "multi" && _ctx.videos.length + index2 < 9 || _ctx.type != "multi" ? (openBlock(), createElementBlock("view", {
192
+ key: 0,
193
+ class: "nut-comment-images__item nut-comment-images__item--imgbox",
194
+ onClick: ($event) => _ctx.showImages("img", index2 + _ctx.videos.length)
195
+ }, [
196
+ createElementVNode("img", {
197
+ src: itI.smallImgUrl ? itI.smallImgUrl : itI.imgUrl
198
+ }, null, 8, _hoisted_5),
199
+ _ctx.type == "multi" && _ctx.totalImages.length > 9 && _ctx.videos.length + index2 > 7 ? (openBlock(), createElementBlock("view", _hoisted_6, [
200
+ createElementVNode("span", null, "\u5171 " + toDisplayString(_ctx.totalImages.length) + " \u5F20", 1),
201
+ createVNode(_component_nut_icon, {
202
+ name: "right",
203
+ size: "12"
204
+ })
205
+ ])) : createCommentVNode("", true)
206
+ ], 8, _hoisted_4$2)) : createCommentVNode("", true)
207
+ ], 64);
208
+ }), 128))
209
+ ], 2);
210
+ }
211
+ var CommentImages = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
212
+ const { componentName: componentName$1, create: create$1, translate: translate$1 } = createComponent("comment-bottom");
213
+ const _sfc_main$1 = create$1({
214
+ props: {
215
+ type: {
216
+ type: String,
217
+ default: "base"
218
+ },
219
+ info: {
220
+ type: Object,
221
+ default: () => {
222
+ }
223
+ },
224
+ operation: {
225
+ type: Array,
226
+ default: ["replay", "like", "more"]
227
+ }
228
+ },
229
+ components: {},
230
+ emits: ["clickOperate", "handleClick"],
231
+ setup(props, { emit }) {
232
+ const showPopver = ref(false);
233
+ const mergeOp = ref([]);
234
+ onMounted(() => {
235
+ const deOp = ["replay", "like", "more"];
236
+ if (props.operation) {
237
+ props.operation.forEach((name) => {
238
+ if (deOp.includes(name)) {
239
+ mergeOp.value.push(name);
240
+ }
241
+ });
242
+ }
243
+ });
244
+ const operate = (type) => {
245
+ if (type == "more") {
246
+ showPopver.value = !showPopver.value;
247
+ }
248
+ emit("clickOperate", type);
249
+ };
250
+ const handleClick = () => {
251
+ emit("handleClick");
252
+ };
253
+ return { showPopver, operate, mergeOp, handleClick, translate: translate$1 };
254
+ }
255
+ });
256
+ const _hoisted_1$1 = { class: "nut-comment-bottom" };
257
+ const _hoisted_2$1 = { key: 0 };
258
+ const _hoisted_3$1 = { class: "nut-comment-bottom__cpx" };
259
+ const _hoisted_4$1 = ["onClick"];
260
+ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
261
+ const _component_nut_icon = resolveComponent("nut-icon");
262
+ return openBlock(), createElementBlock("view", _hoisted_1$1, [
263
+ createElementVNode("view", {
264
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args)),
265
+ class: "nut-comment-bottom__lable"
266
+ }, [
267
+ _ctx.type != "complex" ? (openBlock(), createElementBlock("span", _hoisted_2$1, toDisplayString(_ctx.info.size), 1)) : createCommentVNode("", true)
268
+ ]),
269
+ createElementVNode("view", _hoisted_3$1, [
270
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.mergeOp, (name, i) => {
271
+ return openBlock(), createElementBlock("view", {
272
+ key: i,
273
+ class: normalizeClass(["nut-comment-bottom__cpx-item", `nut-comment-bottom__cpx-item--${name}`]),
274
+ onClick: ($event) => _ctx.operate(name)
275
+ }, [
276
+ name != "more" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
277
+ createElementVNode("span", null, toDisplayString(_ctx.info[name]), 1),
278
+ createVNode(_component_nut_icon, {
279
+ name: name == "like" ? "fabulous" : "comment"
280
+ }, null, 8, ["name"])
281
+ ], 64)) : createCommentVNode("", true),
282
+ name == "more" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
283
+ createVNode(_component_nut_icon, { name: "more-x" }),
284
+ _ctx.showPopver ? (openBlock(), createElementBlock("view", {
285
+ key: 0,
286
+ class: "nut-comment-bottom__cpx-item-popover",
287
+ onClick: _cache[1] || (_cache[1] = ($event) => _ctx.operate("popover"))
288
+ }, toDisplayString(_ctx.translate("complaintsText")), 1)) : createCommentVNode("", true)
289
+ ], 64)) : createCommentVNode("", true)
290
+ ], 10, _hoisted_4$1);
291
+ }), 128))
292
+ ])
293
+ ]);
294
+ }
295
+ var CommentBottom = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
296
+ const { componentName, create, translate } = createComponent("comment");
297
+ const _sfc_main = create({
298
+ props: {
299
+ headerType: {
300
+ type: String,
301
+ default: "default"
302
+ },
303
+ imagesRows: {
304
+ type: String,
305
+ default: "one"
306
+ },
307
+ ellipsis: {
308
+ type: [String, Number, Boolean],
309
+ default: false
310
+ },
311
+ videos: {
312
+ type: Array,
313
+ default: () => []
314
+ },
315
+ images: {
316
+ type: Array,
317
+ default: () => []
318
+ },
319
+ info: {
320
+ type: Object,
321
+ default: () => {
322
+ }
323
+ },
324
+ follow: {
325
+ type: Object,
326
+ default: () => {
327
+ }
328
+ },
329
+ labels: {
330
+ type: Function,
331
+ default: () => ""
332
+ },
333
+ operation: {
334
+ type: Array,
335
+ default: ["replay", "like", "more"]
336
+ }
337
+ },
338
+ components: {
339
+ CommentHeader,
340
+ CommentImages,
341
+ CommentBottom
342
+ },
343
+ emits: ["click", "clickImages", "clickOperate"],
344
+ setup(props, { emit }) {
345
+ const classes = computed(() => {
346
+ const prefixCls = componentName;
347
+ return {
348
+ [prefixCls]: true
349
+ };
350
+ });
351
+ const conEllipsis = computed(() => {
352
+ if (props.ellipsis)
353
+ return props.ellipsis;
354
+ return props.headerType == "complex" ? 6 : 2;
355
+ });
356
+ const clickOperate = (t) => {
357
+ emit("clickOperate", t);
358
+ };
359
+ const handleClick = () => {
360
+ emit("click", props.info);
361
+ };
362
+ const clickImages = (value) => {
363
+ emit("clickImages", value);
364
+ };
365
+ return { classes, conEllipsis, clickOperate, handleClick, clickImages, translate };
366
+ }
367
+ });
368
+ const _hoisted_1 = ["innerHTML"];
369
+ const _hoisted_2 = { class: "nut-comment__follow-title" };
370
+ const _hoisted_3 = { class: "nut-comment__follow-com" };
371
+ const _hoisted_4 = {
372
+ key: 0,
373
+ class: "nut-comment__follow-img"
374
+ };
375
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
376
+ const _component_comment_header = resolveComponent("comment-header");
377
+ const _component_comment_images = resolveComponent("comment-images");
378
+ const _component_nut_icon = resolveComponent("nut-icon");
379
+ const _component_comment_bottom = resolveComponent("comment-bottom");
380
+ return _ctx.info && Object.keys(_ctx.info) ? (openBlock(), createElementBlock("view", {
381
+ key: 0,
382
+ class: normalizeClass(_ctx.classes)
383
+ }, [
384
+ createVNode(_component_comment_header, {
385
+ type: _ctx.headerType,
386
+ info: _ctx.info,
387
+ labels: _ctx.labels,
388
+ onHandleClick: _ctx.handleClick
389
+ }, {
390
+ labels: withCtx(() => [
391
+ renderSlot(_ctx.$slots, "comment-labels")
392
+ ]),
393
+ _: 3
394
+ }, 8, ["type", "info", "labels", "onHandleClick"]),
395
+ renderSlot(_ctx.$slots, "feature"),
396
+ createElementVNode("view", {
397
+ class: "nut-comment__main",
398
+ style: normalizeStyle(`-webkit-line-clamp:${_ctx.conEllipsis}`),
399
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args)),
400
+ innerHTML: _ctx.info.content.replace(/\n/g, "<br>")
401
+ }, null, 12, _hoisted_1),
402
+ createVNode(_component_comment_images, {
403
+ images: _ctx.images,
404
+ videos: _ctx.videos,
405
+ type: _ctx.imagesRows,
406
+ onClickImages: _ctx.clickImages
407
+ }, null, 8, ["images", "videos", "type", "onClickImages"]),
408
+ _ctx.follow && _ctx.follow.days > 0 ? (openBlock(), createElementBlock("view", {
409
+ key: 0,
410
+ class: "nut-comment__follow",
411
+ onClick: _cache[1] || (_cache[1] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
412
+ }, [
413
+ createElementVNode("view", _hoisted_2, [
414
+ createVNode(_component_nut_icon, {
415
+ size: "14",
416
+ name: "joy-smile"
417
+ }),
418
+ createTextVNode(toDisplayString(_ctx.translate("additionalReview", _ctx.follow.days)), 1)
419
+ ]),
420
+ createElementVNode("view", _hoisted_3, toDisplayString(_ctx.follow.content), 1),
421
+ _ctx.follow.images && _ctx.follow.images.length > 0 ? (openBlock(), createElementBlock("view", _hoisted_4, [
422
+ createTextVNode(toDisplayString(_ctx.translate("additionalImages", _ctx.follow.images.length)) + " ", 1),
423
+ createVNode(_component_nut_icon, {
424
+ size: "12",
425
+ name: "right"
426
+ })
427
+ ])) : createCommentVNode("", true)
428
+ ])) : createCommentVNode("", true),
429
+ createVNode(_component_comment_bottom, {
430
+ type: _ctx.headerType,
431
+ info: _ctx.info,
432
+ operation: _ctx.operation,
433
+ onClickOperate: _ctx.clickOperate,
434
+ onHandleClick: _ctx.handleClick
435
+ }, null, 8, ["type", "info", "operation", "onClickOperate", "onHandleClick"]),
436
+ renderSlot(_ctx.$slots, "comment-shop-reply")
437
+ ], 2)) : createCommentVNode("", true);
438
+ }
439
+ var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
440
+ export { index as default };
@@ -0,0 +1,25 @@
1
+ /*!
2
+ * @nutui/nutui v3.1.23-beta.0 Mon Jun 27 2022 17:55:50 GMT+0800 (中国标准时间)
3
+ * (c) 2022 @jdf2e.
4
+ * Released under the MIT License.
5
+ */
6
+ import { c as createComponent } from "./component.js";
7
+ import { h } from "vue";
8
+ import "../locale/lang";
9
+ const component = {
10
+ props: {
11
+ theme: { type: String, default: "" },
12
+ tag: { type: String, default: "div" }
13
+ },
14
+ setup(props, { slots }) {
15
+ return () => {
16
+ var _a;
17
+ return h(props.tag, {
18
+ class: `nut-theme-${props.theme}`
19
+ }, (_a = slots.default) == null ? void 0 : _a.call(slots));
20
+ };
21
+ }
22
+ };
23
+ const { componentName, create } = createComponent("config-provider");
24
+ const _sfc_main = create(component);
25
+ export { _sfc_main as default };