@nutui/nutui 3.1.19 → 3.1.21-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/dist/nutui.es.js +0 -18271
- package/dist/nutui.umd.js +0 -18375
- package/dist/packages/_es/ActionSheet.js +0 -175
- package/dist/packages/_es/Address.js +0 -568
- package/dist/packages/_es/AddressList.js +0 -616
- package/dist/packages/_es/Audio.js +0 -290
- package/dist/packages/_es/AudioOperate.js +0 -126
- package/dist/packages/_es/Avatar.js +0 -183
- package/dist/packages/_es/AvatarGroup.js +0 -78
- package/dist/packages/_es/BackTop.js +0 -163
- package/dist/packages/_es/Badge.js +0 -91
- package/dist/packages/_es/Barrage.js +0 -119
- package/dist/packages/_es/Button.js +0 -134
- package/dist/packages/_es/Calendar.js +0 -243
- package/dist/packages/_es/CalendarItem.js +0 -11
- package/dist/packages/_es/Card.js +0 -112
- package/dist/packages/_es/Cascader.js +0 -546
- package/dist/packages/_es/Category.js +0 -63
- package/dist/packages/_es/CategoryPane.js +0 -116
- package/dist/packages/_es/Cell.js +0 -103
- package/dist/packages/_es/CellGroup.js +0 -49
- package/dist/packages/_es/Checkbox.js +0 -120
- package/dist/packages/_es/CheckboxGroup.js +0 -63
- package/dist/packages/_es/CircleProgress.js +0 -156
- package/dist/packages/_es/Col.js +0 -61
- package/dist/packages/_es/Collapse.js +0 -90
- package/dist/packages/_es/CollapseItem.js +0 -279
- package/dist/packages/_es/Comment.js +0 -440
- package/dist/packages/_es/CountDown.js +0 -264
- package/dist/packages/_es/CountUp.js +0 -568
- package/dist/packages/_es/DatePicker.js +0 -343
- package/dist/packages/_es/Dialog.js +0 -286
- package/dist/packages/_es/Divider.js +0 -50
- package/dist/packages/_es/Drag.js +0 -204
- package/dist/packages/_es/Ecard.js +0 -164
- package/dist/packages/_es/Elevator.js +0 -215
- package/dist/packages/_es/Empty.js +0 -76
- package/dist/packages/_es/FixedNav.js +0 -127
- package/dist/packages/_es/Form.js +0 -153
- package/dist/packages/_es/FormItem.js +0 -115
- package/dist/packages/_es/Grid.js +0 -13
- package/dist/packages/_es/GridItem.js +0 -150
- package/dist/packages/_es/Icon.js +0 -45
- package/dist/packages/_es/ImagePreview.js +0 -326
- package/dist/packages/_es/Indicator.js +0 -67
- package/dist/packages/_es/InfiniteLoading.js +0 -268
- package/dist/packages/_es/Input.js +0 -420
- package/dist/packages/_es/InputNumber.js +0 -165
- package/dist/packages/_es/Layout.js +0 -11
- package/dist/packages/_es/List.js +0 -128
- package/dist/packages/_es/Menu.js +0 -120
- package/dist/packages/_es/MenuItem.js +0 -169
- package/dist/packages/_es/Navbar.js +0 -100
- package/dist/packages/_es/NoticeBar.js +0 -404
- package/dist/packages/_es/Notify.js +0 -255
- package/dist/packages/_es/NumberKeyboard.js +0 -261
- package/dist/packages/_es/OldPicker.js +0 -485
- package/dist/packages/_es/OverLay.js +0 -119
- package/dist/packages/_es/Pagination.js +0 -165
- package/dist/packages/_es/Picker.js +0 -477
- package/dist/packages/_es/Popover.js +0 -208
- package/dist/packages/_es/Popup.js +0 -317
- package/dist/packages/_es/Price.js +0 -123
- package/dist/packages/_es/Progress.js +0 -151
- package/dist/packages/_es/PullRefresh.js +0 -364
- package/dist/packages/_es/Radio.js +0 -96
- package/dist/packages/_es/RadioGroup.js +0 -42
- package/dist/packages/_es/Range.js +0 -433
- package/dist/packages/_es/Rate.js +0 -144
- package/dist/packages/_es/Row.js +0 -69
- package/dist/packages/_es/SearchBar.js +0 -196
- package/dist/packages/_es/ShortPassword.js +0 -231
- package/dist/packages/_es/SideNavBar.js +0 -105
- package/dist/packages/_es/SideNavBarItem.js +0 -51
- package/dist/packages/_es/Signature.js +0 -185
- package/dist/packages/_es/Skeleton.js +0 -141
- package/dist/packages/_es/Sku.js +0 -517
- package/dist/packages/_es/Step.js +0 -138
- package/dist/packages/_es/Steps.js +0 -58
- package/dist/packages/_es/Sticky.js +0 -144
- package/dist/packages/_es/SubSideNavBar.js +0 -105
- package/dist/packages/_es/Swipe.js +0 -207
- package/dist/packages/_es/Swiper.js +0 -430
- package/dist/packages/_es/SwiperItem.js +0 -56
- package/dist/packages/_es/Switch.js +0 -121
- package/dist/packages/_es/TabPane.js +0 -40
- package/dist/packages/_es/Tabbar.js +0 -78
- package/dist/packages/_es/TabbarItem.js +0 -158
- package/dist/packages/_es/Table.js +0 -201
- package/dist/packages/_es/Tabs.js +0 -221
- package/dist/packages/_es/Tag.js +0 -102
- package/dist/packages/_es/TextArea.js +0 -166
- package/dist/packages/_es/TimeDetail.js +0 -103
- package/dist/packages/_es/TimePannel.js +0 -71
- package/dist/packages/_es/TimeSelect.js +0 -108
- package/dist/packages/_es/Toast.js +0 -335
- package/dist/packages/_es/Uploader.js +0 -494
- package/dist/packages/_es/Video.js +0 -357
- package/dist/packages/_es/common.js +0 -136
- package/dist/packages/_es/component.js +0 -102
- package/dist/packages/_es/index.js +0 -11
- package/dist/packages/_es/index2.js +0 -36
- package/dist/packages/_es/index3.js +0 -13
- package/dist/packages/_es/index4.js +0 -64
- package/dist/packages/_es/index5.js +0 -692
- package/dist/packages/_es/plugin-vue_export-helper.js +0 -13
- package/dist/packages/_es/pxCheck.js +0 -9
- package/dist/packages/_es/raf.js +0 -19
- package/dist/packages/_es/style.css +0 -111
- package/dist/packages/actionsheet/index.scss +0 -73
- package/dist/packages/address/index.scss +0 -155
- package/dist/packages/addresslist/index.scss +0 -144
- package/dist/packages/audio/index.scss +0 -66
- package/dist/packages/audiooperate/index.scss +0 -13
- package/dist/packages/avatar/index.scss +0 -53
- package/dist/packages/avatargroup/index.scss +0 -14
- package/dist/packages/backtop/index.scss +0 -20
- package/dist/packages/badge/index.scss +0 -33
- package/dist/packages/barrage/index.scss +0 -48
- package/dist/packages/button/index.scss +0 -169
- package/dist/packages/calendar/index.scss +0 -212
- package/dist/packages/calendaritem/index.scss +0 -0
- package/dist/packages/card/index.scss +0 -97
- package/dist/packages/cascader/index.scss +0 -81
- package/dist/packages/category/index.scss +0 -38
- package/dist/packages/categorypane/index.scss +0 -124
- package/dist/packages/cell/index.scss +0 -76
- package/dist/packages/cellgroup/index.scss +0 -38
- package/dist/packages/checkbox/index.scss +0 -31
- package/dist/packages/checkboxgroup/index.scss +0 -0
- package/dist/packages/circleprogress/index.scss +0 -24
- package/dist/packages/col/index.scss +0 -24
- package/dist/packages/collapse/index.scss +0 -0
- package/dist/packages/collapseitem/index.scss +0 -143
- package/dist/packages/comment/index.scss +0 -353
- package/dist/packages/countdown/index.scss +0 -5
- package/dist/packages/countup/index.scss +0 -67
- package/dist/packages/datepicker/index.scss +0 -2
- package/dist/packages/dialog/index.scss +0 -65
- package/dist/packages/divider/index.scss +0 -54
- package/dist/packages/drag/index.scss +0 -18
- package/dist/packages/ecard/index.scss +0 -83
- package/dist/packages/elevator/index.scss +0 -73
- package/dist/packages/empty/index.scss +0 -33
- package/dist/packages/fixednav/index.scss +0 -134
- package/dist/packages/form/index.scss +0 -2
- package/dist/packages/formitem/index.scss +0 -70
- package/dist/packages/grid/index.scss +0 -10
- package/dist/packages/griditem/index.scss +0 -92
- package/dist/packages/icon/index.scss +0 -131
- package/dist/packages/imagepreview/index.scss +0 -49
- package/dist/packages/indicator/index.scss +0 -48
- package/dist/packages/infiniteloading/index.scss +0 -47
- package/dist/packages/input/index.scss +0 -126
- package/dist/packages/inputnumber/index.scss +0 -38
- package/dist/packages/layout/index.scss +0 -0
- package/dist/packages/list/index.scss +0 -24
- package/dist/packages/locale/index.d.ts +0 -3
- package/dist/packages/locale/index.scss +0 -1
- package/dist/packages/locale/lang/baseLang.js +0 -8
- package/dist/packages/locale/lang/en-US.js +0 -91
- package/dist/packages/locale/lang/index.js +0 -48
- package/dist/packages/locale/lang/index.scss +0 -1
- package/dist/packages/locale/lang/zh-CN.js +0 -91
- package/dist/packages/locale/lang/zh-TW.js +0 -91
- package/dist/packages/locale/locale/index.d.ts +0 -8
- package/dist/packages/locale/locale/lang/baseLang.d.ts +0 -82
- package/dist/packages/locale/locale/lang/en-US.d.ts +0 -83
- package/dist/packages/locale/locale/lang/zh-CN.d.ts +0 -83
- package/dist/packages/locale/locale/lang/zh-TW.d.ts +0 -83
- package/dist/packages/menu/index.scss +0 -49
- package/dist/packages/menuitem/index.scss +0 -47
- package/dist/packages/navbar/index.scss +0 -124
- package/dist/packages/noticebar/index.scss +0 -114
- package/dist/packages/notify/index.scss +0 -62
- package/dist/packages/numberkeyboard/index.scss +0 -109
- package/dist/packages/oldpicker/index.scss +0 -131
- package/dist/packages/overlay/index.scss +0 -22
- package/dist/packages/pagination/index.scss +0 -50
- package/dist/packages/picker/index.scss +0 -128
- package/dist/packages/popover/index.scss +0 -133
- package/dist/packages/popup/index.scss +0 -132
- package/dist/packages/price/index.scss +0 -59
- package/dist/packages/progress/index.scss +0 -104
- package/dist/packages/pullrefresh/index.scss +0 -71
- package/dist/packages/radio/index.scss +0 -59
- package/dist/packages/radiogroup/index.scss +0 -22
- package/dist/packages/range/index.scss +0 -202
- package/dist/packages/rate/index.scss +0 -35
- package/dist/packages/row/index.scss +0 -54
- package/dist/packages/searchbar/index.scss +0 -98
- package/dist/packages/shortpassword/index.scss +0 -169
- package/dist/packages/sidenavbar/index.scss +0 -14
- package/dist/packages/sidenavbaritem/index.scss +0 -10
- package/dist/packages/signature/index.scss +0 -14
- package/dist/packages/skeleton/index.scss +0 -57
- package/dist/packages/sku/index.scss +0 -147
- package/dist/packages/step/index.scss +0 -190
- package/dist/packages/steps/index.scss +0 -7
- package/dist/packages/sticky/index.scss +0 -5
- package/dist/packages/subsidenavbar/index.scss +0 -41
- package/dist/packages/swipe/index.scss +0 -22
- package/dist/packages/swiper/index.scss +0 -45
- package/dist/packages/swiperitem/index.scss +0 -3
- package/dist/packages/switch/index.scss +0 -60
- package/dist/packages/tabbar/index.scss +0 -27
- package/dist/packages/tabbaritem/index.scss +0 -79
- package/dist/packages/table/index.scss +0 -81
- package/dist/packages/tabpane/index.scss +0 -12
- package/dist/packages/tabs/index.scss +0 -166
- package/dist/packages/tag/index.scss +0 -48
- package/dist/packages/textarea/index.scss +0 -40
- package/dist/packages/timedetail/index.scss +0 -38
- package/dist/packages/timepannel/index.scss +0 -16
- package/dist/packages/timeselect/index.scss +0 -37
- package/dist/packages/toast/index.scss +0 -98
- package/dist/packages/uploader/index.scss +0 -157
- package/dist/packages/video/index.scss +0 -205
- package/dist/smartips/attributes.json +0 -2542
- package/dist/smartips/tags.json +0 -955
- package/dist/style.css +0 -1
- package/dist/style.es.js +0 -2
- package/dist/styles/animation/drop.scss +0 -24
- package/dist/styles/animation/ease.scss +0 -23
- package/dist/styles/animation/fade.scss +0 -20
- package/dist/styles/animation/icon.scss +0 -245
- package/dist/styles/animation/index.scss +0 -7
- package/dist/styles/animation/rotate.scss +0 -10
- package/dist/styles/animation/zoom.scss +0 -26
- package/dist/styles/font/config.json +0 -167
- package/dist/styles/font/demo.css +0 -539
- package/dist/styles/font/demo_index.html +0 -2879
- package/dist/styles/font/iconfont.css +0 -483
- package/dist/styles/font/iconfont.eot +0 -0
- package/dist/styles/font/iconfont.js +0 -63
- package/dist/styles/font/iconfont.json +0 -828
- package/dist/styles/font/iconfont.svg +0 -356
- package/dist/styles/font/iconfont.ttf +0 -0
- package/dist/styles/font/iconfont.woff +0 -0
- package/dist/styles/font/iconfont.woff2 +0 -0
- package/dist/styles/mixins/index.scss +0 -2
- package/dist/styles/mixins/make-animation.scss +0 -24
- package/dist/styles/mixins/text-ellipsis.scss +0 -20
- package/dist/styles/themes/default.scss +0 -97
- package/dist/styles/themes/jdt.scss +0 -97
- package/dist/styles/variables-jdt.scss +0 -750
- package/dist/styles/variables.scss +0 -774
- package/dist/types/__VUE/actionsheet/index.d.ts +0 -273
- package/dist/types/__VUE/address/index.d.ts +0 -394
- package/dist/types/__VUE/addresslist/components/GeneralShell.d.ts +0 -28
- package/dist/types/__VUE/addresslist/components/ItemContents.d.ts +0 -35
- package/dist/types/__VUE/addresslist/components/LongPressShell.d.ts +0 -40
- package/dist/types/__VUE/addresslist/components/SwipeShell.d.ts +0 -30
- package/dist/types/__VUE/addresslist/index.d.ts +0 -74
- package/dist/types/__VUE/audio/index.d.ts +0 -85
- package/dist/types/__VUE/audiooperate/index.d.ts +0 -61
- package/dist/types/__VUE/avatar/index.d.ts +0 -103
- package/dist/types/__VUE/avatargroup/index.d.ts +0 -86
- package/dist/types/__VUE/backtop/index.d.ts +0 -98
- package/dist/types/__VUE/badge/index.d.ts +0 -87
- package/dist/types/__VUE/barrage/index.d.ts +0 -73
- package/dist/types/__VUE/button/index.d.ts +0 -113
- package/dist/types/__VUE/calendar/index.d.ts +0 -148
- package/dist/types/__VUE/calendaritem/index.d.ts +0 -200
- package/dist/types/__VUE/card/index.d.ts +0 -83
- package/dist/types/__VUE/cascader/cascader-item.d.ts +0 -71
- package/dist/types/__VUE/cascader/helper.d.ts +0 -8
- package/dist/types/__VUE/cascader/index.d.ts +0 -235
- package/dist/types/__VUE/cascader/tree.d.ts +0 -16
- package/dist/types/__VUE/cascader/types.d.ts +0 -30
- package/dist/types/__VUE/category/index.d.ts +0 -32
- package/dist/types/__VUE/categorypane/index.d.ts +0 -38
- package/dist/types/__VUE/cell/index.d.ts +0 -102
- package/dist/types/__VUE/cellgroup/index.d.ts +0 -31
- package/dist/types/__VUE/checkbox/index.d.ts +0 -95
- package/dist/types/__VUE/checkboxgroup/index.d.ts +0 -32
- package/dist/types/__VUE/circleprogress/index.d.ts +0 -87
- package/dist/types/__VUE/col/index.d.ts +0 -38
- package/dist/types/__VUE/collapse/index.d.ts +0 -97
- package/dist/types/__VUE/collapseitem/index.d.ts +0 -76
- package/dist/types/__VUE/comment/components/CmtBottom.d.ts +0 -45
- package/dist/types/__VUE/comment/components/CmtHeader.d.ts +0 -40
- package/dist/types/__VUE/comment/components/CmtImages.d.ts +0 -44
- package/dist/types/__VUE/comment/index.d.ts +0 -103
- package/dist/types/__VUE/countdown/index.d.ts +0 -98
- package/dist/types/__VUE/countdown/util.d.ts +0 -6
- package/dist/types/__VUE/countup/index.d.ts +0 -209
- package/dist/types/__VUE/datepicker/index.d.ts +0 -354
- package/dist/types/__VUE/datepicker/utils.d.ts +0 -5
- package/dist/types/__VUE/dialog/index.d.ts +0 -299
- package/dist/types/__VUE/divider/index.d.ts +0 -40
- package/dist/types/__VUE/drag/index.d.ts +0 -54
- package/dist/types/__VUE/ecard/index.d.ts +0 -118
- package/dist/types/__VUE/elevator/index.d.ts +0 -70
- package/dist/types/__VUE/empty/index.d.ts +0 -40
- package/dist/types/__VUE/fixednav/index.d.ts +0 -89
- package/dist/types/__VUE/form/common.d.ts +0 -20
- package/dist/types/__VUE/form/index.d.ts +0 -25
- package/dist/types/__VUE/form/types.d.ts +0 -13
- package/dist/types/__VUE/formitem/index.d.ts +0 -115
- package/dist/types/__VUE/formitem/types.d.ts +0 -10
- package/dist/types/__VUE/grid/common.d.ts +0 -91
- package/dist/types/__VUE/grid/index.d.ts +0 -93
- package/dist/types/__VUE/griditem/index.d.ts +0 -74
- package/dist/types/__VUE/icon/index.d.ts +0 -68
- package/dist/types/__VUE/imagepreview/index.d.ts +0 -118
- package/dist/types/__VUE/indicator/index.d.ts +0 -63
- package/dist/types/__VUE/infiniteloading/index.d.ts +0 -133
- package/dist/types/__VUE/input/index.d.ts +0 -339
- package/dist/types/__VUE/input/util.d.ts +0 -5
- package/dist/types/__VUE/inputnumber/index.d.ts +0 -110
- package/dist/types/__VUE/layout/index.d.ts +0 -6
- package/dist/types/__VUE/list/index.d.ts +0 -50
- package/dist/types/__VUE/menu/index.d.ts +0 -45
- package/dist/types/__VUE/menuitem/index.d.ts +0 -75
- package/dist/types/__VUE/navbar/index.d.ts +0 -76
- package/dist/types/__VUE/noticebar/index.d.ts +0 -202
- package/dist/types/__VUE/notify/index.d.ts +0 -106
- package/dist/types/__VUE/numberkeyboard/index.d.ts +0 -118
- package/dist/types/__VUE/oldpicker/Column.d.ts +0 -89
- package/dist/types/__VUE/oldpicker/commonProps.d.ts +0 -22
- package/dist/types/__VUE/oldpicker/index.d.ts +0 -363
- package/dist/types/__VUE/oldpicker/types.d.ts +0 -24
- package/dist/types/__VUE/overlay/index.d.ts +0 -1638
- package/dist/types/__VUE/pagination/index.d.ts +0 -105
- package/dist/types/__VUE/picker/Column.d.ts +0 -85
- package/dist/types/__VUE/picker/index.d.ts +0 -347
- package/dist/types/__VUE/picker/types.d.ts +0 -26
- package/dist/types/__VUE/popover/index.d.ts +0 -238
- package/dist/types/__VUE/popup/index.d.ts +0 -1817
- package/dist/types/__VUE/popup/use-lock-scroll.d.ts +0 -5
- package/dist/types/__VUE/price/index.d.ts +0 -80
- package/dist/types/__VUE/progress/index.d.ts +0 -131
- package/dist/types/__VUE/pullrefresh/index.d.ts +0 -122
- package/dist/types/__VUE/pullrefresh/use-touch.d.ts +0 -20
- package/dist/types/__VUE/pullrefresh/util.d.ts +0 -6
- package/dist/types/__VUE/radio/index.d.ts +0 -83
- package/dist/types/__VUE/radiogroup/index.d.ts +0 -41
- package/dist/types/__VUE/range/index.d.ts +0 -151
- package/dist/types/__VUE/rate/index.d.ts +0 -135
- package/dist/types/__VUE/row/index.d.ts +0 -59
- package/dist/types/__VUE/searchbar/index.d.ts +0 -93
- package/dist/types/__VUE/shortpassword/index.d.ts +0 -130
- package/dist/types/__VUE/sidenavbar/index.d.ts +0 -30
- package/dist/types/__VUE/sidenavbaritem/index.d.ts +0 -34
- package/dist/types/__VUE/signature/index.d.ts +0 -67
- package/dist/types/__VUE/skeleton/common.d.ts +0 -63
- package/dist/types/__VUE/skeleton/index.d.ts +0 -110
- package/dist/types/__VUE/sku/components/SkuHeader.d.ts +0 -21
- package/dist/types/__VUE/sku/components/SkuOperate.d.ts +0 -63
- package/dist/types/__VUE/sku/components/SkuSelect.d.ts +0 -23
- package/dist/types/__VUE/sku/components/SkuStepper.d.ts +0 -60
- package/dist/types/__VUE/sku/index.d.ts +0 -303
- package/dist/types/__VUE/step/index.d.ts +0 -63
- package/dist/types/__VUE/steps/index.d.ts +0 -40
- package/dist/types/__VUE/sticky/index.d.ts +0 -57
- package/dist/types/__VUE/subsidenavbar/index.d.ts +0 -47
- package/dist/types/__VUE/swipe/index.d.ts +0 -64
- package/dist/types/__VUE/swiper/index.d.ts +0 -157
- package/dist/types/__VUE/swiper/use-touch.d.ts +0 -20
- package/dist/types/__VUE/swiperitem/index.d.ts +0 -22
- package/dist/types/__VUE/switch/index.d.ts +0 -129
- package/dist/types/__VUE/tabbar/index.d.ts +0 -77
- package/dist/types/__VUE/tabbaritem/index.d.ts +0 -101
- package/dist/types/__VUE/table/common.d.ts +0 -56
- package/dist/types/__VUE/table/index.d.ts +0 -69
- package/dist/types/__VUE/table/renderColumn.d.ts +0 -21
- package/dist/types/__VUE/table/types.d.ts +0 -19
- package/dist/types/__VUE/tabpane/index.d.ts +0 -40
- package/dist/types/__VUE/tabs/common.d.ts +0 -78
- package/dist/types/__VUE/tabs/index.d.ts +0 -119
- package/dist/types/__VUE/tag/index.d.ts +0 -84
- package/dist/types/__VUE/textarea/index.d.ts +0 -114
- package/dist/types/__VUE/timedetail/index.d.ts +0 -41
- package/dist/types/__VUE/timepannel/index.d.ts +0 -36
- package/dist/types/__VUE/timeselect/index.d.ts +0 -76
- package/dist/types/__VUE/toast/index.d.ts +0 -142
- package/dist/types/__VUE/uploader/index.d.ts +0 -262
- package/dist/types/__VUE/uploader/uploader.d.ts +0 -25
- package/dist/types/__VUE/video/index.d.ts +0 -116
- package/dist/types/index.d.ts +0 -3
- package/dist/types/nutui.d.ts +0 -99
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* @nutui/nutui v3.1.19 Mon Apr 25 2022 17:26:38 GMT+0800 (中国标准时间)
|
|
3
|
-
* (c) 2022 @jdf2e.
|
|
4
|
-
* Released under the MIT License.
|
|
5
|
-
*/
|
|
6
|
-
import { ref, reactive, computed, onMounted, onActivated, onDeactivated, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
|
|
7
|
-
import { c as createComponent } from "./component.js";
|
|
8
|
-
import { r as requestAniFrame } from "./raf.js";
|
|
9
|
-
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
10
|
-
import "../locale/lang";
|
|
11
|
-
const { componentName, create } = createComponent("drag");
|
|
12
|
-
const _sfc_main = create({
|
|
13
|
-
props: {
|
|
14
|
-
attract: {
|
|
15
|
-
type: Boolean,
|
|
16
|
-
default: false
|
|
17
|
-
},
|
|
18
|
-
direction: {
|
|
19
|
-
type: String,
|
|
20
|
-
default: "all"
|
|
21
|
-
},
|
|
22
|
-
boundary: {
|
|
23
|
-
type: Object,
|
|
24
|
-
default: () => {
|
|
25
|
-
return {
|
|
26
|
-
top: 0,
|
|
27
|
-
left: 0,
|
|
28
|
-
right: 0,
|
|
29
|
-
bottom: 0
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
setup(props, { emit }) {
|
|
35
|
-
const myDrag = ref();
|
|
36
|
-
const state = reactive({
|
|
37
|
-
keepAlive: false,
|
|
38
|
-
elWidth: 0,
|
|
39
|
-
elHeight: 0,
|
|
40
|
-
screenWidth: 0,
|
|
41
|
-
screenHeight: 0,
|
|
42
|
-
startTop: 0,
|
|
43
|
-
startLeft: 0,
|
|
44
|
-
nx: 0,
|
|
45
|
-
ny: 0,
|
|
46
|
-
xPum: 0,
|
|
47
|
-
yPum: 0,
|
|
48
|
-
position: { x: 0, y: 0 },
|
|
49
|
-
boundary: {
|
|
50
|
-
top: 0,
|
|
51
|
-
left: 0,
|
|
52
|
-
right: 0,
|
|
53
|
-
bottom: 0
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
const classes = computed(() => {
|
|
57
|
-
const prefixCls = componentName;
|
|
58
|
-
return {
|
|
59
|
-
[prefixCls]: true
|
|
60
|
-
};
|
|
61
|
-
});
|
|
62
|
-
function getInfo() {
|
|
63
|
-
const domElem = document.documentElement;
|
|
64
|
-
state.elWidth = myDrag.value.offsetWidth;
|
|
65
|
-
state.elHeight = myDrag.value.offsetHeight;
|
|
66
|
-
state.screenWidth = domElem.clientWidth || 375;
|
|
67
|
-
state.screenHeight = domElem.clientHeight || 667;
|
|
68
|
-
}
|
|
69
|
-
function goLeft(target) {
|
|
70
|
-
if (state.boundary.left) {
|
|
71
|
-
if (+target.style.left.split("px")[0] > state.boundary.left) {
|
|
72
|
-
target.style.left = +target.style.left.split("px")[0] - 10 + "px";
|
|
73
|
-
requestAniFrame(() => {
|
|
74
|
-
goLeft(target);
|
|
75
|
-
});
|
|
76
|
-
} else {
|
|
77
|
-
target.style.left = `${state.boundary.left}px`;
|
|
78
|
-
}
|
|
79
|
-
} else {
|
|
80
|
-
if (+target.style.left.split("px")[0] > 10) {
|
|
81
|
-
target.style.left = +target.style.left.split("px")[0] - 10 + "px";
|
|
82
|
-
requestAniFrame(() => {
|
|
83
|
-
goLeft(target);
|
|
84
|
-
});
|
|
85
|
-
} else {
|
|
86
|
-
target.style.left = "0px";
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
function goRight(target, rightLocation) {
|
|
91
|
-
if (rightLocation - parseInt(target.style.left.split("px")[0]) > 10) {
|
|
92
|
-
target.style.left = parseInt(target.style.left.split("px")[0]) + 10 + "px";
|
|
93
|
-
requestAniFrame(() => {
|
|
94
|
-
goRight(target, rightLocation);
|
|
95
|
-
});
|
|
96
|
-
} else {
|
|
97
|
-
target.style.left = rightLocation + "px";
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
function touchMove(e) {
|
|
101
|
-
e.preventDefault();
|
|
102
|
-
const target = e.currentTarget;
|
|
103
|
-
if (e.targetTouches.length === 1) {
|
|
104
|
-
const touch = e.targetTouches[0];
|
|
105
|
-
state.nx = touch.clientX - state.position.x;
|
|
106
|
-
state.ny = touch.clientY - state.position.y;
|
|
107
|
-
state.xPum = state.startLeft + state.nx;
|
|
108
|
-
state.yPum = state.startTop + state.ny;
|
|
109
|
-
const rightLocation = state.screenWidth - state.elWidth - state.boundary.right;
|
|
110
|
-
if (Math.abs(state.xPum) > rightLocation) {
|
|
111
|
-
state.xPum = rightLocation;
|
|
112
|
-
} else if (state.xPum <= state.boundary.left) {
|
|
113
|
-
state.xPum = state.boundary.left;
|
|
114
|
-
}
|
|
115
|
-
if (state.yPum < state.boundary.top) {
|
|
116
|
-
state.yPum = state.boundary.top;
|
|
117
|
-
} else if (state.yPum > state.screenHeight - state.elHeight - state.boundary.bottom) {
|
|
118
|
-
state.yPum = state.screenHeight - state.elHeight - state.boundary.bottom;
|
|
119
|
-
}
|
|
120
|
-
if (props.direction != "y") {
|
|
121
|
-
target.style.left = state.xPum + "px";
|
|
122
|
-
}
|
|
123
|
-
if (props.direction != "x") {
|
|
124
|
-
target.style.top = state.yPum + "px";
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
function touchEnd(e) {
|
|
129
|
-
const target = e.currentTarget;
|
|
130
|
-
const touch = e.changedTouches[0];
|
|
131
|
-
let currX = touch.clientX;
|
|
132
|
-
const rightLocation = state.screenWidth - state.elWidth - state.boundary.right;
|
|
133
|
-
if (currX > rightLocation) {
|
|
134
|
-
currX = rightLocation;
|
|
135
|
-
} else if (currX < state.boundary.left) {
|
|
136
|
-
currX = state.boundary.left;
|
|
137
|
-
} else {
|
|
138
|
-
currX = currX < state.screenWidth / 2 ? state.boundary.left : rightLocation;
|
|
139
|
-
}
|
|
140
|
-
if (props.direction != "y" && props.attract) {
|
|
141
|
-
if (currX < state.screenWidth / 2) {
|
|
142
|
-
requestAniFrame(() => {
|
|
143
|
-
goLeft(target);
|
|
144
|
-
});
|
|
145
|
-
} else {
|
|
146
|
-
requestAniFrame(() => {
|
|
147
|
-
goRight(target, rightLocation);
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
if (props.direction != "x") {
|
|
152
|
-
target.style.top = state.yPum + "px";
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
function touchStart(e) {
|
|
156
|
-
const target = e.currentTarget;
|
|
157
|
-
const touches = e.touches[0];
|
|
158
|
-
const touch = e.targetTouches[0];
|
|
159
|
-
state.startTop = target.offsetTop;
|
|
160
|
-
state.startLeft = target.offsetLeft;
|
|
161
|
-
state.position.x = touches.clientX;
|
|
162
|
-
state.position.y = touches.clientY;
|
|
163
|
-
state.nx = touch.clientX - state.position.x;
|
|
164
|
-
state.ny = touch.clientY - state.position.y;
|
|
165
|
-
state.xPum = state.startLeft + state.nx;
|
|
166
|
-
state.yPum = state.startTop + state.ny;
|
|
167
|
-
}
|
|
168
|
-
onMounted(() => {
|
|
169
|
-
getInfo();
|
|
170
|
-
state.boundary = props.boundary;
|
|
171
|
-
});
|
|
172
|
-
onActivated(() => {
|
|
173
|
-
if (state.keepAlive) {
|
|
174
|
-
state.keepAlive = false;
|
|
175
|
-
}
|
|
176
|
-
});
|
|
177
|
-
onDeactivated(() => {
|
|
178
|
-
state.keepAlive = true;
|
|
179
|
-
myDrag.removeEventListener("touchstart", touchStart);
|
|
180
|
-
myDrag.removeEventListener("touchmove", touchMove);
|
|
181
|
-
myDrag.removeEventListener("touchend", touchEnd);
|
|
182
|
-
});
|
|
183
|
-
return {
|
|
184
|
-
classes,
|
|
185
|
-
myDrag,
|
|
186
|
-
touchStart,
|
|
187
|
-
touchMove,
|
|
188
|
-
touchEnd
|
|
189
|
-
};
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
193
|
-
return openBlock(), createElementBlock("view", {
|
|
194
|
-
class: normalizeClass(_ctx.classes),
|
|
195
|
-
ref: "myDrag",
|
|
196
|
-
onTouchstart: _cache[0] || (_cache[0] = ($event) => _ctx.touchStart($event)),
|
|
197
|
-
onTouchmove: _cache[1] || (_cache[1] = ($event) => _ctx.touchMove($event)),
|
|
198
|
-
onTouchend: _cache[2] || (_cache[2] = ($event) => _ctx.touchEnd($event))
|
|
199
|
-
}, [
|
|
200
|
-
renderSlot(_ctx.$slots, "default")
|
|
201
|
-
], 34);
|
|
202
|
-
}
|
|
203
|
-
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
204
|
-
export { index as default };
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* @nutui/nutui v3.1.19 Mon Apr 25 2022 17:26:38 GMT+0800 (中国标准时间)
|
|
3
|
-
* (c) 2022 @jdf2e.
|
|
4
|
-
* Released under the MIT License.
|
|
5
|
-
*/
|
|
6
|
-
import { ref, watch, resolveComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, Fragment, renderList, normalizeClass, withDirectives, vModelText, createTextVNode, createVNode } from "vue";
|
|
7
|
-
import { c as createComponent } from "./component.js";
|
|
8
|
-
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
|
-
import "../locale/lang";
|
|
10
|
-
const { componentName, create, translate } = createComponent("ecard");
|
|
11
|
-
const _sfc_main = create({
|
|
12
|
-
props: {
|
|
13
|
-
chooseText: {
|
|
14
|
-
type: String,
|
|
15
|
-
default: ""
|
|
16
|
-
},
|
|
17
|
-
otherValueText: {
|
|
18
|
-
type: String,
|
|
19
|
-
default: ""
|
|
20
|
-
},
|
|
21
|
-
dataList: {
|
|
22
|
-
type: [Object, Array],
|
|
23
|
-
default: () => {
|
|
24
|
-
return [];
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
cardAmountMin: {
|
|
28
|
-
type: Number,
|
|
29
|
-
default: 1
|
|
30
|
-
},
|
|
31
|
-
cardAmountMax: {
|
|
32
|
-
type: Number,
|
|
33
|
-
default: 9999
|
|
34
|
-
},
|
|
35
|
-
cardBuyMin: {
|
|
36
|
-
type: Number,
|
|
37
|
-
default: 1
|
|
38
|
-
},
|
|
39
|
-
cardBuyMax: {
|
|
40
|
-
type: Number,
|
|
41
|
-
default: 9999
|
|
42
|
-
},
|
|
43
|
-
modelValue: {
|
|
44
|
-
type: Number,
|
|
45
|
-
default: 0
|
|
46
|
-
},
|
|
47
|
-
placeholder: {
|
|
48
|
-
type: String,
|
|
49
|
-
default: ""
|
|
50
|
-
},
|
|
51
|
-
suffix: {
|
|
52
|
-
type: String,
|
|
53
|
-
default: "\xA5"
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
emits: ["inputChange", "changeStep", "inputClick", "change", "update:modelValue"],
|
|
57
|
-
setup(props, { emit }) {
|
|
58
|
-
const currentIndex = ref(null);
|
|
59
|
-
const currentValue = ref(null);
|
|
60
|
-
const inputValue = ref();
|
|
61
|
-
const stepValue = ref(props.cardAmountMin);
|
|
62
|
-
const money = ref(props.modelValue);
|
|
63
|
-
const handleClick = (item, index2) => {
|
|
64
|
-
currentIndex.value = index2;
|
|
65
|
-
inputValue.value = "";
|
|
66
|
-
stepValue.value = props.cardAmountMin;
|
|
67
|
-
currentValue.value = item.price;
|
|
68
|
-
emit("change", item);
|
|
69
|
-
emit("update:modelValue", item.price);
|
|
70
|
-
};
|
|
71
|
-
const change = (event) => {
|
|
72
|
-
let input = event.target;
|
|
73
|
-
let val = input.value.replace(/[^\d]/g, "");
|
|
74
|
-
inputValue.value = val;
|
|
75
|
-
currentValue.value = val;
|
|
76
|
-
if (Number(val) > props.cardAmountMax) {
|
|
77
|
-
inputValue.value = props.cardAmountMax;
|
|
78
|
-
currentValue.value = props.cardAmountMax;
|
|
79
|
-
}
|
|
80
|
-
if (Number(val) < props.cardAmountMin) {
|
|
81
|
-
inputValue.value = props.cardAmountMin;
|
|
82
|
-
currentValue.value = props.cardAmountMin;
|
|
83
|
-
}
|
|
84
|
-
emit("inputChange", Number(inputValue.value));
|
|
85
|
-
emit("update:modelValue", Number(inputValue.value));
|
|
86
|
-
};
|
|
87
|
-
const inputClick = () => {
|
|
88
|
-
currentIndex.value = "input";
|
|
89
|
-
stepValue.value = props.cardAmountMin;
|
|
90
|
-
emit("update:modelValue", 0);
|
|
91
|
-
emit("inputClick");
|
|
92
|
-
};
|
|
93
|
-
const changeStep = (value) => {
|
|
94
|
-
stepValue.value = value;
|
|
95
|
-
emit("changeStep", stepValue.value, currentValue.value);
|
|
96
|
-
};
|
|
97
|
-
watch(() => props.modelValue, (value) => {
|
|
98
|
-
money.value = value;
|
|
99
|
-
});
|
|
100
|
-
return {
|
|
101
|
-
handleClick,
|
|
102
|
-
changeStep,
|
|
103
|
-
change,
|
|
104
|
-
inputClick,
|
|
105
|
-
stepValue,
|
|
106
|
-
currentIndex,
|
|
107
|
-
inputValue,
|
|
108
|
-
money,
|
|
109
|
-
translate
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
const _hoisted_1 = { class: "nut-ecard" };
|
|
114
|
-
const _hoisted_2 = { class: "nut-ecard__title" };
|
|
115
|
-
const _hoisted_3 = { class: "nut-ecard__list" };
|
|
116
|
-
const _hoisted_4 = ["onClick"];
|
|
117
|
-
const _hoisted_5 = { class: "nut-ecard__list__input--con" };
|
|
118
|
-
const _hoisted_6 = ["placeholder"];
|
|
119
|
-
const _hoisted_7 = { class: "nut-ecard__list__step" };
|
|
120
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
121
|
-
const _component_nut_inputnumber = resolveComponent("nut-inputnumber");
|
|
122
|
-
return openBlock(), createElementBlock("view", _hoisted_1, [
|
|
123
|
-
createElementVNode("view", _hoisted_2, toDisplayString(_ctx.chooseText || _ctx.translate("chooseText")), 1),
|
|
124
|
-
createElementVNode("view", _hoisted_3, [
|
|
125
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.dataList, (item, index2) => {
|
|
126
|
-
return openBlock(), createElementBlock("view", {
|
|
127
|
-
key: index2,
|
|
128
|
-
class: normalizeClass(["nut-ecard__list__item", _ctx.currentIndex == index2 ? "active" : ""]),
|
|
129
|
-
onClick: ($event) => _ctx.handleClick(item, index2)
|
|
130
|
-
}, toDisplayString(item.price), 11, _hoisted_4);
|
|
131
|
-
}), 128)),
|
|
132
|
-
createElementVNode("view", {
|
|
133
|
-
class: normalizeClass(["nut-ecard__list__input", _ctx.currentIndex == "input" ? "active" : ""]),
|
|
134
|
-
onClick: _cache[2] || (_cache[2] = (...args) => _ctx.inputClick && _ctx.inputClick(...args))
|
|
135
|
-
}, [
|
|
136
|
-
createElementVNode("view", null, toDisplayString(_ctx.otherValueText || _ctx.translate("otherValueText")), 1),
|
|
137
|
-
createElementVNode("view", _hoisted_5, [
|
|
138
|
-
withDirectives(createElementVNode("input", {
|
|
139
|
-
class: "nut-ecard__list__input--input",
|
|
140
|
-
type: "text",
|
|
141
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.inputValue = $event),
|
|
142
|
-
onInput: _cache[1] || (_cache[1] = (...args) => _ctx.change && _ctx.change(...args)),
|
|
143
|
-
placeholder: _ctx.placeholder || _ctx.translate("placeholder")
|
|
144
|
-
}, null, 40, _hoisted_6), [
|
|
145
|
-
[vModelText, _ctx.inputValue]
|
|
146
|
-
]),
|
|
147
|
-
createTextVNode(" " + toDisplayString(_ctx.suffix), 1)
|
|
148
|
-
])
|
|
149
|
-
], 2),
|
|
150
|
-
createElementVNode("view", _hoisted_7, [
|
|
151
|
-
createElementVNode("view", null, toDisplayString(_ctx.suffix) + toDisplayString(_ctx.money), 1),
|
|
152
|
-
createVNode(_component_nut_inputnumber, {
|
|
153
|
-
modelValue: _ctx.stepValue,
|
|
154
|
-
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => _ctx.stepValue = $event),
|
|
155
|
-
min: _ctx.cardBuyMin,
|
|
156
|
-
max: _ctx.cardBuyMax,
|
|
157
|
-
onChange: _ctx.changeStep
|
|
158
|
-
}, null, 8, ["modelValue", "min", "max", "onChange"])
|
|
159
|
-
])
|
|
160
|
-
])
|
|
161
|
-
]);
|
|
162
|
-
}
|
|
163
|
-
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
164
|
-
export { index as default };
|
|
@@ -1,215 +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
|
-
/*!
|
|
21
|
-
* @nutui/nutui v3.1.19 Mon Apr 25 2022 17:26:38 GMT+0800 (中国标准时间)
|
|
22
|
-
* (c) 2022 @jdf2e.
|
|
23
|
-
* Released under the MIT License.
|
|
24
|
-
*/
|
|
25
|
-
import { ref, reactive, computed, toRefs, nextTick, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, Fragment, renderList, toDisplayString, withDirectives, vShow, createCommentVNode, withModifiers } from "vue";
|
|
26
|
-
import { c as createComponent } from "./component.js";
|
|
27
|
-
import { u as useExpose } from "./index3.js";
|
|
28
|
-
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
29
|
-
import "../locale/lang";
|
|
30
|
-
const { componentName, create } = createComponent("elevator");
|
|
31
|
-
const _sfc_main = create({
|
|
32
|
-
props: {
|
|
33
|
-
height: {
|
|
34
|
-
type: [Number, String],
|
|
35
|
-
default: "200px"
|
|
36
|
-
},
|
|
37
|
-
acceptKey: {
|
|
38
|
-
type: [String],
|
|
39
|
-
default: "title"
|
|
40
|
-
},
|
|
41
|
-
indexList: {
|
|
42
|
-
type: Array,
|
|
43
|
-
default: () => {
|
|
44
|
-
return [];
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
emits: ["click-item", "click-index"],
|
|
49
|
-
setup(props, context) {
|
|
50
|
-
const spaceHeight = 23;
|
|
51
|
-
const listview = ref(null);
|
|
52
|
-
const state = reactive({
|
|
53
|
-
anchorIndex: 0,
|
|
54
|
-
listHeight: [],
|
|
55
|
-
listGroup: [],
|
|
56
|
-
touchState: {
|
|
57
|
-
y1: 0,
|
|
58
|
-
y2: 0
|
|
59
|
-
},
|
|
60
|
-
scrollStart: false,
|
|
61
|
-
currentIndex: 0,
|
|
62
|
-
currentData: {}
|
|
63
|
-
});
|
|
64
|
-
const classes = computed(() => {
|
|
65
|
-
const prefixCls = componentName;
|
|
66
|
-
return {
|
|
67
|
-
[prefixCls]: true
|
|
68
|
-
};
|
|
69
|
-
});
|
|
70
|
-
const resetScrollState = () => {
|
|
71
|
-
state.anchorIndex = 0;
|
|
72
|
-
state.listHeight = [];
|
|
73
|
-
state.listGroup = [];
|
|
74
|
-
state.currentIndex = 0;
|
|
75
|
-
state.scrollStart = false;
|
|
76
|
-
state.touchState = {
|
|
77
|
-
y1: 0,
|
|
78
|
-
y2: 0
|
|
79
|
-
};
|
|
80
|
-
};
|
|
81
|
-
const getData = (el, name) => {
|
|
82
|
-
const prefix = "data-";
|
|
83
|
-
return el.getAttribute(prefix + name);
|
|
84
|
-
};
|
|
85
|
-
const setListGroup = (el) => {
|
|
86
|
-
nextTick(() => {
|
|
87
|
-
if (!state.listGroup.includes(el) && el != null) {
|
|
88
|
-
state.listGroup.push(el);
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
};
|
|
92
|
-
const calculateHeight = () => {
|
|
93
|
-
let height = 0;
|
|
94
|
-
state.listHeight.push(height);
|
|
95
|
-
for (let i = 0; i < state.listGroup.length; i++) {
|
|
96
|
-
let item = state.listGroup[i];
|
|
97
|
-
height += item.clientHeight;
|
|
98
|
-
state.listHeight.push(height);
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
const scrollTo = (index2) => {
|
|
102
|
-
if (!index2 && index2 !== 0) {
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
if (!state.listHeight.length) {
|
|
106
|
-
calculateHeight();
|
|
107
|
-
}
|
|
108
|
-
if (index2 < 0)
|
|
109
|
-
index2 = 0;
|
|
110
|
-
if (index2 > state.listHeight.length - 2)
|
|
111
|
-
index2 = state.listHeight.length - 2;
|
|
112
|
-
state.currentIndex = index2;
|
|
113
|
-
listview.value.scrollTo(0, state.listHeight[index2]);
|
|
114
|
-
};
|
|
115
|
-
const touchStart = (e) => {
|
|
116
|
-
state.scrollStart = true;
|
|
117
|
-
let index2 = getData(e.target, "index");
|
|
118
|
-
let firstTouch = e.touches[0];
|
|
119
|
-
state.touchState.y1 = firstTouch.pageY;
|
|
120
|
-
state.anchorIndex = +index2;
|
|
121
|
-
state.currentIndex = +index2;
|
|
122
|
-
scrollTo(+index2);
|
|
123
|
-
};
|
|
124
|
-
const touchMove = (e) => {
|
|
125
|
-
let firstTouch = e.touches[0];
|
|
126
|
-
state.touchState.y2 = firstTouch.pageY;
|
|
127
|
-
let delta = (state.touchState.y2 - state.touchState.y1) / spaceHeight | 0;
|
|
128
|
-
state.currentIndex = state.anchorIndex + delta;
|
|
129
|
-
scrollTo(state.currentIndex);
|
|
130
|
-
};
|
|
131
|
-
const touchEnd = () => {
|
|
132
|
-
resetScrollState();
|
|
133
|
-
};
|
|
134
|
-
const handleClickItem = (key, item) => {
|
|
135
|
-
context.emit("click-item", key, item);
|
|
136
|
-
state.currentData = item;
|
|
137
|
-
};
|
|
138
|
-
const handleClickIndex = (key) => {
|
|
139
|
-
context.emit("click-index", key);
|
|
140
|
-
};
|
|
141
|
-
useExpose({
|
|
142
|
-
scrollTo
|
|
143
|
-
});
|
|
144
|
-
return __spreadProps(__spreadValues({
|
|
145
|
-
classes
|
|
146
|
-
}, toRefs(state)), {
|
|
147
|
-
setListGroup,
|
|
148
|
-
listview,
|
|
149
|
-
touchStart,
|
|
150
|
-
touchMove,
|
|
151
|
-
touchEnd,
|
|
152
|
-
handleClickItem,
|
|
153
|
-
handleClickIndex
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
});
|
|
157
|
-
const _hoisted_1 = { class: "nut-elevator__list__item__code" };
|
|
158
|
-
const _hoisted_2 = ["onClick", "innerHTML"];
|
|
159
|
-
const _hoisted_3 = { class: "nut-elevator__bars__inner" };
|
|
160
|
-
const _hoisted_4 = ["data-index", "onClick"];
|
|
161
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
162
|
-
return openBlock(), createElementBlock("view", {
|
|
163
|
-
class: normalizeClass(_ctx.classes)
|
|
164
|
-
}, [
|
|
165
|
-
createElementVNode("view", {
|
|
166
|
-
class: "nut-elevator__list",
|
|
167
|
-
ref: "listview",
|
|
168
|
-
style: normalizeStyle({ height: isNaN(+_ctx.height) ? _ctx.height : `${_ctx.height}px` })
|
|
169
|
-
}, [
|
|
170
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.indexList, (item) => {
|
|
171
|
-
return openBlock(), createElementBlock("view", {
|
|
172
|
-
class: "nut-elevator__list__item",
|
|
173
|
-
key: item[_ctx.acceptKey],
|
|
174
|
-
ref_for: true,
|
|
175
|
-
ref: _ctx.setListGroup
|
|
176
|
-
}, [
|
|
177
|
-
createElementVNode("view", _hoisted_1, toDisplayString(item[_ctx.acceptKey]), 1),
|
|
178
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(item.list, (subitem) => {
|
|
179
|
-
return openBlock(), createElementBlock("view", {
|
|
180
|
-
class: normalizeClass(["nut-elevator__list__item__name", { "nut-elevator__list__item__name--highcolor": _ctx.currentData.id === subitem.id }]),
|
|
181
|
-
key: subitem["id"],
|
|
182
|
-
onClick: ($event) => _ctx.handleClickItem(item[_ctx.acceptKey], subitem),
|
|
183
|
-
innerHTML: subitem.name
|
|
184
|
-
}, null, 10, _hoisted_2);
|
|
185
|
-
}), 128))
|
|
186
|
-
]);
|
|
187
|
-
}), 128))
|
|
188
|
-
], 4),
|
|
189
|
-
_ctx.indexList.length ? withDirectives((openBlock(), createElementBlock("view", {
|
|
190
|
-
key: 0,
|
|
191
|
-
class: "nut-elevator__code--current"
|
|
192
|
-
}, toDisplayString(_ctx.indexList[_ctx.currentIndex][_ctx.acceptKey]), 513)), [
|
|
193
|
-
[vShow, _ctx.scrollStart]
|
|
194
|
-
]) : createCommentVNode("", true),
|
|
195
|
-
createElementVNode("view", {
|
|
196
|
-
class: "nut-elevator__bars",
|
|
197
|
-
onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.touchStart && _ctx.touchStart(...args)),
|
|
198
|
-
onTouchmove: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.touchMove && _ctx.touchMove(...args), ["stop", "prevent"])),
|
|
199
|
-
onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.touchEnd && _ctx.touchEnd(...args))
|
|
200
|
-
}, [
|
|
201
|
-
createElementVNode("view", _hoisted_3, [
|
|
202
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.indexList, (item, index2) => {
|
|
203
|
-
return openBlock(), createElementBlock("view", {
|
|
204
|
-
class: "nut-elevator__bars__inner__item",
|
|
205
|
-
"data-index": index2,
|
|
206
|
-
key: item[_ctx.acceptKey],
|
|
207
|
-
onClick: ($event) => _ctx.handleClickIndex(item[_ctx.acceptKey])
|
|
208
|
-
}, toDisplayString(item[_ctx.acceptKey]), 9, _hoisted_4);
|
|
209
|
-
}), 128))
|
|
210
|
-
])
|
|
211
|
-
], 32)
|
|
212
|
-
], 2);
|
|
213
|
-
}
|
|
214
|
-
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
215
|
-
export { index as default };
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* @nutui/nutui v3.1.19 Mon Apr 25 2022 17:26:38 GMT+0800 (中国标准时间)
|
|
3
|
-
* (c) 2022 @jdf2e.
|
|
4
|
-
* Released under the MIT License.
|
|
5
|
-
*/
|
|
6
|
-
import { toRefs, computed, openBlock, createElementBlock, createElementVNode, normalizeStyle, renderSlot, Fragment, createCommentVNode, toDisplayString } from "vue";
|
|
7
|
-
import { c as createComponent } from "./component.js";
|
|
8
|
-
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
|
-
import "../locale/lang";
|
|
10
|
-
const { componentName, create, translate } = createComponent("empty");
|
|
11
|
-
const defaultStatus = {
|
|
12
|
-
empty: "https://static-ftcms.jd.com/p/files/61a9e3183985005b3958672b.png",
|
|
13
|
-
error: "https://ftcms.jd.com/p/files/61a9e33ee7dcdbcc0ce62736.png",
|
|
14
|
-
network: "https://static-ftcms.jd.com/p/files/61a9e31de7dcdbcc0ce62734.png"
|
|
15
|
-
};
|
|
16
|
-
const _sfc_main = create({
|
|
17
|
-
props: {
|
|
18
|
-
image: {
|
|
19
|
-
type: String,
|
|
20
|
-
default: "empty"
|
|
21
|
-
},
|
|
22
|
-
imageSize: {
|
|
23
|
-
type: [Number, String],
|
|
24
|
-
default: ""
|
|
25
|
-
},
|
|
26
|
-
description: {
|
|
27
|
-
type: String,
|
|
28
|
-
default: ""
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
setup(props) {
|
|
32
|
-
const { image, imageSize } = toRefs(props);
|
|
33
|
-
const imgStyle = computed(() => {
|
|
34
|
-
if (!imageSize.value) {
|
|
35
|
-
return "";
|
|
36
|
-
}
|
|
37
|
-
if (typeof imageSize.value === "number") {
|
|
38
|
-
return `width:${imageSize.value}px;height:${imageSize.value}px`;
|
|
39
|
-
}
|
|
40
|
-
return `width:${imageSize.value};height:${imageSize.value}`;
|
|
41
|
-
});
|
|
42
|
-
const isHttpUrl = image.value.startsWith("https://") || image.value.startsWith("http://") || image.value.startsWith("//");
|
|
43
|
-
const imageUrl = isHttpUrl ? image.value : defaultStatus[image.value];
|
|
44
|
-
return {
|
|
45
|
-
imageUrl,
|
|
46
|
-
imgStyle,
|
|
47
|
-
translate
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
const _hoisted_1 = { class: "nut-empty" };
|
|
52
|
-
const _hoisted_2 = ["src"];
|
|
53
|
-
const _hoisted_3 = {
|
|
54
|
-
key: 1,
|
|
55
|
-
class: "nut-empty-description"
|
|
56
|
-
};
|
|
57
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
58
|
-
return openBlock(), createElementBlock("view", _hoisted_1, [
|
|
59
|
-
createElementVNode("view", {
|
|
60
|
-
class: "nut-empty-image",
|
|
61
|
-
style: normalizeStyle(_ctx.imgStyle)
|
|
62
|
-
}, [
|
|
63
|
-
_ctx.$slots.image ? renderSlot(_ctx.$slots, "image", { key: 0 }) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
64
|
-
_ctx.imageUrl ? (openBlock(), createElementBlock("img", {
|
|
65
|
-
key: 0,
|
|
66
|
-
class: "img",
|
|
67
|
-
src: _ctx.imageUrl
|
|
68
|
-
}, null, 8, _hoisted_2)) : createCommentVNode("", true)
|
|
69
|
-
], 64))
|
|
70
|
-
], 4),
|
|
71
|
-
_ctx.$slots.description ? renderSlot(_ctx.$slots, "description", { key: 0 }) : (openBlock(), createElementBlock("view", _hoisted_3, toDisplayString(_ctx.description || _ctx.translate("noData")), 1)),
|
|
72
|
-
_ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 2 }) : createCommentVNode("", true)
|
|
73
|
-
]);
|
|
74
|
-
}
|
|
75
|
-
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
76
|
-
export { index as default };
|