@nutui/nutui 3.1.21 → 3.1.22-beta.5

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 (233) hide show
  1. package/dist/nutui.es.js +4203 -19263
  2. package/dist/nutui.umd.js +4208 -19368
  3. package/dist/packages/_es/ActionSheet.js +17 -167
  4. package/dist/packages/_es/Address.js +110 -552
  5. package/dist/packages/_es/AddressList.js +113 -613
  6. package/dist/packages/_es/Animate.js +22 -0
  7. package/dist/packages/_es/Audio.js +53 -274
  8. package/dist/packages/_es/AudioOperate.js +13 -121
  9. package/dist/packages/_es/Avatar.js +38 -177
  10. package/dist/packages/_es/AvatarGroup.js +14 -73
  11. package/dist/packages/_es/BackTop.js +43 -156
  12. package/dist/packages/_es/Badge.js +14 -86
  13. package/dist/packages/_es/Barrage.js +41 -120
  14. package/dist/packages/_es/Button.js +23 -128
  15. package/dist/packages/_es/Calendar.js +30 -237
  16. package/dist/packages/_es/CalendarItem.js +2 -1
  17. package/dist/packages/_es/Card.js +10 -107
  18. package/dist/packages/_es/Cascader.js +147 -523
  19. package/dist/packages/_es/Category.js +15 -58
  20. package/dist/packages/_es/CategoryPane.js +11 -111
  21. package/dist/packages/_es/Cell.js +21 -100
  22. package/dist/packages/_es/CellGroup.js +9 -44
  23. package/dist/packages/_es/Checkbox.js +31 -113
  24. package/dist/packages/_es/CheckboxGroup.js +29 -58
  25. package/dist/packages/_es/CircleProgress.js +28 -151
  26. package/dist/packages/_es/Col.js +14 -56
  27. package/dist/packages/_es/Collapse.js +32 -84
  28. package/dist/packages/_es/CollapseItem.js +59 -272
  29. package/dist/packages/_es/Comment.js +64 -434
  30. package/dist/packages/_es/ConfigProvider.js +13 -0
  31. package/dist/packages/_es/CountDown.js +56 -256
  32. package/dist/packages/_es/CountUp.js +140 -556
  33. package/dist/packages/_es/DatePicker.js +98 -332
  34. package/dist/packages/_es/Dialog.js +60 -271
  35. package/dist/packages/_es/Divider.js +13 -82
  36. package/dist/packages/_es/Drag.js +56 -197
  37. package/dist/packages/_es/Ecard.js +24 -159
  38. package/dist/packages/_es/Elevator.js +58 -212
  39. package/dist/packages/_es/Ellipsis.js +64 -0
  40. package/dist/packages/_es/Empty.js +12 -71
  41. package/dist/packages/_es/FixedNav.js +15 -122
  42. package/dist/packages/_es/Form.js +64 -151
  43. package/dist/packages/_es/FormItem.js +15 -110
  44. package/dist/packages/_es/Grid.js +5 -6
  45. package/dist/packages/_es/GridItem.js +33 -144
  46. package/dist/packages/_es/Icon.js +15 -40
  47. package/dist/packages/_es/Image.js +31 -0
  48. package/dist/packages/_es/ImagePreview.js +77 -309
  49. package/dist/packages/_es/Indicator.js +15 -62
  50. package/dist/packages/_es/InfiniteLoading.js +57 -268
  51. package/dist/packages/_es/Input.js +51 -413
  52. package/dist/packages/_es/InputNumber.js +41 -160
  53. package/dist/packages/_es/Layout.js +4 -5
  54. package/dist/packages/_es/List.js +18 -124
  55. package/dist/packages/_es/Menu.js +45 -118
  56. package/dist/packages/_es/MenuItem.js +37 -162
  57. package/dist/packages/_es/Navbar.js +30 -192
  58. package/dist/packages/_es/NoticeBar.js +74 -397
  59. package/dist/packages/_es/Notify.js +72 -246
  60. package/dist/packages/_es/NumberKeyboard.js +41 -272
  61. package/dist/packages/_es/OldPicker.js +131 -474
  62. package/dist/packages/_es/OverLay.js +24 -113
  63. package/dist/packages/_es/Pagination.js +39 -157
  64. package/dist/packages/_es/Picker.js +129 -469
  65. package/dist/packages/_es/Popover.js +318 -975
  66. package/dist/packages/_es/Popup.js +55 -313
  67. package/dist/packages/_es/Price.js +16 -118
  68. package/dist/packages/_es/Progress.js +14 -146
  69. package/dist/packages/_es/PullRefresh.js +84 -354
  70. package/dist/packages/_es/Radio.js +22 -90
  71. package/dist/packages/_es/RadioGroup.js +8 -37
  72. package/dist/packages/_es/Range.js +83 -427
  73. package/dist/packages/_es/Rate.js +35 -137
  74. package/dist/packages/_es/Row.js +22 -64
  75. package/dist/packages/_es/SearchBar.js +37 -257
  76. package/dist/packages/_es/ShortPassword.js +35 -225
  77. package/dist/packages/_es/SideNavBar.js +24 -99
  78. package/dist/packages/_es/SideNavBarItem.js +11 -46
  79. package/dist/packages/_es/Signature.js +41 -179
  80. package/dist/packages/_es/Skeleton.js +20 -136
  81. package/dist/packages/_es/Sku.js +84 -509
  82. package/dist/packages/_es/Step.js +20 -133
  83. package/dist/packages/_es/Steps.js +18 -53
  84. package/dist/packages/_es/Sticky.js +53 -138
  85. package/dist/packages/_es/SubSideNavBar.js +17 -100
  86. package/dist/packages/_es/Swipe.js +41 -197
  87. package/dist/packages/_es/Swiper.js +121 -433
  88. package/dist/packages/_es/SwiperItem.js +22 -53
  89. package/dist/packages/_es/Switch.js +21 -116
  90. package/dist/packages/_es/TabPane.js +12 -39
  91. package/dist/packages/_es/Tabbar.js +17 -72
  92. package/dist/packages/_es/TabbarItem.js +29 -151
  93. package/dist/packages/_es/Table.js +18 -196
  94. package/dist/packages/_es/Tabs.js +43 -217
  95. package/dist/packages/_es/Tag.js +20 -97
  96. package/dist/packages/_es/TextArea.js +42 -160
  97. package/dist/packages/_es/TimeDetail.js +18 -98
  98. package/dist/packages/_es/TimePannel.js +14 -66
  99. package/dist/packages/_es/TimeSelect.js +15 -103
  100. package/dist/packages/_es/Toast.js +71 -329
  101. package/dist/packages/_es/Uploader.js +104 -468
  102. package/dist/packages/_es/Video.js +74 -350
  103. package/dist/packages/_es/common.js +38 -128
  104. package/dist/packages/_es/component.js +35 -76
  105. package/dist/packages/_es/index.js +5 -6
  106. package/dist/packages/_es/index2.js +9 -30
  107. package/dist/packages/_es/index3.js +6 -8
  108. package/dist/packages/_es/index4.js +13 -58
  109. package/dist/packages/_es/index5.js +164 -682
  110. package/dist/packages/_es/plugin-vue_export-helper.js +7 -8
  111. package/dist/packages/_es/pxCheck.js +3 -5
  112. package/dist/packages/_es/raf.js +8 -15
  113. package/dist/packages/animate/index.scss +299 -0
  114. package/dist/packages/button/index.scss +2 -1
  115. package/dist/packages/cell/index.scss +18 -1
  116. package/dist/packages/checkbox/index.scss +16 -0
  117. package/dist/packages/configprovider/index.scss +2 -0
  118. package/dist/packages/dialog/index.scss +1 -0
  119. package/dist/packages/elevator/index.scss +21 -0
  120. package/dist/packages/ellipsis/index.scss +12 -0
  121. package/dist/packages/formitem/index.scss +12 -0
  122. package/dist/packages/griditem/index.scss +11 -0
  123. package/dist/packages/image/index.scss +39 -0
  124. package/dist/packages/imagepreview/index.scss +21 -2
  125. package/dist/packages/input/index.scss +26 -1
  126. package/dist/packages/inputnumber/index.scss +21 -0
  127. package/dist/packages/locale/lang/baseLang.d.ts +1 -0
  128. package/dist/packages/locale/lang/baseLang.js +3 -3
  129. package/dist/packages/locale/lang/en-US.d.ts +8 -0
  130. package/dist/packages/locale/lang/en-US.js +5 -97
  131. package/dist/packages/locale/lang/id-ID.d.ts +8 -0
  132. package/dist/packages/locale/lang/id-ID.js +5 -97
  133. package/dist/packages/locale/lang/index.js +16 -38
  134. package/dist/packages/locale/lang/zh-CN.d.ts +8 -0
  135. package/dist/packages/locale/lang/zh-CN.js +5 -97
  136. package/dist/packages/locale/lang/zh-TW.d.ts +8 -0
  137. package/dist/packages/locale/lang/zh-TW.js +5 -97
  138. package/dist/packages/menu/index.scss +45 -36
  139. package/dist/packages/menuitem/index.scss +4 -0
  140. package/dist/packages/navbar/index.scss +9 -0
  141. package/dist/packages/pagination/index.scss +19 -0
  142. package/dist/packages/radio/index.scss +19 -0
  143. package/dist/packages/range/index.scss +19 -0
  144. package/dist/packages/rate/index.scss +1 -1
  145. package/dist/packages/searchbar/index.scss +21 -0
  146. package/dist/packages/switch/index.scss +4 -3
  147. package/dist/packages/tabbar/index.scss +5 -0
  148. package/dist/packages/tabbaritem/index.scss +7 -0
  149. package/dist/packages/tabpane/index.scss +6 -0
  150. package/dist/packages/tabs/index.scss +22 -0
  151. package/dist/packages/textarea/index.scss +8 -0
  152. package/dist/smartips/attributes.json +192 -12
  153. package/dist/smartips/tags.json +70 -10
  154. package/dist/smartips/web-types.json +6945 -0
  155. package/dist/style.css +1 -1
  156. package/dist/style.es.js +1 -1
  157. package/dist/styles/font/config.json +3 -1
  158. package/dist/styles/font/demo_index.html +49 -3
  159. package/dist/styles/font/iconfont.css +11 -3
  160. package/dist/styles/font/iconfont.js +15 -15
  161. package/dist/styles/font/iconfont.json +14 -0
  162. package/dist/styles/font/iconfont.ttf +0 -0
  163. package/dist/styles/font/iconfont.woff +0 -0
  164. package/dist/styles/font/iconfont.woff2 +0 -0
  165. package/dist/styles/themes/default.scss +54 -50
  166. package/dist/styles/themes/jdb.scss +54 -50
  167. package/dist/styles/themes/jdt.scss +54 -50
  168. package/dist/styles/variables-jdb.scss +19 -1
  169. package/dist/styles/variables-jdt.scss +19 -1
  170. package/dist/styles/variables.scss +22 -1
  171. package/dist/types/__VUE/address/index.vue.d.ts +2 -2
  172. package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +1 -0
  173. package/dist/types/__VUE/animate/index.vue.d.ts +48 -0
  174. package/dist/types/__VUE/animate/type.d.ts +6 -0
  175. package/dist/types/__VUE/audiooperate/index.vue.d.ts +1 -0
  176. package/dist/types/__VUE/avatar/index.vue.d.ts +7 -7
  177. package/dist/types/__VUE/backtop/index.vue.d.ts +2 -2
  178. package/dist/types/__VUE/badge/index.vue.d.ts +2 -2
  179. package/dist/types/__VUE/button/index.vue.d.ts +2 -2
  180. package/dist/types/__VUE/calendaritem/index.vue.d.ts +10 -2
  181. package/dist/types/__VUE/cell/index.vue.d.ts +13 -6
  182. package/dist/types/__VUE/checkbox/common.d.ts +59 -0
  183. package/dist/types/__VUE/checkbox/index.vue.d.ts +20 -7
  184. package/dist/types/__VUE/checkboxgroup/index.vue.d.ts +7 -0
  185. package/dist/types/__VUE/circleprogress/index.vue.d.ts +2 -2
  186. package/dist/types/__VUE/collapse/index.vue.d.ts +5 -3
  187. package/dist/types/__VUE/collapseitem/index.vue.d.ts +2 -2
  188. package/dist/types/__VUE/configprovider/common.d.ts +20 -0
  189. package/dist/types/__VUE/configprovider/index.vue.d.ts +33 -0
  190. package/dist/types/__VUE/datepicker/index.vue.d.ts +5 -5
  191. package/dist/types/__VUE/datepicker/type.d.ts +6 -0
  192. package/dist/types/__VUE/dialog/index.d.ts +9 -2
  193. package/dist/types/__VUE/dialog/index.vue.d.ts +26 -17
  194. package/dist/types/__VUE/ecard/index.vue.d.ts +3 -3
  195. package/dist/types/__VUE/elevator/index.vue.d.ts +29 -0
  196. package/dist/types/__VUE/ellipsis/index.vue.d.ts +72 -0
  197. package/dist/types/__VUE/empty/index.vue.d.ts +2 -2
  198. package/dist/types/__VUE/formitem/index.vue.d.ts +3 -10
  199. package/dist/types/__VUE/grid/common.d.ts +3 -3
  200. package/dist/types/__VUE/grid/index.vue.d.ts +5 -5
  201. package/dist/types/__VUE/griditem/index.vue.d.ts +1 -1
  202. package/dist/types/__VUE/image/index.vue.d.ts +105 -0
  203. package/dist/types/__VUE/image/type.d.ts +6 -0
  204. package/dist/types/__VUE/imagepreview/index.vue.d.ts +36 -2
  205. package/dist/types/__VUE/infiniteloading/index.vue.d.ts +6 -6
  206. package/dist/types/__VUE/input/index.vue.d.ts +4 -4
  207. package/dist/types/__VUE/menu/index.vue.d.ts +29 -2
  208. package/dist/types/__VUE/menuitem/index.vue.d.ts +16 -7
  209. package/dist/types/__VUE/menuitem/type.d.ts +8 -0
  210. package/dist/types/__VUE/noticebar/index.vue.d.ts +3 -3
  211. package/dist/types/__VUE/picker/Column.vue.d.ts +1 -1
  212. package/dist/types/__VUE/picker/index.vue.d.ts +1 -1
  213. package/dist/types/__VUE/popover/index.vue.d.ts +2 -2
  214. package/dist/types/__VUE/range/index.vue.d.ts +1 -1
  215. package/dist/types/__VUE/rate/common.d.ts +149 -0
  216. package/dist/types/__VUE/rate/index.vue.d.ts +17 -7
  217. package/dist/types/__VUE/searchbar/index.vue.d.ts +2 -2
  218. package/dist/types/__VUE/skeleton/common.d.ts +2 -4
  219. package/dist/types/__VUE/step/index.vue.d.ts +2 -2
  220. package/dist/types/__VUE/swiper/index.vue.d.ts +4 -4
  221. package/dist/types/__VUE/switch/index.vue.d.ts +2 -2
  222. package/dist/types/__VUE/tabbaritem/index.vue.d.ts +2 -2
  223. package/dist/types/__VUE/tabs/common.d.ts +2 -2
  224. package/dist/types/__VUE/textarea/index.vue.d.ts +2 -2
  225. package/dist/types/__VUE/timeselect/index.vue.d.ts +8 -0
  226. package/dist/types/__VUE/toast/index.vue.d.ts +2 -2
  227. package/dist/types/__VUE/uploader/index.vue.d.ts +4 -4
  228. package/dist/types/__VUE/uploader/type.d.ts +2 -1
  229. package/dist/types/__VUE/uploader/uploader.d.ts +1 -0
  230. package/dist/types/__VUE/video/index.vue.d.ts +1 -1
  231. package/dist/types/index.d.ts +1 -1
  232. package/dist/types/nutui.d.ts +5 -1
  233. package/package.json +7 -3
@@ -1,440 +1,70 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.21 Mon May 30 2022 20:20:01 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
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";
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";
9
9
  import "../locale/lang";
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);
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);
148
45
  });
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 };
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 };
@@ -0,0 +1,13 @@
1
+ /*!
2
+ * @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
3
+ * (c) 2022 @jdf2e.
4
+ * Released under the MIT License.
5
+ */
6
+ import { c as t } from "./component.js";
7
+ import { h as e } from "vue";
8
+ import "../locale/lang";
9
+ const o = { props: { theme: { type: String, default: "" }, tag: { type: String, default: "div" } }, setup: (t2, { slots: o2 }) => () => {
10
+ var _a;
11
+ return e(t2.tag, { class: `nut-theme-${t2.theme}` }, (_a = o2.default) == null ? void 0 : _a.call(o2));
12
+ } }, { componentName: a, create: p } = t("config-provider"), r = p(o);
13
+ export { r as default };