@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,8 +1,9 @@
|
|
|
1
|
-
import { ref, computed, watch, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, toDisplayString, Fragment, renderList, createCommentVNode } from "vue";
|
|
1
|
+
import { ref, computed, watch, onMounted, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, toDisplayString, createTextVNode, Fragment, renderList, createCommentVNode } from "vue";
|
|
2
2
|
import { c as createComponent } from "../component-DQf3CENX.js";
|
|
3
|
-
import { N as NutPopup } from "../index-
|
|
4
|
-
import { Tips } from "@nutui/icons-vue";
|
|
5
|
-
import { u as useLocale } from "../index-
|
|
3
|
+
import { N as NutPopup } from "../index.taro-CNxLoYer.js";
|
|
4
|
+
import { Tips } from "@nutui/icons-vue-taro";
|
|
5
|
+
import { u as useLocale } from "../index-IxPZmHlb.js";
|
|
6
|
+
import { eventCenter, getCurrentInstance } from "@tarojs/taro";
|
|
6
7
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
|
|
7
8
|
const { create } = createComponent("short-password");
|
|
8
9
|
const cN = "NutShortPassword";
|
|
@@ -56,10 +57,10 @@ const _sfc_main = create({
|
|
|
56
57
|
const realInput = ref(props.modelValue);
|
|
57
58
|
const comLen = computed(() => range(Number(props.length)));
|
|
58
59
|
const show = ref(props.visible);
|
|
59
|
-
|
|
60
|
+
function focus(event) {
|
|
60
61
|
event.stopPropagation();
|
|
61
62
|
emit("focus");
|
|
62
|
-
}
|
|
63
|
+
}
|
|
63
64
|
watch(
|
|
64
65
|
() => props.visible,
|
|
65
66
|
(value) => {
|
|
@@ -75,45 +76,46 @@ const _sfc_main = create({
|
|
|
75
76
|
}
|
|
76
77
|
}
|
|
77
78
|
);
|
|
78
|
-
|
|
79
|
+
function close() {
|
|
79
80
|
emit("update:visible", false);
|
|
80
81
|
emit("close");
|
|
81
|
-
}
|
|
82
|
-
|
|
82
|
+
}
|
|
83
|
+
function range(val) {
|
|
83
84
|
return Math.min(Math.max(4, val), 6);
|
|
84
|
-
}
|
|
85
|
-
|
|
85
|
+
}
|
|
86
|
+
function onTips() {
|
|
86
87
|
emit("tips");
|
|
87
|
-
}
|
|
88
|
+
}
|
|
89
|
+
onMounted(() => {
|
|
90
|
+
eventCenter.once(getCurrentInstance().router.onReady, () => {
|
|
91
|
+
});
|
|
92
|
+
});
|
|
88
93
|
return {
|
|
89
94
|
comLen,
|
|
90
95
|
realInput,
|
|
91
|
-
onTouchStart,
|
|
92
96
|
range,
|
|
93
97
|
close,
|
|
94
98
|
onTips,
|
|
99
|
+
focus,
|
|
95
100
|
show,
|
|
96
101
|
translate
|
|
97
102
|
};
|
|
98
103
|
}
|
|
99
104
|
});
|
|
100
|
-
const _hoisted_1 = { class: "nut-short-password
|
|
101
|
-
const _hoisted_2 = { class: "nut-short-password-
|
|
102
|
-
const _hoisted_3 = { class: "nut-short-password-
|
|
103
|
-
const _hoisted_4 = {
|
|
105
|
+
const _hoisted_1 = { class: "nut-short-password" };
|
|
106
|
+
const _hoisted_2 = { class: "nut-short-password-title" };
|
|
107
|
+
const _hoisted_3 = { class: "nut-short-password-subtitle" };
|
|
108
|
+
const _hoisted_4 = { class: "nut-short-password-wrapper" };
|
|
109
|
+
const _hoisted_5 = {
|
|
104
110
|
key: 0,
|
|
105
111
|
class: "nut-short-password__item-icon"
|
|
106
112
|
};
|
|
107
|
-
const
|
|
108
|
-
const
|
|
109
|
-
const _hoisted_7 = {
|
|
110
|
-
key: 0,
|
|
111
|
-
class: "nut-short-password--forget"
|
|
112
|
-
};
|
|
113
|
+
const _hoisted_6 = { class: "nut-short-password__message" };
|
|
114
|
+
const _hoisted_7 = { class: "nut-short-password--error" };
|
|
113
115
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
114
116
|
const _component_tips = resolveComponent("tips");
|
|
115
117
|
const _component_nut_popup = resolveComponent("nut-popup");
|
|
116
|
-
return openBlock(), createElementBlock("view",
|
|
118
|
+
return openBlock(), createElementBlock("view", _hoisted_1, [
|
|
117
119
|
createVNode(_component_nut_popup, {
|
|
118
120
|
visible: _ctx.show,
|
|
119
121
|
"onUpdate:visible": _cache[2] || (_cache[2] = ($event) => _ctx.show = $event),
|
|
@@ -125,48 +127,54 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
125
127
|
},
|
|
126
128
|
closeable: true,
|
|
127
129
|
"close-on-click-overlay": _ctx.closeOnClickOverlay,
|
|
128
|
-
"teleport-disable": false,
|
|
129
130
|
"lock-scroll": _ctx.lockScroll,
|
|
131
|
+
"catch-move": _ctx.lockScroll,
|
|
130
132
|
onClickCloseIcon: _ctx.close,
|
|
131
133
|
onClickOverlay: _ctx.close
|
|
132
134
|
}, {
|
|
133
135
|
default: withCtx(() => [
|
|
134
|
-
createElementVNode("view",
|
|
135
|
-
|
|
136
|
-
createElementVNode("
|
|
136
|
+
createElementVNode("view", _hoisted_2, toDisplayString(_ctx.title || _ctx.translate("title")), 1),
|
|
137
|
+
_cache[5] || (_cache[5] = createTextVNode()),
|
|
138
|
+
createElementVNode("view", _hoisted_3, toDisplayString(_ctx.desc || _ctx.translate("desc")), 1),
|
|
139
|
+
_cache[6] || (_cache[6] = createTextVNode()),
|
|
140
|
+
createElementVNode("view", _hoisted_4, [
|
|
137
141
|
createElementVNode("view", {
|
|
138
142
|
class: "nut-short-password__list",
|
|
139
|
-
onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.
|
|
143
|
+
onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.focus && _ctx.focus(...args))
|
|
140
144
|
}, [
|
|
141
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(new Array(_ctx.comLen), (sublen,
|
|
145
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(new Array(_ctx.comLen), (sublen, index) => {
|
|
142
146
|
return openBlock(), createElementBlock("view", {
|
|
143
|
-
key:
|
|
147
|
+
key: index,
|
|
144
148
|
class: "nut-short-password__item"
|
|
145
149
|
}, [
|
|
146
|
-
String(_ctx.realInput).length >
|
|
150
|
+
String(_ctx.realInput).length > index ? (openBlock(), createElementBlock("view", _hoisted_5)) : createCommentVNode("", true)
|
|
147
151
|
]);
|
|
148
152
|
}), 128))
|
|
149
153
|
], 32)
|
|
150
154
|
]),
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
155
|
+
_cache[7] || (_cache[7] = createTextVNode()),
|
|
156
|
+
createElementVNode("view", _hoisted_6, [
|
|
157
|
+
createElementVNode("view", _hoisted_7, toDisplayString(_ctx.errorMsg), 1),
|
|
158
|
+
_cache[4] || (_cache[4] = createTextVNode()),
|
|
159
|
+
_ctx.tips || _ctx.translate("tips") ? (openBlock(), createElementBlock("view", {
|
|
160
|
+
key: 0,
|
|
161
|
+
class: "nut-short-password--forget",
|
|
162
|
+
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.onTips && _ctx.onTips(...args))
|
|
163
|
+
}, [
|
|
154
164
|
createVNode(_component_tips, {
|
|
155
165
|
class: "icon",
|
|
156
|
-
|
|
157
|
-
height: "11px"
|
|
166
|
+
size: "11px"
|
|
158
167
|
}),
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}, toDisplayString(_ctx.tips || _ctx.translate("tips")), 1)
|
|
168
|
+
_cache[3] || (_cache[3] = createTextVNode()),
|
|
169
|
+
createElementVNode("view", null, toDisplayString(_ctx.tips || _ctx.translate("tips")), 1)
|
|
162
170
|
])) : createCommentVNode("", true)
|
|
163
171
|
])
|
|
164
172
|
]),
|
|
165
173
|
_: 1
|
|
166
|
-
}, 8, ["visible", "close-on-click-overlay", "lock-scroll", "onClickCloseIcon", "onClickOverlay"])
|
|
174
|
+
}, 8, ["visible", "close-on-click-overlay", "lock-scroll", "catch-move", "onClickCloseIcon", "onClickOverlay"])
|
|
167
175
|
]);
|
|
168
176
|
}
|
|
169
|
-
const
|
|
177
|
+
const index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
170
178
|
export {
|
|
171
|
-
|
|
179
|
+
index_taro as default
|
|
172
180
|
};
|
|
@@ -31,8 +31,7 @@ const _sfc_main = create({
|
|
|
31
31
|
setup: (props) => {
|
|
32
32
|
const list = ref(null);
|
|
33
33
|
const state = reactive({
|
|
34
|
-
count: 1
|
|
35
|
-
observer: null
|
|
34
|
+
count: 1
|
|
36
35
|
});
|
|
37
36
|
const setPaddingLeft = (nodeList, level = 1) => {
|
|
38
37
|
var _a;
|
|
@@ -58,16 +57,6 @@ const _sfc_main = create({
|
|
|
58
57
|
};
|
|
59
58
|
onMounted(() => {
|
|
60
59
|
handleSlots();
|
|
61
|
-
state.observer = new MutationObserver(function() {
|
|
62
|
-
state.count = 1;
|
|
63
|
-
handleSlots();
|
|
64
|
-
});
|
|
65
|
-
state.observer.observe(list.value, {
|
|
66
|
-
attributes: false,
|
|
67
|
-
childList: true,
|
|
68
|
-
characterData: false,
|
|
69
|
-
subtree: true
|
|
70
|
-
});
|
|
71
60
|
});
|
|
72
61
|
return __spreadProps(__spreadValues({}, toRefs(state)), {
|
|
73
62
|
list
|
|
@@ -89,7 +78,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
89
78
|
])
|
|
90
79
|
]);
|
|
91
80
|
}
|
|
92
|
-
const
|
|
81
|
+
const index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
93
82
|
export {
|
|
94
|
-
|
|
83
|
+
index_taro as default
|
|
95
84
|
};
|
|
@@ -17,7 +17,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
17
17
|
createElementVNode("span", _hoisted_2, toDisplayString(_ctx.title), 1)
|
|
18
18
|
]);
|
|
19
19
|
}
|
|
20
|
-
const
|
|
20
|
+
const index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
21
21
|
export {
|
|
22
|
-
|
|
22
|
+
index_taro as default
|
|
23
23
|
};
|
|
@@ -1,26 +1,28 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
1
|
+
var __async = (__this, __arguments, generator) => {
|
|
2
|
+
return new Promise((resolve, reject) => {
|
|
3
|
+
var fulfilled = (value) => {
|
|
4
|
+
try {
|
|
5
|
+
step(generator.next(value));
|
|
6
|
+
} catch (e) {
|
|
7
|
+
reject(e);
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
var rejected = (value) => {
|
|
11
|
+
try {
|
|
12
|
+
step(generator.throw(value));
|
|
13
|
+
} catch (e) {
|
|
14
|
+
reject(e);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
18
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
19
|
+
});
|
|
18
20
|
};
|
|
19
|
-
|
|
20
|
-
import {
|
|
21
|
+
import Taro from "@tarojs/taro";
|
|
22
|
+
import { computed, ref, reactive, onMounted, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, createTextVNode, createVNode, withCtx, toDisplayString } from "vue";
|
|
21
23
|
import { c as createComponent } from "../component-DQf3CENX.js";
|
|
22
24
|
import { Button as _sfc_main$1 } from "../button/Button.js";
|
|
23
|
-
import { u as useLocale } from "../index-
|
|
25
|
+
import { u as useLocale } from "../index-IxPZmHlb.js";
|
|
24
26
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
|
|
25
27
|
const { create } = createComponent("signature");
|
|
26
28
|
const cN = "NutSignature";
|
|
@@ -36,15 +38,7 @@ const _sfc_main = create({
|
|
|
36
38
|
},
|
|
37
39
|
strokeStyle: {
|
|
38
40
|
type: String,
|
|
39
|
-
default:
|
|
40
|
-
let bodyDom = document.getElementsByTagName("body");
|
|
41
|
-
let clsName = bodyDom[0]["className"];
|
|
42
|
-
if (clsName.indexOf("nut-theme-dark") == -1) {
|
|
43
|
-
return "#000";
|
|
44
|
-
} else {
|
|
45
|
-
return "#fff";
|
|
46
|
-
}
|
|
47
|
-
}
|
|
41
|
+
default: "#000"
|
|
48
42
|
},
|
|
49
43
|
type: {
|
|
50
44
|
type: String,
|
|
@@ -61,8 +55,6 @@ const _sfc_main = create({
|
|
|
61
55
|
emits: ["start", "end", "signing", "confirm", "clear"],
|
|
62
56
|
setup(props, { emit }) {
|
|
63
57
|
const translate = useLocale(cN);
|
|
64
|
-
const canvas = ref(null);
|
|
65
|
-
const wrap = ref(null);
|
|
66
58
|
const classes = computed(() => {
|
|
67
59
|
const prefixCls = "nut-signature";
|
|
68
60
|
return {
|
|
@@ -70,132 +62,182 @@ const _sfc_main = create({
|
|
|
70
62
|
[`${props.customClass}`]: props.customClass
|
|
71
63
|
};
|
|
72
64
|
});
|
|
65
|
+
const spcanvas = ref(null);
|
|
66
|
+
const canvasSetId = "spcanvas" + (/* @__PURE__ */ new Date()).getTime();
|
|
73
67
|
const state = reactive({
|
|
68
|
+
canvas: null,
|
|
74
69
|
canvasHeight: 0,
|
|
75
70
|
canvasWidth: 0,
|
|
76
|
-
ctx: null
|
|
77
|
-
isSupportTouch: "ontouchstart" in window,
|
|
78
|
-
events: "ontouchstart" in window ? ["touchstart", "touchmove", "touchend", "touchleave"] : ["mousedown", "mousemove", "mouseup", "mouseleave"]
|
|
71
|
+
ctx: null
|
|
79
72
|
});
|
|
80
|
-
const isCanvasSupported = () => {
|
|
81
|
-
let elem = document.createElement("canvas");
|
|
82
|
-
return !!(elem.getContext && elem.getContext("2d"));
|
|
83
|
-
};
|
|
84
|
-
const addEvent = () => {
|
|
85
|
-
canvas.value.addEventListener(state.events[0], startEventHandler, false);
|
|
86
|
-
};
|
|
87
73
|
const startEventHandler = (event) => {
|
|
88
74
|
event.preventDefault();
|
|
75
|
+
if (!state.ctx) {
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
emit("start");
|
|
89
79
|
state.ctx.beginPath();
|
|
90
80
|
state.ctx.lineWidth = props.lineWidth;
|
|
91
81
|
state.ctx.strokeStyle = props.strokeStyle;
|
|
92
|
-
emit("start");
|
|
93
|
-
canvas.value.addEventListener(state.events[1], moveEventHandler, false);
|
|
94
|
-
canvas.value.addEventListener(state.events[2], endEventHandler, false);
|
|
95
|
-
canvas.value.addEventListener(state.events[3], leaveEventHandler, false);
|
|
96
82
|
};
|
|
83
|
+
const isDraw = ref(false);
|
|
97
84
|
const moveEventHandler = (event) => {
|
|
98
85
|
event.preventDefault();
|
|
99
|
-
|
|
86
|
+
if (!state.ctx) {
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
let evt = event.changedTouches[0];
|
|
90
|
+
isDraw.value = true;
|
|
100
91
|
emit("signing", evt);
|
|
101
|
-
let
|
|
102
|
-
let
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
92
|
+
let mouseX = evt.x || evt.clientX;
|
|
93
|
+
let mouseY = evt.y || evt.clientY;
|
|
94
|
+
if (Taro.getEnv() === "WEB") {
|
|
95
|
+
const canvas = document.getElementById(canvasSetId);
|
|
96
|
+
const coverPos = canvas == null ? void 0 : canvas.getBoundingClientRect();
|
|
97
|
+
if (coverPos) {
|
|
98
|
+
mouseX = evt.clientX - coverPos.left;
|
|
99
|
+
mouseY = evt.clientY - coverPos.top;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
Taro.nextTick(() => {
|
|
103
|
+
var _a, _b;
|
|
104
|
+
state.ctx.lineCap = "round";
|
|
105
|
+
state.ctx.lineJoin = "round";
|
|
106
|
+
(_a = state.ctx) == null ? void 0 : _a.lineTo(mouseX, mouseY);
|
|
107
|
+
(_b = state.ctx) == null ? void 0 : _b.stroke();
|
|
108
|
+
});
|
|
106
109
|
};
|
|
107
110
|
const endEventHandler = (event) => {
|
|
108
111
|
event.preventDefault();
|
|
109
112
|
emit("end");
|
|
110
|
-
canvas.value.removeEventListener(state.events[1], moveEventHandler, false);
|
|
111
|
-
canvas.value.removeEventListener(state.events[2], endEventHandler, false);
|
|
112
113
|
};
|
|
113
114
|
const leaveEventHandler = (event) => {
|
|
114
115
|
event.preventDefault();
|
|
115
|
-
canvas.value.removeEventListener(state.events[1], moveEventHandler, false);
|
|
116
|
-
canvas.value.removeEventListener(state.events[2], endEventHandler, false);
|
|
117
116
|
};
|
|
118
117
|
const clear = () => {
|
|
119
|
-
canvas.value.addEventListener(state.events[2], endEventHandler, false);
|
|
120
118
|
state.ctx.clearRect(0, 0, state.canvasWidth, state.canvasHeight);
|
|
121
119
|
state.ctx.closePath();
|
|
122
120
|
emit("clear");
|
|
121
|
+
isDraw.value = false;
|
|
123
122
|
};
|
|
124
123
|
const confirm = () => {
|
|
125
|
-
onSave(
|
|
126
|
-
};
|
|
127
|
-
const isCanvasBlank = (canvas2) => {
|
|
128
|
-
if (!canvas2) {
|
|
129
|
-
return true;
|
|
130
|
-
}
|
|
131
|
-
var blank = document.createElement("canvas");
|
|
132
|
-
blank.width = canvas2.width;
|
|
133
|
-
blank.height = canvas2.height;
|
|
134
|
-
return (canvas2 == null ? void 0 : canvas2.toDataURL()) == blank.toDataURL();
|
|
124
|
+
onSave();
|
|
135
125
|
};
|
|
136
|
-
const onSave = (
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
case "png":
|
|
140
|
-
dataurl = canvas2.toDataURL("image/png");
|
|
141
|
-
break;
|
|
142
|
-
case "jpg":
|
|
143
|
-
dataurl = canvas2.toDataURL("image/jpeg", 0.8);
|
|
144
|
-
break;
|
|
126
|
+
const onSave = () => {
|
|
127
|
+
if (!state.canvas) {
|
|
128
|
+
return;
|
|
145
129
|
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
130
|
+
Taro.createSelectorQuery().select("#" + canvasSetId).fields({
|
|
131
|
+
node: true,
|
|
132
|
+
size: true
|
|
133
|
+
}).exec((res) => __async(this, null, function* () {
|
|
134
|
+
Taro.canvasToTempFilePath({
|
|
135
|
+
canvas: res[0].node,
|
|
136
|
+
canvasId: canvasSetId,
|
|
137
|
+
fileType: props.type,
|
|
138
|
+
success: function(result) {
|
|
139
|
+
const _canvas = !isDraw.value ? "请绘制签名" : state.canvas;
|
|
140
|
+
const _filePath = !isDraw.value ? "" : result.tempFilePath;
|
|
141
|
+
emit("confirm", _canvas, _filePath);
|
|
142
|
+
},
|
|
143
|
+
fail: function(result) {
|
|
144
|
+
emit("confirm", result);
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
}));
|
|
149
148
|
};
|
|
150
149
|
onMounted(() => {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
150
|
+
Taro.nextTick(() => {
|
|
151
|
+
setTimeout(() => {
|
|
152
|
+
if (["WEAPP", "JD", "TT", "SWAN", "ALIPAY", "QQ", "ASCF"].includes(Taro.getEnv())) {
|
|
153
|
+
Taro.createSelectorQuery().select("#" + canvasSetId).fields(
|
|
154
|
+
{
|
|
155
|
+
node: true,
|
|
156
|
+
size: true
|
|
157
|
+
},
|
|
158
|
+
function(res) {
|
|
159
|
+
const canvas = res.node;
|
|
160
|
+
canvasSetting(canvas, res.width, res.height);
|
|
161
|
+
}
|
|
162
|
+
).exec();
|
|
163
|
+
} else {
|
|
164
|
+
const canvasDom = document.getElementById(canvasSetId);
|
|
165
|
+
let canvas = canvasDom;
|
|
166
|
+
if ((canvasDom == null ? void 0 : canvasDom.tagName) !== "CANVAS") {
|
|
167
|
+
canvas = canvasDom == null ? void 0 : canvasDom.getElementsByTagName("canvas")[0];
|
|
168
|
+
}
|
|
169
|
+
canvasSetting(canvas, canvasDom == null ? void 0 : canvasDom.offsetWidth, canvasDom == null ? void 0 : canvasDom.offsetHeight);
|
|
170
|
+
}
|
|
171
|
+
}, 1e3);
|
|
172
|
+
});
|
|
157
173
|
});
|
|
158
|
-
|
|
174
|
+
const canvasSetting = (canvasDom, width, height) => {
|
|
175
|
+
const canvas = canvasDom;
|
|
176
|
+
const dpr = Taro.getSystemInfoSync().pixelRatio;
|
|
177
|
+
const ctx = canvas.getContext("2d");
|
|
178
|
+
canvas.width = width * dpr;
|
|
179
|
+
canvas.height = height * dpr;
|
|
180
|
+
state.canvas = canvas;
|
|
181
|
+
ctx.scale(dpr, dpr);
|
|
182
|
+
state.ctx = ctx;
|
|
183
|
+
state.canvasWidth = width * dpr;
|
|
184
|
+
state.canvasHeight = height * dpr;
|
|
185
|
+
};
|
|
186
|
+
return {
|
|
187
|
+
taroEnv: Taro.getEnv(),
|
|
188
|
+
canvasSetId,
|
|
189
|
+
spcanvas,
|
|
190
|
+
confirm,
|
|
191
|
+
clear,
|
|
192
|
+
classes,
|
|
193
|
+
startEventHandler,
|
|
194
|
+
moveEventHandler,
|
|
195
|
+
endEventHandler,
|
|
196
|
+
leaveEventHandler,
|
|
197
|
+
translate
|
|
198
|
+
};
|
|
159
199
|
}
|
|
160
200
|
});
|
|
161
201
|
const _hoisted_1 = {
|
|
162
|
-
|
|
163
|
-
class: "nut-signature-inner"
|
|
164
|
-
};
|
|
165
|
-
const _hoisted_2 = ["height", "width"];
|
|
166
|
-
const _hoisted_3 = {
|
|
167
|
-
key: 0,
|
|
168
|
-
class: "nut-signature-unsopport"
|
|
202
|
+
class: /* @__PURE__ */ normalizeClass(["nut-signature-inner", "spcanvas_WEAPP"])
|
|
169
203
|
};
|
|
204
|
+
const _hoisted_2 = ["id", "canvasId", "canvas-id"];
|
|
170
205
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
171
206
|
const _component_nut_button = resolveComponent("nut-button");
|
|
172
|
-
return openBlock(), createElementBlock("
|
|
207
|
+
return openBlock(), createElementBlock("view", {
|
|
173
208
|
class: normalizeClass(_ctx.classes)
|
|
174
209
|
}, [
|
|
175
210
|
createElementVNode("div", _hoisted_1, [
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
211
|
+
createElementVNode("canvas", {
|
|
212
|
+
id: _ctx.canvasSetId,
|
|
213
|
+
ref: "spcanvas",
|
|
214
|
+
class: "spcanvas",
|
|
215
|
+
canvasId: _ctx.canvasSetId,
|
|
216
|
+
"canvas-id": _ctx.canvasSetId,
|
|
217
|
+
type: "2d",
|
|
218
|
+
"disable-scroll": "true",
|
|
219
|
+
onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.startEventHandler && _ctx.startEventHandler(...args)),
|
|
220
|
+
onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.moveEventHandler && _ctx.moveEventHandler(...args)),
|
|
221
|
+
onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.endEventHandler && _ctx.endEventHandler(...args)),
|
|
222
|
+
onTouchleave: _cache[3] || (_cache[3] = (...args) => _ctx.leaveEventHandler && _ctx.leaveEventHandler(...args))
|
|
223
|
+
}, null, 40, _hoisted_2)
|
|
224
|
+
]),
|
|
225
|
+
_cache[6] || (_cache[6] = createTextVNode()),
|
|
185
226
|
createVNode(_component_nut_button, {
|
|
186
227
|
class: "nut-signature-btn",
|
|
187
228
|
type: "default",
|
|
188
|
-
onClick: _cache[
|
|
229
|
+
onClick: _cache[4] || (_cache[4] = ($event) => _ctx.clear())
|
|
189
230
|
}, {
|
|
190
231
|
default: withCtx(() => [
|
|
191
232
|
createTextVNode(toDisplayString(_ctx.translate("reSign")), 1)
|
|
192
233
|
]),
|
|
193
234
|
_: 1
|
|
194
235
|
}),
|
|
236
|
+
_cache[7] || (_cache[7] = createTextVNode()),
|
|
195
237
|
createVNode(_component_nut_button, {
|
|
196
238
|
class: "nut-signature-btn",
|
|
197
239
|
type: "primary",
|
|
198
|
-
onClick: _cache[
|
|
240
|
+
onClick: _cache[5] || (_cache[5] = ($event) => _ctx.confirm())
|
|
199
241
|
}, {
|
|
200
242
|
default: withCtx(() => [
|
|
201
243
|
createTextVNode(toDisplayString(_ctx.translate("confirm")), 1)
|
|
@@ -204,7 +246,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
204
246
|
})
|
|
205
247
|
], 2);
|
|
206
248
|
}
|
|
207
|
-
const
|
|
249
|
+
const index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
208
250
|
export {
|
|
209
|
-
|
|
251
|
+
index_taro as default
|
|
210
252
|
};
|
|
@@ -17,8 +17,8 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { defineComponent, computed, openBlock, createElementBlock, renderSlot, createCommentVNode, createElementVNode, createBlock, normalizeClass, normalizeStyle, Fragment, renderList } from "vue";
|
|
21
|
-
import { N as NutAvatar } from "../index-Do4_KY74.js";
|
|
20
|
+
import { defineComponent, computed, openBlock, createElementBlock, renderSlot, createCommentVNode, createTextVNode, createElementVNode, createBlock, normalizeClass, normalizeStyle, Fragment, renderList } from "vue";
|
|
21
|
+
import { N as NutAvatar } from "../index.taro-Do4_KY74.js";
|
|
22
22
|
import { w as withInstall } from "../with-install-Ch3FF0uS.js";
|
|
23
23
|
const _hoisted_1 = { key: 0 };
|
|
24
24
|
const _hoisted_2 = {
|
|
@@ -33,7 +33,7 @@ const _hoisted_4 = { class: "nut-skeleton-content" };
|
|
|
33
33
|
const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
|
|
34
34
|
name: "NutSkeleton"
|
|
35
35
|
}), {
|
|
36
|
-
__name: "skeleton",
|
|
36
|
+
__name: "skeleton.taro",
|
|
37
37
|
props: {
|
|
38
38
|
width: { default: "100px" },
|
|
39
39
|
height: { default: "15px" },
|
|
@@ -72,6 +72,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
72
72
|
renderSlot(_ctx.$slots, "default")
|
|
73
73
|
])) : (openBlock(), createElementBlock("view", _hoisted_2, [
|
|
74
74
|
_ctx.animated ? (openBlock(), createElementBlock("view", _hoisted_3)) : createCommentVNode("", true),
|
|
75
|
+
_cache[2] || (_cache[2] = createTextVNode()),
|
|
75
76
|
createElementVNode("view", _hoisted_4, [
|
|
76
77
|
_ctx.avatar ? (openBlock(), createBlock(NutAvatar, {
|
|
77
78
|
key: 0,
|
|
@@ -79,6 +80,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
79
80
|
shape: _ctx.avatarShape,
|
|
80
81
|
style: normalizeStyle(avatarStyle.value)
|
|
81
82
|
}, null, 8, ["class", "shape", "style"])) : createCommentVNode("", true),
|
|
83
|
+
_cache[1] || (_cache[1] = createTextVNode()),
|
|
82
84
|
createElementVNode("view", {
|
|
83
85
|
class: "nut-skeleton-content__line",
|
|
84
86
|
style: normalizeStyle({ width: _ctx.width })
|
|
@@ -88,6 +90,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
88
90
|
class: normalizeClass(getBlockClass("nut-skeleton-blockTitle")),
|
|
89
91
|
style: normalizeStyle({ height: _ctx.height })
|
|
90
92
|
}, null, 6)) : createCommentVNode("", true),
|
|
93
|
+
_cache[0] || (_cache[0] = createTextVNode()),
|
|
91
94
|
(openBlock(true), createElementBlock(Fragment, null, renderList(Number(_ctx.row), (_) => {
|
|
92
95
|
return openBlock(), createElementBlock("view", {
|
|
93
96
|
key: _,
|