@nutui/nutui 3.2.5 → 3.2.6-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 +12 -0
- package/dist/nutui.es.js +4214 -4444
- package/dist/nutui.umd.js +4213 -4543
- package/dist/packages/_es/ActionSheet.js +18 -19
- package/dist/packages/_es/Address.js +94 -85
- package/dist/packages/_es/AddressList.js +25 -12
- package/dist/packages/_es/Animate.js +3 -3
- package/dist/packages/_es/Audio.js +9 -2
- package/dist/packages/_es/AudioOperate.js +5 -1
- package/dist/packages/_es/Avatar.js +10 -10
- package/dist/packages/_es/AvatarGroup.js +5 -5
- package/dist/packages/_es/BackTop.js +55 -108
- package/dist/packages/_es/Badge.js +6 -4
- package/dist/packages/_es/Barrage.js +79 -103
- package/dist/packages/_es/Button.js +5 -3
- package/dist/packages/_es/Calendar.js +36 -23
- package/dist/packages/_es/CalendarItem.js +4 -3
- package/dist/packages/_es/Card.js +15 -5
- package/dist/packages/_es/Cascader.js +12 -11
- package/dist/packages/_es/Category.js +13 -12
- package/dist/packages/_es/CategoryPane.js +17 -13
- package/dist/packages/_es/Cell.js +9 -12
- package/dist/packages/_es/CellGroup.js +4 -2
- package/dist/packages/_es/Checkbox.js +1 -1
- package/dist/packages/_es/CheckboxGroup.js +2 -2
- package/dist/packages/_es/CircleProgress.js +98 -82
- package/dist/packages/_es/Col.js +1 -1
- package/dist/packages/_es/Collapse.js +65 -34
- package/dist/packages/_es/CollapseItem.js +93 -60
- package/dist/packages/_es/Comment.js +43 -19
- package/dist/packages/_es/ConfigProvider.js +1 -1
- package/dist/packages/_es/CountDown.js +3 -3
- package/dist/packages/_es/CountUp.js +47 -52
- package/dist/packages/_es/DatePicker.js +37 -54
- package/dist/packages/_es/Dialog.js +9 -88
- package/dist/packages/_es/Divider.js +3 -3
- package/dist/packages/_es/Drag.js +75 -49
- package/dist/packages/_es/Ecard.js +20 -18
- package/dist/packages/_es/Elevator.js +101 -76
- package/dist/packages/_es/Ellipsis.js +140 -100
- package/dist/packages/_es/Empty.js +6 -4
- package/dist/packages/_es/FixedNav.js +11 -6
- package/dist/packages/_es/Form.js +4 -4
- package/dist/packages/_es/FormItem.js +3 -1
- package/dist/packages/_es/Grid.js +1 -1
- package/dist/packages/_es/GridItem.js +10 -27
- package/dist/packages/_es/Icon.js +1 -1
- package/dist/packages/_es/Image.js +13 -114
- package/dist/packages/_es/ImagePreview.js +154 -400
- package/dist/packages/_es/Indicator.js +3 -3
- package/dist/packages/_es/InfiniteLoading.js +103 -115
- package/dist/packages/_es/Input.js +54 -26
- package/dist/packages/_es/InputNumber.js +25 -16
- package/dist/packages/_es/Invoice.js +6 -5
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/List.js +47 -34
- package/dist/packages/_es/Menu.js +35 -35
- package/dist/packages/_es/MenuItem.js +56 -29
- package/dist/packages/_es/Navbar.js +49 -39
- package/dist/packages/_es/NoticeBar.js +52 -41
- package/dist/packages/_es/Notify.js +37 -166
- package/dist/packages/_es/NumberKeyboard.js +15 -20
- package/dist/packages/_es/OldPicker.js +130 -116
- package/dist/packages/_es/OverLay.js +5 -28
- package/dist/packages/_es/Pagination.js +8 -5
- package/dist/packages/_es/Picker.js +196 -65
- package/dist/packages/_es/Popover.js +201 -881
- package/dist/packages/_es/Popup.js +28 -84
- package/dist/packages/_es/Price.js +22 -6
- package/dist/packages/_es/Progress.js +18 -11
- package/dist/packages/_es/PullRefresh.js +4 -2
- package/dist/packages/_es/Radio.js +3 -3
- package/dist/packages/_es/RadioGroup.js +1 -1
- package/dist/packages/_es/Range.js +48 -34
- package/dist/packages/_es/Rate.js +15 -14
- package/dist/packages/_es/Row.js +1 -1
- package/dist/packages/_es/SearchBar.js +39 -36
- package/dist/packages/_es/ShortPassword.js +97 -66
- package/dist/packages/_es/SideNavBar.js +7 -18
- package/dist/packages/_es/SideNavBarItem.js +1 -1
- package/dist/packages/_es/Signature.js +113 -80
- package/dist/packages/_es/Skeleton.js +12 -11
- package/dist/packages/_es/Sku.js +63 -38
- package/dist/packages/_es/Step.js +7 -2
- package/dist/packages/_es/Steps.js +1 -1
- package/dist/packages/_es/Sticky.js +33 -23
- package/dist/packages/_es/SubSideNavBar.js +4 -2
- package/dist/packages/_es/Swipe.js +41 -26
- package/dist/packages/_es/Swiper.js +38 -21
- package/dist/packages/_es/SwiperItem.js +2 -2
- package/dist/packages/_es/Switch.js +8 -8
- package/dist/packages/_es/TabPane.js +1 -1
- package/dist/packages/_es/Tabbar.js +40 -9
- package/dist/packages/_es/TabbarItem.js +24 -30
- package/dist/packages/_es/Table.js +22 -17
- package/dist/packages/_es/Tabs.js +49 -16
- package/dist/packages/_es/Tag.js +6 -5
- package/dist/packages/_es/TextArea.js +114 -49
- package/dist/packages/_es/TimeDetail.js +4 -3
- package/dist/packages/_es/TimePannel.js +3 -3
- package/dist/packages/_es/TimeSelect.js +12 -10
- package/dist/packages/_es/Toast.js +53 -164
- package/dist/packages/_es/TrendArrow.js +6 -4
- package/dist/packages/_es/Uploader.js +141 -140
- package/dist/packages/_es/Video.js +72 -5
- package/dist/packages/_es/WaterMark.js +22 -14
- package/dist/packages/_es/common.js +1 -1
- package/dist/packages/_es/component.js +1 -1
- package/dist/packages/_es/index.js +44 -6
- package/dist/packages/_es/{index5.js → index.taro.js} +167 -154
- package/dist/packages/_es/index2.js +8 -31
- package/dist/packages/_es/index3.js +64 -7
- package/dist/packages/_es/index4.js +424 -62
- 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 +21 -3
- package/dist/packages/_es/use-lock-scroll.js +23 -0
- package/dist/packages/locale/lang/baseLang.js +1 -1
- package/dist/packages/locale/lang/en-US.js +1 -1
- package/dist/packages/locale/lang/id-ID.js +1 -1
- package/dist/packages/locale/lang/index.js +1 -1
- package/dist/packages/locale/lang/zh-CN.js +1 -1
- package/dist/packages/locale/lang/zh-TW.js +1 -1
- package/dist/packages/signature/index.scss +4 -1
- package/dist/packages/swiperitem/index.scss +1 -1
- package/dist/smartips/attributes.json +4 -0
- package/dist/smartips/tags.json +2 -1
- package/dist/smartips/web-types.json +10 -1
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +44 -44
- package/dist/styles/themes/jdb.scss +44 -44
- package/dist/styles/themes/jddkh.scss +44 -44
- package/dist/styles/themes/jdt.scss +44 -44
- package/dist/types/__VUE/actionsheet/{index.vue.d.ts → index.taro.vue.d.ts} +11 -11
- package/dist/types/__VUE/address/{index.vue.d.ts → index.taro.vue.d.ts} +74 -34
- package/dist/types/__VUE/addresslist/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/animate/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/avatar/{index.vue.d.ts → index.taro.vue.d.ts} +5 -5
- package/dist/types/__VUE/avatargroup/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
- package/dist/types/__VUE/backtop/{index.vue.d.ts → index.taro.vue.d.ts} +14 -36
- package/dist/types/__VUE/badge/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
- package/dist/types/__VUE/barrage/{index.vue.d.ts → index.taro.vue.d.ts} +2 -2
- package/dist/types/__VUE/button/index.taro.vue.d.ts +116 -0
- package/dist/types/__VUE/calendar/{index.vue.d.ts → index.taro.vue.d.ts} +14 -2
- package/dist/types/__VUE/calendaritem/{index.vue.d.ts → index.taro.vue.d.ts} +17 -17
- package/dist/types/__VUE/card/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/cascader/{index.vue.d.ts → index.taro.vue.d.ts} +2 -2
- package/dist/types/__VUE/category/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/categorypane/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/cell/{index.vue.d.ts → index.taro.vue.d.ts} +12 -5
- package/dist/types/__VUE/checkbox/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/circleprogress/{index.vue.d.ts → index.taro.vue.d.ts} +14 -15
- package/dist/types/__VUE/collapse/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
- package/dist/types/__VUE/collapseitem/{index.vue.d.ts → index.taro.vue.d.ts} +1 -9
- package/dist/types/__VUE/comment/{index.vue.d.ts → index.taro.vue.d.ts} +1 -2
- package/dist/types/__VUE/configprovider/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/countdown/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/countup/{index.vue.d.ts → index.taro.vue.d.ts} +5 -7
- package/dist/types/__VUE/datepicker/{index.vue.d.ts → index.taro.vue.d.ts} +6 -6
- package/dist/types/__VUE/dialog/{index.vue.d.ts → index.taro.vue.d.ts} +10 -13
- package/dist/types/__VUE/divider/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/drag/{index.vue.d.ts → index.taro.vue.d.ts} +2 -1
- package/dist/types/__VUE/ecard/{index.vue.d.ts → index.taro.vue.d.ts} +3 -3
- package/dist/types/__VUE/elevator/{index.vue.d.ts → index.taro.vue.d.ts} +11 -2
- package/dist/types/__VUE/ellipsis/{index.vue.d.ts → index.taro.vue.d.ts} +4 -0
- package/dist/types/__VUE/empty/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/fixednav/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
- package/dist/types/__VUE/form/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/grid/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
- package/dist/types/__VUE/griditem/{index.vue.d.ts → index.taro.vue.d.ts} +2 -27
- package/dist/types/__VUE/icon/index.taro.vue.d.ts +74 -0
- package/dist/types/__VUE/image/index.taro.vue.d.ts +33 -0
- package/dist/types/__VUE/imagepreview/{index.vue.d.ts → index.taro.vue.d.ts} +41 -43
- package/dist/types/__VUE/indicator/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/infiniteloading/{index.vue.d.ts → index.taro.vue.d.ts} +15 -8
- package/dist/types/__VUE/input/{index.vue.d.ts → index.taro.vue.d.ts} +34 -16
- package/dist/types/__VUE/inputnumber/{index.vue.d.ts → index.taro.vue.d.ts} +2 -2
- package/dist/types/__VUE/invoice/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/layout/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/list/{index.vue.d.ts → index.taro.vue.d.ts} +2 -2
- package/dist/types/__VUE/menu/{index.vue.d.ts → index.taro.vue.d.ts} +2 -1
- package/dist/types/__VUE/menuitem/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/navbar/{index.vue.d.ts → index.taro.vue.d.ts} +1 -2
- package/dist/types/__VUE/noticebar/{index.vue.d.ts → index.taro.vue.d.ts} +6 -5
- package/dist/types/__VUE/notify/{index.vue.d.ts → index.taro.vue.d.ts} +10 -25
- package/dist/types/__VUE/numberkeyboard/{index.vue.d.ts → index.taro.vue.d.ts} +6 -30
- package/dist/types/__VUE/oldpicker/{Column.vue.d.ts → ColumnTaro.vue.d.ts} +28 -17
- package/dist/types/__VUE/oldpicker/{index.vue.d.ts → index.taro.vue.d.ts} +65 -45
- package/dist/types/__VUE/overlay/index.taro.vue.d.ts +85 -0
- package/dist/types/__VUE/pagination/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/picker/{Column.vue.d.ts → ColumnTaro.vue.d.ts} +16 -4
- package/dist/types/__VUE/picker/{index.vue.d.ts → index.taro.vue.d.ts} +54 -29
- package/dist/types/__VUE/popover/{index.vue.d.ts → index.taro.vue.d.ts} +18 -16
- package/dist/types/__VUE/popup/index.taro.vue.d.ts +1728 -0
- package/dist/types/__VUE/popup/index.vue.d.ts +4 -4
- package/dist/types/__VUE/price/{index.vue.d.ts → index.taro.vue.d.ts} +1 -0
- package/dist/types/__VUE/progress/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
- package/dist/types/__VUE/radio/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/range/{index.vue.d.ts → index.taro.vue.d.ts} +7 -6
- package/dist/types/__VUE/rate/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/searchbar/{index.vue.d.ts → index.taro.vue.d.ts} +19 -19
- package/dist/types/__VUE/shortpassword/{index.vue.d.ts → index.taro.vue.d.ts} +6 -21
- package/dist/types/__VUE/sidenavbar/{index.vue.d.ts → index.taro.vue.d.ts} +0 -5
- package/dist/types/__VUE/signature/{index.vue.d.ts → index.taro.vue.d.ts} +8 -5
- package/dist/types/__VUE/skeleton/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/sku/{index.vue.d.ts → index.taro.vue.d.ts} +55 -183
- package/dist/types/__VUE/step/index.vue.d.ts +1 -1
- package/dist/types/__VUE/steps/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/sticky/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/swipe/{index.vue.d.ts → index.taro.vue.d.ts} +4 -3
- package/dist/types/__VUE/swiper/{index.vue.d.ts → index.taro.vue.d.ts} +2 -1
- package/dist/types/__VUE/swiperitem/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/switch/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/tabbar/{index.vue.d.ts → index.taro.vue.d.ts} +10 -0
- package/dist/types/__VUE/tabbaritem/{index.vue.d.ts → index.taro.vue.d.ts} +8 -8
- package/dist/types/__VUE/table/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/tabs/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/tag/{index.vue.d.ts → index.taro.vue.d.ts} +4 -4
- package/dist/types/__VUE/textarea/{index.vue.d.ts → index.taro.vue.d.ts} +5 -3
- package/dist/types/__VUE/timedetail/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/timepannel/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/timeselect/{index.vue.d.ts → index.taro.vue.d.ts} +7 -8
- package/dist/types/__VUE/toast/{index.vue.d.ts → index.taro.vue.d.ts} +44 -22
- package/dist/types/__VUE/trendarrow/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/uploader/{index.vue.d.ts → index.taro.vue.d.ts} +22 -13
- package/dist/types/__VUE/video/index.vue.d.ts +4 -2
- package/dist/types/__VUE/watermark/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/nutui.d.ts +89 -89
- package/package.json +1 -1
- package/dist/types/__VUE/dialog/index.d.ts +0 -48
- package/dist/types/__VUE/image/index.vue.d.ts +0 -117
- package/dist/types/__VUE/image/type.d.ts +0 -6
- package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +0 -108
- package/dist/types/__VUE/imagepreview/index.d.ts +0 -25
- package/dist/types/__VUE/notify/index.d.ts +0 -26
- package/dist/types/__VUE/tag/type.d.ts +0 -5
- package/dist/types/__VUE/toast/index.d.ts +0 -16
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.6-beta.1 Mon Oct 31 2022 19:38:22 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 { useSlots, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, withCtx, createElementVNode, toDisplayString, createCommentVNode, renderSlot, Fragment, renderList, normalizeStyle, createBlock } from "vue";
|
|
8
|
-
import { popupProps } from "./
|
|
7
|
+
import { useSlots, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, withCtx, createElementVNode, toDisplayString, createCommentVNode, createTextVNode, renderSlot, Fragment, renderList, normalizeStyle, createBlock } from "vue";
|
|
8
|
+
import { p as popupProps } from "./index4.js";
|
|
9
9
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
10
10
|
import "../locale/lang";
|
|
11
|
-
import "./
|
|
12
|
-
import "./Icon.js";
|
|
11
|
+
import "./use-lock-scroll.js";
|
|
13
12
|
import "./pxCheck.js";
|
|
14
13
|
const { componentName, create } = createComponent("actionsheet");
|
|
15
14
|
const _sfc_main = create({
|
|
@@ -47,16 +46,12 @@ const _sfc_main = create({
|
|
|
47
46
|
type: Array,
|
|
48
47
|
default: () => []
|
|
49
48
|
},
|
|
50
|
-
isWrapTeleport: {
|
|
51
|
-
type: Boolean,
|
|
52
|
-
default: true
|
|
53
|
-
},
|
|
54
49
|
closeAbled: {
|
|
55
50
|
type: Boolean,
|
|
56
51
|
default: true
|
|
57
52
|
}
|
|
58
53
|
},
|
|
59
|
-
emits: ["cancel", "
|
|
54
|
+
emits: ["cancel", "choose", "update:visible", "close"],
|
|
60
55
|
setup(props, { emit }) {
|
|
61
56
|
const slotDefault = !!useSlots().default;
|
|
62
57
|
const classes = computed(() => {
|
|
@@ -72,9 +67,9 @@ const _sfc_main = create({
|
|
|
72
67
|
emit("cancel");
|
|
73
68
|
emit("update:visible", false);
|
|
74
69
|
};
|
|
75
|
-
const chooseItem = (item,
|
|
70
|
+
const chooseItem = (item, index) => {
|
|
76
71
|
if (!item.disable && !item.loading) {
|
|
77
|
-
emit("choose", item,
|
|
72
|
+
emit("choose", item, index);
|
|
78
73
|
emit("update:visible", false);
|
|
79
74
|
}
|
|
80
75
|
};
|
|
@@ -118,7 +113,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
118
113
|
createVNode(_component_nut_popup, {
|
|
119
114
|
"pop-class": "popclass",
|
|
120
115
|
visible: _ctx.visible,
|
|
121
|
-
isWrapTeleport: _ctx.isWrapTeleport,
|
|
122
116
|
position: "bottom",
|
|
123
117
|
round: "",
|
|
124
118
|
onClickOverlay: _ctx.close,
|
|
@@ -127,25 +121,30 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
127
121
|
default: withCtx(() => [
|
|
128
122
|
createElementVNode("view", _hoisted_1, [
|
|
129
123
|
_ctx.title ? (openBlock(), createElementBlock("view", _hoisted_2, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
|
|
124
|
+
createTextVNode(),
|
|
130
125
|
renderSlot(_ctx.$slots, "default"),
|
|
126
|
+
createTextVNode(),
|
|
131
127
|
!_ctx.slotDefault ? (openBlock(), createElementBlock("view", _hoisted_3, [
|
|
132
128
|
_ctx.description ? (openBlock(), createElementBlock("view", _hoisted_4, toDisplayString(_ctx.description), 1)) : createCommentVNode("", true),
|
|
129
|
+
createTextVNode(),
|
|
133
130
|
_ctx.menuItems.length ? (openBlock(), createElementBlock("view", _hoisted_5, [
|
|
134
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menuItems, (item,
|
|
131
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menuItems, (item, index) => {
|
|
135
132
|
return openBlock(), createElementBlock("view", {
|
|
136
133
|
class: normalizeClass(["nut-actionsheet-item", { "nut-actionsheet-item-disabled": item.disable, "nut-actionsheet-item-loading": item.loading }]),
|
|
137
134
|
style: normalizeStyle({ color: _ctx.isHighlight(item) || item.color }),
|
|
138
|
-
key:
|
|
139
|
-
onClick: ($event) => _ctx.chooseItem(item,
|
|
135
|
+
key: index,
|
|
136
|
+
onClick: ($event) => _ctx.chooseItem(item, index)
|
|
140
137
|
}, [
|
|
141
138
|
item.loading ? (openBlock(), createBlock(_component_nut_icon, {
|
|
142
139
|
key: 0,
|
|
143
140
|
name: "loading"
|
|
144
141
|
})) : (openBlock(), createElementBlock("view", _hoisted_7, toDisplayString(item[_ctx.optionTag]), 1)),
|
|
142
|
+
createTextVNode(),
|
|
145
143
|
createElementVNode("view", _hoisted_8, toDisplayString(item[_ctx.optionSubTag]), 1)
|
|
146
144
|
], 14, _hoisted_6);
|
|
147
145
|
}), 128))
|
|
148
146
|
])) : createCommentVNode("", true),
|
|
147
|
+
createTextVNode(),
|
|
149
148
|
_ctx.cancelTxt ? (openBlock(), createElementBlock("view", {
|
|
150
149
|
key: 2,
|
|
151
150
|
class: "nut-actionsheet-cancel",
|
|
@@ -155,8 +154,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
155
154
|
])
|
|
156
155
|
]),
|
|
157
156
|
_: 3
|
|
158
|
-
}, 8, ["visible", "
|
|
157
|
+
}, 8, ["visible", "onClickOverlay", "closeOnClickOverlay"])
|
|
159
158
|
], 2);
|
|
160
159
|
}
|
|
161
|
-
var
|
|
162
|
-
export {
|
|
160
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
161
|
+
export { index_taro as default };
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.6-beta.1 Mon Oct 31 2022 19:38:22 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
7
|
-
import { c as createComponent } from "./component.js";
|
|
6
|
+
import { computed, ref, reactive, onMounted, watch, toRefs, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, withDirectives, createVNode, mergeProps, vShow, createTextVNode, toDisplayString, createCommentVNode, createElementBlock, Fragment, renderList, normalizeClass, renderSlot } from "vue";
|
|
8
7
|
import { popupProps } from "./Popup.js";
|
|
8
|
+
import { c as createComponent } from "./component.js";
|
|
9
9
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
10
|
-
import "
|
|
10
|
+
import "./use-lock-scroll.js";
|
|
11
11
|
import "./OverLay.js";
|
|
12
|
+
import "../locale/lang";
|
|
12
13
|
import "./Icon.js";
|
|
13
14
|
import "./pxCheck.js";
|
|
14
|
-
const {
|
|
15
|
+
const { create, componentName, translate } = createComponent("address");
|
|
15
16
|
const _sfc_main = create({
|
|
16
17
|
inheritAttrs: false,
|
|
17
18
|
props: {
|
|
@@ -20,6 +21,10 @@ const _sfc_main = create({
|
|
|
20
21
|
type: Array,
|
|
21
22
|
default: () => []
|
|
22
23
|
},
|
|
24
|
+
visible: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: false
|
|
27
|
+
},
|
|
23
28
|
type: {
|
|
24
29
|
type: String,
|
|
25
30
|
default: "custom"
|
|
@@ -87,8 +92,19 @@ const _sfc_main = create({
|
|
|
87
92
|
},
|
|
88
93
|
emits: ["update:visible", "update:modelValue", "type", "change", "selected", "close", "close-mask", "switch-module"],
|
|
89
94
|
setup(props, { emit }) {
|
|
95
|
+
const classes = computed(() => {
|
|
96
|
+
const prefixCls = componentName;
|
|
97
|
+
return {
|
|
98
|
+
[prefixCls]: true
|
|
99
|
+
};
|
|
100
|
+
});
|
|
90
101
|
const regionLine = ref(null);
|
|
91
|
-
const
|
|
102
|
+
const tabItemRef = reactive({
|
|
103
|
+
province: ref(null),
|
|
104
|
+
city: ref(null),
|
|
105
|
+
country: ref(null),
|
|
106
|
+
town: ref(null)
|
|
107
|
+
});
|
|
92
108
|
const showPopup = ref(props.visible);
|
|
93
109
|
const privateType = ref(props.type);
|
|
94
110
|
const tabIndex = ref(0);
|
|
@@ -111,16 +127,16 @@ const _sfc_main = create({
|
|
|
111
127
|
return a.title.localeCompare(b.title);
|
|
112
128
|
});
|
|
113
129
|
data.forEach((item) => {
|
|
114
|
-
const
|
|
115
|
-
if (
|
|
130
|
+
const index = newData.findIndex((value) => value.title === item.title);
|
|
131
|
+
if (index <= -1) {
|
|
116
132
|
newData.push({
|
|
117
133
|
title: item.title,
|
|
118
134
|
list: [].concat(item)
|
|
119
135
|
});
|
|
120
136
|
} else {
|
|
121
|
-
newData[
|
|
137
|
+
newData[index] = {
|
|
122
138
|
title: item.title,
|
|
123
|
-
list: newData[
|
|
139
|
+
list: newData[index].list.concat(item)
|
|
124
140
|
};
|
|
125
141
|
}
|
|
126
142
|
});
|
|
@@ -147,25 +163,24 @@ const _sfc_main = create({
|
|
|
147
163
|
const initCustomSelected = () => {
|
|
148
164
|
if (props.modelValue.length > 0) {
|
|
149
165
|
tabIndex.value = props.modelValue.length - 1;
|
|
150
|
-
for (let
|
|
151
|
-
if (regionList[tabName.value[
|
|
152
|
-
tabIndex.value =
|
|
166
|
+
for (let index = 0; index < props.modelValue.length; index++) {
|
|
167
|
+
if (regionList[tabName.value[index]].length == 0) {
|
|
168
|
+
tabIndex.value = index - 1;
|
|
153
169
|
break;
|
|
154
170
|
} else {
|
|
155
|
-
const val = props.modelValue[
|
|
156
|
-
const arr = regionList[tabName.value[
|
|
171
|
+
const val = props.modelValue[index];
|
|
172
|
+
const arr = regionList[tabName.value[index]];
|
|
157
173
|
if (privateType.value == "custom") {
|
|
158
|
-
selectedRegion[tabName.value[
|
|
174
|
+
selectedRegion[tabName.value[index]] = arr.filter((item) => item.id == val)[0];
|
|
159
175
|
} else if (privateType.value == "custom2") {
|
|
160
176
|
let sumArr = [];
|
|
161
177
|
arr.map((item) => {
|
|
162
178
|
sumArr.push(...item.list);
|
|
163
179
|
});
|
|
164
|
-
selectedRegion[tabName.value[
|
|
180
|
+
selectedRegion[tabName.value[index]] = sumArr.filter((item) => item.id == val)[0];
|
|
165
181
|
}
|
|
166
182
|
}
|
|
167
183
|
}
|
|
168
|
-
lineAnimation();
|
|
169
184
|
}
|
|
170
185
|
};
|
|
171
186
|
const customPlaceholder = () => {
|
|
@@ -175,22 +190,22 @@ const _sfc_main = create({
|
|
|
175
190
|
tabNameDefault.value = new Array(4).fill(props.columnsPlaceholder || selectStr);
|
|
176
191
|
} else if (typeD == "[object Array]") {
|
|
177
192
|
tabNameDefault.value = new Array(4).fill("");
|
|
178
|
-
tabNameDefault.value.forEach((val,
|
|
179
|
-
if (props.columnsPlaceholder[
|
|
180
|
-
tabNameDefault.value[
|
|
193
|
+
tabNameDefault.value.forEach((val, index) => {
|
|
194
|
+
if (props.columnsPlaceholder[index]) {
|
|
195
|
+
tabNameDefault.value[index] = props.columnsPlaceholder[index];
|
|
181
196
|
} else {
|
|
182
|
-
tabNameDefault.value[
|
|
197
|
+
tabNameDefault.value[index] = selectStr;
|
|
183
198
|
}
|
|
184
199
|
});
|
|
185
200
|
}
|
|
186
201
|
};
|
|
187
|
-
const getTabName = (item,
|
|
202
|
+
const getTabName = (item, index) => {
|
|
188
203
|
if (item.name)
|
|
189
204
|
return item.name;
|
|
190
|
-
if (tabIndex.value <
|
|
205
|
+
if (tabIndex.value < index) {
|
|
191
206
|
return item.name;
|
|
192
207
|
} else {
|
|
193
|
-
return tabNameDefault.value[
|
|
208
|
+
return tabNameDefault.value[index];
|
|
194
209
|
}
|
|
195
210
|
};
|
|
196
211
|
const handClose = (type = "self") => {
|
|
@@ -202,15 +217,6 @@ const _sfc_main = create({
|
|
|
202
217
|
const clickOverlay = () => {
|
|
203
218
|
closeWay.value = "mask";
|
|
204
219
|
};
|
|
205
|
-
const lineAnimation = () => {
|
|
206
|
-
nextTick(() => {
|
|
207
|
-
const name = tabRegion.value && tabRegion.value.getElementsByClassName("active")[0];
|
|
208
|
-
if (name) {
|
|
209
|
-
const distance = name.offsetLeft;
|
|
210
|
-
lineDistance.value = distance ? distance : 20;
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
};
|
|
214
220
|
const nextAreaList = (item) => {
|
|
215
221
|
const calBack = {
|
|
216
222
|
next: "",
|
|
@@ -223,7 +229,6 @@ const _sfc_main = create({
|
|
|
223
229
|
}
|
|
224
230
|
if (tabIndex.value < 3) {
|
|
225
231
|
tabIndex.value = tabIndex.value + 1;
|
|
226
|
-
lineAnimation();
|
|
227
232
|
calBack.next = tabName.value[tabIndex.value];
|
|
228
233
|
calBack.value = item;
|
|
229
234
|
emit("change", calBack);
|
|
@@ -232,16 +237,15 @@ const _sfc_main = create({
|
|
|
232
237
|
emit("update:modelValue");
|
|
233
238
|
}
|
|
234
239
|
};
|
|
235
|
-
const changeRegionTab = (item, key,
|
|
236
|
-
if (getTabName(item,
|
|
237
|
-
tabIndex.value =
|
|
238
|
-
lineAnimation();
|
|
240
|
+
const changeRegionTab = (item, key, index) => {
|
|
241
|
+
if (getTabName(item, index)) {
|
|
242
|
+
tabIndex.value = index;
|
|
239
243
|
}
|
|
240
244
|
};
|
|
241
245
|
const selectedExist = (item) => {
|
|
242
246
|
const copyExistAdd = props.existAddress;
|
|
243
247
|
let prevExistAdd = {};
|
|
244
|
-
copyExistAdd.forEach((list,
|
|
248
|
+
copyExistAdd.forEach((list, index) => {
|
|
245
249
|
if (list && list.selectedAddress) {
|
|
246
250
|
prevExistAdd = list;
|
|
247
251
|
}
|
|
@@ -257,10 +261,8 @@ const _sfc_main = create({
|
|
|
257
261
|
selectedRegion[tabName.value[i]] = {};
|
|
258
262
|
}
|
|
259
263
|
tabIndex.value = 0;
|
|
260
|
-
lineAnimation();
|
|
261
264
|
};
|
|
262
265
|
const close = () => {
|
|
263
|
-
console.log("\u5173\u95ED", closeWay.value, showPopup.value);
|
|
264
266
|
const resCopy = Object.assign(
|
|
265
267
|
{
|
|
266
268
|
addressIdStr: "",
|
|
@@ -319,10 +321,9 @@ const _sfc_main = create({
|
|
|
319
321
|
watch(
|
|
320
322
|
() => showPopup.value,
|
|
321
323
|
(value) => {
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
else {
|
|
324
|
+
if (value == false) {
|
|
325
|
+
close();
|
|
326
|
+
} else {
|
|
326
327
|
initCustomSelected();
|
|
327
328
|
}
|
|
328
329
|
}
|
|
@@ -354,7 +355,7 @@ const _sfc_main = create({
|
|
|
354
355
|
watch(
|
|
355
356
|
() => props.existAddress,
|
|
356
357
|
(value) => {
|
|
357
|
-
value.forEach((item,
|
|
358
|
+
value.forEach((item, index) => {
|
|
358
359
|
if (item.selectedAddress) {
|
|
359
360
|
selectedExistAddress = item;
|
|
360
361
|
}
|
|
@@ -362,6 +363,7 @@ const _sfc_main = create({
|
|
|
362
363
|
}
|
|
363
364
|
);
|
|
364
365
|
return {
|
|
366
|
+
classes,
|
|
365
367
|
showPopup,
|
|
366
368
|
privateType,
|
|
367
369
|
tabIndex,
|
|
@@ -375,15 +377,14 @@ const _sfc_main = create({
|
|
|
375
377
|
getTabName,
|
|
376
378
|
nextAreaList,
|
|
377
379
|
regionLine,
|
|
378
|
-
tabRegion,
|
|
379
380
|
lineDistance,
|
|
380
381
|
changeRegionTab,
|
|
381
382
|
selectedExist,
|
|
382
383
|
clickOverlay,
|
|
383
384
|
handClose,
|
|
384
385
|
handleElevatorItem,
|
|
385
|
-
initCustomSelected,
|
|
386
386
|
...toRefs(props),
|
|
387
|
+
...toRefs(tabItemRef),
|
|
387
388
|
translate
|
|
388
389
|
};
|
|
389
390
|
}
|
|
@@ -440,9 +441,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
440
441
|
onClickOverlay: _ctx.clickOverlay,
|
|
441
442
|
onOpen: _cache[3] || (_cache[3] = ($event) => _ctx.closeWay = "self"),
|
|
442
443
|
visible: _ctx.showPopup,
|
|
443
|
-
"onUpdate:visible": _cache[4] || (_cache[4] = ($event) => _ctx.showPopup = $event)
|
|
444
|
-
isWrapTeleport: _ctx.isWrapTeleport,
|
|
445
|
-
teleport: _ctx.teleport
|
|
444
|
+
"onUpdate:visible": _cache[4] || (_cache[4] = ($event) => _ctx.showPopup = $event)
|
|
446
445
|
}, {
|
|
447
446
|
default: withCtx(() => [
|
|
448
447
|
createElementVNode("view", _hoisted_1, [
|
|
@@ -458,7 +457,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
458
457
|
[vShow, _ctx.type == "exist" && _ctx.privateType == "custom" && _ctx.backBtnIcon]
|
|
459
458
|
])
|
|
460
459
|
]),
|
|
460
|
+
createTextVNode(),
|
|
461
461
|
createElementVNode("view", _hoisted_3, toDisplayString(_ctx.privateType == "custom" ? _ctx.customAddressTitle || _ctx.translate("selectRegion") : _ctx.existAddressTitle || _ctx.translate("deliveryTo")), 1),
|
|
462
|
+
createTextVNode(),
|
|
462
463
|
createElementVNode("view", {
|
|
463
464
|
class: "arrow-close",
|
|
464
465
|
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.handClose("cross"))
|
|
@@ -470,29 +471,32 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
470
471
|
}), null, 16, ["name"])) : createCommentVNode("", true)
|
|
471
472
|
])
|
|
472
473
|
]),
|
|
474
|
+
createTextVNode(),
|
|
473
475
|
_ctx.privateType == "custom" ? (openBlock(), createElementBlock("view", _hoisted_4, [
|
|
474
476
|
createElementVNode("view", _hoisted_5, [
|
|
475
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.selectedRegion, (item, key,
|
|
477
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.selectedRegion, (item, key, index) => {
|
|
476
478
|
return openBlock(), createElementBlock("view", {
|
|
477
|
-
class: normalizeClass(
|
|
478
|
-
key:
|
|
479
|
-
onClick: ($event) => _ctx.changeRegionTab(item, key,
|
|
479
|
+
class: normalizeClass({ "tab-item": true, active: index == _ctx.tabIndex, [_ctx.tabName[index]]: true }),
|
|
480
|
+
key: index,
|
|
481
|
+
onClick: ($event) => _ctx.changeRegionTab(item, key, index)
|
|
480
482
|
}, [
|
|
481
|
-
createElementVNode("view", null, toDisplayString(_ctx.getTabName(item,
|
|
483
|
+
createElementVNode("view", null, toDisplayString(_ctx.getTabName(item, index)), 1),
|
|
484
|
+
createTextVNode(),
|
|
485
|
+
createElementVNode("view", {
|
|
486
|
+
class: normalizeClass({ "region-tab-line-mini": true, active: index == _ctx.tabIndex }),
|
|
487
|
+
ref_for: true,
|
|
488
|
+
ref: "regionLine"
|
|
489
|
+
}, null, 2)
|
|
482
490
|
], 10, _hoisted_6);
|
|
483
|
-
}), 128))
|
|
484
|
-
createElementVNode("view", {
|
|
485
|
-
class: "region-tab-line",
|
|
486
|
-
ref: "regionLine",
|
|
487
|
-
style: normalizeStyle({ left: _ctx.lineDistance + "px" })
|
|
488
|
-
}, null, 4)
|
|
491
|
+
}), 128))
|
|
489
492
|
], 512),
|
|
493
|
+
createTextVNode(),
|
|
490
494
|
createElementVNode("view", _hoisted_7, [
|
|
491
495
|
createElementVNode("ul", _hoisted_8, [
|
|
492
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.regionList[_ctx.tabName[_ctx.tabIndex]], (item,
|
|
496
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.regionList[_ctx.tabName[_ctx.tabIndex]], (item, index) => {
|
|
493
497
|
return openBlock(), createElementBlock("li", {
|
|
494
|
-
key:
|
|
495
|
-
class: normalizeClass(["region-item",
|
|
498
|
+
key: index,
|
|
499
|
+
class: normalizeClass(["region-item", _ctx.selectedRegion[_ctx.tabName[_ctx.tabIndex]].id == item.id ? "active" : ""]),
|
|
496
500
|
onClick: ($event) => _ctx.nextAreaList(item)
|
|
497
501
|
}, [
|
|
498
502
|
_ctx.selectedRegion[_ctx.tabName[_ctx.tabIndex]].id == item.id ? (openBlock(), createBlock(_component_nut_icon, mergeProps({
|
|
@@ -510,21 +514,21 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
510
514
|
])
|
|
511
515
|
])) : _ctx.privateType == "custom2" ? (openBlock(), createElementBlock("view", _hoisted_10, [
|
|
512
516
|
createElementVNode("view", _hoisted_11, [
|
|
513
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.selectedRegion, (item, key,
|
|
517
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.selectedRegion, (item, key, index) => {
|
|
514
518
|
return openBlock(), createElementBlock("view", {
|
|
515
|
-
class: normalizeClass(
|
|
516
|
-
key:
|
|
517
|
-
onClick: ($event) => _ctx.changeRegionTab(item, key,
|
|
519
|
+
class: normalizeClass({ "tab-item": true, active: index == _ctx.tabIndex, [_ctx.tabName[index]]: true }),
|
|
520
|
+
key: index,
|
|
521
|
+
onClick: ($event) => _ctx.changeRegionTab(item, key, index)
|
|
518
522
|
}, [
|
|
519
|
-
createElementVNode("view", null, toDisplayString(_ctx.getTabName(item,
|
|
523
|
+
createElementVNode("view", null, toDisplayString(_ctx.getTabName(item, index)), 1),
|
|
524
|
+
createTextVNode(),
|
|
525
|
+
createElementVNode("view", {
|
|
526
|
+
class: normalizeClass({ "region-tab-line-mini": true, active: index == _ctx.tabIndex })
|
|
527
|
+
}, null, 2)
|
|
520
528
|
], 10, _hoisted_12);
|
|
521
|
-
}), 128))
|
|
522
|
-
createElementVNode("view", {
|
|
523
|
-
class: "region-tab-line",
|
|
524
|
-
ref: "regionLine",
|
|
525
|
-
style: normalizeStyle({ left: _ctx.lineDistance + "px" })
|
|
526
|
-
}, null, 4)
|
|
529
|
+
}), 128))
|
|
527
530
|
], 512),
|
|
531
|
+
createTextVNode(),
|
|
528
532
|
createElementVNode("view", _hoisted_13, [
|
|
529
533
|
createVNode(_component_nut_elevator, {
|
|
530
534
|
height: _ctx.height,
|
|
@@ -535,10 +539,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
535
539
|
])) : _ctx.privateType == "exist" ? (openBlock(), createElementBlock("view", _hoisted_14, [
|
|
536
540
|
createElementVNode("div", _hoisted_15, [
|
|
537
541
|
createElementVNode("ul", _hoisted_16, [
|
|
538
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.existAddress, (item,
|
|
542
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.existAddress, (item, index) => {
|
|
539
543
|
return openBlock(), createElementBlock("li", {
|
|
540
544
|
class: normalizeClass(["exist-item", [item.selectedAddress ? "active" : ""]]),
|
|
541
|
-
key:
|
|
545
|
+
key: index,
|
|
542
546
|
onClick: ($event) => _ctx.selectedExist(item)
|
|
543
547
|
}, [
|
|
544
548
|
createVNode(_component_nut_icon, mergeProps({
|
|
@@ -548,11 +552,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
548
552
|
name: item.selectedAddress ? _ctx.selectedIcon : _ctx.defaultIcon,
|
|
549
553
|
size: "13px"
|
|
550
554
|
}), null, 16, ["name"]),
|
|
555
|
+
createTextVNode(),
|
|
551
556
|
createElementVNode("div", _hoisted_18, [
|
|
552
557
|
item.name && item.phone ? (openBlock(), createElementBlock("div", _hoisted_19, [
|
|
553
558
|
createElementVNode("div", _hoisted_20, toDisplayString(item.name), 1),
|
|
559
|
+
createTextVNode(),
|
|
554
560
|
createElementVNode("div", _hoisted_21, toDisplayString(item.phone), 1)
|
|
555
561
|
])) : createCommentVNode("", true),
|
|
562
|
+
createTextVNode(),
|
|
556
563
|
createElementVNode("div", _hoisted_22, [
|
|
557
564
|
createElementVNode("view", null, toDisplayString(item.provinceName + item.cityName + item.countyName + item.townName + item.addressDetail), 1)
|
|
558
565
|
])
|
|
@@ -561,19 +568,21 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
561
568
|
}), 128))
|
|
562
569
|
])
|
|
563
570
|
]),
|
|
571
|
+
createTextVNode(),
|
|
564
572
|
_ctx.isShowCustomAddress ? (openBlock(), createElementBlock("div", {
|
|
565
573
|
key: 0,
|
|
566
574
|
class: "choose-other",
|
|
567
575
|
onClick: _cache[2] || (_cache[2] = (...args) => _ctx.switchModule && _ctx.switchModule(...args))
|
|
568
576
|
}, [
|
|
569
577
|
createElementVNode("div", _hoisted_23, toDisplayString(_ctx.customAndExistTitle || _ctx.translate("chooseAnotherAddress")), 1)
|
|
570
|
-
])) : createCommentVNode("", true)
|
|
571
|
-
|
|
572
|
-
|
|
578
|
+
])) : createCommentVNode("", true),
|
|
579
|
+
createTextVNode(),
|
|
580
|
+
!_ctx.isShowCustomAddress ? renderSlot(_ctx.$slots, "bottom", { key: 1 }) : createCommentVNode("", true)
|
|
581
|
+
])) : createCommentVNode("", true)
|
|
573
582
|
])
|
|
574
583
|
]),
|
|
575
584
|
_: 3
|
|
576
|
-
}, 8, ["lock-scroll", "onClose", "onClickOverlay", "visible"
|
|
585
|
+
}, 8, ["lock-scroll", "onClose", "onClickOverlay", "visible"]);
|
|
577
586
|
}
|
|
578
|
-
var
|
|
579
|
-
export {
|
|
587
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
588
|
+
export { index_taro as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.6-beta.1 Mon Oct 31 2022 19:38:22 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { resolveComponent, openBlock, createElementBlock, createElementVNode, renderSlot, toDisplayString, createCommentVNode, createVNode,
|
|
6
|
+
import { resolveComponent, openBlock, createElementBlock, createElementVNode, renderSlot, toDisplayString, createTextVNode, createCommentVNode, createVNode, ref, withCtx, createBlock, reactive, watch, onMounted, Fragment, renderList } from "vue";
|
|
7
7
|
import { c as createComponent, f as floatData } from "./component.js";
|
|
8
8
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
9
|
import "../locale/lang";
|
|
@@ -64,10 +64,13 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
64
64
|
createElementVNode("div", _hoisted_2$1, [
|
|
65
65
|
renderSlot(_ctx.$slots, "contentTop", {}, () => [
|
|
66
66
|
createElementVNode("div", _hoisted_3$1, toDisplayString(_ctx.item.addressName), 1),
|
|
67
|
+
createTextVNode(),
|
|
67
68
|
createElementVNode("div", _hoisted_4$1, toDisplayString(_ctx.item.phone), 1),
|
|
69
|
+
createTextVNode(),
|
|
68
70
|
_ctx.item.defaultAddress ? (openBlock(), createElementBlock("div", _hoisted_5$1, toDisplayString(_ctx.translate("default")), 1)) : createCommentVNode("", true)
|
|
69
71
|
])
|
|
70
72
|
]),
|
|
73
|
+
createTextVNode(),
|
|
71
74
|
createElementVNode("div", _hoisted_6$1, [
|
|
72
75
|
renderSlot(_ctx.$slots, "contentIcon", {}, () => [
|
|
73
76
|
createVNode(_component_nut_icon, {
|
|
@@ -75,6 +78,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
75
78
|
class: "nut-item-contents__info-handle-del",
|
|
76
79
|
onClick: _ctx.delClick
|
|
77
80
|
}, null, 8, ["onClick"]),
|
|
81
|
+
createTextVNode(),
|
|
78
82
|
createVNode(_component_nut_icon, {
|
|
79
83
|
name: "edit",
|
|
80
84
|
class: "nut-item-contents__info-handle-edit",
|
|
@@ -83,6 +87,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
83
87
|
])
|
|
84
88
|
])
|
|
85
89
|
]),
|
|
90
|
+
createTextVNode(),
|
|
86
91
|
createElementVNode("div", _hoisted_7$1, [
|
|
87
92
|
renderSlot(_ctx.$slots, "contentAddr", {}, () => [
|
|
88
93
|
createTextVNode(toDisplayString(_ctx.item.fullAddress), 1)
|
|
@@ -238,6 +243,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
238
243
|
]),
|
|
239
244
|
_: 3
|
|
240
245
|
}, 8, ["item", "onDelIconClick", "onEditIconClick", "onItemClick"]),
|
|
246
|
+
createTextVNode(),
|
|
241
247
|
_ctx.showMaskRef ? (openBlock(), createElementBlock("div", {
|
|
242
248
|
key: 0,
|
|
243
249
|
class: "nut-long-press-shell__contain-mask",
|
|
@@ -248,10 +254,12 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
248
254
|
class: "nut-long-press-shell__contain-mask-copy",
|
|
249
255
|
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.copyCLick && _ctx.copyCLick(...args))
|
|
250
256
|
}, _hoisted_3),
|
|
257
|
+
createTextVNode(),
|
|
251
258
|
createElementVNode("div", {
|
|
252
259
|
class: "nut-long-press-shell__contain-mask-set",
|
|
253
260
|
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.setDefault && _ctx.setDefault(...args))
|
|
254
261
|
}, _hoisted_5),
|
|
262
|
+
createTextVNode(),
|
|
255
263
|
createElementVNode("div", {
|
|
256
264
|
class: "nut-long-press-shell__contain-mask-del",
|
|
257
265
|
onClick: _cache[2] || (_cache[2] = (...args) => _ctx.delClick && _ctx.delClick(...args))
|
|
@@ -259,6 +267,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
259
267
|
])
|
|
260
268
|
])) : createCommentVNode("", true)
|
|
261
269
|
], 32),
|
|
270
|
+
createTextVNode(),
|
|
262
271
|
_ctx.showMaskRef ? (openBlock(), createElementBlock("div", {
|
|
263
272
|
key: 0,
|
|
264
273
|
class: "nut-addresslist__mask-bottom",
|
|
@@ -357,7 +366,8 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
357
366
|
]),
|
|
358
367
|
_: 3
|
|
359
368
|
}, 8, ["item", "onDelIconClick", "onEditIconClick", "onItemClick", "onTouchmove", "onTouchstart"])
|
|
360
|
-
])
|
|
369
|
+
]),
|
|
370
|
+
createTextVNode()
|
|
361
371
|
]),
|
|
362
372
|
_: 3
|
|
363
373
|
});
|
|
@@ -474,7 +484,7 @@ const _sfc_main = create({
|
|
|
474
484
|
});
|
|
475
485
|
const trowelData = () => {
|
|
476
486
|
if (Object.keys(props.dataMapOptions).length > 0) {
|
|
477
|
-
dataArray.value = props.data.map((item,
|
|
487
|
+
dataArray.value = props.data.map((item, index) => {
|
|
478
488
|
return floatData(dataInfo, item, props.dataMapOptions);
|
|
479
489
|
});
|
|
480
490
|
}
|
|
@@ -540,9 +550,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
540
550
|
const _component_swipe_shell = resolveComponent("swipe-shell");
|
|
541
551
|
const _component_nut_button = resolveComponent("nut-button");
|
|
542
552
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
543
|
-
!_ctx.longPressEdition && !_ctx.swipeEdition ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.dataArray, (item,
|
|
553
|
+
!_ctx.longPressEdition && !_ctx.swipeEdition ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.dataArray, (item, index) => {
|
|
544
554
|
return openBlock(), createBlock(_component_general_shell, {
|
|
545
|
-
key: "general" +
|
|
555
|
+
key: "general" + index,
|
|
546
556
|
item,
|
|
547
557
|
onHandleDelIcon: _ctx.clickDelIcon,
|
|
548
558
|
onHandleEditIcon: _ctx.clickEditIcon,
|
|
@@ -550,9 +560,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
550
560
|
onHandelSwipeDel: _ctx.clickSwipeDel
|
|
551
561
|
}, null, 8, ["item", "onHandleDelIcon", "onHandleEditIcon", "onHandleItemContent", "onHandelSwipeDel"]);
|
|
552
562
|
}), 128)) : createCommentVNode("", true),
|
|
553
|
-
|
|
563
|
+
createTextVNode(),
|
|
564
|
+
_ctx.longPressEdition && !_ctx.swipeEdition ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.dataArray, (item, index) => {
|
|
554
565
|
return openBlock(), createBlock(_component_long_press_shell, {
|
|
555
|
-
key: "longpress" +
|
|
566
|
+
key: "longpress" + index,
|
|
556
567
|
item,
|
|
557
568
|
onHandleDelIcon: _ctx.clickDelIcon,
|
|
558
569
|
onHandleEditIcon: _ctx.clickEditIcon,
|
|
@@ -576,9 +587,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
576
587
|
_: 2
|
|
577
588
|
}, 1032, ["item", "onHandleDelIcon", "onHandleEditIcon", "onHandleItemContent", "onHandleCopy", "onHandleSet", "onHandleDel"]);
|
|
578
589
|
}), 128)) : createCommentVNode("", true),
|
|
579
|
-
|
|
590
|
+
createTextVNode(),
|
|
591
|
+
!_ctx.longPressEdition && _ctx.swipeEdition ? (openBlock(true), createElementBlock(Fragment, { key: 2 }, renderList(_ctx.dataArray, (item, index) => {
|
|
580
592
|
return openBlock(), createBlock(_component_swipe_shell, {
|
|
581
|
-
key: "swipe" +
|
|
593
|
+
key: "swipe" + index,
|
|
582
594
|
item,
|
|
583
595
|
onHandleDelIcon: _ctx.clickDelIcon,
|
|
584
596
|
onHandleEditIcon: _ctx.clickEditIcon,
|
|
@@ -600,6 +612,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
600
612
|
_: 2
|
|
601
613
|
}, 1032, ["item", "onHandleDelIcon", "onHandleEditIcon", "onHandleItemContent", "onHandelSwipeDel"]);
|
|
602
614
|
}), 128)) : createCommentVNode("", true),
|
|
615
|
+
createTextVNode(),
|
|
603
616
|
_ctx.showBottomButton ? (openBlock(), createElementBlock("div", {
|
|
604
617
|
key: 3,
|
|
605
618
|
class: "nut-addresslist__bottom",
|
|
@@ -617,5 +630,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
617
630
|
])) : createCommentVNode("", true)
|
|
618
631
|
]);
|
|
619
632
|
}
|
|
620
|
-
var
|
|
621
|
-
export {
|
|
633
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
634
|
+
export { index_taro as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.6-beta.1 Mon Oct 31 2022 19:38:22 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -60,5 +60,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
60
60
|
], 2)
|
|
61
61
|
]);
|
|
62
62
|
}
|
|
63
|
-
var
|
|
64
|
-
export {
|
|
63
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
64
|
+
export { index_taro as default };
|