@nutui/nutui 3.1.19-beta.7 → 3.1.20-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.
- package/CHANGELOG.md +49 -0
- package/README.md +1 -1
- package/dist/nutui.es.js +3329 -1681
- package/dist/nutui.umd.js +3336 -1682
- package/dist/packages/_es/ActionSheet.js +19 -23
- package/dist/packages/_es/Address.js +17 -13
- package/dist/packages/_es/AddressList.js +616 -0
- package/dist/packages/_es/Audio.js +2 -1
- package/dist/packages/_es/AudioOperate.js +2 -1
- package/dist/packages/_es/Avatar.js +120 -24
- package/dist/packages/_es/AvatarGroup.js +78 -0
- package/dist/packages/_es/BackTop.js +2 -1
- package/dist/packages/_es/Badge.js +2 -1
- package/dist/packages/_es/Barrage.js +2 -1
- package/dist/packages/_es/Button.js +2 -1
- package/dist/packages/_es/Calendar.js +2 -1
- package/dist/packages/_es/CalendarItem.js +2 -1
- package/dist/packages/_es/Card.js +13 -5
- package/dist/packages/_es/Cascader.js +30 -31
- package/dist/packages/_es/Category.js +63 -0
- package/dist/packages/_es/CategoryPane.js +116 -0
- package/dist/packages/_es/Cell.js +2 -1
- package/dist/packages/_es/CellGroup.js +2 -1
- package/dist/packages/_es/Checkbox.js +2 -1
- package/dist/packages/_es/CheckboxGroup.js +2 -1
- package/dist/packages/_es/CircleProgress.js +114 -67
- package/dist/packages/_es/Col.js +12 -4
- package/dist/packages/_es/Collapse.js +2 -1
- package/dist/packages/_es/CollapseItem.js +13 -2
- package/dist/packages/_es/Comment.js +440 -0
- package/dist/packages/_es/CountDown.js +175 -137
- package/dist/packages/_es/CountUp.js +2 -1
- package/dist/packages/_es/DatePicker.js +40 -12
- package/dist/packages/_es/Dialog.js +36 -44
- package/dist/packages/_es/Divider.js +2 -1
- package/dist/packages/_es/Drag.js +2 -1
- package/dist/packages/_es/Ecard.js +22 -11
- package/dist/packages/_es/Elevator.js +2 -1
- package/dist/packages/_es/Empty.js +2 -1
- package/dist/packages/_es/FixedNav.js +2 -1
- package/dist/packages/_es/Form.js +2 -1
- package/dist/packages/_es/FormItem.js +6 -4
- package/dist/packages/_es/Grid.js +2 -1
- package/dist/packages/_es/GridItem.js +2 -1
- package/dist/packages/_es/Icon.js +2 -1
- package/dist/packages/_es/ImagePreview.js +11 -14
- package/dist/packages/_es/Indicator.js +2 -1
- package/dist/packages/_es/InfiniteLoading.js +11 -8
- package/dist/packages/_es/Input.js +5 -3
- package/dist/packages/_es/InputNumber.js +2 -1
- package/dist/packages/_es/Layout.js +2 -1
- package/dist/packages/_es/List.js +7 -3
- package/dist/packages/_es/Menu.js +2 -1
- package/dist/packages/_es/MenuItem.js +2 -1
- package/dist/packages/_es/Navbar.js +2 -1
- package/dist/packages/_es/NoticeBar.js +2 -1
- package/dist/packages/_es/Notify.js +41 -23
- package/dist/packages/_es/NumberKeyboard.js +2 -1
- package/dist/packages/_es/OldPicker.js +2 -1
- package/dist/packages/_es/OverLay.js +2 -1
- package/dist/packages/_es/Pagination.js +2 -1
- package/dist/packages/_es/Picker.js +9 -6
- package/dist/packages/_es/Popover.js +2 -1
- package/dist/packages/_es/Popup.js +7 -1
- package/dist/packages/_es/Price.js +2 -1
- package/dist/packages/_es/Progress.js +19 -4
- package/dist/packages/_es/PullRefresh.js +2 -1
- package/dist/packages/_es/Radio.js +2 -1
- package/dist/packages/_es/RadioGroup.js +2 -1
- package/dist/packages/_es/Range.js +2 -1
- package/dist/packages/_es/Rate.js +2 -1
- package/dist/packages/_es/Row.js +12 -4
- package/dist/packages/_es/SearchBar.js +2 -1
- package/dist/packages/_es/ShortPassword.js +2 -1
- package/dist/packages/_es/SideNavBar.js +2 -1
- package/dist/packages/_es/SideNavBarItem.js +2 -1
- package/dist/packages/_es/Signature.js +9 -10
- package/dist/packages/_es/Skeleton.js +2 -1
- package/dist/packages/_es/Sku.js +17 -14
- package/dist/packages/_es/Step.js +2 -1
- package/dist/packages/_es/Steps.js +2 -1
- package/dist/packages/_es/Sticky.js +2 -1
- package/dist/packages/_es/SubSideNavBar.js +2 -1
- package/dist/packages/_es/Swipe.js +2 -1
- package/dist/packages/_es/Swiper.js +2 -1
- package/dist/packages/_es/SwiperItem.js +2 -1
- package/dist/packages/_es/Switch.js +2 -1
- package/dist/packages/_es/TabPane.js +2 -1
- package/dist/packages/_es/Tabbar.js +2 -1
- package/dist/packages/_es/TabbarItem.js +2 -1
- package/dist/packages/_es/Table.js +21 -18
- package/dist/packages/_es/Tabs.js +27 -24
- package/dist/packages/_es/Tag.js +2 -1
- package/dist/packages/_es/TextArea.js +4 -3
- package/dist/packages/_es/TimeDetail.js +2 -1
- package/dist/packages/_es/TimePannel.js +2 -1
- package/dist/packages/_es/TimeSelect.js +7 -5
- package/dist/packages/_es/Toast.js +2 -1
- package/dist/packages/_es/Uploader.js +43 -52
- package/dist/packages/_es/Video.js +2 -1
- package/dist/packages/_es/common.js +1 -1
- package/dist/packages/_es/component.js +27 -113
- package/dist/packages/_es/index.js +1 -1
- package/dist/packages/_es/index2.js +1 -1
- package/dist/packages/_es/index3.js +1 -1
- package/dist/packages/_es/index4.js +1 -1
- package/dist/packages/_es/index5.js +1 -1
- package/dist/packages/_es/plugin-vue_export-helper.js +1 -1
- package/dist/packages/_es/pxCheck.js +1 -1
- package/dist/packages/_es/raf.js +1 -1
- package/dist/packages/_es/style.css +111 -0
- package/dist/packages/actionsheet/index.scss +0 -4
- package/dist/packages/addresslist/index.scss +144 -0
- package/dist/packages/avatar/index.scss +10 -5
- package/dist/packages/avatargroup/index.scss +14 -0
- package/dist/packages/category/index.scss +38 -0
- package/dist/packages/categorypane/index.scss +124 -0
- package/dist/packages/circleprogress/index.scss +12 -53
- package/dist/packages/col/index.scss +2 -2
- package/dist/packages/collapseitem/index.scss +12 -2
- package/dist/packages/comment/index.scss +353 -0
- package/dist/packages/ecard/index.scss +2 -2
- package/dist/packages/input/index.scss +18 -2
- package/dist/packages/locale/index.d.ts +3 -0
- package/dist/packages/locale/index.scss +1 -0
- package/dist/packages/locale/lang/baseLang.js +8 -0
- package/dist/packages/locale/lang/en-US.js +91 -0
- package/dist/packages/locale/lang/index.js +48 -0
- package/dist/packages/locale/lang/index.scss +1 -0
- package/dist/packages/locale/lang/zh-CN.js +91 -0
- package/dist/packages/locale/lang/zh-TW.js +91 -0
- package/dist/packages/locale/locale/index.d.ts +8 -0
- package/dist/packages/locale/locale/lang/baseLang.d.ts +82 -0
- package/dist/packages/locale/locale/lang/en-US.d.ts +83 -0
- package/dist/packages/locale/locale/lang/zh-CN.d.ts +83 -0
- package/dist/packages/locale/locale/lang/zh-TW.d.ts +83 -0
- package/dist/packages/notify/index.scss +2 -0
- package/dist/packages/popup/index.scss +4 -0
- package/dist/smartips/attributes.json +2542 -0
- package/dist/smartips/tags.json +955 -0
- package/dist/style.css +1 -1
- package/dist/styles/font/config.json +5 -0
- package/dist/styles/themes/default.scss +51 -46
- package/dist/styles/themes/jdt.scss +51 -46
- package/dist/styles/variables-jdt.scss +22 -3
- package/dist/styles/variables.scss +21 -2
- package/dist/types/__VUE/actionsheet/index.d.ts +14 -14
- package/dist/types/__VUE/address/index.d.ts +15 -5
- package/dist/types/__VUE/addresslist/components/GeneralShell.d.ts +35 -0
- package/dist/types/__VUE/addresslist/components/ItemContents.d.ts +42 -0
- package/dist/types/__VUE/addresslist/components/LongPressShell.d.ts +47 -0
- package/dist/types/__VUE/addresslist/components/SwipeShell.d.ts +37 -0
- package/dist/types/__VUE/addresslist/index.d.ts +81 -0
- package/dist/types/__VUE/audio/index.d.ts +3 -3
- package/dist/types/__VUE/audiooperate/index.d.ts +3 -3
- package/dist/types/__VUE/avatar/index.d.ts +48 -4
- package/dist/types/__VUE/avatargroup/index.d.ts +93 -0
- package/dist/types/__VUE/backtop/index.d.ts +3 -3
- package/dist/types/__VUE/badge/index.d.ts +3 -3
- package/dist/types/__VUE/barrage/index.d.ts +3 -3
- package/dist/types/__VUE/button/index.d.ts +3 -3
- package/dist/types/__VUE/calendar/index.d.ts +4 -4
- package/dist/types/__VUE/calendaritem/index.d.ts +3 -3
- package/dist/types/__VUE/card/index.d.ts +12 -3
- package/dist/types/__VUE/cascader/cascader-item.d.ts +3 -3
- package/dist/types/__VUE/cascader/index.d.ts +167 -3
- package/dist/types/__VUE/cascader/tree.d.ts +0 -1
- package/dist/types/__VUE/category/index.d.ts +38 -0
- package/dist/types/__VUE/categorypane/index.d.ts +45 -0
- package/dist/types/__VUE/cell/index.d.ts +3 -3
- package/dist/types/__VUE/cellgroup/index.d.ts +3 -3
- package/dist/types/__VUE/checkbox/index.d.ts +3 -3
- package/dist/types/__VUE/checkboxgroup/index.d.ts +3 -3
- package/dist/types/__VUE/circleprogress/index.d.ts +58 -30
- package/dist/types/__VUE/col/index.d.ts +8 -5
- package/dist/types/__VUE/collapse/index.d.ts +4 -4
- package/dist/types/__VUE/collapseitem/index.d.ts +3 -3
- package/dist/types/__VUE/comment/components/CmtBottom.d.ts +52 -0
- package/dist/types/__VUE/comment/components/CmtHeader.d.ts +47 -0
- package/dist/types/__VUE/comment/components/CmtImages.d.ts +51 -0
- package/dist/types/__VUE/comment/index.d.ts +110 -0
- package/dist/types/__VUE/countdown/index.d.ts +81 -67
- package/dist/types/__VUE/countdown/util.d.ts +6 -0
- package/dist/types/__VUE/countup/index.d.ts +3 -3
- package/dist/types/__VUE/datepicker/index.d.ts +13 -4
- package/dist/types/__VUE/dialog/index.d.ts +15 -15
- package/dist/types/__VUE/divider/index.d.ts +3 -3
- package/dist/types/__VUE/drag/index.d.ts +3 -3
- package/dist/types/__VUE/ecard/index.d.ts +4 -3
- package/dist/types/__VUE/elevator/index.d.ts +4 -4
- package/dist/types/__VUE/empty/index.d.ts +3 -3
- package/dist/types/__VUE/fixednav/index.d.ts +4 -4
- package/dist/types/__VUE/form/index.d.ts +3 -3
- package/dist/types/__VUE/formitem/index.d.ts +3 -3
- package/dist/types/__VUE/grid/index.d.ts +3 -3
- package/dist/types/__VUE/griditem/index.d.ts +3 -3
- package/dist/types/__VUE/icon/index.d.ts +3 -3
- package/dist/types/__VUE/imagepreview/index.d.ts +3 -3
- package/dist/types/__VUE/indicator/index.d.ts +3 -3
- package/dist/types/__VUE/infiniteloading/index.d.ts +7 -7
- package/dist/types/__VUE/input/index.d.ts +3 -3
- package/dist/types/__VUE/inputnumber/index.d.ts +3 -3
- package/dist/types/__VUE/layout/index.d.ts +3 -3
- package/dist/types/__VUE/list/index.d.ts +12 -4
- package/dist/types/__VUE/menu/index.d.ts +4 -4
- package/dist/types/__VUE/menuitem/index.d.ts +3 -3
- package/dist/types/__VUE/navbar/index.d.ts +3 -3
- package/dist/types/__VUE/noticebar/index.d.ts +5 -5
- package/dist/types/__VUE/notify/index.d.ts +13 -3
- package/dist/types/__VUE/numberkeyboard/index.d.ts +5 -5
- package/dist/types/__VUE/oldpicker/Column.d.ts +3 -3
- package/dist/types/__VUE/oldpicker/index.d.ts +14 -5
- package/dist/types/__VUE/overlay/index.d.ts +3 -3
- package/dist/types/__VUE/pagination/index.d.ts +3 -3
- package/dist/types/__VUE/picker/Column.d.ts +3 -3
- package/dist/types/__VUE/picker/index.d.ts +14 -5
- package/dist/types/__VUE/popover/index.d.ts +14 -5
- package/dist/types/__VUE/popup/index.d.ts +15 -6
- package/dist/types/__VUE/price/index.d.ts +3 -3
- package/dist/types/__VUE/progress/index.d.ts +4 -3
- package/dist/types/__VUE/pullrefresh/index.d.ts +3 -3
- package/dist/types/__VUE/radio/index.d.ts +3 -3
- package/dist/types/__VUE/radiogroup/index.d.ts +3 -3
- package/dist/types/__VUE/range/index.d.ts +3 -3
- package/dist/types/__VUE/rate/index.d.ts +3 -3
- package/dist/types/__VUE/row/index.d.ts +8 -5
- package/dist/types/__VUE/searchbar/index.d.ts +3 -3
- package/dist/types/__VUE/shortpassword/index.d.ts +4 -4
- package/dist/types/__VUE/sidenavbar/index.d.ts +3 -3
- package/dist/types/__VUE/sidenavbaritem/index.d.ts +3 -3
- package/dist/types/__VUE/signature/index.d.ts +4 -3
- package/dist/types/__VUE/skeleton/index.d.ts +3 -3
- package/dist/types/__VUE/sku/components/SkuHeader.d.ts +4 -3
- package/dist/types/__VUE/sku/components/SkuOperate.d.ts +3 -3
- package/dist/types/__VUE/sku/components/SkuSelect.d.ts +3 -3
- package/dist/types/__VUE/sku/components/SkuStepper.d.ts +3 -3
- package/dist/types/__VUE/sku/index.d.ts +15 -5
- package/dist/types/__VUE/step/index.d.ts +3 -3
- package/dist/types/__VUE/steps/index.d.ts +3 -3
- package/dist/types/__VUE/sticky/index.d.ts +3 -3
- package/dist/types/__VUE/subsidenavbar/index.d.ts +3 -3
- package/dist/types/__VUE/swipe/index.d.ts +5 -5
- package/dist/types/__VUE/swiper/index.d.ts +4 -4
- package/dist/types/__VUE/swiperitem/index.d.ts +3 -3
- package/dist/types/__VUE/switch/index.d.ts +3 -3
- package/dist/types/__VUE/tabbar/index.d.ts +4 -4
- package/dist/types/__VUE/tabbaritem/index.d.ts +3 -3
- package/dist/types/__VUE/table/common.d.ts +2 -1
- package/dist/types/__VUE/table/index.d.ts +3 -3
- package/dist/types/__VUE/table/renderColumn.d.ts +5 -10
- package/dist/types/__VUE/table/types.d.ts +2 -2
- package/dist/types/__VUE/tabpane/index.d.ts +3 -3
- package/dist/types/__VUE/tabs/common.d.ts +78 -0
- package/dist/types/__VUE/tabs/index.d.ts +15 -17
- package/dist/types/__VUE/tag/index.d.ts +4 -4
- package/dist/types/__VUE/textarea/index.d.ts +6 -6
- package/dist/types/__VUE/timedetail/index.d.ts +3 -3
- package/dist/types/__VUE/timepannel/index.d.ts +3 -3
- package/dist/types/__VUE/timeselect/index.d.ts +4 -3
- package/dist/types/__VUE/toast/index.d.ts +3 -3
- package/dist/types/__VUE/uploader/index.d.ts +5 -5
- package/dist/types/__VUE/uploader/uploader.d.ts +1 -1
- package/dist/types/__VUE/video/index.d.ts +3 -3
- package/dist/types/nutui.d.ts +8 -2
- package/package.json +11 -12
- package/dist/index.d.ts +0 -3
- package/dist/nutui.d.ts +0 -103
|
@@ -0,0 +1,440 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @nutui/nutui v3.1.20-beta.0 Mon Apr 25 2022 18:02:52 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
|
+
* Released under the MIT License.
|
|
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";
|
|
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);
|
|
148
|
+
});
|
|
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 };
|