@nutui/nutui 3.1.20 → 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 -280
- package/dist/types/__VUE/address/index.d.ts +0 -396
- package/dist/types/__VUE/addresslist/components/GeneralShell.d.ts +0 -35
- package/dist/types/__VUE/addresslist/components/ItemContents.d.ts +0 -42
- package/dist/types/__VUE/addresslist/components/LongPressShell.d.ts +0 -47
- package/dist/types/__VUE/addresslist/components/SwipeShell.d.ts +0 -37
- package/dist/types/__VUE/addresslist/index.d.ts +0 -81
- package/dist/types/__VUE/audio/index.d.ts +0 -92
- package/dist/types/__VUE/audiooperate/index.d.ts +0 -68
- package/dist/types/__VUE/avatar/index.d.ts +0 -110
- package/dist/types/__VUE/avatargroup/index.d.ts +0 -93
- package/dist/types/__VUE/backtop/index.d.ts +0 -105
- package/dist/types/__VUE/badge/index.d.ts +0 -94
- package/dist/types/__VUE/barrage/index.d.ts +0 -80
- package/dist/types/__VUE/button/index.d.ts +0 -116
- package/dist/types/__VUE/calendar/index.d.ts +0 -155
- package/dist/types/__VUE/calendaritem/index.d.ts +0 -195
- package/dist/types/__VUE/card/index.d.ts +0 -90
- package/dist/types/__VUE/cascader/cascader-item.d.ts +0 -76
- package/dist/types/__VUE/cascader/helper.d.ts +0 -8
- package/dist/types/__VUE/cascader/index.d.ts +0 -240
- 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 -38
- package/dist/types/__VUE/categorypane/index.d.ts +0 -45
- package/dist/types/__VUE/cell/index.d.ts +0 -109
- package/dist/types/__VUE/cellgroup/index.d.ts +0 -38
- package/dist/types/__VUE/checkbox/index.d.ts +0 -102
- package/dist/types/__VUE/checkboxgroup/index.d.ts +0 -39
- package/dist/types/__VUE/circleprogress/index.d.ts +0 -94
- package/dist/types/__VUE/col/index.d.ts +0 -45
- package/dist/types/__VUE/collapse/index.d.ts +0 -104
- package/dist/types/__VUE/collapseitem/index.d.ts +0 -83
- package/dist/types/__VUE/comment/components/CmtBottom.d.ts +0 -52
- package/dist/types/__VUE/comment/components/CmtHeader.d.ts +0 -47
- package/dist/types/__VUE/comment/components/CmtImages.d.ts +0 -51
- package/dist/types/__VUE/comment/index.d.ts +0 -110
- package/dist/types/__VUE/countdown/index.d.ts +0 -105
- package/dist/types/__VUE/countdown/util.d.ts +0 -6
- package/dist/types/__VUE/countup/index.d.ts +0 -216
- package/dist/types/__VUE/datepicker/index.d.ts +0 -356
- package/dist/types/__VUE/datepicker/utils.d.ts +0 -5
- package/dist/types/__VUE/dialog/index.d.ts +0 -306
- package/dist/types/__VUE/divider/index.d.ts +0 -47
- package/dist/types/__VUE/drag/index.d.ts +0 -61
- package/dist/types/__VUE/ecard/index.d.ts +0 -124
- package/dist/types/__VUE/elevator/index.d.ts +0 -71
- package/dist/types/__VUE/empty/index.d.ts +0 -47
- package/dist/types/__VUE/fixednav/index.d.ts +0 -96
- package/dist/types/__VUE/form/common.d.ts +0 -20
- package/dist/types/__VUE/form/index.d.ts +0 -32
- package/dist/types/__VUE/form/types.d.ts +0 -13
- package/dist/types/__VUE/formitem/index.d.ts +0 -120
- 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 -100
- package/dist/types/__VUE/griditem/index.d.ts +0 -80
- package/dist/types/__VUE/icon/index.d.ts +0 -74
- package/dist/types/__VUE/imagepreview/index.d.ts +0 -125
- package/dist/types/__VUE/indicator/index.d.ts +0 -70
- package/dist/types/__VUE/infiniteloading/index.d.ts +0 -140
- package/dist/types/__VUE/input/index.d.ts +0 -337
- package/dist/types/__VUE/input/util.d.ts +0 -5
- package/dist/types/__VUE/inputnumber/index.d.ts +0 -117
- package/dist/types/__VUE/layout/index.d.ts +0 -13
- package/dist/types/__VUE/list/index.d.ts +0 -56
- package/dist/types/__VUE/menu/index.d.ts +0 -51
- package/dist/types/__VUE/menuitem/index.d.ts +0 -77
- package/dist/types/__VUE/navbar/index.d.ts +0 -83
- package/dist/types/__VUE/noticebar/index.d.ts +0 -209
- package/dist/types/__VUE/notify/index.d.ts +0 -113
- package/dist/types/__VUE/numberkeyboard/index.d.ts +0 -124
- package/dist/types/__VUE/oldpicker/Column.d.ts +0 -96
- package/dist/types/__VUE/oldpicker/commonProps.d.ts +0 -22
- package/dist/types/__VUE/oldpicker/index.d.ts +0 -369
- package/dist/types/__VUE/oldpicker/types.d.ts +0 -24
- package/dist/types/__VUE/overlay/index.d.ts +0 -1614
- package/dist/types/__VUE/pagination/index.d.ts +0 -112
- package/dist/types/__VUE/picker/Column.d.ts +0 -90
- package/dist/types/__VUE/picker/index.d.ts +0 -352
- package/dist/types/__VUE/picker/types.d.ts +0 -26
- package/dist/types/__VUE/popover/index.d.ts +0 -242
- package/dist/types/__VUE/popup/index.d.ts +0 -1743
- package/dist/types/__VUE/popup/use-lock-scroll.d.ts +0 -5
- package/dist/types/__VUE/price/index.d.ts +0 -87
- package/dist/types/__VUE/progress/index.d.ts +0 -138
- package/dist/types/__VUE/pullrefresh/index.d.ts +0 -128
- 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 -90
- package/dist/types/__VUE/radiogroup/index.d.ts +0 -48
- package/dist/types/__VUE/range/index.d.ts +0 -156
- package/dist/types/__VUE/rate/index.d.ts +0 -142
- package/dist/types/__VUE/row/index.d.ts +0 -66
- package/dist/types/__VUE/searchbar/index.d.ts +0 -100
- package/dist/types/__VUE/shortpassword/index.d.ts +0 -137
- package/dist/types/__VUE/sidenavbar/index.d.ts +0 -36
- package/dist/types/__VUE/sidenavbaritem/index.d.ts +0 -41
- package/dist/types/__VUE/signature/index.d.ts +0 -74
- package/dist/types/__VUE/skeleton/common.d.ts +0 -63
- package/dist/types/__VUE/skeleton/index.d.ts +0 -117
- package/dist/types/__VUE/sku/components/SkuHeader.d.ts +0 -28
- package/dist/types/__VUE/sku/components/SkuOperate.d.ts +0 -70
- package/dist/types/__VUE/sku/components/SkuSelect.d.ts +0 -30
- package/dist/types/__VUE/sku/components/SkuStepper.d.ts +0 -67
- package/dist/types/__VUE/sku/index.d.ts +0 -310
- package/dist/types/__VUE/step/index.d.ts +0 -70
- package/dist/types/__VUE/steps/index.d.ts +0 -47
- package/dist/types/__VUE/sticky/index.d.ts +0 -63
- package/dist/types/__VUE/subsidenavbar/index.d.ts +0 -54
- package/dist/types/__VUE/swipe/index.d.ts +0 -69
- package/dist/types/__VUE/swiper/index.d.ts +0 -163
- package/dist/types/__VUE/swiper/use-touch.d.ts +0 -20
- package/dist/types/__VUE/swiperitem/index.d.ts +0 -24
- package/dist/types/__VUE/switch/index.d.ts +0 -136
- package/dist/types/__VUE/tabbar/index.d.ts +0 -84
- package/dist/types/__VUE/tabbaritem/index.d.ts +0 -108
- package/dist/types/__VUE/table/common.d.ts +0 -56
- package/dist/types/__VUE/table/index.d.ts +0 -76
- package/dist/types/__VUE/table/renderColumn.d.ts +0 -15
- package/dist/types/__VUE/table/types.d.ts +0 -19
- package/dist/types/__VUE/tabpane/index.d.ts +0 -47
- package/dist/types/__VUE/tabs/common.d.ts +0 -78
- package/dist/types/__VUE/tabs/index.d.ts +0 -126
- package/dist/types/__VUE/tag/index.d.ts +0 -89
- package/dist/types/__VUE/textarea/index.d.ts +0 -121
- package/dist/types/__VUE/timedetail/index.d.ts +0 -48
- package/dist/types/__VUE/timepannel/index.d.ts +0 -43
- package/dist/types/__VUE/timeselect/index.d.ts +0 -83
- package/dist/types/__VUE/toast/index.d.ts +0 -149
- package/dist/types/__VUE/uploader/index.d.ts +0 -258
- package/dist/types/__VUE/uploader/uploader.d.ts +0 -25
- package/dist/types/__VUE/video/index.d.ts +0 -123
- package/dist/types/index.d.ts +0 -3
- package/dist/types/nutui.d.ts +0 -99
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* @nutui/nutui v3.1.20 Mon Apr 25 2022 18:06:52 GMT+0800 (中国标准时间)
|
|
3
|
-
* (c) 2022 @jdf2e.
|
|
4
|
-
* Released under the MIT License.
|
|
5
|
-
*/
|
|
6
|
-
import { reactive, provide, watch, openBlock, createElementBlock, normalizeClass, renderSlot } 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 { create } = createComponent("tabbar");
|
|
11
|
-
const _sfc_main = create({
|
|
12
|
-
props: {
|
|
13
|
-
visible: {
|
|
14
|
-
type: [Number, String],
|
|
15
|
-
default: 0
|
|
16
|
-
},
|
|
17
|
-
bottom: {
|
|
18
|
-
type: Boolean,
|
|
19
|
-
default: false
|
|
20
|
-
},
|
|
21
|
-
type: {
|
|
22
|
-
type: String,
|
|
23
|
-
default: "base"
|
|
24
|
-
},
|
|
25
|
-
size: {
|
|
26
|
-
type: String,
|
|
27
|
-
default: "20px"
|
|
28
|
-
},
|
|
29
|
-
unactiveColor: {
|
|
30
|
-
type: String,
|
|
31
|
-
default: "#000000"
|
|
32
|
-
},
|
|
33
|
-
activeColor: {
|
|
34
|
-
type: String,
|
|
35
|
-
default: ""
|
|
36
|
-
},
|
|
37
|
-
safeAreaInsetBottom: {
|
|
38
|
-
type: Boolean,
|
|
39
|
-
default: false
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
emits: ["tab-switch", "update:visible"],
|
|
43
|
-
setup(props, { emit, slots }) {
|
|
44
|
-
const mdValue = reactive({
|
|
45
|
-
val: props.visible,
|
|
46
|
-
children: []
|
|
47
|
-
});
|
|
48
|
-
function changeIndex(active) {
|
|
49
|
-
emit("update:visible", active);
|
|
50
|
-
parentData.modelValue = active;
|
|
51
|
-
emit("tab-switch", parentData.children[active], active);
|
|
52
|
-
}
|
|
53
|
-
let parentData = reactive({
|
|
54
|
-
children: mdValue.children,
|
|
55
|
-
size: props.size,
|
|
56
|
-
modelValue: mdValue.val,
|
|
57
|
-
unactiveColor: props.unactiveColor,
|
|
58
|
-
activeColor: props.activeColor,
|
|
59
|
-
changeIndex
|
|
60
|
-
});
|
|
61
|
-
provide("parent", parentData);
|
|
62
|
-
watch(() => props.visible, (value) => {
|
|
63
|
-
parentData.modelValue = value;
|
|
64
|
-
});
|
|
65
|
-
return {
|
|
66
|
-
changeIndex
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
71
|
-
return openBlock(), createElementBlock("view", {
|
|
72
|
-
class: normalizeClass(["nut-tabbar", { "nut-tabbar-bottom": _ctx.bottom, "nut-tabbar-safebottom": _ctx.safeAreaInsetBottom }])
|
|
73
|
-
}, [
|
|
74
|
-
renderSlot(_ctx.$slots, "default")
|
|
75
|
-
], 2);
|
|
76
|
-
}
|
|
77
|
-
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
78
|
-
export { index as default };
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* @nutui/nutui v3.1.20 Mon Apr 25 2022 18:06:52 GMT+0800 (中国标准时间)
|
|
3
|
-
* (c) 2022 @jdf2e.
|
|
4
|
-
* Released under the MIT License.
|
|
5
|
-
*/
|
|
6
|
-
import { c as createComponent } from "./component.js";
|
|
7
|
-
import { u as useRouter } from "./index.js";
|
|
8
|
-
import { inject, reactive, getCurrentInstance, computed, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, Fragment, toDisplayString, createCommentVNode, createVNode, renderSlot } from "vue";
|
|
9
|
-
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
10
|
-
import "../locale/lang";
|
|
11
|
-
const { create } = createComponent("tabbar-item");
|
|
12
|
-
const _sfc_main = create({
|
|
13
|
-
props: {
|
|
14
|
-
tabTitle: {
|
|
15
|
-
type: String,
|
|
16
|
-
default: ""
|
|
17
|
-
},
|
|
18
|
-
icon: {
|
|
19
|
-
type: String,
|
|
20
|
-
default: ""
|
|
21
|
-
},
|
|
22
|
-
href: {
|
|
23
|
-
type: String,
|
|
24
|
-
default: ""
|
|
25
|
-
},
|
|
26
|
-
num: {
|
|
27
|
-
type: String,
|
|
28
|
-
default: ""
|
|
29
|
-
},
|
|
30
|
-
activeImg: {
|
|
31
|
-
type: String,
|
|
32
|
-
default: ""
|
|
33
|
-
},
|
|
34
|
-
img: {
|
|
35
|
-
type: String,
|
|
36
|
-
default: ""
|
|
37
|
-
},
|
|
38
|
-
classPrefix: {
|
|
39
|
-
type: String,
|
|
40
|
-
default: "nut-icon"
|
|
41
|
-
},
|
|
42
|
-
dot: {
|
|
43
|
-
type: Boolean,
|
|
44
|
-
default: false
|
|
45
|
-
},
|
|
46
|
-
fontClassName: {
|
|
47
|
-
type: String,
|
|
48
|
-
default: "nutui-iconfont"
|
|
49
|
-
},
|
|
50
|
-
to: [Object, String]
|
|
51
|
-
},
|
|
52
|
-
setup(props, ctx) {
|
|
53
|
-
const parent = inject("parent");
|
|
54
|
-
const state = reactive({
|
|
55
|
-
size: parent.size,
|
|
56
|
-
unactiveColor: parent.unactiveColor,
|
|
57
|
-
activeColor: parent.activeColor,
|
|
58
|
-
active: parent.modelValue,
|
|
59
|
-
index: 0
|
|
60
|
-
});
|
|
61
|
-
const router = useRouter();
|
|
62
|
-
const relation = (child) => {
|
|
63
|
-
if (child.proxy) {
|
|
64
|
-
let index2 = parent.children.length;
|
|
65
|
-
state.index = index2;
|
|
66
|
-
parent.children.push(child.proxy);
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
relation(getCurrentInstance());
|
|
70
|
-
function change(index2) {
|
|
71
|
-
parent.changeIndex(index2);
|
|
72
|
-
}
|
|
73
|
-
const choosed = computed(() => {
|
|
74
|
-
if (parent) {
|
|
75
|
-
return parent.modelValue;
|
|
76
|
-
}
|
|
77
|
-
return null;
|
|
78
|
-
});
|
|
79
|
-
watch(choosed, (value, oldValue) => {
|
|
80
|
-
state.active = value;
|
|
81
|
-
setTimeout(() => {
|
|
82
|
-
if (parent.children[value].href) {
|
|
83
|
-
window.location.href = parent.children[value].href;
|
|
84
|
-
}
|
|
85
|
-
if (parent.children[value].to) {
|
|
86
|
-
let to = parent.children[value].to;
|
|
87
|
-
if (to && router) {
|
|
88
|
-
router.push(to);
|
|
89
|
-
} else {
|
|
90
|
-
location.replace(to);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
return {
|
|
96
|
-
state,
|
|
97
|
-
change
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
const _hoisted_1 = { class: "nut-tabbar-item_icon-box" };
|
|
102
|
-
const _hoisted_2 = {
|
|
103
|
-
key: 0,
|
|
104
|
-
class: "nut-tabbar-item_icon-box_tips nut-tabbar-item_icon-box_num"
|
|
105
|
-
};
|
|
106
|
-
const _hoisted_3 = {
|
|
107
|
-
key: 1,
|
|
108
|
-
class: "nut-tabbar-item_icon-box_tips nut-tabbar-item_icon-box_nums"
|
|
109
|
-
};
|
|
110
|
-
const _hoisted_4 = {
|
|
111
|
-
key: 1,
|
|
112
|
-
class: "nut-tabbar-item_icon-box_dot"
|
|
113
|
-
};
|
|
114
|
-
const _hoisted_5 = { key: 2 };
|
|
115
|
-
const _hoisted_6 = { key: 0 };
|
|
116
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
117
|
-
const _component_nut_icon = resolveComponent("nut-icon");
|
|
118
|
-
return openBlock(), createElementBlock("div", {
|
|
119
|
-
class: normalizeClass(["nut-tabbar-item", { "nut-tabbar-item__icon--unactive": _ctx.state.active != _ctx.state.index }]),
|
|
120
|
-
style: normalizeStyle({
|
|
121
|
-
color: _ctx.state.active == _ctx.state.index ? _ctx.state.activeColor : _ctx.state.unactiveColor
|
|
122
|
-
}),
|
|
123
|
-
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.change(_ctx.state.index))
|
|
124
|
-
}, [
|
|
125
|
-
createElementVNode("view", _hoisted_1, [
|
|
126
|
-
!_ctx.dot ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
127
|
-
_ctx.num && _ctx.num <= 99 ? (openBlock(), createElementBlock("view", _hoisted_2, toDisplayString(_ctx.num), 1)) : _ctx.num && _ctx.num > 100 ? (openBlock(), createElementBlock("view", _hoisted_3, toDisplayString("99+"))) : createCommentVNode("", true)
|
|
128
|
-
], 64)) : createCommentVNode("", true),
|
|
129
|
-
_ctx.dot ? (openBlock(), createElementBlock("div", _hoisted_4)) : createCommentVNode("", true),
|
|
130
|
-
_ctx.icon ? (openBlock(), createElementBlock("view", _hoisted_5, [
|
|
131
|
-
createVNode(_component_nut_icon, {
|
|
132
|
-
class: "nut-tabbar-item_icon-box_icon",
|
|
133
|
-
size: _ctx.state.size,
|
|
134
|
-
name: _ctx.icon,
|
|
135
|
-
"font-class-name": _ctx.fontClassName,
|
|
136
|
-
"class-prefix": _ctx.classPrefix
|
|
137
|
-
}, null, 8, ["size", "name", "font-class-name", "class-prefix"])
|
|
138
|
-
])) : createCommentVNode("", true),
|
|
139
|
-
!_ctx.icon && _ctx.activeImg ? (openBlock(), createElementBlock("div", {
|
|
140
|
-
key: 3,
|
|
141
|
-
class: "nut-tabbar-item_icon-box_icon",
|
|
142
|
-
style: normalizeStyle({
|
|
143
|
-
backgroundImage: `url(${_ctx.state.active == _ctx.state.index ? _ctx.activeImg : _ctx.img})`,
|
|
144
|
-
width: _ctx.state.size,
|
|
145
|
-
height: _ctx.state.size
|
|
146
|
-
})
|
|
147
|
-
}, null, 4)) : createCommentVNode("", true),
|
|
148
|
-
createElementVNode("view", {
|
|
149
|
-
class: normalizeClass(["nut-tabbar-item_icon-box_nav-word", { "nut-tabbar-item_icon-box_big-word": !_ctx.icon && !_ctx.activeImg }])
|
|
150
|
-
}, [
|
|
151
|
-
_ctx.tabTitle ? (openBlock(), createElementBlock("view", _hoisted_6, toDisplayString(_ctx.tabTitle), 1)) : createCommentVNode("", true),
|
|
152
|
-
!_ctx.tabTitle ? renderSlot(_ctx.$slots, "default", { key: 1 }) : createCommentVNode("", true)
|
|
153
|
-
], 2)
|
|
154
|
-
])
|
|
155
|
-
], 6);
|
|
156
|
-
}
|
|
157
|
-
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
158
|
-
export { index as default };
|
|
@@ -1,201 +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.20 Mon Apr 25 2022 18:06:52 GMT+0800 (中国标准时间)
|
|
22
|
-
* (c) 2022 @jdf2e.
|
|
23
|
-
* Released under the MIT License.
|
|
24
|
-
*/
|
|
25
|
-
import { c as createComponent } from "./component.js";
|
|
26
|
-
import { h, reactive, computed, watch, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, createTextVNode, toDisplayString, renderSlot, createBlock, createCommentVNode } from "vue";
|
|
27
|
-
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
28
|
-
import "../locale/lang";
|
|
29
|
-
var RenderColumn = {
|
|
30
|
-
setup(props) {
|
|
31
|
-
return () => h(`view`, {}, props.slots[0] ? props.slots[0](props.record) : props.slots[1](props.record));
|
|
32
|
-
},
|
|
33
|
-
props: {
|
|
34
|
-
slots: Array,
|
|
35
|
-
record: Object
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
const component = (componentName2, translate2) => {
|
|
39
|
-
return {
|
|
40
|
-
components: {
|
|
41
|
-
RenderColumn
|
|
42
|
-
},
|
|
43
|
-
props: {
|
|
44
|
-
bordered: {
|
|
45
|
-
type: Boolean,
|
|
46
|
-
default: true
|
|
47
|
-
},
|
|
48
|
-
columns: {
|
|
49
|
-
type: Array,
|
|
50
|
-
default: () => {
|
|
51
|
-
return [];
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
data: {
|
|
55
|
-
type: Object,
|
|
56
|
-
default: () => {
|
|
57
|
-
return {};
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
summary: {
|
|
61
|
-
type: Function,
|
|
62
|
-
default: null
|
|
63
|
-
},
|
|
64
|
-
striped: {
|
|
65
|
-
type: Boolean,
|
|
66
|
-
default: false
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
emits: ["sorter"],
|
|
70
|
-
setup(props, { emit, slots }) {
|
|
71
|
-
const state = reactive({
|
|
72
|
-
curData: props.data
|
|
73
|
-
});
|
|
74
|
-
const classes = computed(() => {
|
|
75
|
-
const prefixCls = componentName2;
|
|
76
|
-
return {
|
|
77
|
-
[prefixCls]: true
|
|
78
|
-
};
|
|
79
|
-
});
|
|
80
|
-
const cellClasses = (item) => {
|
|
81
|
-
return {
|
|
82
|
-
"nut-table__main__head__tr--border": props.bordered,
|
|
83
|
-
[`nut-table__main__head__tr--align${item.align ? item.align : ""}`]: true
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
const getColumnItem = (value) => {
|
|
87
|
-
return props.columns.filter((item) => item.key === value)[0];
|
|
88
|
-
};
|
|
89
|
-
const handleSorterClick = (item) => {
|
|
90
|
-
if (item.sorter) {
|
|
91
|
-
emit("sorter", item);
|
|
92
|
-
state.curData = typeof item.sorter === "function" ? state.curData.sort(item.sorter) : item.sorter === "default" ? state.curData.sort() : state.curData;
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
const sortDataItem = () => {
|
|
96
|
-
return props.columns.map((columns) => {
|
|
97
|
-
return [columns.key, columns.render];
|
|
98
|
-
});
|
|
99
|
-
};
|
|
100
|
-
watch(() => props.data, (val) => {
|
|
101
|
-
state.curData = val.slice();
|
|
102
|
-
});
|
|
103
|
-
return __spreadProps(__spreadValues({}, toRefs(state)), {
|
|
104
|
-
classes,
|
|
105
|
-
cellClasses,
|
|
106
|
-
getColumnItem,
|
|
107
|
-
handleSorterClick,
|
|
108
|
-
sortDataItem,
|
|
109
|
-
translate: translate2
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
};
|
|
114
|
-
const { componentName, create, translate } = createComponent("table");
|
|
115
|
-
const _sfc_main = create(component(componentName, translate));
|
|
116
|
-
const _hoisted_1 = { class: "nut-table__main__head" };
|
|
117
|
-
const _hoisted_2 = { class: "nut-table__main__head__tr" };
|
|
118
|
-
const _hoisted_3 = ["onClick"];
|
|
119
|
-
const _hoisted_4 = { class: "nut-table__main__body" };
|
|
120
|
-
const _hoisted_5 = { key: 1 };
|
|
121
|
-
const _hoisted_6 = {
|
|
122
|
-
key: 0,
|
|
123
|
-
class: "nut-table__summary"
|
|
124
|
-
};
|
|
125
|
-
const _hoisted_7 = ["innerHTML"];
|
|
126
|
-
const _hoisted_8 = {
|
|
127
|
-
key: 1,
|
|
128
|
-
class: "nut-table__nodata"
|
|
129
|
-
};
|
|
130
|
-
const _hoisted_9 = {
|
|
131
|
-
key: 0,
|
|
132
|
-
class: "nut-table__nodata__text"
|
|
133
|
-
};
|
|
134
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
135
|
-
const _component_nut_icon = resolveComponent("nut-icon");
|
|
136
|
-
const _component_RenderColumn = resolveComponent("RenderColumn");
|
|
137
|
-
return openBlock(), createElementBlock("view", {
|
|
138
|
-
class: normalizeClass(_ctx.classes)
|
|
139
|
-
}, [
|
|
140
|
-
createElementVNode("view", {
|
|
141
|
-
class: normalizeClass(["nut-table__main", { "nut-table__main--striped": _ctx.striped }])
|
|
142
|
-
}, [
|
|
143
|
-
createElementVNode("view", _hoisted_1, [
|
|
144
|
-
createElementVNode("view", _hoisted_2, [
|
|
145
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columns, (item) => {
|
|
146
|
-
return openBlock(), createElementBlock("span", {
|
|
147
|
-
class: normalizeClass(["nut-table__main__head__tr__th", _ctx.cellClasses(item)]),
|
|
148
|
-
key: item.key,
|
|
149
|
-
onClick: ($event) => _ctx.handleSorterClick(item)
|
|
150
|
-
}, [
|
|
151
|
-
createTextVNode(toDisplayString(item.title) + " ", 1),
|
|
152
|
-
renderSlot(_ctx.$slots, "icon"),
|
|
153
|
-
!_ctx.$slots.icon && item.sorter ? (openBlock(), createBlock(_component_nut_icon, {
|
|
154
|
-
key: 0,
|
|
155
|
-
name: "down-arrow",
|
|
156
|
-
size: "12px"
|
|
157
|
-
})) : createCommentVNode("", true)
|
|
158
|
-
], 10, _hoisted_3);
|
|
159
|
-
}), 128))
|
|
160
|
-
])
|
|
161
|
-
]),
|
|
162
|
-
createElementVNode("view", _hoisted_4, [
|
|
163
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.curData, (item) => {
|
|
164
|
-
return openBlock(), createElementBlock("view", {
|
|
165
|
-
class: "nut-table__main__body__tr",
|
|
166
|
-
key: item
|
|
167
|
-
}, [
|
|
168
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.sortDataItem(), ([value, render]) => {
|
|
169
|
-
return openBlock(), createElementBlock("span", {
|
|
170
|
-
class: normalizeClass(["nut-table__main__body__tr__td", _ctx.cellClasses(_ctx.getColumnItem(value))]),
|
|
171
|
-
key: value
|
|
172
|
-
}, [
|
|
173
|
-
typeof item[value] === "function" || typeof render === "function" ? (openBlock(), createBlock(_component_RenderColumn, {
|
|
174
|
-
key: 0,
|
|
175
|
-
slots: [render, item[value]],
|
|
176
|
-
record: item
|
|
177
|
-
}, null, 8, ["slots", "record"])) : (openBlock(), createElementBlock("view", _hoisted_5, toDisplayString(item[value]), 1))
|
|
178
|
-
], 2);
|
|
179
|
-
}), 128))
|
|
180
|
-
]);
|
|
181
|
-
}), 128))
|
|
182
|
-
])
|
|
183
|
-
], 2),
|
|
184
|
-
_ctx.summary ? (openBlock(), createElementBlock("view", _hoisted_6, [
|
|
185
|
-
createElementVNode("span", {
|
|
186
|
-
class: "nut-table__summary__text",
|
|
187
|
-
innerHTML: _ctx.summary().value
|
|
188
|
-
}, null, 8, _hoisted_7)
|
|
189
|
-
])) : createCommentVNode("", true),
|
|
190
|
-
!_ctx.curData.length ? (openBlock(), createElementBlock("view", _hoisted_8, [
|
|
191
|
-
createElementVNode("div", {
|
|
192
|
-
class: normalizeClass(["nut-table__nodata", { "nut-table__nodata--border": _ctx.bordered }])
|
|
193
|
-
}, [
|
|
194
|
-
renderSlot(_ctx.$slots, "nodata"),
|
|
195
|
-
!_ctx.$slots.nodata ? (openBlock(), createElementBlock("div", _hoisted_9, toDisplayString(_ctx.translate("noData")), 1)) : createCommentVNode("", true)
|
|
196
|
-
], 2)
|
|
197
|
-
])) : createCommentVNode("", true)
|
|
198
|
-
], 2);
|
|
199
|
-
}
|
|
200
|
-
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
201
|
-
export { index as default };
|
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
-
var __spreadValues = (a, b) => {
|
|
7
|
-
for (var prop in b || (b = {}))
|
|
8
|
-
if (__hasOwnProp.call(b, prop))
|
|
9
|
-
__defNormalProp(a, prop, b[prop]);
|
|
10
|
-
if (__getOwnPropSymbols)
|
|
11
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
-
if (__propIsEnum.call(b, prop))
|
|
13
|
-
__defNormalProp(a, prop, b[prop]);
|
|
14
|
-
}
|
|
15
|
-
return a;
|
|
16
|
-
};
|
|
17
|
-
/*!
|
|
18
|
-
* @nutui/nutui v3.1.20 Mon Apr 25 2022 18:06:52 GMT+0800 (中国标准时间)
|
|
19
|
-
* (c) 2022 @jdf2e.
|
|
20
|
-
* Released under the MIT License.
|
|
21
|
-
*/
|
|
22
|
-
import { c as createComponent } from "./component.js";
|
|
23
|
-
import { p as pxCheck } from "./pxCheck.js";
|
|
24
|
-
import { provide, computed, ref, watch, onMounted, onActivated, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, renderSlot, Fragment, renderList, createCommentVNode, createVNode, toDisplayString } from "vue";
|
|
25
|
-
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
26
|
-
import "../locale/lang";
|
|
27
|
-
class Title {
|
|
28
|
-
constructor() {
|
|
29
|
-
this.title = "";
|
|
30
|
-
this.paneKey = "";
|
|
31
|
-
this.disabled = false;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
const component = {
|
|
35
|
-
props: {
|
|
36
|
-
modelValue: {
|
|
37
|
-
type: [String, Number],
|
|
38
|
-
default: 0
|
|
39
|
-
},
|
|
40
|
-
color: {
|
|
41
|
-
type: String,
|
|
42
|
-
default: ""
|
|
43
|
-
},
|
|
44
|
-
direction: {
|
|
45
|
-
type: String,
|
|
46
|
-
default: "horizontal"
|
|
47
|
-
},
|
|
48
|
-
size: {
|
|
49
|
-
type: String,
|
|
50
|
-
default: "normal"
|
|
51
|
-
},
|
|
52
|
-
type: {
|
|
53
|
-
type: String,
|
|
54
|
-
default: "line"
|
|
55
|
-
},
|
|
56
|
-
titleScroll: {
|
|
57
|
-
type: Boolean,
|
|
58
|
-
default: false
|
|
59
|
-
},
|
|
60
|
-
ellipsis: {
|
|
61
|
-
type: Boolean,
|
|
62
|
-
default: true
|
|
63
|
-
},
|
|
64
|
-
background: {
|
|
65
|
-
type: String,
|
|
66
|
-
default: ""
|
|
67
|
-
},
|
|
68
|
-
animatedTime: {
|
|
69
|
-
type: [Number, String],
|
|
70
|
-
default: 300
|
|
71
|
-
},
|
|
72
|
-
titleGutter: {
|
|
73
|
-
type: [Number, String],
|
|
74
|
-
default: 0
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
components: {},
|
|
78
|
-
emits: ["update:modelValue", "click", "change"],
|
|
79
|
-
setup(props, { emit, slots }) {
|
|
80
|
-
provide("activeKey", { activeKey: computed(() => props.modelValue) });
|
|
81
|
-
const titles = ref([]);
|
|
82
|
-
const renderTitles = (vnodes) => {
|
|
83
|
-
vnodes.forEach((vnode, index2) => {
|
|
84
|
-
var _a, _b, _c, _d, _e;
|
|
85
|
-
let type = vnode.type;
|
|
86
|
-
type = type.name || type;
|
|
87
|
-
if (type == "nut-tabpane") {
|
|
88
|
-
let title = new Title();
|
|
89
|
-
if (((_a = vnode.props) == null ? void 0 : _a.title) || ((_b = vnode.props) == null ? void 0 : _b["pane-key"])) {
|
|
90
|
-
title.title = (_c = vnode.props) == null ? void 0 : _c.title;
|
|
91
|
-
title.paneKey = ((_d = vnode.props) == null ? void 0 : _d["pane-key"]) || index2;
|
|
92
|
-
title.disabled = (_e = vnode.props) == null ? void 0 : _e.disabled;
|
|
93
|
-
}
|
|
94
|
-
titles.value.push(title);
|
|
95
|
-
} else {
|
|
96
|
-
renderTitles(vnode.children);
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
};
|
|
100
|
-
const currentIndex = ref(props.modelValue || 0);
|
|
101
|
-
const findTabsIndex = (value) => {
|
|
102
|
-
let index2 = titles.value.findIndex((item) => item.paneKey == value);
|
|
103
|
-
if (titles.value.length == 0) {
|
|
104
|
-
console.error("[NutUI] <Tabs> \u5F53\u524D\u672A\u627E\u5230 TabPane \u7EC4\u4EF6\u5143\u7D20 , \u8BF7\u68C0\u67E5 .");
|
|
105
|
-
} else if (index2 == -1) {
|
|
106
|
-
console.error("[NutUI] <Tabs> \u8BF7\u68C0\u67E5 v-model \u503C\u662F\u5426\u4E3A paneKey ,\u5982 paneKey \u672A\u8BBE\u7F6E\uFF0C\u8BF7\u91C7\u7528\u4E0B\u6807\u63A7\u5236 .");
|
|
107
|
-
} else {
|
|
108
|
-
currentIndex.value = index2;
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
const init = (vnodes = ((_a) => (_a = slots.default) == null ? void 0 : _a.call(slots))()) => {
|
|
112
|
-
titles.value = [];
|
|
113
|
-
if (vnodes && vnodes.length) {
|
|
114
|
-
renderTitles(vnodes);
|
|
115
|
-
}
|
|
116
|
-
findTabsIndex(props.modelValue);
|
|
117
|
-
};
|
|
118
|
-
watch(() => {
|
|
119
|
-
var _a;
|
|
120
|
-
return (_a = slots.default) == null ? void 0 : _a.call(slots);
|
|
121
|
-
}, (vnodes) => {
|
|
122
|
-
init(vnodes);
|
|
123
|
-
});
|
|
124
|
-
watch(() => props.modelValue, (value) => {
|
|
125
|
-
findTabsIndex(value);
|
|
126
|
-
});
|
|
127
|
-
onMounted(init);
|
|
128
|
-
onActivated(init);
|
|
129
|
-
const contentStyle = computed(() => {
|
|
130
|
-
return {
|
|
131
|
-
transform: props.direction == "horizontal" ? `translate3d(-${currentIndex.value * 100}%, 0, 0)` : `translate3d( 0,-${currentIndex.value * 100}%, 0)`,
|
|
132
|
-
transitionDuration: `${props.animatedTime}ms`
|
|
133
|
-
};
|
|
134
|
-
});
|
|
135
|
-
const tabsNavStyle = computed(() => {
|
|
136
|
-
return {
|
|
137
|
-
background: props.background
|
|
138
|
-
};
|
|
139
|
-
});
|
|
140
|
-
const tabsActiveStyle = computed(() => {
|
|
141
|
-
return {
|
|
142
|
-
color: props.type == "smile" ? props.color : "",
|
|
143
|
-
background: props.type == "line" ? props.color : ""
|
|
144
|
-
};
|
|
145
|
-
});
|
|
146
|
-
const titleStyle = computed(() => {
|
|
147
|
-
return {
|
|
148
|
-
marginLeft: pxCheck(props.titleGutter),
|
|
149
|
-
marginRight: pxCheck(props.titleGutter)
|
|
150
|
-
};
|
|
151
|
-
});
|
|
152
|
-
const methods = {
|
|
153
|
-
tabChange: (item, index2) => {
|
|
154
|
-
emit("click", item);
|
|
155
|
-
if (item.disabled) {
|
|
156
|
-
return;
|
|
157
|
-
}
|
|
158
|
-
currentIndex.value = index2;
|
|
159
|
-
emit("update:modelValue", item.paneKey);
|
|
160
|
-
emit("change", item);
|
|
161
|
-
}
|
|
162
|
-
};
|
|
163
|
-
return __spreadValues({
|
|
164
|
-
titles,
|
|
165
|
-
contentStyle,
|
|
166
|
-
tabsNavStyle,
|
|
167
|
-
titleStyle,
|
|
168
|
-
tabsActiveStyle
|
|
169
|
-
}, methods);
|
|
170
|
-
}
|
|
171
|
-
};
|
|
172
|
-
const _hoisted_1 = ["onClick"];
|
|
173
|
-
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
174
|
-
const _component_nut_icon = resolveComponent("nut-icon");
|
|
175
|
-
return openBlock(), createElementBlock("view", {
|
|
176
|
-
class: normalizeClass(["nut-tabs", [_ctx.direction]])
|
|
177
|
-
}, [
|
|
178
|
-
createElementVNode("view", {
|
|
179
|
-
class: normalizeClass(["nut-tabs__titles", { [_ctx.type]: _ctx.type, scrollable: _ctx.titleScroll, [_ctx.size]: _ctx.size }]),
|
|
180
|
-
style: normalizeStyle(_ctx.tabsNavStyle)
|
|
181
|
-
}, [
|
|
182
|
-
_ctx.$slots.titles ? renderSlot(_ctx.$slots, "titles", { key: 0 }) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.titles, (item, index2) => {
|
|
183
|
-
return openBlock(), createElementBlock("view", {
|
|
184
|
-
class: normalizeClass(["nut-tabs__titles-item", { active: item.paneKey == _ctx.modelValue, disabled: item.disabled }]),
|
|
185
|
-
style: normalizeStyle(_ctx.titleStyle),
|
|
186
|
-
onClick: ($event) => _ctx.tabChange(item, index2),
|
|
187
|
-
key: item.paneKey
|
|
188
|
-
}, [
|
|
189
|
-
_ctx.type == "line" ? (openBlock(), createElementBlock("view", {
|
|
190
|
-
key: 0,
|
|
191
|
-
class: "nut-tabs__titles-item__line",
|
|
192
|
-
style: normalizeStyle(_ctx.tabsActiveStyle)
|
|
193
|
-
}, null, 4)) : createCommentVNode("", true),
|
|
194
|
-
_ctx.type == "smile" ? (openBlock(), createElementBlock("view", {
|
|
195
|
-
key: 1,
|
|
196
|
-
class: "nut-tabs__titles-item__smile",
|
|
197
|
-
style: normalizeStyle(_ctx.tabsActiveStyle)
|
|
198
|
-
}, [
|
|
199
|
-
createVNode(_component_nut_icon, {
|
|
200
|
-
color: _ctx.color,
|
|
201
|
-
name: "joy-smile"
|
|
202
|
-
}, null, 8, ["color"])
|
|
203
|
-
], 4)) : createCommentVNode("", true),
|
|
204
|
-
createElementVNode("view", {
|
|
205
|
-
class: normalizeClass(["nut-tabs__titles-item__text", { ellipsis: _ctx.ellipsis && !_ctx.titleScroll && _ctx.direction == "horizontal" }])
|
|
206
|
-
}, toDisplayString(item.title), 3)
|
|
207
|
-
], 14, _hoisted_1);
|
|
208
|
-
}), 128))
|
|
209
|
-
], 6),
|
|
210
|
-
createElementVNode("view", {
|
|
211
|
-
class: "nut-tabs__content",
|
|
212
|
-
style: normalizeStyle(_ctx.contentStyle)
|
|
213
|
-
}, [
|
|
214
|
-
renderSlot(_ctx.$slots, "default")
|
|
215
|
-
], 4)
|
|
216
|
-
], 2);
|
|
217
|
-
}
|
|
218
|
-
const { create } = createComponent("tabs");
|
|
219
|
-
const _sfc_main = create(component);
|
|
220
|
-
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", render]]);
|
|
221
|
-
export { index as default };
|