@nutui/nutui 4.0.11 → 4.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/nutui.es.js +1 -1
- package/dist/nutui.js +2 -2
- package/dist/nutui.umd.js +1 -1
- package/dist/packages/_es/ActionSheet.js +111 -78
- package/dist/packages/_es/Address.js +375 -250
- package/dist/packages/_es/AddressList.js +354 -269
- package/dist/packages/_es/Animate.js +58 -41
- package/dist/packages/_es/Audio.js +197 -128
- package/dist/packages/_es/AudioOperate.js +71 -60
- package/dist/packages/_es/Avatar.js +89 -66
- package/dist/packages/_es/AvatarGroup.js +31 -23
- package/dist/packages/_es/Backtop.js +99 -59
- package/dist/packages/_es/Badge.js +47 -36
- package/dist/packages/_es/Barrage.js +147 -68
- package/dist/packages/_es/Button.js +66 -47
- package/dist/packages/_es/Calendar.js +157 -135
- package/dist/packages/_es/CalendarItem.js +6 -6
- package/dist/packages/_es/Card.js +56 -42
- package/dist/packages/_es/Cascader.js +474 -315
- package/dist/packages/_es/Category.js +39 -29
- package/dist/packages/_es/CategoryPane.js +83 -57
- package/dist/packages/_es/Cell.js +71 -56
- package/dist/packages/_es/CellGroup.js +27 -19
- package/dist/packages/_es/Checkbox.js +156 -109
- package/dist/packages/_es/CheckboxGroup.js +59 -38
- package/dist/packages/_es/CircleProgress.js +96 -67
- package/dist/packages/_es/Col.js +31 -23
- package/dist/packages/_es/Collapse.js +58 -33
- package/dist/packages/_es/CollapseItem.js +108 -78
- package/dist/packages/_es/Comment.js +279 -207
- package/dist/packages/_es/ConfigProvider.js +55 -37
- package/dist/packages/_es/Countdown.js +212 -100
- package/dist/packages/_es/Countup.js +445 -232
- package/dist/packages/_es/DatePicker.js +265 -162
- package/dist/packages/_es/Dialog.js +213 -161
- package/dist/packages/_es/Divider.js +57 -42
- package/dist/packages/_es/Drag.js +153 -70
- package/dist/packages/_es/Ecard.js +104 -64
- package/dist/packages/_es/Elevator.js +219 -143
- package/dist/packages/_es/Ellipsis.js +178 -95
- package/dist/packages/_es/Empty.js +39 -23
- package/dist/packages/_es/FixedNav.js +116 -93
- package/dist/packages/_es/Form.js +178 -107
- package/dist/packages/_es/FormItem.js +61 -48
- package/dist/packages/_es/Grid.js +6 -5
- package/dist/packages/_es/GridItem.js +84 -58
- package/dist/packages/_es/Image.js +130 -90
- package/dist/packages/_es/ImagePreview.js +412 -256
- package/dist/packages/_es/Indicator.js +34 -30
- package/dist/packages/_es/InfiniteLoading.js +136 -83
- package/dist/packages/_es/Input.js +264 -160
- package/dist/packages/_es/InputNumber.js +117 -81
- package/dist/packages/_es/Interceptor-956b24fc.js +29 -0
- package/dist/packages/_es/Invoice.js +130 -104
- package/dist/packages/_es/Layout.js +4 -3
- package/dist/packages/_es/List.js +215 -117
- package/dist/packages/_es/Menu.js +150 -95
- package/dist/packages/_es/MenuItem.js +154 -109
- package/dist/packages/_es/Navbar.js +119 -103
- package/dist/packages/_es/Noticebar.js +312 -197
- package/dist/packages/_es/Notify.js +166 -110
- package/dist/packages/_es/NumberKeyboard.js +202 -127
- package/dist/packages/_es/Overlay.js +80 -52
- package/dist/packages/_es/Pagination.js +100 -70
- package/dist/packages/_es/Picker.js +437 -275
- package/dist/packages/_es/Popover.js +225 -122
- package/dist/packages/_es/Popup.js +4 -4
- package/dist/packages/_es/Price.js +82 -44
- package/dist/packages/_es/Progress.js +79 -63
- package/dist/packages/_es/PullRefresh.js +173 -95
- package/dist/packages/_es/Radio.js +4 -4
- package/dist/packages/_es/RadioGroup.js +3 -3
- package/dist/packages/_es/Range.js +347 -204
- package/dist/packages/_es/Rate.js +141 -92
- package/dist/packages/_es/Row.js +27 -21
- package/dist/packages/_es/Searchbar.js +174 -123
- package/dist/packages/_es/ShortPassword.js +93 -69
- package/dist/packages/_es/SideNavbar.js +80 -49
- package/dist/packages/_es/SideNavbarItem.js +32 -22
- package/dist/packages/_es/Signature.js +146 -83
- package/dist/packages/_es/Skeleton.js +130 -110
- package/dist/packages/_es/Sku.js +343 -250
- package/dist/packages/_es/Step.js +86 -59
- package/dist/packages/_es/Steps.js +31 -26
- package/dist/packages/_es/Sticky.js +4 -4
- package/dist/packages/_es/SubSideNavbar.js +74 -52
- package/dist/packages/_es/Swipe.js +155 -83
- package/dist/packages/_es/Swiper.js +311 -174
- package/dist/packages/_es/SwiperItem.js +44 -28
- package/dist/packages/_es/Switch.js +68 -55
- package/dist/packages/_es/TabPane.js +41 -30
- package/dist/packages/_es/Tabbar.js +52 -41
- package/dist/packages/_es/TabbarItem.js +82 -61
- package/dist/packages/_es/Table.js +165 -109
- package/dist/packages/_es/Tabs.js +388 -240
- package/dist/packages/_es/Tag.js +61 -44
- package/dist/packages/_es/Textarea.js +124 -80
- package/dist/packages/_es/TimeDetail.js +76 -49
- package/dist/packages/_es/TimePannel.js +48 -34
- package/dist/packages/_es/TimeSelect.js +68 -47
- package/dist/packages/_es/Toast.js +218 -144
- package/dist/packages/_es/Tour.js +192 -138
- package/dist/packages/_es/TrendArrow.js +77 -57
- package/dist/packages/_es/Uploader.js +359 -234
- package/dist/packages/_es/Video.js +316 -191
- package/dist/packages/_es/Watermark.js +117 -84
- package/dist/packages/_es/_plugin-vue_export-helper-cc2b3d55.js +10 -0
- package/dist/packages/_es/common-b9a5e726.js +145 -0
- package/dist/packages/_es/component-81a4c1d0.js +145 -0
- package/dist/packages/_es/index-29892cda.js +33 -0
- package/dist/packages/_es/index-43c34ac6.js +30 -0
- package/dist/packages/_es/index-54d03fc1.js +8 -0
- package/dist/packages/_es/index-79c5dc33.js +10 -0
- package/dist/packages/_es/index-7a7385e4.js +67 -0
- package/dist/packages/_es/index-87422be8.js +942 -0
- package/dist/packages/_es/index-da0a7662.js +259 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-22dfc112.js +46 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-a8856969.js +97 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-cc5c4086.js +151 -0
- package/dist/packages/_es/mountComponent-8b24c346.js +39 -0
- package/dist/packages/_es/pxCheck-c6b9f6b7.js +6 -0
- package/dist/packages/_es/raf-729dad54.js +25 -0
- package/dist/packages/_es/renderIcon-3d0fd47c.js +9 -0
- package/dist/packages/locale/lang/baseLang-3a8457ac.js +5 -0
- package/dist/packages/locale/lang/en-US.js +39 -36
- package/dist/packages/locale/lang/id-ID.js +39 -36
- package/dist/packages/locale/lang/index.js +44 -22
- package/dist/packages/locale/lang/zh-CN.js +38 -35
- package/dist/packages/locale/lang/zh-TW.js +38 -35
- package/dist/resolver/index.js +26 -1
- package/dist/resolver/index.mjs +17 -14
- package/dist/smartips/web-types.json +1 -1
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +48 -48
- package/dist/styles/themes/jdb.scss +48 -48
- package/dist/styles/themes/jddkh.scss +48 -48
- package/dist/styles/themes/jdt.scss +48 -48
- package/dist/types/index.d.ts +1 -1
- package/package.json +3 -4
- package/dist/packages/_es/Interceptor-6e26b757.js +0 -18
- package/dist/packages/_es/_plugin-vue_export-helper-dad06003.js +0 -9
- package/dist/packages/_es/common-d218746f.js +0 -116
- package/dist/packages/_es/component-234624bc.js +0 -89
- package/dist/packages/_es/index-14dfadc4.js +0 -561
- package/dist/packages/_es/index-192a3ef6.js +0 -29
- package/dist/packages/_es/index-360c5092.js +0 -210
- package/dist/packages/_es/index-496e6e05.js +0 -24
- package/dist/packages/_es/index-50eed3d9.js +0 -7
- package/dist/packages/_es/index-53ec2d4d.js +0 -34
- package/dist/packages/_es/index-fadb0974.js +0 -8
- package/dist/packages/_es/index.vue_vue_type_script_lang-1139b29a.js +0 -43
- package/dist/packages/_es/index.vue_vue_type_script_lang-43b774dd.js +0 -77
- package/dist/packages/_es/index.vue_vue_type_script_lang-f44c159d.js +0 -110
- package/dist/packages/_es/mountComponent-6d4ff200.js +0 -23
- package/dist/packages/_es/pxCheck-38173291.js +0 -4
- package/dist/packages/_es/raf-a74f1a06.js +0 -16
- package/dist/packages/_es/renderIcon-47498b32.js +0 -5
- package/dist/packages/locale/lang/baseLang-0bdc6353.js +0 -5
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { ref
|
|
2
|
-
import { c as
|
|
3
|
-
import { _ as
|
|
1
|
+
import { ref, openBlock, createElementBlock, createElementVNode, Fragment, renderList, normalizeClass, toDisplayString, createCommentVNode, renderSlot } from "vue";
|
|
2
|
+
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
3
|
+
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
4
4
|
import "../locale/lang";
|
|
5
|
-
const { componentName
|
|
5
|
+
const { componentName, create } = createComponent("category");
|
|
6
|
+
const _sfc_main = create({
|
|
6
7
|
props: {
|
|
7
8
|
//分类模式
|
|
8
9
|
type: {
|
|
@@ -15,36 +16,45 @@ const { componentName: D, create: k } = h("category"), C = k({
|
|
|
15
16
|
default: []
|
|
16
17
|
}
|
|
17
18
|
},
|
|
18
|
-
setup(
|
|
19
|
-
const
|
|
19
|
+
setup(props, { emit, slots }) {
|
|
20
|
+
const checkIndex = ref(0);
|
|
21
|
+
const categoryLeft = ref(false);
|
|
22
|
+
const getChildList = (index2) => {
|
|
23
|
+
checkIndex.value = index2;
|
|
24
|
+
emit("change", index2);
|
|
25
|
+
};
|
|
20
26
|
return {
|
|
21
|
-
getChildList
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
checkIndex: r,
|
|
25
|
-
categoryLeft: n
|
|
27
|
+
getChildList,
|
|
28
|
+
checkIndex,
|
|
29
|
+
categoryLeft
|
|
26
30
|
};
|
|
27
31
|
}
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
32
|
+
});
|
|
33
|
+
const _hoisted_1 = { class: "nut-category" };
|
|
34
|
+
const _hoisted_2 = { class: "nut-category__cateList" };
|
|
35
|
+
const _hoisted_3 = { key: 0 };
|
|
36
|
+
const _hoisted_4 = ["onClick"];
|
|
37
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
38
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
39
|
+
createElementVNode("div", _hoisted_2, [
|
|
40
|
+
_ctx.type == "classify" || _ctx.type == "text" ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
41
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.category, (item, index2) => {
|
|
42
|
+
return openBlock(), createElementBlock("div", {
|
|
43
|
+
class: "nut-category__cateListLeft",
|
|
44
|
+
key: index2
|
|
45
|
+
}, [
|
|
46
|
+
createElementVNode("div", {
|
|
47
|
+
class: normalizeClass([_ctx.checkIndex == index2 ? "nut-category__cateListItemChecked" : "nut-category__cateListItem"]),
|
|
48
|
+
onClick: ($event) => _ctx.getChildList(index2)
|
|
49
|
+
}, toDisplayString(item.catName), 11, _hoisted_4)
|
|
50
|
+
]);
|
|
51
|
+
}), 128))
|
|
52
|
+
])) : createCommentVNode("", true),
|
|
53
|
+
renderSlot(_ctx.$slots, "default")
|
|
44
54
|
])
|
|
45
55
|
]);
|
|
46
56
|
}
|
|
47
|
-
const
|
|
57
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
48
58
|
export {
|
|
49
|
-
|
|
59
|
+
index as default
|
|
50
60
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import { openBlock
|
|
3
|
-
import { _ as
|
|
1
|
+
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
2
|
+
import { openBlock, createElementBlock, Fragment, renderList, createElementVNode, toDisplayString, createCommentVNode } from "vue";
|
|
3
|
+
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
4
4
|
import "../locale/lang";
|
|
5
|
-
const { componentName
|
|
5
|
+
const { componentName, create } = createComponent("category-pane");
|
|
6
|
+
const _sfc_main = create({
|
|
6
7
|
props: {
|
|
7
8
|
//分类模式
|
|
8
9
|
type: {
|
|
@@ -20,73 +21,98 @@ const { componentName: H, create: v } = u("category-pane"), m = v({
|
|
|
20
21
|
default: () => []
|
|
21
22
|
}
|
|
22
23
|
},
|
|
23
|
-
setup(
|
|
24
|
+
setup(props, { emit }) {
|
|
25
|
+
const onChange = (sku) => {
|
|
26
|
+
emit("onChange", sku);
|
|
27
|
+
};
|
|
24
28
|
return {
|
|
25
|
-
onChange
|
|
26
|
-
p("onChange", y);
|
|
27
|
-
}
|
|
29
|
+
onChange
|
|
28
30
|
};
|
|
29
31
|
}
|
|
30
|
-
})
|
|
32
|
+
});
|
|
33
|
+
const _hoisted_1 = { class: "nut-category-pane" };
|
|
34
|
+
const _hoisted_2 = {
|
|
31
35
|
key: 0,
|
|
32
36
|
class: "nut-category-pane__cateListRight"
|
|
33
|
-
}
|
|
37
|
+
};
|
|
38
|
+
const _hoisted_3 = { class: "nut-category-pane__childTitle" };
|
|
39
|
+
const _hoisted_4 = {
|
|
34
40
|
key: 0,
|
|
35
41
|
class: "nut-category-pane__childItemList"
|
|
36
|
-
}
|
|
42
|
+
};
|
|
43
|
+
const _hoisted_5 = ["onClick"];
|
|
44
|
+
const _hoisted_6 = ["src"];
|
|
45
|
+
const _hoisted_7 = { class: "nut-category-pane__skuImg" };
|
|
46
|
+
const _hoisted_8 = {
|
|
37
47
|
key: 1,
|
|
38
48
|
class: "nut-category-pane__cateListRight"
|
|
39
|
-
}
|
|
49
|
+
};
|
|
50
|
+
const _hoisted_9 = { class: "nut-category-pane__childTitle" };
|
|
51
|
+
const _hoisted_10 = {
|
|
40
52
|
key: 0,
|
|
41
53
|
class: "nut-category-pane__childItemList"
|
|
42
|
-
}
|
|
54
|
+
};
|
|
55
|
+
const _hoisted_11 = ["onClick"];
|
|
56
|
+
const _hoisted_12 = { class: "nut-category-pane__skuName" };
|
|
57
|
+
const _hoisted_13 = {
|
|
43
58
|
key: 2,
|
|
44
59
|
class: "nut-category-pane__selfItemList"
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
(
|
|
53
|
-
|
|
54
|
-
key
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
60
|
+
};
|
|
61
|
+
const _hoisted_14 = ["onClick"];
|
|
62
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
63
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
64
|
+
_ctx.type == "classify" ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
65
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.categoryChild, (item, index2) => {
|
|
66
|
+
return openBlock(), createElementBlock("div", { key: index2 }, [
|
|
67
|
+
createElementVNode("div", _hoisted_3, toDisplayString(item == null ? void 0 : item.catName), 1),
|
|
68
|
+
(item == null ? void 0 : item.catType) == 1 ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
69
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(item.childCateList, (sku, key) => {
|
|
70
|
+
return openBlock(), createElementBlock("div", {
|
|
71
|
+
class: "nut-category-pane__childItem",
|
|
72
|
+
key,
|
|
73
|
+
onClick: ($event) => _ctx.onChange(sku)
|
|
74
|
+
}, [
|
|
75
|
+
createElementVNode("img", {
|
|
76
|
+
class: "nut-category-pane__childImg",
|
|
77
|
+
src: sku.backImg
|
|
78
|
+
}, null, 8, _hoisted_6),
|
|
79
|
+
createElementVNode("div", _hoisted_7, toDisplayString(sku == null ? void 0 : sku.catName), 1)
|
|
80
|
+
], 8, _hoisted_5);
|
|
81
|
+
}), 128))
|
|
82
|
+
])) : createCommentVNode("", true)
|
|
83
|
+
]);
|
|
84
|
+
}), 128))
|
|
85
|
+
])) : createCommentVNode("", true),
|
|
86
|
+
_ctx.type == "text" ? (openBlock(), createElementBlock("div", _hoisted_8, [
|
|
87
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.categoryChild, (item, index2) => {
|
|
88
|
+
return openBlock(), createElementBlock("div", { key: index2 }, [
|
|
89
|
+
createElementVNode("div", _hoisted_9, toDisplayString(item == null ? void 0 : item.catName), 1),
|
|
90
|
+
(item == null ? void 0 : item.catType) == 1 ? (openBlock(), createElementBlock("div", _hoisted_10, [
|
|
91
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(item.childCateList, (sku, key) => {
|
|
92
|
+
return openBlock(), createElementBlock("div", {
|
|
93
|
+
class: "nut-category-pane__childItem",
|
|
94
|
+
key,
|
|
95
|
+
onClick: ($event) => _ctx.onChange(sku)
|
|
96
|
+
}, [
|
|
97
|
+
createElementVNode("div", _hoisted_12, toDisplayString(sku == null ? void 0 : sku.catName), 1)
|
|
98
|
+
], 8, _hoisted_11);
|
|
99
|
+
}), 128))
|
|
100
|
+
])) : createCommentVNode("", true)
|
|
101
|
+
]);
|
|
102
|
+
}), 128))
|
|
103
|
+
])) : createCommentVNode("", true),
|
|
104
|
+
_ctx.type == "custom" ? (openBlock(), createElementBlock("div", _hoisted_13, [
|
|
105
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.customCategory, (sku, key) => {
|
|
106
|
+
return openBlock(), createElementBlock("div", {
|
|
107
|
+
class: "nut-category-pane__skuName",
|
|
108
|
+
key,
|
|
109
|
+
onClick: ($event) => _ctx.onChange(sku)
|
|
110
|
+
}, toDisplayString(sku == null ? void 0 : sku.catName), 9, _hoisted_14);
|
|
111
|
+
}), 128))
|
|
112
|
+
])) : createCommentVNode("", true)
|
|
87
113
|
]);
|
|
88
114
|
}
|
|
89
|
-
const
|
|
115
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
90
116
|
export {
|
|
91
|
-
|
|
117
|
+
index as default
|
|
92
118
|
};
|
|
@@ -1,90 +1,105 @@
|
|
|
1
|
-
import { computed
|
|
2
|
-
import { c as
|
|
3
|
-
import { u as
|
|
4
|
-
import { p as
|
|
5
|
-
import { Right
|
|
6
|
-
import { _ as
|
|
1
|
+
import { computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, createCommentVNode, Fragment, createElementVNode, toDisplayString, createTextVNode, createBlock } from "vue";
|
|
2
|
+
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
3
|
+
import { u as useRouter } from "./index-54d03fc1.js";
|
|
4
|
+
import { p as pxCheck } from "./pxCheck-c6b9f6b7.js";
|
|
5
|
+
import { Right } from "@nutui/icons-vue";
|
|
6
|
+
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
7
7
|
import "../locale/lang";
|
|
8
|
-
const { componentName
|
|
9
|
-
|
|
8
|
+
const { componentName, create } = createComponent("cell");
|
|
9
|
+
const _sfc_main = create({
|
|
10
|
+
components: { Right },
|
|
10
11
|
props: {
|
|
11
12
|
title: { type: String, default: "" },
|
|
12
13
|
subTitle: { type: String, default: "" },
|
|
13
14
|
desc: { type: String, default: "" },
|
|
14
15
|
descTextAlign: { type: String, default: "right" },
|
|
15
|
-
isLink: { type: Boolean, default:
|
|
16
|
+
isLink: { type: Boolean, default: false },
|
|
16
17
|
to: [String, Object],
|
|
17
|
-
replace: { type: Boolean, default:
|
|
18
|
+
replace: { type: Boolean, default: false },
|
|
18
19
|
roundRadius: { type: [String, Number], default: "" },
|
|
19
20
|
url: { type: String, default: "" },
|
|
20
|
-
center: { type: Boolean, default:
|
|
21
|
+
center: { type: Boolean, default: false },
|
|
21
22
|
size: { type: String, default: "" }
|
|
22
23
|
// large
|
|
23
24
|
},
|
|
24
25
|
emits: ["click"],
|
|
25
|
-
setup(
|
|
26
|
-
const
|
|
27
|
-
const
|
|
26
|
+
setup(props, { emit }) {
|
|
27
|
+
const classes = computed(() => {
|
|
28
|
+
const prefixCls = componentName;
|
|
28
29
|
return {
|
|
29
|
-
[
|
|
30
|
-
[`${
|
|
31
|
-
[`${
|
|
32
|
-
[`${
|
|
30
|
+
[prefixCls]: true,
|
|
31
|
+
[`${prefixCls}--clickable`]: props.isLink || props.to,
|
|
32
|
+
[`${prefixCls}--center`]: props.center,
|
|
33
|
+
[`${prefixCls}--large`]: props.size == "large"
|
|
33
34
|
};
|
|
34
|
-
})
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
});
|
|
36
|
+
const router = useRouter();
|
|
37
|
+
const baseStyle = computed(() => {
|
|
38
|
+
return {
|
|
39
|
+
borderRadius: pxCheck(props.roundRadius)
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
const handleClick = (event) => {
|
|
43
|
+
emit("click", event);
|
|
44
|
+
if (props.to && router) {
|
|
45
|
+
router[props.replace ? "replace" : "push"](props.to);
|
|
46
|
+
} else if (props.url) {
|
|
47
|
+
props.replace ? location.replace(props.url) : location.href = props.url;
|
|
48
|
+
}
|
|
49
|
+
};
|
|
37
50
|
return {
|
|
38
|
-
handleClick
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
classes: c,
|
|
42
|
-
baseStyle: u
|
|
51
|
+
handleClick,
|
|
52
|
+
classes,
|
|
53
|
+
baseStyle
|
|
43
54
|
};
|
|
44
55
|
}
|
|
45
|
-
})
|
|
56
|
+
});
|
|
57
|
+
const _hoisted_1 = {
|
|
46
58
|
key: 0,
|
|
47
59
|
class: "nut-cell__icon"
|
|
48
|
-
}
|
|
60
|
+
};
|
|
61
|
+
const _hoisted_2 = {
|
|
49
62
|
key: 1,
|
|
50
63
|
class: "nut-cell__title"
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
64
|
+
};
|
|
65
|
+
const _hoisted_3 = { class: "title" };
|
|
66
|
+
const _hoisted_4 = { class: "nut-cell__title-desc" };
|
|
67
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
68
|
+
const _component_Right = resolveComponent("Right");
|
|
69
|
+
return openBlock(), createElementBlock("view", {
|
|
70
|
+
class: normalizeClass(_ctx.classes),
|
|
71
|
+
style: normalizeStyle(_ctx.baseStyle),
|
|
72
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
|
|
58
73
|
}, [
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
])) :
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
74
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
75
|
+
_ctx.$slots.icon ? (openBlock(), createElementBlock("view", _hoisted_1, [
|
|
76
|
+
renderSlot(_ctx.$slots, "icon")
|
|
77
|
+
])) : createCommentVNode("", true),
|
|
78
|
+
_ctx.title || _ctx.subTitle || _ctx.$slots.title ? (openBlock(), createElementBlock("view", _hoisted_2, [
|
|
79
|
+
_ctx.subTitle ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
80
|
+
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
81
|
+
createElementVNode("view", _hoisted_3, toDisplayString(_ctx.title), 1)
|
|
67
82
|
]),
|
|
68
|
-
|
|
69
|
-
], 64)) :
|
|
70
|
-
|
|
83
|
+
createElementVNode("view", _hoisted_4, toDisplayString(_ctx.subTitle), 1)
|
|
84
|
+
], 64)) : renderSlot(_ctx.$slots, "title", { key: 1 }, () => [
|
|
85
|
+
createTextVNode(toDisplayString(_ctx.title), 1)
|
|
71
86
|
])
|
|
72
|
-
])) :
|
|
73
|
-
|
|
87
|
+
])) : createCommentVNode("", true),
|
|
88
|
+
_ctx.desc ? (openBlock(), createElementBlock("view", {
|
|
74
89
|
key: 2,
|
|
75
|
-
class:
|
|
76
|
-
style:
|
|
77
|
-
},
|
|
78
|
-
|
|
79
|
-
|
|
90
|
+
class: normalizeClass(["nut-cell__value", { "nut-cell__value--alone": !_ctx.title && !_ctx.subTitle && !_ctx.$slots.title }]),
|
|
91
|
+
style: normalizeStyle({ "text-align": _ctx.descTextAlign })
|
|
92
|
+
}, toDisplayString(_ctx.desc), 7)) : createCommentVNode("", true),
|
|
93
|
+
renderSlot(_ctx.$slots, "link", {}, () => [
|
|
94
|
+
_ctx.isLink || _ctx.to ? (openBlock(), createBlock(_component_Right, {
|
|
80
95
|
key: 0,
|
|
81
96
|
class: "nut-cell__link"
|
|
82
|
-
})) :
|
|
97
|
+
})) : createCommentVNode("", true)
|
|
83
98
|
])
|
|
84
99
|
])
|
|
85
100
|
], 6);
|
|
86
101
|
}
|
|
87
|
-
const
|
|
102
|
+
const Cell = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", render]]);
|
|
88
103
|
export {
|
|
89
|
-
|
|
104
|
+
Cell as default
|
|
90
105
|
};
|
|
@@ -1,38 +1,46 @@
|
|
|
1
|
-
import { computed
|
|
2
|
-
import { c as
|
|
3
|
-
import { _ as
|
|
1
|
+
import { computed, openBlock, createElementBlock, normalizeClass, renderSlot, toDisplayString, createCommentVNode, createElementVNode } from "vue";
|
|
2
|
+
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
3
|
+
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
4
4
|
import "../locale/lang";
|
|
5
|
-
const { componentName
|
|
5
|
+
const { componentName, create } = createComponent("cell-group");
|
|
6
|
+
const _sfc_main = create({
|
|
6
7
|
props: {
|
|
7
8
|
title: { type: String, default: "" },
|
|
8
9
|
desc: { type: String, default: "" }
|
|
9
10
|
},
|
|
10
11
|
setup() {
|
|
12
|
+
const classes = computed(() => {
|
|
13
|
+
const prefixCls = componentName;
|
|
14
|
+
return {
|
|
15
|
+
[prefixCls]: true
|
|
16
|
+
};
|
|
17
|
+
});
|
|
11
18
|
return {
|
|
12
|
-
classes
|
|
13
|
-
[d]: !0
|
|
14
|
-
}))
|
|
19
|
+
classes
|
|
15
20
|
};
|
|
16
21
|
}
|
|
17
|
-
})
|
|
22
|
+
});
|
|
23
|
+
const _hoisted_1 = {
|
|
18
24
|
key: 1,
|
|
19
25
|
class: "nut-cell-group__title"
|
|
20
|
-
}
|
|
26
|
+
};
|
|
27
|
+
const _hoisted_2 = {
|
|
21
28
|
key: 3,
|
|
22
29
|
class: "nut-cell-group__desc"
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
30
|
+
};
|
|
31
|
+
const _hoisted_3 = { class: "nut-cell-group__wrap" };
|
|
32
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
33
|
+
return openBlock(), createElementBlock("view", {
|
|
34
|
+
class: normalizeClass(_ctx.classes)
|
|
27
35
|
}, [
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
36
|
+
_ctx.$slots.title ? renderSlot(_ctx.$slots, "title", { key: 0 }) : _ctx.title ? (openBlock(), createElementBlock("view", _hoisted_1, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
|
|
37
|
+
_ctx.$slots.desc ? renderSlot(_ctx.$slots, "desc", { key: 2 }) : _ctx.desc ? (openBlock(), createElementBlock("view", _hoisted_2, toDisplayString(_ctx.desc), 1)) : createCommentVNode("", true),
|
|
38
|
+
createElementVNode("view", _hoisted_3, [
|
|
39
|
+
renderSlot(_ctx.$slots, "default")
|
|
32
40
|
])
|
|
33
41
|
], 2);
|
|
34
42
|
}
|
|
35
|
-
const
|
|
43
|
+
const CellGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
36
44
|
export {
|
|
37
|
-
|
|
45
|
+
CellGroup as default
|
|
38
46
|
};
|