@nutui/nutui 4.3.14 → 4.3.15-beta.2
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 +19 -0
- package/README.md +2 -2
- package/dist/nutui.es.js +2 -14
- package/dist/nutui.umd.js +19829 -1
- package/dist/packages/{Interceptor-CBzqGJrl.js → Interceptor-aNUpilAP.js} +1 -1
- package/dist/packages/actionsheet/ActionSheet.js +17 -11
- package/dist/packages/address/Address.js +139 -121
- package/dist/packages/addresslist/AddressList.js +22 -11
- package/dist/packages/animate/Animate.js +1 -1
- package/dist/packages/avatar/Avatar.js +1 -1
- package/dist/packages/avatarcropper/AvatarCropper.js +329 -126
- package/dist/packages/avatargroup/AvatarGroup.js +17 -10
- package/dist/packages/backtop/Backtop.js +42 -88
- package/dist/packages/badge/Badge.js +4 -2
- package/dist/packages/barrage/Barrage.js +76 -130
- package/dist/packages/button/Button.js +15 -8
- package/dist/packages/calendar/Calendar.js +173 -152
- package/dist/packages/calendarcard/CalendarCard.js +33 -61
- package/dist/packages/card/Card.js +12 -4
- package/dist/packages/cascader/Cascader.js +49 -37
- package/dist/packages/category/Category.js +13 -12
- package/dist/packages/categorypane/CategoryPane.js +13 -8
- package/dist/packages/cell/Cell.js +10 -16
- package/dist/packages/cellgroup/CellGroup.js +4 -2
- package/dist/packages/checkbox/Checkbox.js +1 -1
- package/dist/packages/circleprogress/CircleProgress.js +53 -69
- package/dist/packages/col/Col.js +1 -1
- package/dist/packages/collapse/Collapse.js +1 -1
- package/dist/packages/collapseitem/CollapseItem.js +74 -39
- package/dist/packages/comment/Comment.js +46 -24
- package/dist/packages/configprovider/ConfigProvider.js +1 -1
- package/dist/packages/countdown/Countdown.js +2 -2
- package/dist/packages/countup/Countup.js +53 -66
- package/dist/packages/datepicker/DatePicker.js +12 -7
- package/dist/packages/dialog/Dialog.js +27 -96
- package/dist/packages/dialog/index.mjs +1 -2
- package/dist/packages/divider/Divider.js +1 -1
- package/dist/packages/drag/Drag.js +95 -58
- package/dist/packages/ecard/Ecard.js +19 -16
- package/dist/packages/elevator/Elevator.js +86 -73
- package/dist/packages/ellipsis/Ellipsis.js +223 -121
- package/dist/packages/empty/Empty.js +5 -3
- package/dist/packages/fixednav/FixedNav.js +12 -7
- package/dist/packages/form/Form.js +2 -2
- package/dist/packages/formitem/FormItem.js +3 -1
- package/dist/packages/grid/Grid.js +1 -1
- package/dist/packages/griditem/GridItem.js +5 -15
- package/dist/packages/imagepreview/ImagePreview.js +192 -400
- package/dist/packages/imagepreview/index.mjs +1 -2
- package/dist/packages/{index-BOB4ytqZ.js → index-IxPZmHlb.js} +2 -2
- package/dist/packages/index-m0Wcof-q.js +69 -0
- package/dist/packages/{index-wLaOjIn1.js → index.taro-CNxLoYer.js} +6 -7
- package/dist/packages/index.taro.vue_vue_type_script_setup_true_lang-JJ7hr71Y.js +17 -0
- package/dist/packages/indicator/Indicator.js +2 -2
- package/dist/packages/input/Input.js +87 -70
- package/dist/packages/inputnumber/InputNumber.js +22 -14
- package/dist/packages/invoice/Invoice.js +3 -2
- package/dist/packages/list/List.js +114 -56
- package/dist/packages/menu/Menu.js +45 -40
- package/dist/packages/menuitem/MenuItem.js +53 -47
- package/dist/packages/navbar/Navbar.js +31 -17
- package/dist/packages/noticebar/Noticebar.js +68 -43
- package/dist/packages/notify/Notify.js +10 -157
- package/dist/packages/notify/index.mjs +1 -2
- package/dist/packages/numberkeyboard/NumberKeyboard.js +103 -109
- package/dist/packages/overlay/Overlay.js +6 -34
- package/dist/packages/pagination/Pagination.js +8 -5
- package/dist/packages/picker/Picker.js +113 -26
- package/dist/packages/popover/Popover.js +158 -88
- package/dist/packages/popup/Popup.js +1 -1
- package/dist/packages/price/Price.js +16 -3
- package/dist/packages/progress/Progress.js +7 -4
- package/dist/packages/radio/Radio.js +11 -12
- package/dist/packages/radiogroup/RadioGroup.js +2 -2
- package/dist/packages/{raf-c01wDYCo.js → raf-CzJhCkQo.js} +0 -9
- package/dist/packages/range/Range.js +139 -71
- package/dist/packages/rate/Rate.js +15 -49
- package/dist/packages/row/Row.js +1 -1
- package/dist/packages/searchbar/Searchbar.js +35 -27
- package/dist/packages/shortpassword/ShortPassword.js +51 -43
- package/dist/packages/sidenavbar/SideNavbar.js +3 -14
- package/dist/packages/sidenavbaritem/SideNavbarItem.js +2 -2
- package/dist/packages/signature/Signature.js +148 -106
- package/dist/packages/skeleton/Skeleton.js +6 -3
- package/dist/packages/sku/Sku.js +66 -42
- package/dist/packages/space/Space.js +2 -2
- package/dist/packages/step/Step.js +5 -2
- package/dist/packages/steps/Steps.js +1 -1
- package/dist/packages/sticky/Sticky.js +32 -71
- package/dist/packages/subsidenavbar/SubSideNavbar.js +13 -5
- package/dist/packages/swipe/Swipe.js +37 -14
- package/dist/packages/swipegroup/SwipeGroup.js +2 -2
- package/dist/packages/swiper/Swiper.js +73 -24
- package/dist/packages/switch/Switch.js +6 -4
- package/dist/packages/tabbar/Tabbar.js +23 -24
- package/dist/packages/tabbaritem/TabbarItem.js +8 -3
- package/dist/packages/table/Table.js +10 -6
- package/dist/packages/tabs/Tabs.js +146 -150
- package/dist/packages/tag/Tag.js +5 -5
- package/dist/packages/textarea/Textarea.js +144 -69
- package/dist/packages/timedetail/TimeDetail.js +2 -2
- package/dist/packages/timepannel/TimePannel.js +2 -2
- package/dist/packages/timeselect/TimeSelect.js +9 -11
- package/dist/packages/toast/Toast.js +50 -186
- package/dist/packages/toast/index.mjs +1 -2
- package/dist/packages/tour/Tour.js +145 -99
- package/dist/packages/trendarrow/TrendArrow.js +7 -4
- package/dist/packages/uploader/Uploader.js +263 -106
- package/dist/packages/{util-D1pvnUYu.js → util-2G3mRQeF.js} +5 -17
- package/dist/packages/watermark/Watermark.js +95 -35
- package/dist/smartips/web-types.json +380 -770
- package/dist/style.css +1 -1
- package/dist/styles/base-jda.css +1 -0
- package/dist/styles/themes/default.scss +0 -1
- package/dist/styles/themes/jda.scss +106 -0
- package/dist/styles/themes/jdb.scss +0 -1
- package/dist/styles/themes/jddkh.scss +0 -1
- package/dist/styles/themes/jdt.scss +0 -1
- package/dist/styles/variables-jda.scss +945 -0
- package/dist/types/__VUE/actionsheet/{index.vue.d.ts → index.taro.vue.d.ts} +5 -112
- package/dist/types/__VUE/address/{index.vue.d.ts → index.taro.vue.d.ts} +139 -412
- package/dist/types/__VUE/addresslist/components/{GeneralShell.vue.d.ts → GeneralShell.taro.vue.d.ts} +45 -134
- package/dist/types/__VUE/addresslist/components/ItemContents.taro.vue.d.ts +27 -0
- package/dist/types/__VUE/addresslist/{index.vue.d.ts → index.taro.vue.d.ts} +85 -155
- package/dist/types/__VUE/animate/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/avatarcropper/{index.vue.d.ts → index.taro.vue.d.ts} +90 -147
- package/dist/types/__VUE/backtop/{backtop.vue.d.ts → backtop.taro.vue.d.ts} +8 -19
- package/dist/types/__VUE/backtop/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/badge/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/barrage/{index.vue.d.ts → index.taro.vue.d.ts} +10 -5
- package/dist/types/__VUE/button/{button.vue.d.ts → button.taro.vue.d.ts} +7 -1
- package/dist/types/__VUE/button/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/calendar/{index.vue.d.ts → index.taro.vue.d.ts} +59 -94
- package/dist/types/__VUE/calendarcard/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/calendaritem/{index.vue.d.ts → index.taro.vue.d.ts} +22 -4
- package/dist/types/__VUE/card/{index.vue.d.ts → index.taro.vue.d.ts} +13 -13
- package/dist/types/__VUE/cascader/{cascader-item.vue.d.ts → cascader-item.taro.vue.d.ts} +47 -229
- package/dist/types/__VUE/cascader/{index.vue.d.ts → index.taro.vue.d.ts} +50 -287
- package/dist/types/__VUE/category/{index.vue.d.ts → index.taro.vue.d.ts} +2 -2
- package/dist/types/__VUE/cell/{cell.vue.d.ts → cell.taro.vue.d.ts} +0 -15
- package/dist/types/__VUE/cell/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/cellgroup/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/circleprogress/{circle-progress.vue.d.ts → circle-progress.taro.vue.d.ts} +0 -4
- package/dist/types/__VUE/circleprogress/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/col/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/collapse/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/collapseitem/collapse-item.taro.vue.d.ts +94 -0
- package/dist/types/__VUE/collapseitem/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/comment/components/CmtBottom.taro.vue.d.ts +47 -0
- package/dist/types/__VUE/comment/components/CmtHeader.taro.vue.d.ts +122 -0
- package/dist/types/__VUE/comment/components/{CmtImages.vue.d.ts → CmtImages.taro.vue.d.ts} +2 -55
- package/dist/types/__VUE/comment/index.taro.vue.d.ts +333 -0
- package/dist/types/__VUE/countdown/{index.d.ts → index.taro.d.ts} +2 -2
- 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} +31 -2
- package/dist/types/__VUE/dialog/{index.vue.d.ts → index.taro.vue.d.ts} +52 -85
- package/dist/types/__VUE/divider/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/drag/{index.vue.d.ts → index.taro.vue.d.ts} +2 -0
- package/dist/types/__VUE/elevator/{index.vue.d.ts → index.taro.vue.d.ts} +40 -5
- package/dist/types/__VUE/ellipsis/{index.vue.d.ts → index.taro.vue.d.ts} +11 -6
- package/dist/types/__VUE/empty/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/fixednav/{index.vue.d.ts → index.taro.vue.d.ts} +2 -55
- package/dist/types/__VUE/form/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/formitem/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/grid/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/griditem/{grid-item.vue.d.ts → grid-item.taro.vue.d.ts} +3 -21
- package/dist/types/__VUE/griditem/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/imagepreview/index.taro.vue.d.ts +732 -0
- package/dist/types/__VUE/indicator/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/input/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/input/{input.vue.d.ts → input.taro.vue.d.ts} +14 -6
- package/dist/types/__VUE/inputnumber/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/invoice/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/layout/{index.d.ts → index.taro.d.ts} +1 -1
- package/dist/types/__VUE/list/{index.vue.d.ts → index.taro.vue.d.ts} +32 -4
- package/dist/types/__VUE/menu/index.taro.vue.d.ts +104 -0
- package/dist/types/__VUE/menuitem/{index.vue.d.ts → index.taro.vue.d.ts} +22 -114
- package/dist/types/__VUE/navbar/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/noticebar/{index.vue.d.ts → index.taro.vue.d.ts} +9 -116
- package/dist/types/__VUE/notify/{index.vue.d.ts → index.taro.vue.d.ts} +2 -66
- package/dist/types/__VUE/numberkeyboard/{index.vue.d.ts → index.taro.vue.d.ts} +14 -60
- package/dist/types/__VUE/overlay/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/picker/{index.vue.d.ts → index.taro.vue.d.ts} +31 -2
- package/dist/types/__VUE/popover/{index.vue.d.ts → index.taro.vue.d.ts} +4 -56
- package/dist/types/__VUE/popup/{index.vue.d.ts → index.taro.vue.d.ts} +3 -56
- package/dist/types/__VUE/price/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/progress/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/radio/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/radiogroup/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/range/{index.vue.d.ts → index.taro.vue.d.ts} +3 -2
- package/dist/types/__VUE/rate/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/rate/rate.taro.vue.d.ts +95 -0
- package/dist/types/__VUE/row/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/scroll-view/index.taro.vue.d.ts +9 -0
- package/dist/types/__VUE/searchbar/{index.vue.d.ts → index.taro.vue.d.ts} +23 -121
- package/dist/types/__VUE/shortpassword/{index.vue.d.ts → index.taro.vue.d.ts} +5 -112
- package/dist/types/__VUE/sidenavbar/{index.vue.d.ts → index.taro.vue.d.ts} +0 -9
- package/dist/types/__VUE/signature/{index.vue.d.ts → index.taro.vue.d.ts} +53 -31
- package/dist/types/__VUE/skeleton/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/sku/components/{SkuHeader.vue.d.ts → SkuHeader.taro.vue.d.ts} +6 -6
- package/dist/types/__VUE/sku/{index.vue.d.ts → index.taro.vue.d.ts} +25 -62
- package/dist/types/__VUE/step/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/steps/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/sticky/{index.vue.d.ts → index.taro.vue.d.ts} +7 -26
- package/dist/types/__VUE/subsidenavbar/index.taro.vue.d.ts +45 -0
- package/dist/types/__VUE/swipe/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/swipegroup/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/swiper/{index.vue.d.ts → index.taro.vue.d.ts} +6 -5
- package/dist/types/__VUE/switch/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/tabbar/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/tabbaritem/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/table/{index.vue.d.ts → index.taro.vue.d.ts} +2 -55
- package/dist/types/__VUE/tabs/{index.vue.d.ts → index.taro.vue.d.ts} +27 -118
- package/dist/types/__VUE/tag/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/textarea/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/textarea/{textarea.vue.d.ts → textarea.taro.vue.d.ts} +1 -1
- package/dist/types/__VUE/timeselect/{index.vue.d.ts → index.taro.vue.d.ts} +3 -66
- package/dist/types/__VUE/toast/{index.vue.d.ts → index.taro.vue.d.ts} +16 -12
- package/dist/types/__VUE/tour/{index.vue.d.ts → index.taro.vue.d.ts} +13 -121
- package/dist/types/__VUE/trendarrow/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/__VUE/uploader/{index.vue.d.ts → index.taro.vue.d.ts} +268 -286
- package/dist/types/__VUE/watermark/{index.d.ts → index.taro.d.ts} +2 -2
- package/dist/types/index.d.ts +145 -155
- package/package.json +1 -1
- package/dist/nutui.js +0 -15854
- package/dist/packages/audio/Audio.js +0 -271
- package/dist/packages/audio/index.mjs +0 -2
- package/dist/packages/audiooperate/AudioOperate.js +0 -125
- package/dist/packages/audiooperate/index.mjs +0 -2
- package/dist/packages/image/Image.js +0 -167
- package/dist/packages/image/index.mjs +0 -2
- package/dist/packages/index-B1qsj2XR.js +0 -33
- package/dist/packages/index-BvmDLUYP.js +0 -31
- package/dist/packages/index-aiGQ-EiA.js +0 -8
- package/dist/packages/infiniteloading/InfiniteLoading.js +0 -184
- package/dist/packages/infiniteloading/index.mjs +0 -2
- package/dist/packages/mountComponent-CLi4Nz91.js +0 -39
- package/dist/packages/pullrefresh/PullRefresh.js +0 -240
- package/dist/packages/pullrefresh/index.mjs +0 -2
- package/dist/packages/types-BMA1Y94E.js +0 -4
- package/dist/packages/video/Video.js +0 -449
- package/dist/packages/video/index.mjs +0 -2
- package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +0 -134
- package/dist/types/__VUE/audio/index.vue.d.ts +0 -323
- package/dist/types/__VUE/audio/types.d.ts +0 -3
- package/dist/types/__VUE/audiooperate/index.vue.d.ts +0 -229
- package/dist/types/__VUE/collapseitem/collapse-item.vue.d.ts +0 -201
- package/dist/types/__VUE/comment/components/CmtBottom.vue.d.ts +0 -208
- package/dist/types/__VUE/comment/components/CmtHeader.vue.d.ts +0 -248
- package/dist/types/__VUE/comment/index.vue.d.ts +0 -728
- package/dist/types/__VUE/dialog/index.d.ts +0 -44
- package/dist/types/__VUE/image/image.vue.d.ts +0 -111
- package/dist/types/__VUE/image/index.d.ts +0 -6
- package/dist/types/__VUE/image/types.d.ts +0 -2
- package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +0 -267
- package/dist/types/__VUE/imagepreview/index.d.ts +0 -36
- package/dist/types/__VUE/imagepreview/index.vue.d.ts +0 -1088
- package/dist/types/__VUE/infiniteloading/index.vue.d.ts +0 -140
- package/dist/types/__VUE/menu/index.vue.d.ts +0 -210
- package/dist/types/__VUE/notify/index.d.ts +0 -22
- package/dist/types/__VUE/pullrefresh/index.vue.d.ts +0 -200
- package/dist/types/__VUE/rate/rate.vue.d.ts +0 -208
- package/dist/types/__VUE/subsidenavbar/index.vue.d.ts +0 -152
- package/dist/types/__VUE/toast/index.d.ts +0 -12
- package/dist/types/__VUE/video/index.vue.d.ts +0 -149
- package/dist/packages/{index-Do4_KY74.js → index.taro-Do4_KY74.js} +0 -0
- package/dist/types/__VUE/animate/{animate.vue.d.ts → animate.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/avatar/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/avatargroup/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/badge/{badge.vue.d.ts → badge.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/calendarcard/{calendar-card.vue.d.ts → calendar-card.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/calendarcard/{icon.d.ts → icon.taro.d.ts} +0 -0
- package/dist/types/__VUE/categorypane/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/cellgroup/{cell-group.vue.d.ts → cell-group.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/checkbox/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/checkboxgroup/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/col/{col.vue.d.ts → col.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/collapse/{collapse.vue.d.ts → collapse.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/configprovider/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/countdown/{countdown.vue.d.ts → countdown.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/divider/{divider.vue.d.ts → divider.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/ecard/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/empty/{empty.vue.d.ts → empty.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/form/{form.vue.d.ts → form.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/formitem/{form-item.vue.d.ts → form-item.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/grid/{grid.vue.d.ts → grid.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/indicator/{indicator.vue.d.ts → indicator.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/inputnumber/{input-number.vue.d.ts → input-number.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/invoice/{invoice.vue.d.ts → invoice.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/layout/{layout.vue.d.ts → layout.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/navbar/{navbar.vue.d.ts → navbar.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/overlay/{overlay.vue.d.ts → overlay.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/pagination/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/price/{price.vue.d.ts → price.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/progress/{progress.vue.d.ts → progress.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/radio/{radio.vue.d.ts → radio.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/radiogroup/{radio-group.vue.d.ts → radio-group.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/row/{row.vue.d.ts → row.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/sidenavbaritem/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/skeleton/{skeleton.vue.d.ts → skeleton.taro.vue.d.ts} +2 -2
- package/dist/types/__VUE/sku/components/{SkuStepper.vue.d.ts → SkuStepper.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/space/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/step/{step.vue.d.ts → step.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/steps/{steps.vue.d.ts → steps.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/swipe/{swipe.vue.d.ts → swipe.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/swipegroup/{swipe-group.vue.d.ts → swipe-group.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/swiperitem/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/switch/{switch.vue.d.ts → switch.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/tabbar/{tabbar.vue.d.ts → tabbar.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/tabbaritem/{tabbar-item.vue.d.ts → tabbar-item.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/tabpane/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/tag/{tag.vue.d.ts → tag.taro.vue.d.ts} +0 -0
- 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/trendarrow/{trend-arrow.vue.d.ts → trend-arrow.taro.vue.d.ts} +1 -1
- package/dist/types/__VUE/watermark/{watermark.vue.d.ts → watermark.taro.vue.d.ts} +2 -2
|
@@ -17,9 +17,31 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
|
|
20
|
+
var __async = (__this, __arguments, generator) => {
|
|
21
|
+
return new Promise((resolve, reject) => {
|
|
22
|
+
var fulfilled = (value) => {
|
|
23
|
+
try {
|
|
24
|
+
step(generator.next(value));
|
|
25
|
+
} catch (e) {
|
|
26
|
+
reject(e);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
var rejected = (value) => {
|
|
30
|
+
try {
|
|
31
|
+
step(generator.throw(value));
|
|
32
|
+
} catch (e) {
|
|
33
|
+
reject(e);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
37
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
import { ref, reactive, computed, watch, toRefs, resolveComponent, openBlock, createBlock, normalizeStyle, withCtx, createElementVNode, createTextVNode, createElementBlock, Fragment, renderList, renderSlot } from "vue";
|
|
21
41
|
import { c as createComponent } from "../component-DQf3CENX.js";
|
|
22
|
-
import
|
|
42
|
+
import Taro from "@tarojs/taro";
|
|
43
|
+
import { _ as _sfc_main$1 } from "../index.taro.vue_vue_type_script_setup_true_lang-JJ7hr71Y.js";
|
|
44
|
+
import { u as useTaroRect } from "../index-m0Wcof-q.js";
|
|
23
45
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
|
|
24
46
|
var CompareResult = /* @__PURE__ */ ((CompareResult2) => {
|
|
25
47
|
CompareResult2[CompareResult2["eq"] = 1] = "eq";
|
|
@@ -48,7 +70,14 @@ function binarySearch(list, value, compareFunc) {
|
|
|
48
70
|
}
|
|
49
71
|
const { create } = createComponent("list");
|
|
50
72
|
const _sfc_main = create({
|
|
73
|
+
components: {
|
|
74
|
+
NutScrollView: _sfc_main$1
|
|
75
|
+
},
|
|
51
76
|
props: {
|
|
77
|
+
height: {
|
|
78
|
+
type: [Number],
|
|
79
|
+
default: 50
|
|
80
|
+
},
|
|
52
81
|
listData: {
|
|
53
82
|
type: Array,
|
|
54
83
|
default: () => {
|
|
@@ -62,7 +91,7 @@ const _sfc_main = create({
|
|
|
62
91
|
containerHeight: {
|
|
63
92
|
type: Number
|
|
64
93
|
},
|
|
65
|
-
|
|
94
|
+
estimateRowHeight: {
|
|
66
95
|
type: Number,
|
|
67
96
|
default: 80
|
|
68
97
|
},
|
|
@@ -73,17 +102,19 @@ const _sfc_main = create({
|
|
|
73
102
|
},
|
|
74
103
|
emits: ["scrollUp", "scrollDown", "scrollBottom"],
|
|
75
104
|
setup(props, { emit }) {
|
|
76
|
-
|
|
105
|
+
var _a, _b, _c;
|
|
106
|
+
const clientHeight = ((_c = (_b = (_a = Taro).getSystemInfoSync) == null ? void 0 : _b.call(_a)) == null ? void 0 : _c.windowHeight) || 667;
|
|
77
107
|
const list = ref(null);
|
|
78
108
|
const phantom = ref(null);
|
|
79
109
|
const actualContent = ref(null);
|
|
110
|
+
const refRandomId = Math.random().toString(36).slice(-8);
|
|
80
111
|
const state = reactive({
|
|
81
112
|
start: 0,
|
|
82
113
|
originStartIndex: 0,
|
|
83
114
|
scrollTop: 0,
|
|
84
115
|
list: props.listData.slice(),
|
|
85
116
|
cachePositions: [],
|
|
86
|
-
phantomHeight: props.
|
|
117
|
+
phantomHeight: props.estimateRowHeight * props.listData.length
|
|
87
118
|
});
|
|
88
119
|
const getContainerHeight = computed(() => {
|
|
89
120
|
if (props.containerHeight) {
|
|
@@ -92,7 +123,7 @@ const _sfc_main = create({
|
|
|
92
123
|
return clientHeight;
|
|
93
124
|
});
|
|
94
125
|
const visibleCount = computed(() => {
|
|
95
|
-
return Math.ceil(getContainerHeight.value / props.
|
|
126
|
+
return Math.ceil(getContainerHeight.value / props.estimateRowHeight);
|
|
96
127
|
});
|
|
97
128
|
const end = computed(() => {
|
|
98
129
|
return Math.min(state.originStartIndex + visibleCount.value + props.bufferSize, state.list.length);
|
|
@@ -110,9 +141,9 @@ const _sfc_main = create({
|
|
|
110
141
|
for (let i = 0; i < state.list.length; ++i) {
|
|
111
142
|
state.cachePositions[i] = {
|
|
112
143
|
index: i,
|
|
113
|
-
height: props.
|
|
114
|
-
top: i * props.
|
|
115
|
-
bottom: (i + 1) * (props.
|
|
144
|
+
height: props.estimateRowHeight,
|
|
145
|
+
top: i * props.estimateRowHeight,
|
|
146
|
+
bottom: (i + 1) * (props.estimateRowHeight + props.margin),
|
|
116
147
|
dValue: 0
|
|
117
148
|
};
|
|
118
149
|
}
|
|
@@ -121,18 +152,25 @@ const _sfc_main = create({
|
|
|
121
152
|
let nodes = actualContent.value.childNodes;
|
|
122
153
|
nodes = Array.from(nodes).filter((node) => node.nodeType === 1);
|
|
123
154
|
const start = nodes[0];
|
|
124
|
-
nodes.forEach((node,
|
|
155
|
+
nodes.forEach((node, index) => __async(this, null, function* () {
|
|
125
156
|
if (!node) return;
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
157
|
+
useTaroRect(node).then(
|
|
158
|
+
(rect) => {
|
|
159
|
+
if (rect && rect.height) {
|
|
160
|
+
const { height: height2 } = rect;
|
|
161
|
+
const oldHeight = state.cachePositions[index + state.start] ? state.cachePositions[index + state.start].height : props.height;
|
|
162
|
+
const dValue = oldHeight - height2;
|
|
163
|
+
if (dValue && state.cachePositions[index + state.start]) {
|
|
164
|
+
state.cachePositions[index + state.start].bottom -= dValue;
|
|
165
|
+
state.cachePositions[index + state.start].height = height2;
|
|
166
|
+
state.cachePositions[index + state.start].dValue = dValue;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
() => {
|
|
171
|
+
}
|
|
172
|
+
);
|
|
173
|
+
}));
|
|
136
174
|
let startIndex = 0;
|
|
137
175
|
if (start) {
|
|
138
176
|
startIndex = state.start;
|
|
@@ -179,11 +217,10 @@ const _sfc_main = create({
|
|
|
179
217
|
state.scrollTop = 0;
|
|
180
218
|
list.value.scrollTop = 0;
|
|
181
219
|
initCachedPosition();
|
|
182
|
-
state.phantomHeight = props.
|
|
220
|
+
state.phantomHeight = props.estimateRowHeight * state.list.length;
|
|
183
221
|
};
|
|
184
|
-
const handleScrollEvent = () => {
|
|
185
|
-
|
|
186
|
-
const scrollTop = (_a = list.value) == null ? void 0 : _a.scrollTop;
|
|
222
|
+
const handleScrollEvent = (e) => __async(this, null, function* () {
|
|
223
|
+
const scrollTop = Math.max(e.detail ? e.detail.scrollTop : e.target.scrollTop, 0.1);
|
|
187
224
|
const { originStartIndex } = state;
|
|
188
225
|
const currentIndex = getStartIndex(scrollTop);
|
|
189
226
|
if (currentIndex !== originStartIndex) {
|
|
@@ -195,15 +232,17 @@ const _sfc_main = create({
|
|
|
195
232
|
}
|
|
196
233
|
emit(scrollTop > state.scrollTop ? "scrollUp" : "scrollDown", scrollTop);
|
|
197
234
|
state.scrollTop = scrollTop;
|
|
198
|
-
};
|
|
235
|
+
});
|
|
199
236
|
initCachedPosition();
|
|
200
237
|
watch(
|
|
201
238
|
() => props.listData,
|
|
202
239
|
(val) => {
|
|
203
240
|
state.list = val.slice();
|
|
204
241
|
if (state.list.length === val.length) {
|
|
205
|
-
|
|
206
|
-
|
|
242
|
+
setTimeout(() => {
|
|
243
|
+
initCachedPosition();
|
|
244
|
+
updateCachedPosition();
|
|
245
|
+
}, 200);
|
|
207
246
|
} else {
|
|
208
247
|
resetAllVirtualParam();
|
|
209
248
|
return;
|
|
@@ -214,7 +253,11 @@ const _sfc_main = create({
|
|
|
214
253
|
() => state.start,
|
|
215
254
|
() => {
|
|
216
255
|
if (actualContent.value && state.list.length > 0) {
|
|
217
|
-
|
|
256
|
+
Taro.nextTick(() => {
|
|
257
|
+
setTimeout(() => {
|
|
258
|
+
updateCachedPosition();
|
|
259
|
+
}, 200);
|
|
260
|
+
});
|
|
218
261
|
}
|
|
219
262
|
}
|
|
220
263
|
);
|
|
@@ -224,43 +267,58 @@ const _sfc_main = create({
|
|
|
224
267
|
actualContent,
|
|
225
268
|
getTransform,
|
|
226
269
|
visibleData,
|
|
270
|
+
refRandomId,
|
|
227
271
|
getContainerHeight,
|
|
228
272
|
handleScrollEvent
|
|
229
273
|
});
|
|
230
274
|
}
|
|
231
275
|
});
|
|
276
|
+
const _hoisted_1 = ["id"];
|
|
277
|
+
const _hoisted_2 = ["id"];
|
|
278
|
+
const _hoisted_3 = ["id"];
|
|
232
279
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
233
|
-
|
|
280
|
+
const _component_nut_scroll_view = resolveComponent("nut-scroll-view");
|
|
281
|
+
return openBlock(), createBlock(_component_nut_scroll_view, {
|
|
282
|
+
id: "list" + _ctx.refRandomId,
|
|
234
283
|
ref: "list",
|
|
235
284
|
class: "nut-list",
|
|
285
|
+
"scroll-y": true,
|
|
236
286
|
style: normalizeStyle({ height: `${_ctx.getContainerHeight}px` }),
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
287
|
+
"scroll-top": "0",
|
|
288
|
+
onScroll: _ctx.handleScrollEvent
|
|
289
|
+
}, {
|
|
290
|
+
default: withCtx(() => [
|
|
291
|
+
createElementVNode("div", {
|
|
292
|
+
id: "phantom" + _ctx.refRandomId,
|
|
293
|
+
ref: "phantom",
|
|
294
|
+
class: "nut-list-phantom",
|
|
295
|
+
style: normalizeStyle({ height: _ctx.phantomHeight + "px" })
|
|
296
|
+
}, null, 12, _hoisted_1),
|
|
297
|
+
_cache[0] || (_cache[0] = createTextVNode()),
|
|
298
|
+
createElementVNode("div", {
|
|
299
|
+
id: "actualContent" + _ctx.refRandomId,
|
|
300
|
+
ref: "actualContent",
|
|
301
|
+
class: "nut-list-container",
|
|
302
|
+
style: normalizeStyle({ transform: _ctx.getTransform() })
|
|
303
|
+
}, [
|
|
304
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.visibleData, (item, index) => {
|
|
305
|
+
return openBlock(), createElementBlock("div", {
|
|
306
|
+
id: "list-item-" + Number(index + _ctx.start),
|
|
307
|
+
key: item,
|
|
308
|
+
class: "nut-list-item"
|
|
309
|
+
}, [
|
|
310
|
+
renderSlot(_ctx.$slots, "default", {
|
|
311
|
+
item,
|
|
312
|
+
index: index + _ctx.start
|
|
313
|
+
})
|
|
314
|
+
], 8, _hoisted_3);
|
|
315
|
+
}), 128))
|
|
316
|
+
], 12, _hoisted_2)
|
|
317
|
+
]),
|
|
318
|
+
_: 3
|
|
319
|
+
}, 8, ["id", "style", "onScroll"]);
|
|
262
320
|
}
|
|
263
|
-
const
|
|
321
|
+
const index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
264
322
|
export {
|
|
265
|
-
|
|
323
|
+
index_taro as default
|
|
266
324
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { ref, computed,
|
|
1
|
+
import { ref, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, normalizeStyle, toDisplayString, createTextVNode, renderSlot, createBlock } from "vue";
|
|
2
2
|
import { c as createComponent } from "../component-DQf3CENX.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import Taro, { usePageScroll } from "@tarojs/taro";
|
|
4
|
+
import { u as useTaroRect } from "../index-m0Wcof-q.js";
|
|
5
|
+
import { RectUp, RectDown } from "@nutui/icons-vue-taro";
|
|
6
6
|
import { u as useChildren } from "../useChildren-BZ4-J79J.js";
|
|
7
|
+
import { M as MENU_KEY } from "../types-CkPfROfI.js";
|
|
7
8
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
|
|
8
9
|
const { componentName, create } = createComponent("menu");
|
|
9
10
|
const _sfc_main = create({
|
|
@@ -47,6 +48,7 @@ const _sfc_main = create({
|
|
|
47
48
|
},
|
|
48
49
|
setup(props) {
|
|
49
50
|
const barRef = ref();
|
|
51
|
+
const refRandomId = Math.random().toString(36).slice(-8);
|
|
50
52
|
const offset = ref(0);
|
|
51
53
|
const isScrollFixed = ref(false);
|
|
52
54
|
const { children, linkChildren } = useChildren(MENU_KEY);
|
|
@@ -58,33 +60,37 @@ const _sfc_main = create({
|
|
|
58
60
|
"scroll-fixed": isScrollFixed.value
|
|
59
61
|
};
|
|
60
62
|
});
|
|
61
|
-
const updateOffset = () => {
|
|
63
|
+
const updateOffset = (children2) => {
|
|
62
64
|
if (barRef.value) {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
setTimeout(() => {
|
|
66
|
+
useTaroRect(barRef).then(
|
|
67
|
+
(rect) => {
|
|
68
|
+
if (props.direction === "down") {
|
|
69
|
+
offset.value = rect.bottom;
|
|
70
|
+
} else {
|
|
71
|
+
offset.value = Taro.getSystemInfoSync().windowHeight - rect.top;
|
|
72
|
+
}
|
|
73
|
+
children2.toggle();
|
|
74
|
+
},
|
|
75
|
+
() => {
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
}, 100);
|
|
69
79
|
}
|
|
70
80
|
};
|
|
71
81
|
linkChildren({ props, offset });
|
|
72
82
|
const toggleItem = (active) => {
|
|
73
|
-
children.forEach((item,
|
|
74
|
-
if (
|
|
75
|
-
updateOffset();
|
|
76
|
-
item.toggle();
|
|
83
|
+
children.forEach((item, index) => {
|
|
84
|
+
if (index === active) {
|
|
85
|
+
updateOffset(item);
|
|
77
86
|
} else if (item.state.showPopup) {
|
|
78
87
|
item.toggle(false, { immediate: true });
|
|
79
88
|
}
|
|
80
89
|
});
|
|
81
90
|
};
|
|
82
|
-
const
|
|
83
|
-
return Math.max(0, "scrollTop" in el ? el.scrollTop : el.pageYOffset);
|
|
84
|
-
};
|
|
85
|
-
const onScroll = () => {
|
|
91
|
+
const onScroll = (res) => {
|
|
86
92
|
const { scrollFixed } = props;
|
|
87
|
-
const scrollTop =
|
|
93
|
+
const scrollTop = res.scrollTop;
|
|
88
94
|
isScrollFixed.value = scrollTop > (typeof scrollFixed === "boolean" ? 30 : Number(scrollFixed));
|
|
89
95
|
};
|
|
90
96
|
const getClasses = (showPopup) => {
|
|
@@ -98,16 +104,10 @@ const _sfc_main = create({
|
|
|
98
104
|
}
|
|
99
105
|
return str;
|
|
100
106
|
};
|
|
101
|
-
|
|
102
|
-
const { scrollFixed } = props;
|
|
103
|
-
if (scrollFixed) {
|
|
104
|
-
window.addEventListener("scroll", onScroll);
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
onUnmounted(() => {
|
|
107
|
+
usePageScroll((res) => {
|
|
108
108
|
const { scrollFixed } = props;
|
|
109
109
|
if (scrollFixed) {
|
|
110
|
-
|
|
110
|
+
onScroll(res);
|
|
111
111
|
}
|
|
112
112
|
});
|
|
113
113
|
return {
|
|
@@ -116,13 +116,15 @@ const _sfc_main = create({
|
|
|
116
116
|
opened,
|
|
117
117
|
classes,
|
|
118
118
|
barRef,
|
|
119
|
+
refRandomId,
|
|
119
120
|
getClasses
|
|
120
121
|
};
|
|
121
122
|
}
|
|
122
123
|
});
|
|
123
|
-
const _hoisted_1 = ["
|
|
124
|
-
const _hoisted_2 =
|
|
125
|
-
const _hoisted_3 = { class: "nut-menu__title-
|
|
124
|
+
const _hoisted_1 = ["id"];
|
|
125
|
+
const _hoisted_2 = ["onClick"];
|
|
126
|
+
const _hoisted_3 = { class: "nut-menu__title-text" };
|
|
127
|
+
const _hoisted_4 = { class: "nut-menu__title-icon" };
|
|
126
128
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
127
129
|
const _component_RectUp = resolveComponent("RectUp");
|
|
128
130
|
const _component_RectDown = resolveComponent("RectDown");
|
|
@@ -130,33 +132,36 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
130
132
|
class: normalizeClass(_ctx.classes)
|
|
131
133
|
}, [
|
|
132
134
|
createElementVNode("view", {
|
|
135
|
+
id: "nut-menu__bar" + _ctx.refRandomId,
|
|
133
136
|
ref: "barRef",
|
|
134
137
|
class: normalizeClass(["nut-menu__bar", { opened: _ctx.opened }])
|
|
135
138
|
}, [
|
|
136
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.children, (item,
|
|
139
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.children, (item, index) => {
|
|
137
140
|
return openBlock(), createElementBlock("view", {
|
|
138
|
-
key:
|
|
141
|
+
key: index,
|
|
139
142
|
class: normalizeClass(["nut-menu__item", { disabled: item.disabled, active: item.state.showPopup }]),
|
|
140
143
|
style: normalizeStyle({ color: item.state.showPopup ? _ctx.activeColor : "" }),
|
|
141
|
-
onClick: ($event) => !item.disabled && _ctx.toggleItem(
|
|
144
|
+
onClick: ($event) => !item.disabled && _ctx.toggleItem(index)
|
|
142
145
|
}, [
|
|
143
146
|
createElementVNode("view", {
|
|
144
147
|
class: normalizeClass(["nut-menu__title", _ctx.getClasses(item.state.showPopup)])
|
|
145
148
|
}, [
|
|
146
|
-
createElementVNode("view",
|
|
147
|
-
|
|
149
|
+
createElementVNode("view", _hoisted_3, toDisplayString(item.renderTitle()), 1),
|
|
150
|
+
_cache[0] || (_cache[0] = createTextVNode()),
|
|
151
|
+
createElementVNode("span", _hoisted_4, [
|
|
148
152
|
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
149
153
|
_ctx.direction === "up" ? (openBlock(), createBlock(_component_RectUp, { key: 0 })) : (openBlock(), createBlock(_component_RectDown, { key: 1 }))
|
|
150
154
|
])
|
|
151
155
|
])
|
|
152
156
|
], 2)
|
|
153
|
-
], 14,
|
|
157
|
+
], 14, _hoisted_2);
|
|
154
158
|
}), 128))
|
|
155
|
-
],
|
|
159
|
+
], 10, _hoisted_1),
|
|
160
|
+
_cache[1] || (_cache[1] = createTextVNode()),
|
|
156
161
|
renderSlot(_ctx.$slots, "default")
|
|
157
162
|
], 2);
|
|
158
163
|
}
|
|
159
|
-
const
|
|
164
|
+
const index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
160
165
|
export {
|
|
161
|
-
|
|
166
|
+
index_taro as default
|
|
162
167
|
};
|
|
@@ -17,10 +17,11 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { reactive, computed, resolveComponent, withDirectives, openBlock, createElementBlock, normalizeStyle, createElementVNode, vShow, createVNode, mergeProps, withCtx, Fragment, renderList, normalizeClass, renderSlot, createCommentVNode, toDisplayString } from "vue";
|
|
20
|
+
import { reactive, computed, resolveComponent, withDirectives, openBlock, createElementBlock, normalizeStyle, createElementVNode, vShow, createTextVNode, createVNode, mergeProps, withCtx, Fragment, renderList, normalizeClass, renderSlot, createCommentVNode, toDisplayString } from "vue";
|
|
21
21
|
import { c as createComponent } from "../component-DQf3CENX.js";
|
|
22
|
-
import { N as NutPopup } from "../index-
|
|
23
|
-
import { Check } from "@nutui/icons-vue";
|
|
22
|
+
import { N as NutPopup } from "../index.taro-CNxLoYer.js";
|
|
23
|
+
import { Check } from "@nutui/icons-vue-taro";
|
|
24
|
+
import { _ as _sfc_main$1 } from "../index.taro.vue_vue_type_script_setup_true_lang-JJ7hr71Y.js";
|
|
24
25
|
import { u as useParent } from "../useParent-D6DiuxZZ.js";
|
|
25
26
|
import { M as MENU_KEY } from "../types-CkPfROfI.js";
|
|
26
27
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
|
|
@@ -45,10 +46,11 @@ const _sfc_main = create({
|
|
|
45
46
|
inactiveTitleClass: String
|
|
46
47
|
},
|
|
47
48
|
components: {
|
|
49
|
+
Check,
|
|
48
50
|
NutPopup,
|
|
49
|
-
|
|
51
|
+
NutScrollView: _sfc_main$1
|
|
50
52
|
},
|
|
51
|
-
emits: ["update:modelValue", "change"
|
|
53
|
+
emits: ["update:modelValue", "change"],
|
|
52
54
|
setup(props, { emit }) {
|
|
53
55
|
const state = reactive({
|
|
54
56
|
showPopup: false,
|
|
@@ -56,11 +58,7 @@ const _sfc_main = create({
|
|
|
56
58
|
});
|
|
57
59
|
const { parent } = useParent(MENU_KEY);
|
|
58
60
|
const style = computed(() => {
|
|
59
|
-
return parent.props.direction === "down" ? {
|
|
60
|
-
top: parent.offset.value + "px"
|
|
61
|
-
} : {
|
|
62
|
-
bottom: parent.offset.value + "px"
|
|
63
|
-
};
|
|
61
|
+
return parent.props.direction === "down" ? { top: parent.offset.value + "px" } : { bottom: parent.offset.value + "px" };
|
|
64
62
|
});
|
|
65
63
|
const placeholderElementStyle = computed(() => {
|
|
66
64
|
const heightStyle = { height: parent.offset.value + "px" };
|
|
@@ -77,7 +75,6 @@ const _sfc_main = create({
|
|
|
77
75
|
state.showPopup = show;
|
|
78
76
|
if (show) {
|
|
79
77
|
state.showWrapper = true;
|
|
80
|
-
emit("open");
|
|
81
78
|
}
|
|
82
79
|
};
|
|
83
80
|
const renderTitle = () => {
|
|
@@ -96,12 +93,10 @@ const _sfc_main = create({
|
|
|
96
93
|
}
|
|
97
94
|
};
|
|
98
95
|
const handleClose = () => {
|
|
99
|
-
emit("close");
|
|
100
96
|
state.showWrapper = false;
|
|
101
97
|
};
|
|
102
98
|
const handleClickOutside = () => {
|
|
103
99
|
state.showPopup = false;
|
|
104
|
-
emit("close");
|
|
105
100
|
};
|
|
106
101
|
return {
|
|
107
102
|
style,
|
|
@@ -116,22 +111,26 @@ const _sfc_main = create({
|
|
|
116
111
|
};
|
|
117
112
|
}
|
|
118
113
|
});
|
|
119
|
-
const _hoisted_1 =
|
|
120
|
-
const _hoisted_2 =
|
|
114
|
+
const _hoisted_1 = ["catch-move"];
|
|
115
|
+
const _hoisted_2 = { class: "nut-menu-item__content" };
|
|
116
|
+
const _hoisted_3 = ["onClick"];
|
|
121
117
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
122
118
|
const _component_Check = resolveComponent("Check");
|
|
119
|
+
const _component_nut_scroll_view = resolveComponent("nut-scroll-view");
|
|
123
120
|
const _component_nut_popup = resolveComponent("nut-popup");
|
|
124
121
|
return withDirectives((openBlock(), createElementBlock("view", {
|
|
125
122
|
class: "nut-menu-item",
|
|
126
123
|
style: normalizeStyle(_ctx.style)
|
|
127
124
|
}, [
|
|
128
|
-
withDirectives(createElementVNode("
|
|
125
|
+
withDirectives(createElementVNode("view", {
|
|
129
126
|
class: "nut-menu-item-placeholder-element",
|
|
130
127
|
style: normalizeStyle(_ctx.placeholderElementStyle),
|
|
128
|
+
"catch-move": _ctx.parent.props.lockScroll,
|
|
131
129
|
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClickOutside && _ctx.handleClickOutside(...args))
|
|
132
|
-
}, null,
|
|
130
|
+
}, null, 12, _hoisted_1), [
|
|
133
131
|
[vShow, _ctx.state.showPopup]
|
|
134
132
|
]),
|
|
133
|
+
_cache[4] || (_cache[4] = createTextVNode()),
|
|
135
134
|
createVNode(_component_nut_popup, mergeProps(_ctx.$attrs, {
|
|
136
135
|
visible: _ctx.state.showPopup,
|
|
137
136
|
"onUpdate:visible": _cache[1] || (_cache[1] = ($event) => _ctx.state.showPopup = $event),
|
|
@@ -142,45 +141,52 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
142
141
|
"destroy-on-close": false,
|
|
143
142
|
overlay: _ctx.parent.props.overlay,
|
|
144
143
|
"lock-scroll": _ctx.parent.props.lockScroll,
|
|
145
|
-
"teleport-disable": false,
|
|
146
144
|
"close-on-click-overlay": _ctx.parent.props.closeOnClickOverlay,
|
|
145
|
+
"catch-move": _ctx.parent.props.lockScroll,
|
|
147
146
|
onClosed: _ctx.handleClose
|
|
148
147
|
}), {
|
|
149
148
|
default: withCtx(() => [
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
149
|
+
createVNode(_component_nut_scroll_view, { "scroll-y": true }, {
|
|
150
|
+
default: withCtx(() => [
|
|
151
|
+
createElementVNode("view", _hoisted_2, [
|
|
152
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (option, index) => {
|
|
153
|
+
return openBlock(), createElementBlock("view", {
|
|
154
|
+
key: index,
|
|
155
|
+
class: normalizeClass(["nut-menu-item__option", [{ active: option.value === _ctx.modelValue }]]),
|
|
156
|
+
style: normalizeStyle({ "flex-basis": 100 / _ctx.cols + "%" }),
|
|
157
|
+
onClick: ($event) => _ctx.onClick(option)
|
|
158
|
+
}, [
|
|
159
|
+
option.value === _ctx.modelValue ? (openBlock(), createElementBlock("span", {
|
|
160
|
+
key: 0,
|
|
161
|
+
class: normalizeClass(["nut-menu-item__span", [option.value === _ctx.modelValue ? _ctx.activeTitleClass : _ctx.inactiveTitleClass]])
|
|
162
|
+
}, [
|
|
163
|
+
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
164
|
+
createVNode(_component_Check, mergeProps({ ref_for: true }, _ctx.$attrs, {
|
|
165
|
+
color: _ctx.parent.props.activeColor
|
|
166
|
+
}), null, 16, ["color"])
|
|
167
|
+
])
|
|
168
|
+
], 2)) : createCommentVNode("", true),
|
|
169
|
+
_cache[2] || (_cache[2] = createTextVNode()),
|
|
170
|
+
createElementVNode("view", {
|
|
171
|
+
class: normalizeClass([option.value === _ctx.modelValue ? _ctx.activeTitleClass : _ctx.inactiveTitleClass]),
|
|
172
|
+
style: normalizeStyle({ color: option.value === _ctx.modelValue ? _ctx.parent.props.activeColor : "" })
|
|
173
|
+
}, toDisplayString(option.text), 7)
|
|
174
|
+
], 14, _hoisted_3);
|
|
175
|
+
}), 128)),
|
|
176
|
+
_cache[3] || (_cache[3] = createTextVNode()),
|
|
177
|
+
renderSlot(_ctx.$slots, "default")
|
|
178
|
+
])
|
|
179
|
+
]),
|
|
180
|
+
_: 3
|
|
181
|
+
})
|
|
176
182
|
]),
|
|
177
183
|
_: 3
|
|
178
|
-
}, 16, ["visible", "position", "duration", "overlay", "lock-scroll", "close-on-click-overlay", "onClosed"])
|
|
184
|
+
}, 16, ["visible", "position", "duration", "overlay", "lock-scroll", "close-on-click-overlay", "catch-move", "onClosed"])
|
|
179
185
|
], 4)), [
|
|
180
186
|
[vShow, _ctx.state.showWrapper]
|
|
181
187
|
]);
|
|
182
188
|
}
|
|
183
|
-
const
|
|
189
|
+
const index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
184
190
|
export {
|
|
185
|
-
|
|
191
|
+
index_taro as default
|
|
186
192
|
};
|