@nutui/nutui 4.3.15-beta.1 → 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/dist/nutui.es.js +1 -13
- 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 -97
- package/dist/packages/dialog/index.mjs +1 -2
- package/dist/packages/divider/Divider.js +1 -1
- package/dist/packages/drag/Drag.js +91 -55
- 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 +376 -775
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +0 -1
- package/dist/styles/themes/jda.scss +0 -1
- 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/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 +19 -96
- package/dist/nutui.js +0 -15856
- 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 -45
- 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
|
@@ -1,271 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { ref, reactive, onMounted, watch, provide, toRefs, resolveComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, createVNode, withCtx, createCommentVNode, normalizeClass, createBlock, renderSlot } from "vue";
|
|
21
|
-
import { c as createComponent } from "../component-DQf3CENX.js";
|
|
22
|
-
import { Service } from "@nutui/icons-vue";
|
|
23
|
-
import NutRange from "../range/Range.js";
|
|
24
|
-
import { A as AUDIO_KEY } from "../types-BMA1Y94E.js";
|
|
25
|
-
import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
|
|
26
|
-
const { create } = createComponent("audio");
|
|
27
|
-
const _sfc_main = create({
|
|
28
|
-
props: {
|
|
29
|
-
url: {
|
|
30
|
-
type: String,
|
|
31
|
-
default: ""
|
|
32
|
-
},
|
|
33
|
-
// 静音
|
|
34
|
-
muted: {
|
|
35
|
-
type: Boolean,
|
|
36
|
-
default: false
|
|
37
|
-
},
|
|
38
|
-
// 自动播放
|
|
39
|
-
autoplay: {
|
|
40
|
-
type: Boolean,
|
|
41
|
-
default: false
|
|
42
|
-
},
|
|
43
|
-
// 循环播放
|
|
44
|
-
loop: {
|
|
45
|
-
type: Boolean,
|
|
46
|
-
default: false
|
|
47
|
-
},
|
|
48
|
-
// 是否预加载音频
|
|
49
|
-
preload: {
|
|
50
|
-
type: String,
|
|
51
|
-
default: "auto"
|
|
52
|
-
},
|
|
53
|
-
/* 总时长秒数 */
|
|
54
|
-
second: {
|
|
55
|
-
type: Number,
|
|
56
|
-
default: 0
|
|
57
|
-
},
|
|
58
|
-
// 展示的形式 controls 控制面板 progress 进度条 icon 图标 none 自定义
|
|
59
|
-
type: {
|
|
60
|
-
type: String,
|
|
61
|
-
default: "progress"
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
components: {
|
|
65
|
-
Service,
|
|
66
|
-
NutRange
|
|
67
|
-
},
|
|
68
|
-
emits: ["fastBack", "play", "forward", "ended", "changeProgress", "mute", "canPlay"],
|
|
69
|
-
setup(props, { emit, slots }) {
|
|
70
|
-
const audioRef = ref(null);
|
|
71
|
-
const audioData = reactive({
|
|
72
|
-
currentTime: 0,
|
|
73
|
-
currentDuration: "00:00:00",
|
|
74
|
-
percent: 0,
|
|
75
|
-
duration: "00:00:00",
|
|
76
|
-
second: 0,
|
|
77
|
-
hanMuted: props.muted,
|
|
78
|
-
playing: props.autoplay,
|
|
79
|
-
handPlaying: false
|
|
80
|
-
});
|
|
81
|
-
onMounted(() => {
|
|
82
|
-
var arr = ["webkitVisibilityState", "visibilitychange"];
|
|
83
|
-
try {
|
|
84
|
-
for (let i = 0; i < arr.length; i++) {
|
|
85
|
-
document.addEventListener(arr[i], () => {
|
|
86
|
-
if (document.hidden) {
|
|
87
|
-
audioRef.value.pause();
|
|
88
|
-
} else {
|
|
89
|
-
if (audioData.playing) {
|
|
90
|
-
setTimeout(() => {
|
|
91
|
-
audioRef.value.play();
|
|
92
|
-
}, 200);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
} catch (e) {
|
|
98
|
-
console.log(e.message);
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
const onCanplay = (e) => {
|
|
102
|
-
const audioR = audioRef.value;
|
|
103
|
-
if (props.autoplay) {
|
|
104
|
-
if (audioR && audioR.paused) {
|
|
105
|
-
audioR.play();
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
audioData.second = audioR.duration;
|
|
109
|
-
audioData.duration = formatSeconds(audioR.duration);
|
|
110
|
-
emit("canPlay", e);
|
|
111
|
-
};
|
|
112
|
-
const onTimeupdate = (e) => {
|
|
113
|
-
audioData.currentTime = parseInt(e.target.currentTime);
|
|
114
|
-
};
|
|
115
|
-
const fastBack = () => {
|
|
116
|
-
if (audioData.currentTime > 0) {
|
|
117
|
-
audioData.currentTime--;
|
|
118
|
-
}
|
|
119
|
-
audioRef.value.currentTime = audioData.currentTime;
|
|
120
|
-
emit("fastBack", audioData.currentTime);
|
|
121
|
-
};
|
|
122
|
-
const changeStatus = () => {
|
|
123
|
-
const audioR = audioRef.value;
|
|
124
|
-
if (audioData.playing) {
|
|
125
|
-
audioR.pause();
|
|
126
|
-
audioData.handPlaying = false;
|
|
127
|
-
} else {
|
|
128
|
-
audioR.play();
|
|
129
|
-
audioData.handPlaying = true;
|
|
130
|
-
}
|
|
131
|
-
audioData.playing = !audioData.playing;
|
|
132
|
-
emit("play", audioData.playing);
|
|
133
|
-
};
|
|
134
|
-
const forward = () => {
|
|
135
|
-
audioData.currentTime++;
|
|
136
|
-
audioRef.value.currentTime = audioData.currentTime;
|
|
137
|
-
emit("forward", audioData.currentTime);
|
|
138
|
-
};
|
|
139
|
-
const handle = (val) => {
|
|
140
|
-
audioData.currentDuration = formatSeconds(val);
|
|
141
|
-
audioData.percent = val / audioData.second * 100;
|
|
142
|
-
};
|
|
143
|
-
const audioEnd = () => {
|
|
144
|
-
audioData.playing = false;
|
|
145
|
-
emit("ended");
|
|
146
|
-
};
|
|
147
|
-
const progressChange = (val) => {
|
|
148
|
-
const ar = audioRef.value;
|
|
149
|
-
ar.currentTime = audioData.second * val / 100;
|
|
150
|
-
emit("changeProgress", ar.currentTime);
|
|
151
|
-
};
|
|
152
|
-
const handleMute = () => {
|
|
153
|
-
audioData.hanMuted = !audioData.hanMuted;
|
|
154
|
-
emit("mute", audioData.hanMuted);
|
|
155
|
-
};
|
|
156
|
-
const formatSeconds = (value) => {
|
|
157
|
-
if (!value) {
|
|
158
|
-
return "00:00:00";
|
|
159
|
-
}
|
|
160
|
-
let time = parseInt(value);
|
|
161
|
-
let hours = Math.floor(time / 3600);
|
|
162
|
-
let minutes = Math.floor((time - hours * 3600) / 60);
|
|
163
|
-
let seconds = time - hours * 3600 - minutes * 60;
|
|
164
|
-
let result = "";
|
|
165
|
-
result += ("0" + hours.toString()).slice(-2) + ":";
|
|
166
|
-
result += ("0" + minutes.toString()).slice(-2) + ":";
|
|
167
|
-
result += ("0" + seconds.toString()).slice(-2);
|
|
168
|
-
return result;
|
|
169
|
-
};
|
|
170
|
-
watch(
|
|
171
|
-
() => audioData.currentTime,
|
|
172
|
-
(value) => {
|
|
173
|
-
handle(value);
|
|
174
|
-
}
|
|
175
|
-
);
|
|
176
|
-
provide(AUDIO_KEY, {
|
|
177
|
-
children: [],
|
|
178
|
-
props,
|
|
179
|
-
audioData,
|
|
180
|
-
handleMute,
|
|
181
|
-
forward,
|
|
182
|
-
fastBack,
|
|
183
|
-
changeStatus
|
|
184
|
-
});
|
|
185
|
-
return __spreadProps(__spreadValues(__spreadValues({}, toRefs(props)), toRefs(audioData)), {
|
|
186
|
-
audioRef,
|
|
187
|
-
fastBack,
|
|
188
|
-
forward,
|
|
189
|
-
changeStatus,
|
|
190
|
-
progressChange,
|
|
191
|
-
audioEnd,
|
|
192
|
-
onTimeupdate,
|
|
193
|
-
handleMute,
|
|
194
|
-
onCanplay,
|
|
195
|
-
slots
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
});
|
|
199
|
-
const _hoisted_1 = { class: "nut-audio" };
|
|
200
|
-
const _hoisted_2 = {
|
|
201
|
-
key: 0,
|
|
202
|
-
class: "nut-audio__progress"
|
|
203
|
-
};
|
|
204
|
-
const _hoisted_3 = { class: "nut-audio__time" };
|
|
205
|
-
const _hoisted_4 = { class: "nut-audio__bar" };
|
|
206
|
-
const _hoisted_5 = { class: "nut-audio__time" };
|
|
207
|
-
const _hoisted_6 = {
|
|
208
|
-
key: 1,
|
|
209
|
-
class: "nut-audio__icon"
|
|
210
|
-
};
|
|
211
|
-
const _hoisted_7 = ["controls", "src", "preload", "autoplay", "loop", "muted"];
|
|
212
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
213
|
-
const _component_nut_range = resolveComponent("nut-range");
|
|
214
|
-
const _component_Service = resolveComponent("Service");
|
|
215
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
216
|
-
_ctx.type == "progress" ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
217
|
-
createElementVNode("div", _hoisted_3, toDisplayString(_ctx.currentDuration), 1),
|
|
218
|
-
createElementVNode("div", _hoisted_4, [
|
|
219
|
-
createVNode(_component_nut_range, {
|
|
220
|
-
modelValue: _ctx.percent,
|
|
221
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.percent = $event),
|
|
222
|
-
"hidden-range": "",
|
|
223
|
-
"inactive-color": "#cccccc",
|
|
224
|
-
"active-color": "#fa2c19",
|
|
225
|
-
onChange: _ctx.progressChange
|
|
226
|
-
}, {
|
|
227
|
-
button: withCtx(() => _cache[6] || (_cache[6] = [
|
|
228
|
-
createElementVNode("div", { class: "nut-audio__button--custom" }, null, -1)
|
|
229
|
-
])),
|
|
230
|
-
_: 1
|
|
231
|
-
}, 8, ["modelValue", "onChange"])
|
|
232
|
-
]),
|
|
233
|
-
createElementVNode("div", _hoisted_5, toDisplayString(_ctx.duration), 1)
|
|
234
|
-
])) : createCommentVNode("", true),
|
|
235
|
-
_ctx.type == "icon" ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
236
|
-
createElementVNode("div", {
|
|
237
|
-
class: normalizeClass(["nut-audio__icon--box", _ctx.playing ? "nut-audio__icon--play" : "nut-audio__icon--stop"]),
|
|
238
|
-
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.changeStatus && _ctx.changeStatus(...args))
|
|
239
|
-
}, [
|
|
240
|
-
_ctx.playing ? (openBlock(), createBlock(_component_Service, {
|
|
241
|
-
key: 0,
|
|
242
|
-
class: "nut-icon-am-rotate nut-icon-am-infinite"
|
|
243
|
-
})) : (openBlock(), createBlock(_component_Service, { key: 1 }))
|
|
244
|
-
], 2)
|
|
245
|
-
])) : createCommentVNode("", true),
|
|
246
|
-
_ctx.type == "none" ? (openBlock(), createElementBlock("div", {
|
|
247
|
-
key: 2,
|
|
248
|
-
onClick: _cache[2] || (_cache[2] = (...args) => _ctx.changeStatus && _ctx.changeStatus(...args))
|
|
249
|
-
}, [
|
|
250
|
-
renderSlot(_ctx.$slots, "default")
|
|
251
|
-
])) : createCommentVNode("", true),
|
|
252
|
-
_ctx.type != "none" ? renderSlot(_ctx.$slots, "default", { key: 3 }) : createCommentVNode("", true),
|
|
253
|
-
createElementVNode("audio", {
|
|
254
|
-
ref: "audioRef",
|
|
255
|
-
class: "audioMain",
|
|
256
|
-
controls: _ctx.type == "controls",
|
|
257
|
-
src: _ctx.url,
|
|
258
|
-
preload: _ctx.preload,
|
|
259
|
-
autoplay: _ctx.autoplay,
|
|
260
|
-
loop: _ctx.loop,
|
|
261
|
-
muted: _ctx.hanMuted,
|
|
262
|
-
onTimeupdate: _cache[3] || (_cache[3] = (...args) => _ctx.onTimeupdate && _ctx.onTimeupdate(...args)),
|
|
263
|
-
onCanplay: _cache[4] || (_cache[4] = (...args) => _ctx.onCanplay && _ctx.onCanplay(...args)),
|
|
264
|
-
onEnded: _cache[5] || (_cache[5] = (...args) => _ctx.audioEnd && _ctx.audioEnd(...args))
|
|
265
|
-
}, null, 40, _hoisted_7)
|
|
266
|
-
]);
|
|
267
|
-
}
|
|
268
|
-
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
269
|
-
export {
|
|
270
|
-
index as default
|
|
271
|
-
};
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { inject, reactive, ref, useSlots, toRefs, resolveComponent, openBlock, createElementBlock, createBlock, withCtx, createTextVNode, toDisplayString, createCommentVNode, renderSlot } from "vue";
|
|
21
|
-
import { c as createComponent } from "../component-DQf3CENX.js";
|
|
22
|
-
import { Button as _sfc_main$1 } from "../button/Button.js";
|
|
23
|
-
import { u as useLocale } from "../index-BOB4ytqZ.js";
|
|
24
|
-
import { A as AUDIO_KEY } from "../types-BMA1Y94E.js";
|
|
25
|
-
import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
|
|
26
|
-
const { create } = createComponent("audio-operate");
|
|
27
|
-
const cN = "NutAudioOperate";
|
|
28
|
-
const _sfc_main = create({
|
|
29
|
-
props: {
|
|
30
|
-
// 展示的形式 back 倒退 play 开始 or 暂停 forward 快进 mute 静音
|
|
31
|
-
type: {
|
|
32
|
-
type: String,
|
|
33
|
-
default: () => "play"
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
components: {
|
|
37
|
-
NutButton: _sfc_main$1
|
|
38
|
-
},
|
|
39
|
-
emits: ["click"],
|
|
40
|
-
setup(props) {
|
|
41
|
-
const translate = useLocale(cN);
|
|
42
|
-
const audio = inject(AUDIO_KEY);
|
|
43
|
-
const parent = reactive(audio);
|
|
44
|
-
const customSlot = ref(useSlots().default);
|
|
45
|
-
return __spreadProps(__spreadValues(__spreadValues({}, toRefs(props)), toRefs(parent)), { customSlot, translate });
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
const _hoisted_1 = { class: "nut-audio-operate" };
|
|
49
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
50
|
-
const _component_nut_button = resolveComponent("nut-button");
|
|
51
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
52
|
-
_ctx.type == "back" ? (openBlock(), createElementBlock("div", {
|
|
53
|
-
key: 0,
|
|
54
|
-
class: "nut-audio-operate-item",
|
|
55
|
-
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.fastBack && _ctx.fastBack(...args))
|
|
56
|
-
}, [
|
|
57
|
-
!_ctx.customSlot ? (openBlock(), createBlock(_component_nut_button, {
|
|
58
|
-
key: 0,
|
|
59
|
-
type: "primary",
|
|
60
|
-
size: "small"
|
|
61
|
-
}, {
|
|
62
|
-
default: withCtx(() => [
|
|
63
|
-
createTextVNode(toDisplayString(_ctx.translate("back")), 1)
|
|
64
|
-
]),
|
|
65
|
-
_: 1
|
|
66
|
-
})) : createCommentVNode("", true),
|
|
67
|
-
renderSlot(_ctx.$slots, "default")
|
|
68
|
-
])) : createCommentVNode("", true),
|
|
69
|
-
_ctx.type == "play" ? (openBlock(), createElementBlock("div", {
|
|
70
|
-
key: 1,
|
|
71
|
-
class: "nut-audio-operate-item",
|
|
72
|
-
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.changeStatus && _ctx.changeStatus(...args))
|
|
73
|
-
}, [
|
|
74
|
-
!_ctx.customSlot ? (openBlock(), createBlock(_component_nut_button, {
|
|
75
|
-
key: 0,
|
|
76
|
-
type: "primary",
|
|
77
|
-
size: "small"
|
|
78
|
-
}, {
|
|
79
|
-
default: withCtx(() => [
|
|
80
|
-
createTextVNode(toDisplayString(!_ctx.audioData.playing ? `${_ctx.translate("start")}` : `${_ctx.translate("pause")}`), 1)
|
|
81
|
-
]),
|
|
82
|
-
_: 1
|
|
83
|
-
})) : createCommentVNode("", true),
|
|
84
|
-
renderSlot(_ctx.$slots, "default")
|
|
85
|
-
])) : createCommentVNode("", true),
|
|
86
|
-
_ctx.type == "forward" ? (openBlock(), createElementBlock("div", {
|
|
87
|
-
key: 2,
|
|
88
|
-
class: "nut-audio-operate-item",
|
|
89
|
-
onClick: _cache[2] || (_cache[2] = (...args) => _ctx.forward && _ctx.forward(...args))
|
|
90
|
-
}, [
|
|
91
|
-
!_ctx.customSlot ? (openBlock(), createBlock(_component_nut_button, {
|
|
92
|
-
key: 0,
|
|
93
|
-
type: "primary",
|
|
94
|
-
size: "small"
|
|
95
|
-
}, {
|
|
96
|
-
default: withCtx(() => _cache[4] || (_cache[4] = [
|
|
97
|
-
createTextVNode("快进")
|
|
98
|
-
])),
|
|
99
|
-
_: 1
|
|
100
|
-
})) : createCommentVNode("", true),
|
|
101
|
-
renderSlot(_ctx.$slots, "default")
|
|
102
|
-
])) : createCommentVNode("", true),
|
|
103
|
-
_ctx.type == "mute" ? (openBlock(), createElementBlock("div", {
|
|
104
|
-
key: 3,
|
|
105
|
-
class: "nut-audio-operate-item",
|
|
106
|
-
onClick: _cache[3] || (_cache[3] = (...args) => _ctx.handleMute && _ctx.handleMute(...args))
|
|
107
|
-
}, [
|
|
108
|
-
!_ctx.customSlot ? (openBlock(), createBlock(_component_nut_button, {
|
|
109
|
-
key: 0,
|
|
110
|
-
type: !_ctx.audioData.hanMuted ? "primary" : "default",
|
|
111
|
-
size: "small"
|
|
112
|
-
}, {
|
|
113
|
-
default: withCtx(() => [
|
|
114
|
-
createTextVNode(toDisplayString(_ctx.translate("mute")), 1)
|
|
115
|
-
]),
|
|
116
|
-
_: 1
|
|
117
|
-
}, 8, ["type"])) : createCommentVNode("", true),
|
|
118
|
-
renderSlot(_ctx.$slots, "default")
|
|
119
|
-
])) : createCommentVNode("", true)
|
|
120
|
-
]);
|
|
121
|
-
}
|
|
122
|
-
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
123
|
-
export {
|
|
124
|
-
index as default
|
|
125
|
-
};
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { defineComponent, ref, computed, onMounted, onBeforeUnmount, watch, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot, createVNode, unref, createCommentVNode } from "vue";
|
|
21
|
-
import { p as pxCheck } from "../pxCheck-DN6FYV6q.js";
|
|
22
|
-
import { Image, ImageError } from "@nutui/icons-vue";
|
|
23
|
-
import { w as withInstall } from "../with-install-Ch3FF0uS.js";
|
|
24
|
-
const _hoisted_1 = ["src", "data-src", "alt"];
|
|
25
|
-
const _hoisted_2 = {
|
|
26
|
-
key: 0,
|
|
27
|
-
class: "nut-img-loading"
|
|
28
|
-
};
|
|
29
|
-
const _hoisted_3 = {
|
|
30
|
-
key: 1,
|
|
31
|
-
class: "nut-img-error"
|
|
32
|
-
};
|
|
33
|
-
const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
|
|
34
|
-
name: "NutImage"
|
|
35
|
-
}), {
|
|
36
|
-
__name: "image",
|
|
37
|
-
props: {
|
|
38
|
-
src: {},
|
|
39
|
-
fit: { default: "fill" },
|
|
40
|
-
position: { default: "center" },
|
|
41
|
-
alt: { default: "" },
|
|
42
|
-
width: { default: "" },
|
|
43
|
-
height: { default: "" },
|
|
44
|
-
round: { type: Boolean, default: false },
|
|
45
|
-
radius: {},
|
|
46
|
-
showError: { type: Boolean, default: true },
|
|
47
|
-
showLoading: { type: Boolean, default: true },
|
|
48
|
-
lazyLoad: { type: Boolean, default: false }
|
|
49
|
-
},
|
|
50
|
-
emits: ["click", "load", "error"],
|
|
51
|
-
setup(__props, { emit: __emit }) {
|
|
52
|
-
const props = __props;
|
|
53
|
-
const emit = __emit;
|
|
54
|
-
const loading = ref(true);
|
|
55
|
-
const isError = ref(false);
|
|
56
|
-
const classes = computed(() => {
|
|
57
|
-
const prefixCls = "nut-image";
|
|
58
|
-
return {
|
|
59
|
-
[prefixCls]: true,
|
|
60
|
-
[`${prefixCls}-round`]: props.round
|
|
61
|
-
};
|
|
62
|
-
});
|
|
63
|
-
const observer = ref(null);
|
|
64
|
-
const show = ref(false);
|
|
65
|
-
const imgRef = ref(null);
|
|
66
|
-
const initObserver = () => {
|
|
67
|
-
const options = {
|
|
68
|
-
threshold: [0],
|
|
69
|
-
rootMargin: "0px"
|
|
70
|
-
};
|
|
71
|
-
observer.value = new IntersectionObserver((entires) => {
|
|
72
|
-
entires.forEach((item) => {
|
|
73
|
-
if (item.isIntersecting) {
|
|
74
|
-
show.value = true;
|
|
75
|
-
observer.value.disconnect();
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
}, options);
|
|
79
|
-
imgRef.value && observer.value.observe(imgRef.value);
|
|
80
|
-
};
|
|
81
|
-
onMounted(() => {
|
|
82
|
-
props.lazyLoad && initObserver();
|
|
83
|
-
});
|
|
84
|
-
onBeforeUnmount(() => {
|
|
85
|
-
observer.value && observer.value.disconnect();
|
|
86
|
-
});
|
|
87
|
-
const stylebox = computed(() => {
|
|
88
|
-
let style = {};
|
|
89
|
-
if (props.width) style.width = pxCheck(props.width);
|
|
90
|
-
if (props.height) style.height = pxCheck(props.height);
|
|
91
|
-
if (props.radius !== void 0 && props.radius !== null) {
|
|
92
|
-
style.overflow = "hidden";
|
|
93
|
-
style.borderRadius = pxCheck(props.radius);
|
|
94
|
-
}
|
|
95
|
-
return style;
|
|
96
|
-
});
|
|
97
|
-
const styles = computed(() => {
|
|
98
|
-
let styless = {
|
|
99
|
-
objectFit: props.fit,
|
|
100
|
-
objectPosition: props.position
|
|
101
|
-
};
|
|
102
|
-
return styless;
|
|
103
|
-
});
|
|
104
|
-
watch(
|
|
105
|
-
() => props.src,
|
|
106
|
-
() => {
|
|
107
|
-
isError.value = false;
|
|
108
|
-
loading.value = true;
|
|
109
|
-
}
|
|
110
|
-
);
|
|
111
|
-
const load = () => {
|
|
112
|
-
isError.value = false;
|
|
113
|
-
loading.value = false;
|
|
114
|
-
emit("load");
|
|
115
|
-
};
|
|
116
|
-
const error = () => {
|
|
117
|
-
isError.value = true;
|
|
118
|
-
loading.value = false;
|
|
119
|
-
emit("error");
|
|
120
|
-
};
|
|
121
|
-
const imageClick = (event) => {
|
|
122
|
-
emit("click", event);
|
|
123
|
-
};
|
|
124
|
-
return (_ctx, _cache) => {
|
|
125
|
-
return openBlock(), createElementBlock("div", {
|
|
126
|
-
class: normalizeClass(classes.value),
|
|
127
|
-
style: normalizeStyle(stylebox.value),
|
|
128
|
-
onClick: imageClick
|
|
129
|
-
}, [
|
|
130
|
-
createElementVNode("img", {
|
|
131
|
-
ref_key: "imgRef",
|
|
132
|
-
ref: imgRef,
|
|
133
|
-
class: "nut-img",
|
|
134
|
-
src: _ctx.lazyLoad ? show.value ? _ctx.src : void 0 : _ctx.src,
|
|
135
|
-
"data-src": _ctx.lazyLoad ? show.value ? void 0 : _ctx.src : void 0,
|
|
136
|
-
alt: _ctx.alt,
|
|
137
|
-
style: normalizeStyle(styles.value),
|
|
138
|
-
onLoad: load,
|
|
139
|
-
onError: error
|
|
140
|
-
}, null, 44, _hoisted_1),
|
|
141
|
-
loading.value ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
142
|
-
renderSlot(_ctx.$slots, "loading", {}, () => [
|
|
143
|
-
createVNode(unref(Image), {
|
|
144
|
-
width: "16px",
|
|
145
|
-
height: "20px",
|
|
146
|
-
name: "image"
|
|
147
|
-
})
|
|
148
|
-
])
|
|
149
|
-
])) : createCommentVNode("", true),
|
|
150
|
-
isError.value && !loading.value ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
151
|
-
renderSlot(_ctx.$slots, "error", {}, () => [
|
|
152
|
-
createVNode(unref(ImageError), {
|
|
153
|
-
width: "16px",
|
|
154
|
-
height: "20px",
|
|
155
|
-
name: "imageError"
|
|
156
|
-
})
|
|
157
|
-
])
|
|
158
|
-
])) : createCommentVNode("", true)
|
|
159
|
-
], 6);
|
|
160
|
-
};
|
|
161
|
-
}
|
|
162
|
-
}));
|
|
163
|
-
withInstall(_sfc_main);
|
|
164
|
-
export {
|
|
165
|
-
_sfc_main as Image,
|
|
166
|
-
_sfc_main as default
|
|
167
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { unref } from "vue";
|
|
2
|
-
function isWindow(val) {
|
|
3
|
-
return typeof window !== "undefined" && val === window;
|
|
4
|
-
}
|
|
5
|
-
const useRect = (elementRef) => {
|
|
6
|
-
const element = unref(elementRef);
|
|
7
|
-
if (isWindow(element)) {
|
|
8
|
-
const width = element.innerWidth;
|
|
9
|
-
const height = element.innerHeight;
|
|
10
|
-
return {
|
|
11
|
-
top: 0,
|
|
12
|
-
left: 0,
|
|
13
|
-
right: width,
|
|
14
|
-
bottom: height,
|
|
15
|
-
width,
|
|
16
|
-
height
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
if (element && element.getBoundingClientRect) {
|
|
20
|
-
return element.getBoundingClientRect();
|
|
21
|
-
}
|
|
22
|
-
return {
|
|
23
|
-
top: 0,
|
|
24
|
-
left: 0,
|
|
25
|
-
right: 0,
|
|
26
|
-
bottom: 0,
|
|
27
|
-
width: 0,
|
|
28
|
-
height: 0
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
export {
|
|
32
|
-
useRect as u
|
|
33
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { ref, onMounted } from "vue";
|
|
2
|
-
const overflowScrollReg = /scroll|auto|overlay/i;
|
|
3
|
-
const defaultRoot = window;
|
|
4
|
-
function isElement(node) {
|
|
5
|
-
const ELEMENT_NODE_TYPE = 1;
|
|
6
|
-
return node.tagName !== "HTML" && node.tagName !== "BODY" && node.nodeType === ELEMENT_NODE_TYPE;
|
|
7
|
-
}
|
|
8
|
-
function getScrollParent(el, root = defaultRoot) {
|
|
9
|
-
let node = el;
|
|
10
|
-
while (node && node !== root && isElement(node)) {
|
|
11
|
-
const { overflowY } = window.getComputedStyle(node);
|
|
12
|
-
if (overflowScrollReg.test(overflowY)) {
|
|
13
|
-
return node;
|
|
14
|
-
}
|
|
15
|
-
node = node.parentNode;
|
|
16
|
-
}
|
|
17
|
-
return root;
|
|
18
|
-
}
|
|
19
|
-
function useScrollParent(el, root = defaultRoot) {
|
|
20
|
-
const scrollParent = ref();
|
|
21
|
-
onMounted(() => {
|
|
22
|
-
if (el.value) {
|
|
23
|
-
scrollParent.value = getScrollParent(el.value, root);
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
return scrollParent;
|
|
27
|
-
}
|
|
28
|
-
export {
|
|
29
|
-
getScrollParent as g,
|
|
30
|
-
useScrollParent as u
|
|
31
|
-
};
|