@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
|
@@ -1,17 +1,34 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
1
17
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
18
|
+
* @nutui/nutui v3.1.20-beta.0 Mon Apr 25 2022 18:02:52 GMT+0800 (中国标准时间)
|
|
3
19
|
* (c) 2022 @jdf2e.
|
|
4
20
|
* Released under the MIT License.
|
|
5
21
|
*/
|
|
6
|
-
import { toRefs, computed, resolveComponent, openBlock, createElementBlock, normalizeStyle, normalizeClass,
|
|
22
|
+
import { toRefs, inject, ref, reactive, onMounted, computed, resolveComponent, openBlock, createElementBlock, normalizeStyle, normalizeClass, Fragment, createBlock, createCommentVNode, renderSlot, toDisplayString } from "vue";
|
|
7
23
|
import { c as createComponent } from "./component.js";
|
|
8
24
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
25
|
+
import "../locale/lang";
|
|
9
26
|
const { componentName, create } = createComponent("avatar");
|
|
10
27
|
const _sfc_main = create({
|
|
11
28
|
props: {
|
|
12
29
|
size: {
|
|
13
30
|
type: String,
|
|
14
|
-
default: "
|
|
31
|
+
default: ""
|
|
15
32
|
},
|
|
16
33
|
shape: {
|
|
17
34
|
type: String,
|
|
@@ -21,28 +38,69 @@ const _sfc_main = create({
|
|
|
21
38
|
type: String,
|
|
22
39
|
default: "#eee"
|
|
23
40
|
},
|
|
41
|
+
color: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: "#666"
|
|
44
|
+
},
|
|
45
|
+
url: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: ""
|
|
48
|
+
},
|
|
49
|
+
alt: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: ""
|
|
52
|
+
},
|
|
24
53
|
icon: {
|
|
25
54
|
type: String,
|
|
26
55
|
default: ""
|
|
27
56
|
}
|
|
28
57
|
},
|
|
29
|
-
emits: ["active-avatar"],
|
|
58
|
+
emits: ["active-avatar", "onError"],
|
|
30
59
|
setup(props, { emit, slots }) {
|
|
31
|
-
const { size, shape, bgColor, icon } = toRefs(props);
|
|
60
|
+
const { size, shape, bgColor, color, icon } = toRefs(props);
|
|
32
61
|
const sizeValue = ["large", "normal", "small"];
|
|
62
|
+
const avatarGroup = inject("avatarGroup", null);
|
|
63
|
+
const avatarRef = ref(null);
|
|
64
|
+
const visible = reactive({
|
|
65
|
+
lightTheme: false
|
|
66
|
+
});
|
|
67
|
+
const state = reactive({
|
|
68
|
+
index: 1,
|
|
69
|
+
showMax: false,
|
|
70
|
+
maxIndex: 0
|
|
71
|
+
});
|
|
72
|
+
onMounted(() => {
|
|
73
|
+
var _a, _b;
|
|
74
|
+
const children = (_b = (_a = avatarGroup == null ? void 0 : avatarGroup.avatarGroupRef) == null ? void 0 : _a.value) == null ? void 0 : _b.children;
|
|
75
|
+
if (children) {
|
|
76
|
+
avatarLength(children);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
33
79
|
const classes = computed(() => {
|
|
80
|
+
var _a, _b;
|
|
34
81
|
const prefixCls = componentName;
|
|
35
82
|
return {
|
|
36
83
|
[prefixCls]: true,
|
|
37
|
-
[
|
|
38
|
-
[
|
|
84
|
+
[`nut-avatar-${size.value || ((_a = avatarGroup == null ? void 0 : avatarGroup.props) == null ? void 0 : _a.size) || "normal"}`]: true,
|
|
85
|
+
[`nut-avatar-${shape.value || ((_b = avatarGroup == null ? void 0 : avatarGroup.props) == null ? void 0 : _b.shape) || "normal"}`]: true
|
|
39
86
|
};
|
|
40
87
|
});
|
|
41
88
|
const styles = computed(() => {
|
|
89
|
+
var _a, _b, _c;
|
|
42
90
|
return {
|
|
43
91
|
width: sizeValue.indexOf(size.value) > -1 ? "" : `${size.value}px`,
|
|
44
92
|
height: sizeValue.indexOf(size.value) > -1 ? "" : `${size.value}px`,
|
|
45
|
-
backgroundColor: `${bgColor.value}
|
|
93
|
+
backgroundColor: `${bgColor.value}`,
|
|
94
|
+
color: `${color.value}`,
|
|
95
|
+
marginLeft: state.index != 1 && (((_a = avatarGroup == null ? void 0 : avatarGroup.props) == null ? void 0 : _a.span) ? `${(_b = avatarGroup == null ? void 0 : avatarGroup.props) == null ? void 0 : _b.span}px` : ""),
|
|
96
|
+
zIndex: ((_c = avatarGroup == null ? void 0 : avatarGroup.props) == null ? void 0 : _c.zIndex) == "right" ? `${Math.abs(state.maxIndex - state.index)}` : ""
|
|
97
|
+
};
|
|
98
|
+
});
|
|
99
|
+
const maxStyles = computed(() => {
|
|
100
|
+
var _a, _b;
|
|
101
|
+
return {
|
|
102
|
+
backgroundColor: `${(_a = avatarGroup == null ? void 0 : avatarGroup.props) == null ? void 0 : _a.maxBgColor}`,
|
|
103
|
+
color: `${(_b = avatarGroup == null ? void 0 : avatarGroup.props) == null ? void 0 : _b.maxColor}`
|
|
46
104
|
};
|
|
47
105
|
});
|
|
48
106
|
const iconStyles = computed(() => {
|
|
@@ -51,37 +109,75 @@ const _sfc_main = create({
|
|
|
51
109
|
const isShowText = computed(() => {
|
|
52
110
|
return slots.default;
|
|
53
111
|
});
|
|
112
|
+
const avatarLength = (children) => {
|
|
113
|
+
var _a, _b, _c;
|
|
114
|
+
state.maxIndex = children.length;
|
|
115
|
+
for (let i = 0; i < children.length; i++) {
|
|
116
|
+
if (children[i] && children[i].classList && children[i].classList[0] == "nut-avatar") {
|
|
117
|
+
children[i].setAttribute("data-index", i + 1);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
state.index = (_b = (_a = avatarRef == null ? void 0 : avatarRef.value) == null ? void 0 : _a.dataset) == null ? void 0 : _b.index;
|
|
121
|
+
if (state.index == state.maxIndex && state.index != ((_c = avatarGroup == null ? void 0 : avatarGroup.props) == null ? void 0 : _c.maxCount)) {
|
|
122
|
+
state.showMax = true;
|
|
123
|
+
}
|
|
124
|
+
};
|
|
54
125
|
const activeAvatar = (event) => {
|
|
55
126
|
emit("active-avatar", event);
|
|
56
127
|
};
|
|
57
|
-
|
|
128
|
+
const onError = (event) => {
|
|
129
|
+
emit("onError", event);
|
|
130
|
+
};
|
|
131
|
+
return __spreadValues({
|
|
58
132
|
classes,
|
|
59
133
|
styles,
|
|
60
134
|
iconStyles,
|
|
61
135
|
isShowText,
|
|
62
|
-
|
|
63
|
-
|
|
136
|
+
maxStyles,
|
|
137
|
+
activeAvatar,
|
|
138
|
+
onError,
|
|
139
|
+
avatarGroup,
|
|
140
|
+
visible,
|
|
141
|
+
avatarRef
|
|
142
|
+
}, toRefs(state));
|
|
64
143
|
}
|
|
65
144
|
});
|
|
66
|
-
const _hoisted_1 =
|
|
67
|
-
|
|
145
|
+
const _hoisted_1 = ["src", "alt"];
|
|
146
|
+
const _hoisted_2 = {
|
|
147
|
+
key: 2,
|
|
148
|
+
class: "text"
|
|
149
|
+
};
|
|
150
|
+
const _hoisted_3 = {
|
|
151
|
+
key: 1,
|
|
68
152
|
class: "text"
|
|
69
153
|
};
|
|
70
154
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
155
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
71
156
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
72
|
-
return openBlock(), createElementBlock("view", {
|
|
73
|
-
|
|
157
|
+
return _ctx.showMax || !((_b = (_a = _ctx.avatarGroup) == null ? void 0 : _a.props) == null ? void 0 : _b.maxCount) || _ctx.index <= ((_d = (_c = _ctx.avatarGroup) == null ? void 0 : _c.props) == null ? void 0 : _d.maxCount) ? (openBlock(), createElementBlock("view", {
|
|
158
|
+
key: 0,
|
|
159
|
+
style: normalizeStyle(!_ctx.showMax ? _ctx.styles : _ctx.maxStyles),
|
|
74
160
|
class: normalizeClass(_ctx.classes),
|
|
75
|
-
onClick: _cache[
|
|
161
|
+
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.activeAvatar(_ctx.e)),
|
|
162
|
+
ref: "avatarRef"
|
|
76
163
|
}, [
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
164
|
+
!((_f = (_e = _ctx.avatarGroup) == null ? void 0 : _e.props) == null ? void 0 : _f.maxCount) || _ctx.index <= ((_h = (_g = _ctx.avatarGroup) == null ? void 0 : _g.props) == null ? void 0 : _h.maxCount) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
165
|
+
_ctx.url ? (openBlock(), createElementBlock("img", {
|
|
166
|
+
key: 0,
|
|
167
|
+
src: _ctx.url,
|
|
168
|
+
alt: _ctx.alt,
|
|
169
|
+
onError: _cache[0] || (_cache[0] = (...args) => _ctx.onError && _ctx.onError(...args))
|
|
170
|
+
}, null, 40, _hoisted_1)) : _ctx.icon ? (openBlock(), createBlock(_component_nut_icon, {
|
|
171
|
+
key: 1,
|
|
172
|
+
class: "icon",
|
|
173
|
+
name: _ctx.iconStyles
|
|
174
|
+
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
175
|
+
_ctx.isShowText ? (openBlock(), createElementBlock("view", _hoisted_2, [
|
|
176
|
+
renderSlot(_ctx.$slots, "default")
|
|
177
|
+
])) : createCommentVNode("", true)
|
|
178
|
+
], 64)) : createCommentVNode("", true),
|
|
179
|
+
_ctx.showMax ? (openBlock(), createElementBlock("view", _hoisted_3, toDisplayString(((_j = (_i = _ctx.avatarGroup) == null ? void 0 : _i.props) == null ? void 0 : _j.maxContent) ? (_l = (_k = _ctx.avatarGroup) == null ? void 0 : _k.props) == null ? void 0 : _l.maxContent : `+ ${_ctx.maxIndex - ((_n = (_m = _ctx.avatarGroup) == null ? void 0 : _m.props) == null ? void 0 : _n.maxCount)}`), 1)) : createCommentVNode("", true)
|
|
180
|
+
], 6)) : createCommentVNode("", true);
|
|
85
181
|
}
|
|
86
182
|
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
87
183
|
export { index as default };
|
|
@@ -0,0 +1,78 @@
|
|
|
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 { toRefs, ref, computed, onMounted, provide, openBlock, createElementBlock, normalizeClass, renderSlot } 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, create } = createComponent("avatar-group");
|
|
11
|
+
const _sfc_main = create({
|
|
12
|
+
props: {
|
|
13
|
+
maxContent: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: ""
|
|
16
|
+
},
|
|
17
|
+
maxCount: {
|
|
18
|
+
type: [Number, String],
|
|
19
|
+
default: ""
|
|
20
|
+
},
|
|
21
|
+
maxBgColor: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: "#eee"
|
|
24
|
+
},
|
|
25
|
+
maxColor: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "#666"
|
|
28
|
+
},
|
|
29
|
+
size: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: ""
|
|
32
|
+
},
|
|
33
|
+
shape: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: ""
|
|
36
|
+
},
|
|
37
|
+
span: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: "-8"
|
|
40
|
+
},
|
|
41
|
+
zIndex: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: "left"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
setup(props, { emit, slots }) {
|
|
47
|
+
toRefs(props);
|
|
48
|
+
const avatarGroupRef = ref(null);
|
|
49
|
+
const index2 = ref(0);
|
|
50
|
+
const classes = computed(() => {
|
|
51
|
+
const prefixCls = componentName;
|
|
52
|
+
return {
|
|
53
|
+
[prefixCls]: true
|
|
54
|
+
};
|
|
55
|
+
});
|
|
56
|
+
onMounted(() => {
|
|
57
|
+
});
|
|
58
|
+
provide("avatarGroup", {
|
|
59
|
+
props,
|
|
60
|
+
avatarGroupRef,
|
|
61
|
+
index: index2
|
|
62
|
+
});
|
|
63
|
+
return {
|
|
64
|
+
classes,
|
|
65
|
+
avatarGroupRef
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
70
|
+
return openBlock(), createElementBlock("view", {
|
|
71
|
+
class: normalizeClass(_ctx.classes),
|
|
72
|
+
ref: "avatarGroupRef"
|
|
73
|
+
}, [
|
|
74
|
+
renderSlot(_ctx.$slots, "default")
|
|
75
|
+
], 2);
|
|
76
|
+
}
|
|
77
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
78
|
+
export { index as default };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.20-beta.0 Mon Apr 25 2022 18:02:52 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { reactive, computed, onMounted, onUnmounted, onActivated, onDeactivated, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, withModifiers, renderSlot, createVNode } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
8
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
|
+
import "../locale/lang";
|
|
9
10
|
const { componentName, create } = createComponent("backtop");
|
|
10
11
|
const _sfc_main = create({
|
|
11
12
|
props: {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.20-beta.0 Mon Apr 25 2022 18:02:52 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { reactive, computed, openBlock, createElementBlock, createElementVNode, renderSlot, withDirectives, toDisplayString, normalizeClass, normalizeStyle, vShow } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
8
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
|
+
import "../locale/lang";
|
|
9
10
|
const { create } = createComponent("badge");
|
|
10
11
|
const _sfc_main = create({
|
|
11
12
|
props: {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.20-beta.0 Mon Apr 25 2022 18:02:52 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { computed, ref, onMounted, onUnmounted, onDeactivated, watch, nextTick, openBlock, createElementBlock, normalizeClass, createElementVNode } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
8
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
|
+
import "../locale/lang";
|
|
9
10
|
const { componentName, create } = createComponent("barrage");
|
|
10
11
|
const _sfc_main = create({
|
|
11
12
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.20-beta.0 Mon Apr 25 2022 18:02:52 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -7,6 +7,7 @@ import { toRefs, computed, resolveComponent, openBlock, createElementBlock, norm
|
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
8
|
import _sfc_main$1 from "./Icon.js";
|
|
9
9
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
10
|
+
import "../locale/lang";
|
|
10
11
|
import "./pxCheck.js";
|
|
11
12
|
const { componentName, create } = createComponent("button");
|
|
12
13
|
const _sfc_main = create({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.20-beta.0 Mon Apr 25 2022 18:02:52 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -7,6 +7,7 @@ import { computed, ref, resolveComponent, openBlock, createBlock, withCtx, creat
|
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
8
|
import { C as CalendarItem, U as Utils } from "./index5.js";
|
|
9
9
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
10
|
+
import "../locale/lang";
|
|
10
11
|
import "./raf.js";
|
|
11
12
|
const { create } = createComponent("calendar");
|
|
12
13
|
const _sfc_main = create({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.20-beta.0 Mon Apr 25 2022 18:02:52 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -8,3 +8,4 @@ import "./component.js";
|
|
|
8
8
|
export { C as default } from "./index5.js";
|
|
9
9
|
import "./raf.js";
|
|
10
10
|
import "./plugin-vue_export-helper.js";
|
|
11
|
+
import "../locale/lang";
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.20-beta.0 Mon Apr 25 2022 18:02:52 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { c as createComponent } from "./component.js";
|
|
7
|
-
import { resolveComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, renderSlot, createVNode, createBlock, Fragment, withCtx, createTextVNode } from "vue";
|
|
7
|
+
import { resolveComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, renderSlot, createVNode, createBlock, createCommentVNode, Fragment, withCtx, createTextVNode } from "vue";
|
|
8
8
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
|
+
import "../locale/lang";
|
|
9
10
|
const { create } = createComponent("card");
|
|
10
11
|
const _sfc_main = create({
|
|
11
12
|
props: {
|
|
@@ -36,6 +37,10 @@ const _sfc_main = create({
|
|
|
36
37
|
shopName: {
|
|
37
38
|
type: String,
|
|
38
39
|
default: ""
|
|
40
|
+
},
|
|
41
|
+
isNeedPrice: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: true
|
|
39
44
|
}
|
|
40
45
|
},
|
|
41
46
|
setup(props, { emit, slots }) {
|
|
@@ -52,7 +57,10 @@ const _hoisted_2 = { class: "nut-card__left" };
|
|
|
52
57
|
const _hoisted_3 = ["src"];
|
|
53
58
|
const _hoisted_4 = { class: "nut-card__right" };
|
|
54
59
|
const _hoisted_5 = { class: "nut-card__right__title" };
|
|
55
|
-
const _hoisted_6 = {
|
|
60
|
+
const _hoisted_6 = {
|
|
61
|
+
key: 0,
|
|
62
|
+
class: "nut-card__right__price"
|
|
63
|
+
};
|
|
56
64
|
const _hoisted_7 = { class: "nut-card__right__other" };
|
|
57
65
|
const _hoisted_8 = { class: "nut-card__right__shop" };
|
|
58
66
|
const _hoisted_9 = { class: "nut-card__right__shop__name" };
|
|
@@ -69,14 +77,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
69
77
|
createElementVNode("div", _hoisted_4, [
|
|
70
78
|
createElementVNode("div", _hoisted_5, toDisplayString(_ctx.title), 1),
|
|
71
79
|
renderSlot(_ctx.$slots, "prolist"),
|
|
72
|
-
|
|
80
|
+
_ctx.isNeedPrice ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
73
81
|
createVNode(_component_nut_price, { price: _ctx.price }, null, 8, ["price"]),
|
|
74
82
|
_ctx.isHaveSlot("origin") ? renderSlot(_ctx.$slots, "origin", { key: 0 }) : (openBlock(), createBlock(_component_nut_price, {
|
|
75
83
|
key: 1,
|
|
76
84
|
class: "nut-card__right__price__origin",
|
|
77
85
|
price: _ctx.vipPrice
|
|
78
86
|
}, null, 8, ["price"]))
|
|
79
|
-
]),
|
|
87
|
+
])) : createCommentVNode("", true),
|
|
80
88
|
createElementVNode("div", _hoisted_7, [
|
|
81
89
|
_ctx.isHaveSlot("shop-tag") ? renderSlot(_ctx.$slots, "shop-tag", { key: 0 }) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
82
90
|
createVNode(_component_nut_tag, { type: "danger" }, {
|
|
@@ -30,18 +30,19 @@ var __objRest = (source, exclude) => {
|
|
|
30
30
|
}
|
|
31
31
|
return target;
|
|
32
32
|
};
|
|
33
|
-
var __publicField = (obj, key, value) => {
|
|
34
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
35
|
-
return value;
|
|
36
|
-
};
|
|
37
33
|
/*!
|
|
38
|
-
* @nutui/nutui v3.1.
|
|
34
|
+
* @nutui/nutui v3.1.20-beta.0 Mon Apr 25 2022 18:02:52 GMT+0800 (中国标准时间)
|
|
39
35
|
* (c) 2022 @jdf2e.
|
|
40
36
|
* Released under the MIT License.
|
|
41
37
|
*/
|
|
42
38
|
import { computed, ref, watch, resolveComponent, openBlock, createBlock, withCtx, createElementBlock, Fragment, renderList, createElementVNode, normalizeClass, toDisplayString, createCommentVNode, createVNode } from "vue";
|
|
39
|
+
import { popupProps } from "./Popup.js";
|
|
43
40
|
import { c as createComponent } from "./component.js";
|
|
44
41
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
42
|
+
import "./OverLay.js";
|
|
43
|
+
import "../locale/lang";
|
|
44
|
+
import "./Icon.js";
|
|
45
|
+
import "./pxCheck.js";
|
|
45
46
|
const formatTree = (tree, parent, config) => tree.map((node) => {
|
|
46
47
|
const { value: valueKey = "value", text: textKey = "text", children: childrenKey = "children" } = config;
|
|
47
48
|
const _a = node, { [valueKey]: value, [textKey]: text, [childrenKey]: children } = _a, others = __objRest(_a, [__restKey(valueKey), __restKey(textKey), __restKey(childrenKey)]);
|
|
@@ -104,8 +105,6 @@ const convertListToOptions = (list, options) => {
|
|
|
104
105
|
};
|
|
105
106
|
class Tree {
|
|
106
107
|
constructor(nodes, config) {
|
|
107
|
-
__publicField(this, "nodes");
|
|
108
|
-
__publicField(this, "config");
|
|
109
108
|
this.config = __spreadValues({
|
|
110
109
|
value: "value",
|
|
111
110
|
text: "text",
|
|
@@ -130,24 +129,21 @@ class Tree {
|
|
|
130
129
|
});
|
|
131
130
|
return foundNode;
|
|
132
131
|
}
|
|
133
|
-
getPathNodesByNode(node) {
|
|
134
|
-
const nodes = [];
|
|
135
|
-
while (node) {
|
|
136
|
-
nodes.unshift(node);
|
|
137
|
-
node = node._parent;
|
|
138
|
-
}
|
|
139
|
-
return nodes;
|
|
140
|
-
}
|
|
141
132
|
getPathNodesByValue(value) {
|
|
142
|
-
if (
|
|
133
|
+
if (!value.length) {
|
|
143
134
|
return [];
|
|
144
135
|
}
|
|
145
|
-
const
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
136
|
+
const pathNodes = [];
|
|
137
|
+
let currentNodes = this.nodes;
|
|
138
|
+
while (currentNodes && currentNodes.length) {
|
|
139
|
+
const foundNode = currentNodes.find((node) => node.value === value[node.level]);
|
|
140
|
+
if (!foundNode) {
|
|
141
|
+
break;
|
|
142
|
+
}
|
|
143
|
+
pathNodes.push(foundNode);
|
|
144
|
+
currentNodes = foundNode.children;
|
|
149
145
|
}
|
|
150
|
-
return
|
|
146
|
+
return pathNodes;
|
|
151
147
|
}
|
|
152
148
|
isLeaf(node, lazy) {
|
|
153
149
|
const { leaf, children } = node;
|
|
@@ -451,7 +447,7 @@ const _sfc_main = create({
|
|
|
451
447
|
components: {
|
|
452
448
|
[CascaderItem.name]: CascaderItem
|
|
453
449
|
},
|
|
454
|
-
props: {
|
|
450
|
+
props: __spreadProps(__spreadValues({}, popupProps), {
|
|
455
451
|
modelValue: Array,
|
|
456
452
|
visible: Boolean,
|
|
457
453
|
title: String,
|
|
@@ -474,7 +470,7 @@ const _sfc_main = create({
|
|
|
474
470
|
default: "children"
|
|
475
471
|
},
|
|
476
472
|
convertConfig: Object
|
|
477
|
-
},
|
|
473
|
+
}),
|
|
478
474
|
emits: ["update:modelValue", "change", "pathChange", "update:visible"],
|
|
479
475
|
setup(props, { emit }) {
|
|
480
476
|
const innerValue = ref(props.modelValue);
|
|
@@ -508,10 +504,7 @@ const _sfc_main = create({
|
|
|
508
504
|
};
|
|
509
505
|
}
|
|
510
506
|
});
|
|
511
|
-
const _hoisted_1 =
|
|
512
|
-
key: 0,
|
|
513
|
-
class: "nut-cascader__bar"
|
|
514
|
-
};
|
|
507
|
+
const _hoisted_1 = ["innerHTML"];
|
|
515
508
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
516
509
|
const _component_nut_cascader_item = resolveComponent("nut-cascader-item");
|
|
517
510
|
const _component_nut_popup = resolveComponent("nut-popup");
|
|
@@ -521,11 +514,17 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
521
514
|
position: "bottom",
|
|
522
515
|
"pop-class": "nut-cascader__popup",
|
|
523
516
|
round: "",
|
|
524
|
-
closeable:
|
|
525
|
-
"
|
|
517
|
+
closeable: !_ctx.closeable,
|
|
518
|
+
"close-icon": _ctx.closeIcon,
|
|
519
|
+
"destroy-on-close": false,
|
|
520
|
+
"close-icon-position": _ctx.closeIconPosition
|
|
526
521
|
}, {
|
|
527
522
|
default: withCtx(() => [
|
|
528
|
-
_ctx.title ? (openBlock(), createElementBlock("view",
|
|
523
|
+
_ctx.title ? (openBlock(), createElementBlock("view", {
|
|
524
|
+
key: 0,
|
|
525
|
+
class: "nut-cascader__bar",
|
|
526
|
+
innerHTML: _ctx.title
|
|
527
|
+
}, null, 8, _hoisted_1)) : createCommentVNode("", true),
|
|
529
528
|
createVNode(_component_nut_cascader_item, {
|
|
530
529
|
onChange: _ctx.onChange,
|
|
531
530
|
onPathChange: _ctx.onPathChange,
|
|
@@ -541,7 +540,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
541
540
|
}, null, 8, ["onChange", "onPathChange", "modelValue", "options", "lazy", "lazy-load", "value-key", "text-key", "children-key", "convert-config", "visible"])
|
|
542
541
|
]),
|
|
543
542
|
_: 1
|
|
544
|
-
}, 8, ["visible"]);
|
|
543
|
+
}, 8, ["visible", "closeable", "close-icon", "close-icon-position"]);
|
|
545
544
|
}
|
|
546
545
|
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
547
546
|
export { index as default };
|
|
@@ -0,0 +1,63 @@
|
|
|
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 { 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
|
+
import "../locale/lang";
|
|
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 };
|