@nutui/nutui 3.1.22-beta.5 → 3.1.23-beta.1
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 +48 -0
- package/README.md +3 -4
- package/dist/nutui.es.js +20412 -4214
- package/dist/nutui.umd.js +20518 -4216
- package/dist/packages/_es/ActionSheet.js +149 -17
- package/dist/packages/_es/Address.js +535 -110
- package/dist/packages/_es/AddressList.js +615 -113
- package/dist/packages/_es/Animate.js +59 -17
- package/dist/packages/_es/Audio.js +257 -53
- package/dist/packages/_es/AudioOperate.js +100 -13
- package/dist/packages/_es/Avatar.js +162 -38
- package/dist/packages/_es/AvatarGroup.js +73 -14
- package/dist/packages/_es/BackTop.js +156 -43
- package/dist/packages/_es/Badge.js +86 -14
- package/dist/packages/_es/Barrage.js +120 -41
- package/dist/packages/_es/Button.js +128 -23
- package/dist/packages/_es/Calendar.js +246 -30
- package/dist/packages/_es/CalendarItem.js +1 -1
- package/dist/packages/_es/Card.js +107 -10
- package/dist/packages/_es/Cascader.js +496 -147
- package/dist/packages/_es/Category.js +58 -15
- package/dist/packages/_es/CategoryPane.js +111 -11
- package/dist/packages/_es/Cell.js +108 -21
- package/dist/packages/_es/CellGroup.js +44 -9
- package/dist/packages/_es/Checkbox.js +134 -29
- package/dist/packages/_es/CheckboxGroup.js +79 -29
- package/dist/packages/_es/CircleProgress.js +150 -28
- package/dist/packages/_es/Col.js +56 -14
- package/dist/packages/_es/Collapse.js +109 -32
- package/dist/packages/_es/CollapseItem.js +253 -59
- package/dist/packages/_es/Comment.js +434 -64
- package/dist/packages/_es/ConfigProvider.js +20 -8
- package/dist/packages/_es/CountDown.js +238 -56
- package/dist/packages/_es/CountUp.js +539 -140
- package/dist/packages/_es/DatePicker.js +315 -98
- package/dist/packages/_es/Dialog.js +289 -60
- package/dist/packages/_es/Divider.js +65 -13
- package/dist/packages/_es/Drag.js +197 -56
- package/dist/packages/_es/Ecard.js +159 -24
- package/dist/packages/_es/Elevator.js +255 -58
- package/dist/packages/_es/Ellipsis.js +200 -58
- package/dist/packages/_es/Empty.js +71 -12
- package/dist/packages/_es/FixedNav.js +122 -15
- package/dist/packages/_es/Form.js +151 -64
- package/dist/packages/_es/FormItem.js +114 -15
- package/dist/packages/_es/Grid.js +6 -5
- package/dist/packages/_es/GridItem.js +144 -33
- package/dist/packages/_es/Icon.js +40 -15
- package/dist/packages/_es/Image.js +137 -26
- package/dist/packages/_es/ImagePreview.js +547 -76
- package/dist/packages/_es/Indicator.js +62 -15
- package/dist/packages/_es/InfiniteLoading.js +249 -57
- package/dist/packages/_es/Input.js +433 -51
- package/dist/packages/_es/InputNumber.js +160 -41
- package/dist/packages/_es/Layout.js +5 -4
- package/dist/packages/_es/List.js +106 -18
- package/dist/packages/_es/Menu.js +168 -44
- package/dist/packages/_es/MenuItem.js +173 -37
- package/dist/packages/_es/Navbar.js +192 -30
- package/dist/packages/_es/NoticeBar.js +380 -74
- package/dist/packages/_es/Notify.js +227 -72
- package/dist/packages/_es/NumberKeyboard.js +272 -41
- package/dist/packages/_es/OldPicker.js +457 -130
- package/dist/packages/_es/OverLay.js +98 -24
- package/dist/packages/_es/Pagination.js +157 -39
- package/dist/packages/_es/Picker.js +454 -129
- package/dist/packages/_es/Popover.js +957 -318
- package/dist/packages/_es/Popup.js +299 -55
- package/dist/packages/_es/Price.js +118 -16
- package/dist/packages/_es/Progress.js +146 -14
- package/dist/packages/_es/PullRefresh.js +339 -84
- package/dist/packages/_es/Radio.js +90 -22
- package/dist/packages/_es/RadioGroup.js +37 -8
- package/dist/packages/_es/Range.js +408 -83
- package/dist/packages/_es/Rate.js +192 -36
- package/dist/packages/_es/Row.js +64 -22
- package/dist/packages/_es/SearchBar.js +238 -37
- package/dist/packages/_es/ShortPassword.js +225 -35
- package/dist/packages/_es/SideNavBar.js +81 -24
- package/dist/packages/_es/SideNavBarItem.js +46 -11
- package/dist/packages/_es/Signature.js +160 -41
- package/dist/packages/_es/Skeleton.js +136 -20
- package/dist/packages/_es/Sku.js +491 -84
- package/dist/packages/_es/Step.js +115 -20
- package/dist/packages/_es/Steps.js +53 -18
- package/dist/packages/_es/Sticky.js +138 -53
- package/dist/packages/_es/SubSideNavBar.js +82 -17
- package/dist/packages/_es/Swipe.js +178 -41
- package/dist/packages/_es/Swiper.js +433 -121
- package/dist/packages/_es/SwiperItem.js +53 -22
- package/dist/packages/_es/Switch.js +116 -21
- package/dist/packages/_es/TabPane.js +39 -12
- package/dist/packages/_es/Tabbar.js +72 -17
- package/dist/packages/_es/TabbarItem.js +151 -29
- package/dist/packages/_es/Table.js +178 -18
- package/dist/packages/_es/Tabs.js +202 -43
- package/dist/packages/_es/Tag.js +97 -20
- package/dist/packages/_es/TextArea.js +160 -42
- package/dist/packages/_es/TimeDetail.js +79 -18
- package/dist/packages/_es/TimePannel.js +48 -14
- package/dist/packages/_es/TimeSelect.js +112 -15
- package/dist/packages/_es/Toast.js +310 -71
- package/dist/packages/_es/Uploader.js +455 -104
- package/dist/packages/_es/Video.js +332 -74
- package/dist/packages/_es/common.js +128 -38
- package/dist/packages/_es/component.js +76 -35
- package/dist/packages/_es/index.js +6 -5
- package/dist/packages/_es/index2.js +30 -9
- package/dist/packages/_es/index3.js +8 -6
- package/dist/packages/_es/index4.js +64 -13
- package/dist/packages/_es/index5.js +780 -164
- package/dist/packages/_es/plugin-vue_export-helper.js +8 -7
- package/dist/packages/_es/pxCheck.js +5 -3
- package/dist/packages/_es/raf.js +15 -8
- package/dist/packages/imagepreview/index.scss +6 -1
- package/dist/packages/locale/lang/baseLang.js +3 -3
- package/dist/packages/locale/lang/en-US.js +105 -5
- package/dist/packages/locale/lang/id-ID.js +105 -5
- package/dist/packages/locale/lang/index.js +38 -16
- package/dist/packages/locale/lang/zh-CN.js +105 -5
- package/dist/packages/locale/lang/zh-TW.js +105 -5
- package/dist/packages/picker/index.scss +13 -0
- package/dist/smartips/attributes.json +8 -0
- package/dist/smartips/tags.json +3 -1
- package/dist/smartips/web-types.json +19 -1
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/themes/default.scss +49 -49
- package/dist/styles/themes/jdb.scss +49 -49
- package/dist/styles/themes/jdt.scss +49 -49
- package/dist/styles/variables-jdb.scss +4 -1
- package/dist/styles/variables-jdt.scss +4 -1
- package/dist/styles/variables.scss +1 -1
- package/dist/types/__VUE/actionsheet/index.vue.d.ts +3 -3
- package/dist/types/__VUE/address/index.vue.d.ts +4 -4
- package/dist/types/__VUE/calendar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/cascader/index.vue.d.ts +3 -3
- package/dist/types/__VUE/cell/index.vue.d.ts +2 -2
- package/dist/types/__VUE/checkbox/index.vue.d.ts +2 -2
- package/dist/types/__VUE/collapse/index.vue.d.ts +2 -2
- package/dist/types/__VUE/datepicker/index.vue.d.ts +2 -2
- package/dist/types/__VUE/dialog/index.vue.d.ts +2 -2
- package/dist/types/__VUE/ecard/index.vue.d.ts +2 -2
- package/dist/types/__VUE/fixednav/index.vue.d.ts +2 -2
- package/dist/types/__VUE/grid/index.vue.d.ts +3 -3
- package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +95 -0
- package/dist/types/__VUE/imagepreview/index.vue.d.ts +23 -25
- package/dist/types/__VUE/infiniteloading/index.vue.d.ts +6 -6
- package/dist/types/__VUE/input/index.vue.d.ts +2 -2
- package/dist/types/__VUE/menu/index.vue.d.ts +4 -4
- package/dist/types/__VUE/menuitem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/numberkeyboard/index.vue.d.ts +2 -2
- package/dist/types/__VUE/oldpicker/index.vue.d.ts +3 -3
- package/dist/types/__VUE/picker/index.vue.d.ts +3 -3
- package/dist/types/__VUE/popover/index.vue.d.ts +6 -6
- package/dist/types/__VUE/popup/index.vue.d.ts +4 -4
- package/dist/types/__VUE/range/index.vue.d.ts +1 -1
- package/dist/types/__VUE/rate/index.vue.d.ts +2 -2
- package/dist/types/__VUE/searchbar/index.vue.d.ts +2 -2
- package/dist/types/__VUE/shortpassword/index.vue.d.ts +1 -1
- package/dist/types/__VUE/sku/index.vue.d.ts +3 -3
- package/dist/types/__VUE/swipe/index.vue.d.ts +2 -2
- package/dist/types/__VUE/switch/index.vue.d.ts +2 -2
- package/dist/types/__VUE/tabbar/index.vue.d.ts +2 -2
- package/dist/types/__VUE/textarea/index.vue.d.ts +2 -2
- package/dist/types/__VUE/toast/index.vue.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -2
|
@@ -1,20 +1,63 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.23-beta.1 Mon Jun 27 2022 21:39:05 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { ref
|
|
7
|
-
import { c as
|
|
8
|
-
import { _ as
|
|
6
|
+
import { ref, onMounted, openBlock, createElementBlock, createElementVNode, Fragment, renderList, normalizeClass, toDisplayString, createCommentVNode, renderSlot } from "vue";
|
|
7
|
+
import { c as createComponent } from "./component.js";
|
|
8
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
9
|
import "../locale/lang";
|
|
10
|
-
const { componentName
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
10
|
+
const { componentName, create } = createComponent("category");
|
|
11
|
+
const _sfc_main = create({
|
|
12
|
+
props: {
|
|
13
|
+
type: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: "classify"
|
|
16
|
+
},
|
|
17
|
+
category: {
|
|
18
|
+
type: Array,
|
|
19
|
+
default: () => []
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
setup(props, { emit, slots }) {
|
|
23
|
+
const checkIndex = ref(0);
|
|
24
|
+
const categoryLeft = ref(false);
|
|
25
|
+
const getChildList = (index2) => {
|
|
26
|
+
checkIndex.value = index2;
|
|
27
|
+
emit("change", index2);
|
|
28
|
+
};
|
|
29
|
+
onMounted(() => {
|
|
30
|
+
});
|
|
31
|
+
return {
|
|
32
|
+
getChildList,
|
|
33
|
+
checkIndex,
|
|
34
|
+
categoryLeft
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
const _hoisted_1 = { class: "nut-category" };
|
|
39
|
+
const _hoisted_2 = { class: "nut-category__cateList" };
|
|
40
|
+
const _hoisted_3 = { key: 0 };
|
|
41
|
+
const _hoisted_4 = ["onClick"];
|
|
42
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
43
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
44
|
+
createElementVNode("div", _hoisted_2, [
|
|
45
|
+
_ctx.type == "classify" || _ctx.type == "text" ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
46
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.category, (item, index2) => {
|
|
47
|
+
return openBlock(), createElementBlock("div", {
|
|
48
|
+
class: "nut-category__cateListLeft",
|
|
49
|
+
key: index2
|
|
50
|
+
}, [
|
|
51
|
+
createElementVNode("div", {
|
|
52
|
+
class: normalizeClass([_ctx.checkIndex == index2 ? "nut-category__cateListItemChecked" : "nut-category__cateListItem"]),
|
|
53
|
+
onClick: ($event) => _ctx.getChildList(index2)
|
|
54
|
+
}, toDisplayString(item.catName), 11, _hoisted_4)
|
|
55
|
+
]);
|
|
56
|
+
}), 128))
|
|
57
|
+
])) : createCommentVNode("", true),
|
|
58
|
+
renderSlot(_ctx.$slots, "default")
|
|
59
|
+
])
|
|
60
|
+
]);
|
|
61
|
+
}
|
|
62
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
63
|
+
export { index as default };
|
|
@@ -1,16 +1,116 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.23-beta.1 Mon Jun 27 2022 21:39:05 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { c as
|
|
7
|
-
import { openBlock
|
|
8
|
-
import { _ as
|
|
6
|
+
import { c as createComponent } from "./component.js";
|
|
7
|
+
import { openBlock, createElementBlock, Fragment, renderList, createElementVNode, toDisplayString, createCommentVNode } from "vue";
|
|
8
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
9
|
import "../locale/lang";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
var index_vue_vue_type_style_index_0_lang = /* @__PURE__ */ (() => ".nut-categorypane__cateList {\n display: flex;\n background: rgb(255, 255, 255);\n}\n.nut-categorypane__cateListLeft {\n background: rgb(246, 247, 249);\n}\n.nut-categorypane__cateListItemChecked, .nut-categorypane__cateListItem {\n width: 100px;\n height: 50px;\n font-size: 13px;\n font-family: PingFangSC;\n font-weight: normal;\n color: rgb(51, 51, 51);\n display: flex;\n justify-content: center;\n align-items: center;\n transition: all 0.3s;\n}\n.nut-categorypane__cateListItemChecked {\n background: rgb(255, 255, 255);\n font-weight: 500;\n transition: all 0.3s;\n}\n.nut-categorypane__cateListRight {\n padding-left: 15px;\n background: rgb(255, 255, 255);\n}\n.nut-categorypane__childTitle {\n margin-top: 15px;\n margin-bottom: 15px;\n font-size: 13px;\n font-family: PingFangSC;\n font-weight: 500;\n color: rgb(51, 51, 51);\n}\n.nut-categorypane__childItemList {\n display: flex;\n flex-wrap: wrap;\n}\n.nut-categorypane__childItem {\n margin-right: 10px;\n}\n.nut-categorypane__childImg {\n width: 75px;\n height: 75px;\n border-radius: 5px;\n}\n.nut-categorypane__skuName {\n margin-right: 10px;\n width: 75px;\n height: 40px;\n border: 1px solid rgb(153, 153, 153);\n border-radius: 5px;\n font-size: 12px;\n font-family: PingFangSC;\n font-weight: normal;\n color: rgb(102, 102, 102);\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.nut-categorypane__skuName:nth-child(3n) {\n margin-right: 0;\n}\n.nut-categorypane__skuName:nth-child(n+4) {\n margin-top: 15px;\n}\n.nut-categorypane__skuImg {\n font-size: 12px;\n font-family: PingFangSC;\n font-weight: normal;\n color: rgb(102, 102, 102);\n margin-top: 10px;\n margin-bottom: 10px;\n text-align: center;\n}\n.nut-categorypane__selfItemList {\n display: flex;\n flex-wrap: wrap;\n}\n.nut-categorypane__selfskuName {\n margin-left: 15px;\n margin-top: 15px;\n display: flex;\n justify-content: center;\n align-items: center;\n width: 75px;\n height: 40px;\n border: 1px solid rgb(153, 153, 153);\n border-radius: 5px;\n font-size: 12px;\n font-family: PingFangSC;\n font-weight: normal;\n color: rgb(102, 102, 102);\n}\n.nut-categorypane__skuName {\n margin-left: 15px;\n margin-top: 15px;\n display: flex;\n justify-content: center;\n align-items: center;\n width: 75px;\n height: 40px;\n border: 1px solid rgb(153, 153, 153);\n border-radius: 5px;\n font-size: 12px;\n font-family: PingFangSC;\n font-weight: normal;\n color: rgb(102, 102, 102);\n}")();
|
|
11
|
+
const { componentName, create } = createComponent("categorypane");
|
|
12
|
+
const _sfc_main = create({
|
|
13
|
+
props: {
|
|
14
|
+
type: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: "classify"
|
|
17
|
+
},
|
|
18
|
+
categoryChild: {
|
|
19
|
+
type: Array,
|
|
20
|
+
default: () => []
|
|
21
|
+
},
|
|
22
|
+
customCategory: {
|
|
23
|
+
type: Array,
|
|
24
|
+
default: () => []
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
setup(props, { emit }) {
|
|
28
|
+
const onChange = () => {
|
|
29
|
+
emit("onChange");
|
|
30
|
+
};
|
|
31
|
+
return {
|
|
32
|
+
onChange
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
const _hoisted_1 = { class: "nut-categorypane" };
|
|
37
|
+
const _hoisted_2 = {
|
|
38
|
+
key: 0,
|
|
39
|
+
class: "nut-categorypane__cateListRight"
|
|
40
|
+
};
|
|
41
|
+
const _hoisted_3 = { class: "nut-categorypane__childTitle" };
|
|
42
|
+
const _hoisted_4 = {
|
|
43
|
+
key: 0,
|
|
44
|
+
class: "nut-categorypane__childItemList"
|
|
45
|
+
};
|
|
46
|
+
const _hoisted_5 = ["src"];
|
|
47
|
+
const _hoisted_6 = { class: "nut-categorypane__skuImg" };
|
|
48
|
+
const _hoisted_7 = {
|
|
49
|
+
key: 1,
|
|
50
|
+
class: "nut-categorypane__cateListRight"
|
|
51
|
+
};
|
|
52
|
+
const _hoisted_8 = { class: "nut-categorypane__childTitle" };
|
|
53
|
+
const _hoisted_9 = {
|
|
54
|
+
key: 0,
|
|
55
|
+
class: "nut-categorypane__childItemList"
|
|
56
|
+
};
|
|
57
|
+
const _hoisted_10 = { class: "nut-categorypane__skuName" };
|
|
58
|
+
const _hoisted_11 = {
|
|
59
|
+
key: 2,
|
|
60
|
+
class: "nut-categorypane__selfItemList"
|
|
61
|
+
};
|
|
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.catName), 1),
|
|
68
|
+
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-categorypane__childItem",
|
|
72
|
+
key,
|
|
73
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.onChange())
|
|
74
|
+
}, [
|
|
75
|
+
createElementVNode("img", {
|
|
76
|
+
class: "nut-categorypane__childImg",
|
|
77
|
+
src: sku.backImg
|
|
78
|
+
}, null, 8, _hoisted_5),
|
|
79
|
+
createElementVNode("div", _hoisted_6, toDisplayString(sku.catName), 1)
|
|
80
|
+
]);
|
|
81
|
+
}), 128))
|
|
82
|
+
])) : createCommentVNode("", true)
|
|
83
|
+
]);
|
|
84
|
+
}), 128))
|
|
85
|
+
])) : createCommentVNode("", true),
|
|
86
|
+
_ctx.type == "text" ? (openBlock(), createElementBlock("div", _hoisted_7, [
|
|
87
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.categoryChild, (item, index2) => {
|
|
88
|
+
return openBlock(), createElementBlock("div", { key: index2 }, [
|
|
89
|
+
createElementVNode("div", _hoisted_8, toDisplayString(item.catName), 1),
|
|
90
|
+
item.catType == 1 ? (openBlock(), createElementBlock("div", _hoisted_9, [
|
|
91
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(item.childCateList, (sku, key) => {
|
|
92
|
+
return openBlock(), createElementBlock("div", {
|
|
93
|
+
class: "nut-categorypane__childItem",
|
|
94
|
+
key,
|
|
95
|
+
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.onChange())
|
|
96
|
+
}, [
|
|
97
|
+
createElementVNode("div", _hoisted_10, toDisplayString(sku.catName), 1)
|
|
98
|
+
]);
|
|
99
|
+
}), 128))
|
|
100
|
+
])) : createCommentVNode("", true)
|
|
101
|
+
]);
|
|
102
|
+
}), 128))
|
|
103
|
+
])) : createCommentVNode("", true),
|
|
104
|
+
_ctx.type == "custom" ? (openBlock(), createElementBlock("div", _hoisted_11, [
|
|
105
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.customCategory, (sku, key) => {
|
|
106
|
+
return openBlock(), createElementBlock("div", {
|
|
107
|
+
class: "nut-categorypane__skuName",
|
|
108
|
+
key,
|
|
109
|
+
onClick: _cache[2] || (_cache[2] = ($event) => _ctx.onChange())
|
|
110
|
+
}, toDisplayString(sku.catName), 1);
|
|
111
|
+
}), 128))
|
|
112
|
+
])) : createCommentVNode("", true)
|
|
113
|
+
]);
|
|
114
|
+
}
|
|
115
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
116
|
+
export { index as default };
|
|
@@ -1,26 +1,113 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.23-beta.1 Mon Jun 27 2022 21:39:05 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { resolveComponent
|
|
7
|
-
import { c as
|
|
8
|
-
import { u as
|
|
9
|
-
import { p as
|
|
10
|
-
import { _ as
|
|
6
|
+
import { resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, createBlock, createCommentVNode, Fragment, createElementVNode, toDisplayString, createTextVNode, computed } from "vue";
|
|
7
|
+
import { c as createComponent } from "./component.js";
|
|
8
|
+
import { u as useRouter } from "./index.js";
|
|
9
|
+
import { p as pxCheck } from "./pxCheck.js";
|
|
10
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
11
11
|
import "../locale/lang";
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
return
|
|
25
|
-
|
|
26
|
-
|
|
12
|
+
const _hoisted_1 = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "nut-cell__icon"
|
|
15
|
+
};
|
|
16
|
+
const _hoisted_2 = {
|
|
17
|
+
key: 1,
|
|
18
|
+
class: "nut-cell__title"
|
|
19
|
+
};
|
|
20
|
+
const _hoisted_3 = { class: "title" };
|
|
21
|
+
const _hoisted_4 = { class: "nut-cell__title-desc" };
|
|
22
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
23
|
+
const _component_nut_icon = resolveComponent("nut-icon");
|
|
24
|
+
return openBlock(), createElementBlock("view", {
|
|
25
|
+
class: normalizeClass(_ctx.classes),
|
|
26
|
+
style: normalizeStyle(_ctx.baseStyle),
|
|
27
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
|
|
28
|
+
}, [
|
|
29
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
30
|
+
_ctx.icon || _ctx.$slots.icon ? (openBlock(), createElementBlock("view", _hoisted_1, [
|
|
31
|
+
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
32
|
+
_ctx.icon ? (openBlock(), createBlock(_component_nut_icon, {
|
|
33
|
+
key: 0,
|
|
34
|
+
class: "icon",
|
|
35
|
+
name: _ctx.icon
|
|
36
|
+
}, null, 8, ["name"])) : createCommentVNode("", true)
|
|
37
|
+
])
|
|
38
|
+
])) : createCommentVNode("", true),
|
|
39
|
+
_ctx.title || _ctx.subTitle || _ctx.$slots.title ? (openBlock(), createElementBlock("view", _hoisted_2, [
|
|
40
|
+
_ctx.subTitle ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
41
|
+
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
42
|
+
createElementVNode("view", _hoisted_3, toDisplayString(_ctx.title), 1)
|
|
43
|
+
]),
|
|
44
|
+
createElementVNode("view", _hoisted_4, toDisplayString(_ctx.subTitle), 1)
|
|
45
|
+
], 64)) : renderSlot(_ctx.$slots, "title", { key: 1 }, () => [
|
|
46
|
+
createTextVNode(toDisplayString(_ctx.title), 1)
|
|
47
|
+
])
|
|
48
|
+
])) : createCommentVNode("", true),
|
|
49
|
+
_ctx.desc ? (openBlock(), createElementBlock("view", {
|
|
50
|
+
key: 2,
|
|
51
|
+
class: normalizeClass(["nut-cell__value", { "nut-cell__value--alone": !_ctx.title && !_ctx.subTitle && !_ctx.$slots.title }]),
|
|
52
|
+
style: normalizeStyle({ "text-align": _ctx.descTextAlign })
|
|
53
|
+
}, toDisplayString(_ctx.desc), 7)) : createCommentVNode("", true),
|
|
54
|
+
renderSlot(_ctx.$slots, "link", {}, () => [
|
|
55
|
+
_ctx.isLink || _ctx.to ? (openBlock(), createBlock(_component_nut_icon, {
|
|
56
|
+
key: 0,
|
|
57
|
+
class: "nut-cell__link",
|
|
58
|
+
name: "right"
|
|
59
|
+
})) : createCommentVNode("", true)
|
|
60
|
+
])
|
|
61
|
+
])
|
|
62
|
+
], 6);
|
|
63
|
+
}
|
|
64
|
+
const { componentName, create } = createComponent("cell");
|
|
65
|
+
const _sfc_main = create({
|
|
66
|
+
props: {
|
|
67
|
+
title: { type: String, default: "" },
|
|
68
|
+
subTitle: { type: String, default: "" },
|
|
69
|
+
desc: { type: String, default: "" },
|
|
70
|
+
descTextAlign: { type: String, default: "right" },
|
|
71
|
+
isLink: { type: Boolean, default: false },
|
|
72
|
+
to: [String, Object],
|
|
73
|
+
replace: { type: Boolean, default: false },
|
|
74
|
+
roundRadius: { type: [String, Number], default: "" },
|
|
75
|
+
url: { type: String, default: "" },
|
|
76
|
+
icon: { type: String, default: "" },
|
|
77
|
+
center: { type: Boolean, default: false },
|
|
78
|
+
size: { type: String, default: "" }
|
|
79
|
+
},
|
|
80
|
+
emits: ["click"],
|
|
81
|
+
setup(props, { emit }) {
|
|
82
|
+
const classes = computed(() => {
|
|
83
|
+
const prefixCls = componentName;
|
|
84
|
+
return {
|
|
85
|
+
[prefixCls]: true,
|
|
86
|
+
[`${prefixCls}--clickable`]: props.isLink || props.to,
|
|
87
|
+
[`${prefixCls}--center`]: props.center,
|
|
88
|
+
[`${prefixCls}--large`]: props.size == "large"
|
|
89
|
+
};
|
|
90
|
+
});
|
|
91
|
+
const router = useRouter();
|
|
92
|
+
const baseStyle = computed(() => {
|
|
93
|
+
return {
|
|
94
|
+
borderRadius: pxCheck(props.roundRadius)
|
|
95
|
+
};
|
|
96
|
+
});
|
|
97
|
+
const handleClick = (event) => {
|
|
98
|
+
emit("click", event);
|
|
99
|
+
if (props.to && router) {
|
|
100
|
+
router[props.replace ? "replace" : "push"](props.to);
|
|
101
|
+
} else if (props.url) {
|
|
102
|
+
props.replace ? location.replace(props.url) : location.href = props.url;
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
return {
|
|
106
|
+
handleClick,
|
|
107
|
+
classes,
|
|
108
|
+
baseStyle
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", render]]);
|
|
113
|
+
export { index as default };
|
|
@@ -1,14 +1,49 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.23-beta.1 Mon Jun 27 2022 21:39:05 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { computed
|
|
7
|
-
import { c as
|
|
8
|
-
import { _ as
|
|
6
|
+
import { computed, openBlock, createElementBlock, normalizeClass, renderSlot, toDisplayString, createCommentVNode, createElementVNode } from "vue";
|
|
7
|
+
import { c as createComponent } from "./component.js";
|
|
8
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
9
|
import "../locale/lang";
|
|
10
|
-
const { componentName
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
10
|
+
const { componentName, create } = createComponent("cell-group");
|
|
11
|
+
const _sfc_main = create({
|
|
12
|
+
props: {
|
|
13
|
+
title: { type: String, default: "" },
|
|
14
|
+
desc: { type: String, default: "" }
|
|
15
|
+
},
|
|
16
|
+
setup() {
|
|
17
|
+
const classes = computed(() => {
|
|
18
|
+
const prefixCls = componentName;
|
|
19
|
+
return {
|
|
20
|
+
[prefixCls]: true
|
|
21
|
+
};
|
|
22
|
+
});
|
|
23
|
+
return {
|
|
24
|
+
classes
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const _hoisted_1 = {
|
|
29
|
+
key: 1,
|
|
30
|
+
class: "nut-cell-group__title"
|
|
31
|
+
};
|
|
32
|
+
const _hoisted_2 = {
|
|
33
|
+
key: 3,
|
|
34
|
+
class: "nut-cell-group__desc"
|
|
35
|
+
};
|
|
36
|
+
const _hoisted_3 = { class: "nut-cell-group__warp" };
|
|
37
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
38
|
+
return openBlock(), createElementBlock("view", {
|
|
39
|
+
class: normalizeClass(_ctx.classes)
|
|
40
|
+
}, [
|
|
41
|
+
_ctx.$slots.title ? renderSlot(_ctx.$slots, "title", { key: 0 }) : _ctx.title ? (openBlock(), createElementBlock("view", _hoisted_1, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
|
|
42
|
+
_ctx.$slots.desc ? renderSlot(_ctx.$slots, "desc", { key: 2 }) : _ctx.desc ? (openBlock(), createElementBlock("view", _hoisted_2, toDisplayString(_ctx.desc), 1)) : createCommentVNode("", true),
|
|
43
|
+
createElementVNode("view", _hoisted_3, [
|
|
44
|
+
renderSlot(_ctx.$slots, "default")
|
|
45
|
+
])
|
|
46
|
+
], 2);
|
|
47
|
+
}
|
|
48
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
49
|
+
export { index as default };
|
|
@@ -1,38 +1,143 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.23-beta.1 Mon Jun 27 2022 21:39:05 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { c as
|
|
7
|
-
import { inject
|
|
8
|
-
import
|
|
6
|
+
import { c as createComponent } from "./component.js";
|
|
7
|
+
import { inject, reactive, computed, onMounted, getCurrentInstance, watch, h } from "vue";
|
|
8
|
+
import _sfc_main$1 from "./Icon.js";
|
|
9
9
|
import "../locale/lang";
|
|
10
10
|
import "./pxCheck.js";
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
11
|
+
const component = (componentName2, nutIcon) => {
|
|
12
|
+
return {
|
|
13
|
+
components: {
|
|
14
|
+
nutIcon
|
|
15
|
+
},
|
|
16
|
+
props: {
|
|
17
|
+
modelValue: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: false
|
|
20
|
+
},
|
|
21
|
+
disabled: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: false
|
|
24
|
+
},
|
|
25
|
+
textPosition: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "right"
|
|
28
|
+
},
|
|
29
|
+
iconSize: {
|
|
30
|
+
type: [String, Number],
|
|
31
|
+
default: ""
|
|
32
|
+
},
|
|
33
|
+
iconName: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: "check-normal"
|
|
36
|
+
},
|
|
37
|
+
iconActiveName: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: "checked"
|
|
40
|
+
},
|
|
41
|
+
iconIndeterminateName: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: "check-disabled"
|
|
44
|
+
},
|
|
45
|
+
label: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: ""
|
|
48
|
+
},
|
|
49
|
+
iconClassPrefix: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: "nut-icon"
|
|
52
|
+
},
|
|
53
|
+
iconFontClassName: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: "nutui-iconfont"
|
|
56
|
+
},
|
|
57
|
+
indeterminate: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: false
|
|
26
60
|
}
|
|
61
|
+
},
|
|
62
|
+
emits: ["change", "update:modelValue"],
|
|
63
|
+
setup(props, { emit, slots }) {
|
|
64
|
+
const parent = inject("parent", null);
|
|
65
|
+
const state = reactive({
|
|
66
|
+
partialSelect: props.indeterminate
|
|
67
|
+
});
|
|
68
|
+
const hasParent = computed(() => !!parent);
|
|
69
|
+
const pValue = computed(() => {
|
|
70
|
+
if (hasParent.value) {
|
|
71
|
+
return parent.value.value.includes(props.label);
|
|
72
|
+
} else {
|
|
73
|
+
return props.modelValue;
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
const pDisabled = computed(() => {
|
|
77
|
+
return hasParent.value ? parent.disabled.value ? parent.disabled.value : props.disabled : props.disabled;
|
|
78
|
+
});
|
|
79
|
+
const checked = computed(() => !!props.modelValue);
|
|
80
|
+
const color = computed(() => {
|
|
81
|
+
return !pDisabled.value ? !pValue.value ? "nut-checkbox__icon--unchecked" : state.partialSelect ? "nut-checkbox__icon--indeterminate" : "nut-checkbox__icon" : "nut-checkbox__icon--disable";
|
|
82
|
+
});
|
|
83
|
+
const emitChange = (value, label) => {
|
|
84
|
+
emit("update:modelValue", value);
|
|
85
|
+
emit("change", value, label);
|
|
86
|
+
};
|
|
87
|
+
const renderIcon = () => {
|
|
88
|
+
const { iconName, iconSize, iconActiveName, iconClassPrefix, iconFontClassName, iconIndeterminateName } = props;
|
|
89
|
+
return h(nutIcon, {
|
|
90
|
+
name: !pValue.value ? iconName : state.partialSelect ? iconIndeterminateName : iconActiveName,
|
|
91
|
+
size: iconSize,
|
|
92
|
+
class: color.value,
|
|
93
|
+
classPrefix: iconClassPrefix,
|
|
94
|
+
fontClassName: iconFontClassName
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
const renderLabel = () => {
|
|
98
|
+
var _a;
|
|
99
|
+
return h("view", {
|
|
100
|
+
class: `${componentName2}__label ${pDisabled.value ? `${componentName2}__label--disabled` : ""}`
|
|
101
|
+
}, (_a = slots.default) == null ? void 0 : _a.call(slots));
|
|
102
|
+
};
|
|
103
|
+
const handleClick = (e) => {
|
|
104
|
+
var _a, _b;
|
|
105
|
+
if (pDisabled.value)
|
|
106
|
+
return;
|
|
107
|
+
if (checked.value && state.partialSelect) {
|
|
108
|
+
state.partialSelect = false;
|
|
109
|
+
emitChange(checked.value, (_a = slots.default) == null ? void 0 : _a.call(slots)[0].children);
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
emitChange(!checked.value, (_b = slots.default) == null ? void 0 : _b.call(slots)[0].children);
|
|
113
|
+
if (hasParent.value) {
|
|
114
|
+
let value = parent.value.value;
|
|
115
|
+
let max = parent.max.value;
|
|
116
|
+
let { label } = props;
|
|
117
|
+
const index = value.indexOf(label);
|
|
118
|
+
if (index > -1) {
|
|
119
|
+
value.splice(index, 1);
|
|
120
|
+
} else if (index <= -1 && (value.length < max || !max)) {
|
|
121
|
+
value.push(label);
|
|
122
|
+
}
|
|
123
|
+
parent.updateValue(value);
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
onMounted(() => {
|
|
127
|
+
hasParent.value && parent["relation"](getCurrentInstance());
|
|
128
|
+
});
|
|
129
|
+
watch(() => props.indeterminate, (newVal) => {
|
|
130
|
+
state.partialSelect = newVal;
|
|
131
|
+
});
|
|
132
|
+
return () => {
|
|
133
|
+
return h("view", {
|
|
134
|
+
class: `${componentName2} ${props.textPosition === "left" ? `${componentName2}--reverse` : ""}`,
|
|
135
|
+
onClick: handleClick
|
|
136
|
+
}, [renderIcon(), renderLabel()]);
|
|
137
|
+
};
|
|
27
138
|
}
|
|
28
139
|
};
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}), () => {
|
|
34
|
-
var _a;
|
|
35
|
-
return c("view", { class: `${e2} ${d2.textPosition === "left" ? `${e2}--reverse` : ""}`, onClick: _ }, [g(), c("view", { class: `${e2}__label ${b.value ? `${e2}__label--disabled` : ""}` }, (_a = s2.default) == null ? void 0 : _a.call(s2))]);
|
|
36
|
-
};
|
|
37
|
-
} }))(r, u));
|
|
38
|
-
export { s as default };
|
|
140
|
+
};
|
|
141
|
+
const { create, componentName } = createComponent("checkbox");
|
|
142
|
+
const _sfc_main = create(component(componentName, _sfc_main$1));
|
|
143
|
+
export { _sfc_main as default };
|