@nutui/nutui 3.1.21-beta.3 → 3.1.22-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +57 -0
- package/dist/nutui.es.js +4024 -18197
- package/dist/nutui.umd.js +4017 -18290
- package/dist/packages/_es/ActionSheet.js +26 -157
- package/dist/packages/_es/Address.js +119 -542
- package/dist/packages/_es/AddressList.js +113 -611
- package/dist/packages/_es/Audio.js +62 -274
- package/dist/packages/_es/AudioOperate.js +18 -107
- package/dist/packages/_es/Avatar.js +42 -165
- package/dist/packages/_es/AvatarGroup.js +14 -73
- package/dist/packages/_es/BackTop.js +43 -156
- package/dist/packages/_es/Badge.js +14 -86
- package/dist/packages/_es/Barrage.js +41 -113
- package/dist/packages/_es/Button.js +23 -128
- package/dist/packages/_es/Calendar.js +24 -237
- package/dist/packages/_es/CalendarItem.js +1 -1
- package/dist/packages/_es/Card.js +10 -107
- package/dist/packages/_es/Cascader.js +156 -500
- package/dist/packages/_es/Category.js +15 -58
- package/dist/packages/_es/CategoryPane.js +11 -111
- package/dist/packages/_es/Cell.js +21 -98
- package/dist/packages/_es/CellGroup.js +9 -44
- package/dist/packages/_es/Checkbox.js +31 -113
- package/dist/packages/_es/CheckboxGroup.js +29 -58
- package/dist/packages/_es/CircleProgress.js +28 -151
- package/dist/packages/_es/Col.js +14 -56
- package/dist/packages/_es/Collapse.js +24 -85
- package/dist/packages/_es/CollapseItem.js +70 -261
- package/dist/packages/_es/Comment.js +64 -434
- package/dist/packages/_es/CountDown.js +61 -242
- package/dist/packages/_es/CountUp.js +149 -548
- package/dist/packages/_es/DatePicker.js +107 -322
- package/dist/packages/_es/Dialog.js +69 -259
- package/dist/packages/_es/Divider.js +32 -45
- package/dist/packages/_es/Drag.js +56 -197
- package/dist/packages/_es/Ecard.js +24 -159
- package/dist/packages/_es/Elevator.js +63 -194
- package/dist/packages/_es/Empty.js +12 -71
- package/dist/packages/_es/FixedNav.js +15 -122
- package/dist/packages/_es/Form.js +64 -146
- package/dist/packages/_es/FormItem.js +15 -110
- package/dist/packages/_es/Grid.js +5 -6
- package/dist/packages/_es/GridItem.js +33 -144
- package/dist/packages/_es/Icon.js +15 -40
- package/dist/packages/_es/ImagePreview.js +74 -298
- package/dist/packages/_es/Indicator.js +15 -62
- package/dist/packages/_es/InfiniteLoading.js +66 -258
- package/dist/packages/_es/Input.js +51 -413
- package/dist/packages/_es/InputNumber.js +41 -160
- package/dist/packages/_es/Layout.js +4 -5
- package/dist/packages/_es/List.js +23 -109
- package/dist/packages/_es/Menu.js +30 -114
- package/dist/packages/_es/MenuItem.js +34 -161
- package/dist/packages/_es/Navbar.js +30 -94
- package/dist/packages/_es/NoticeBar.js +83 -387
- package/dist/packages/_es/Notify.js +81 -236
- package/dist/packages/_es/NumberKeyboard.js +41 -262
- package/dist/packages/_es/OldPicker.js +140 -464
- package/dist/packages/_es/OverLay.js +32 -105
- package/dist/packages/_es/Pagination.js +39 -157
- package/dist/packages/_es/Picker.js +138 -457
- package/dist/packages/_es/Popover.js +344 -185
- package/dist/packages/_es/Popup.js +64 -300
- package/dist/packages/_es/Price.js +16 -118
- package/dist/packages/_es/Progress.js +14 -146
- package/dist/packages/_es/PullRefresh.js +92 -346
- package/dist/packages/_es/Radio.js +22 -90
- package/dist/packages/_es/RadioGroup.js +8 -37
- package/dist/packages/_es/Range.js +92 -417
- package/dist/packages/_es/Rate.js +16 -139
- package/dist/packages/_es/Row.js +22 -64
- package/dist/packages/_es/SearchBar.js +46 -181
- package/dist/packages/_es/ShortPassword.js +35 -225
- package/dist/packages/_es/SideNavBar.js +33 -89
- package/dist/packages/_es/SideNavBarItem.js +11 -46
- package/dist/packages/_es/Signature.js +46 -165
- package/dist/packages/_es/Skeleton.js +20 -136
- package/dist/packages/_es/Sku.js +93 -499
- package/dist/packages/_es/Step.js +25 -119
- package/dist/packages/_es/Steps.js +18 -53
- package/dist/packages/_es/Sticky.js +53 -138
- package/dist/packages/_es/SubSideNavBar.js +26 -90
- package/dist/packages/_es/Swipe.js +46 -183
- package/dist/packages/_es/Swiper.js +121 -414
- package/dist/packages/_es/SwiperItem.js +22 -50
- package/dist/packages/_es/Switch.js +21 -116
- package/dist/packages/_es/TabPane.js +12 -35
- package/dist/packages/_es/Tabbar.js +17 -72
- package/dist/packages/_es/TabbarItem.js +29 -150
- package/dist/packages/_es/Table.js +27 -186
- package/dist/packages/_es/Tabs.js +51 -204
- package/dist/packages/_es/Tag.js +20 -97
- package/dist/packages/_es/TextArea.js +42 -160
- package/dist/packages/_es/TimeDetail.js +23 -84
- package/dist/packages/_es/TimePannel.js +19 -52
- package/dist/packages/_es/TimeSelect.js +15 -103
- package/dist/packages/_es/Toast.js +80 -319
- package/dist/packages/_es/Uploader.js +112 -459
- package/dist/packages/_es/Video.js +83 -340
- package/dist/packages/_es/common.js +38 -128
- package/dist/packages/_es/component.js +35 -76
- package/dist/packages/_es/index.js +5 -6
- package/dist/packages/_es/index2.js +9 -30
- package/dist/packages/_es/index3.js +6 -8
- package/dist/packages/_es/index4.js +13 -58
- package/dist/packages/_es/index5.js +120 -675
- package/dist/packages/_es/plugin-vue_export-helper.js +7 -8
- package/dist/packages/_es/pxCheck.js +3 -5
- package/dist/packages/_es/raf.js +8 -15
- package/dist/packages/addresslist/index.scss +2 -2
- package/dist/packages/button/index.scss +2 -1
- package/dist/packages/card/index.scss +1 -1
- package/dist/packages/cell/index.scss +15 -0
- package/dist/packages/checkbox/index.scss +6 -0
- package/dist/packages/dialog/index.scss +1 -2
- package/dist/packages/divider/index.scss +9 -0
- package/dist/packages/elevator/index.scss +21 -0
- package/dist/packages/formitem/index.scss +1 -0
- package/dist/packages/input/index.scss +13 -1
- package/dist/packages/locale/index.d.ts +8 -3
- package/dist/packages/locale/{locale/lang → lang}/baseLang.d.ts +1 -0
- package/dist/packages/locale/lang/baseLang.js +3 -3
- package/dist/packages/locale/{locale/lang → lang}/en-US.d.ts +16 -0
- package/dist/packages/locale/lang/en-US.js +5 -89
- package/dist/packages/locale/lang/id-ID.d.ts +104 -0
- package/dist/packages/locale/lang/id-ID.js +12 -0
- package/dist/packages/locale/lang/index.js +16 -38
- package/dist/packages/locale/{locale/lang → lang}/zh-CN.d.ts +16 -0
- package/dist/packages/locale/lang/zh-CN.js +5 -89
- package/dist/packages/locale/{locale/lang → lang}/zh-TW.d.ts +16 -0
- package/dist/packages/locale/lang/zh-TW.js +5 -89
- package/dist/packages/menuitem/index.scss +0 -1
- package/dist/packages/navbar/index.scss +8 -1
- package/dist/packages/popover/index.scss +402 -81
- package/dist/packages/popup/index.scss +3 -0
- package/dist/packages/radio/index.scss +1 -0
- package/dist/packages/searchbar/index.scss +4 -0
- package/dist/packages/switch/index.scss +3 -3
- package/dist/packages/tabbar/index.scss +2 -2
- package/dist/packages/tabpane/index.scss +5 -2
- package/dist/packages/tabs/index.scss +3 -0
- package/dist/packages/timeselect/index.scss +3 -2
- package/dist/smartips/attributes.json +188 -44
- package/dist/smartips/tags.json +65 -27
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +48 -48
- package/dist/styles/themes/jdb.scss +48 -48
- package/dist/styles/themes/jdt.scss +48 -48
- package/dist/styles/variables-jdb.scss +25 -8
- package/dist/styles/variables-jdt.scss +25 -8
- package/dist/styles/variables.scss +25 -7
- package/dist/types/__VUE/actionsheet/{index.d.ts → index.vue.d.ts} +62 -114
- package/dist/types/__VUE/address/{index.d.ts → index.vue.d.ts} +81 -151
- package/dist/types/__VUE/addresslist/components/{GeneralShell.d.ts → GeneralShell.vue.d.ts} +6 -7
- package/dist/types/__VUE/addresslist/components/{ItemContents.d.ts → ItemContents.vue.d.ts} +9 -11
- package/dist/types/__VUE/addresslist/components/{LongPressShell.d.ts → LongPressShell.vue.d.ts} +6 -7
- package/dist/types/__VUE/addresslist/components/{SwipeShell.d.ts → SwipeShell.vue.d.ts} +6 -7
- package/dist/types/__VUE/addresslist/{index.d.ts → index.vue.d.ts} +14 -23
- package/dist/types/__VUE/audio/index.vue.d.ts +102 -0
- package/dist/types/__VUE/audiooperate/index.vue.d.ts +88 -0
- package/dist/types/__VUE/avatar/{index.d.ts → index.vue.d.ts} +17 -30
- package/dist/types/__VUE/avatargroup/{index.d.ts → index.vue.d.ts} +20 -35
- package/dist/types/__VUE/backtop/{index.d.ts → index.vue.d.ts} +18 -34
- package/dist/types/__VUE/badge/{index.d.ts → index.vue.d.ts} +20 -33
- package/dist/types/__VUE/barrage/{index.d.ts → index.vue.d.ts} +15 -26
- package/dist/types/__VUE/button/{index.d.ts → index.vue.d.ts} +33 -50
- package/dist/types/__VUE/button/type.d.ts +7 -0
- package/dist/types/__VUE/calendar/{index.d.ts → index.vue.d.ts} +32 -57
- package/dist/types/__VUE/calendaritem/{index.d.ts → index.vue.d.ts} +33 -58
- package/dist/types/__VUE/card/{index.d.ts → index.vue.d.ts} +19 -34
- package/dist/types/__VUE/cascader/{cascader-item.d.ts → cascader-item.vue.d.ts} +22 -23
- package/dist/types/__VUE/cascader/{index.d.ts → index.vue.d.ts} +62 -98
- package/dist/types/__VUE/category/{index.d.ts → index.vue.d.ts} +7 -10
- package/dist/types/__VUE/categorypane/{index.d.ts → index.vue.d.ts} +10 -15
- package/dist/types/__VUE/cell/{index.d.ts → index.vue.d.ts} +38 -39
- package/dist/types/__VUE/cellgroup/{index.d.ts → index.vue.d.ts} +8 -11
- package/dist/types/__VUE/checkbox/common.d.ts +59 -0
- package/dist/types/__VUE/checkbox/{index.d.ts → index.vue.d.ts} +36 -40
- package/dist/types/__VUE/checkboxgroup/{index.d.ts → index.vue.d.ts} +15 -11
- package/dist/types/__VUE/circleprogress/{index.d.ts → index.vue.d.ts} +18 -31
- package/dist/types/__VUE/col/{index.d.ts → index.vue.d.ts} +7 -10
- package/dist/types/__VUE/collapse/{index.d.ts → index.vue.d.ts} +24 -40
- package/dist/types/__VUE/collapseitem/{index.d.ts → index.vue.d.ts} +22 -30
- package/dist/types/__VUE/comment/components/{CmtBottom.d.ts → CmtBottom.vue.d.ts} +10 -15
- package/dist/types/__VUE/comment/components/{CmtHeader.d.ts → CmtHeader.vue.d.ts} +10 -15
- package/dist/types/__VUE/comment/components/{CmtImages.d.ts → CmtImages.vue.d.ts} +10 -15
- package/dist/types/__VUE/comment/{index.d.ts → index.vue.d.ts} +21 -38
- package/dist/types/__VUE/countdown/{index.d.ts → index.vue.d.ts} +21 -35
- package/dist/types/__VUE/countup/{index.d.ts → index.vue.d.ts} +41 -74
- package/dist/types/__VUE/datepicker/{index.d.ts → index.vue.d.ts} +71 -125
- package/dist/types/__VUE/datepicker/type.d.ts +6 -0
- package/dist/types/__VUE/dialog/index.d.ts +44 -302
- package/dist/types/__VUE/dialog/index.vue.d.ts +263 -0
- package/dist/types/__VUE/divider/{index.d.ts → index.vue.d.ts} +15 -15
- package/dist/types/__VUE/drag/{index.d.ts → index.vue.d.ts} +9 -19
- package/dist/types/__VUE/ecard/{index.d.ts → index.vue.d.ts} +25 -44
- package/dist/types/__VUE/elevator/{index.d.ts → index.vue.d.ts} +39 -14
- package/dist/types/__VUE/empty/{index.d.ts → index.vue.d.ts} +9 -14
- package/dist/types/__VUE/fixednav/{index.d.ts → index.vue.d.ts} +18 -34
- package/dist/types/__VUE/form/{index.d.ts → index.vue.d.ts} +5 -6
- package/dist/types/__VUE/formitem/{index.d.ts → index.vue.d.ts} +29 -55
- package/dist/types/__VUE/grid/common.d.ts +3 -3
- package/dist/types/__VUE/grid/{index.d.ts → index.vue.d.ts} +24 -40
- package/dist/types/__VUE/griditem/{index.d.ts → index.vue.d.ts} +19 -26
- package/dist/types/__VUE/icon/{index.d.ts → index.vue.d.ts} +15 -26
- package/dist/types/__VUE/imagepreview/index.d.ts +20 -121
- package/dist/types/__VUE/imagepreview/index.vue.d.ts +108 -0
- package/dist/types/__VUE/indicator/{index.d.ts → index.vue.d.ts} +13 -24
- package/dist/types/__VUE/infiniteloading/{index.d.ts → index.vue.d.ts} +26 -47
- package/dist/types/__VUE/input/{index.d.ts → index.vue.d.ts} +81 -144
- package/dist/types/__VUE/input/type.d.ts +13 -0
- package/dist/types/__VUE/inputnumber/{index.d.ts → index.vue.d.ts} +22 -39
- package/dist/types/__VUE/layout/{index.d.ts → index.vue.d.ts} +1 -1
- package/dist/types/__VUE/list/{index.d.ts → index.vue.d.ts} +10 -14
- package/dist/types/__VUE/menu/{index.d.ts → index.vue.d.ts} +16 -14
- package/dist/types/__VUE/menuitem/{index.d.ts → index.vue.d.ts} +20 -24
- package/dist/types/__VUE/menuitem/type.d.ts +8 -0
- package/dist/types/__VUE/navbar/{index.d.ts → index.vue.d.ts} +48 -26
- package/dist/types/__VUE/noticebar/{index.d.ts → index.vue.d.ts} +35 -64
- package/dist/types/__VUE/notify/index.d.ts +12 -109
- package/dist/types/__VUE/notify/index.vue.d.ts +101 -0
- package/dist/types/__VUE/numberkeyboard/{index.d.ts → index.vue.d.ts} +41 -43
- package/dist/types/__VUE/oldpicker/{Column.d.ts → Column.vue.d.ts} +17 -22
- package/dist/types/__VUE/oldpicker/{index.d.ts → index.vue.d.ts} +75 -128
- package/dist/types/__VUE/overlay/{index.d.ts → index.vue.d.ts} +19 -30
- package/dist/types/__VUE/pagination/{index.d.ts → index.vue.d.ts} +21 -38
- package/dist/types/__VUE/picker/{Column.d.ts → Column.vue.d.ts} +16 -18
- package/dist/types/__VUE/picker/{index.d.ts → index.vue.d.ts} +79 -129
- package/dist/types/__VUE/popover/{index.d.ts → index.vue.d.ts} +85 -109
- package/dist/types/__VUE/popover/type.d.ts +6 -0
- package/dist/types/__VUE/popup/{index.d.ts → index.vue.d.ts} +45 -80
- package/dist/types/__VUE/price/{index.d.ts → index.vue.d.ts} +17 -30
- package/dist/types/__VUE/progress/{index.d.ts → index.vue.d.ts} +29 -53
- package/dist/types/__VUE/pullrefresh/{index.d.ts → index.vue.d.ts} +18 -46
- package/dist/types/__VUE/radio/{index.d.ts → index.vue.d.ts} +19 -34
- package/dist/types/__VUE/radiogroup/{index.d.ts → index.vue.d.ts} +10 -15
- package/dist/types/__VUE/range/{index.d.ts → index.vue.d.ts} +35 -47
- package/dist/types/__VUE/range/type.d.ts +5 -0
- package/dist/types/__VUE/rate/{index.d.ts → index.vue.d.ts} +30 -55
- package/dist/types/__VUE/row/{index.d.ts → index.vue.d.ts} +16 -25
- package/dist/types/__VUE/searchbar/{index.d.ts → index.vue.d.ts} +62 -32
- package/dist/types/__VUE/shortpassword/{index.d.ts → index.vue.d.ts} +25 -44
- package/dist/types/__VUE/sidenavbar/{index.d.ts → index.vue.d.ts} +6 -7
- package/dist/types/__VUE/sidenavbaritem/{index.d.ts → index.vue.d.ts} +8 -11
- package/dist/types/__VUE/signature/{index.d.ts → index.vue.d.ts} +13 -22
- package/dist/types/__VUE/skeleton/common.d.ts +3 -5
- package/dist/types/__VUE/skeleton/{index.d.ts → index.vue.d.ts} +24 -43
- package/dist/types/__VUE/sku/components/{SkuHeader.d.ts → SkuHeader.vue.d.ts} +6 -7
- package/dist/types/__VUE/sku/components/{SkuOperate.d.ts → SkuOperate.vue.d.ts} +14 -23
- package/dist/types/__VUE/sku/components/{SkuSelect.d.ts → SkuSelect.vue.d.ts} +6 -7
- package/dist/types/__VUE/sku/components/{SkuStepper.d.ts → SkuStepper.vue.d.ts} +12 -19
- package/dist/types/__VUE/sku/{index.d.ts → index.vue.d.ts} +66 -124
- package/dist/types/__VUE/step/{index.d.ts → index.vue.d.ts} +14 -23
- package/dist/types/__VUE/steps/{index.d.ts → index.vue.d.ts} +9 -14
- package/dist/types/__VUE/sticky/{index.d.ts → index.vue.d.ts} +14 -21
- package/dist/types/__VUE/subsidenavbar/{index.d.ts → index.vue.d.ts} +10 -15
- package/dist/types/__VUE/swipe/{index.d.ts → index.vue.d.ts} +11 -18
- package/dist/types/__VUE/swiper/{index.d.ts → index.vue.d.ts} +30 -50
- package/dist/types/__VUE/swiperitem/{index.d.ts → index.vue.d.ts} +2 -2
- package/dist/types/__VUE/switch/{index.d.ts → index.vue.d.ts} +28 -51
- package/dist/types/__VUE/tabbar/{index.d.ts → index.vue.d.ts} +17 -30
- package/dist/types/__VUE/tabbaritem/{index.d.ts → index.vue.d.ts} +25 -40
- package/dist/types/__VUE/table/common.d.ts +1 -1
- package/dist/types/__VUE/table/{index.d.ts → index.vue.d.ts} +14 -23
- package/dist/types/__VUE/tabpane/{index.d.ts → index.vue.d.ts} +11 -15
- package/dist/types/__VUE/tabs/common.d.ts +6 -2
- package/dist/types/__VUE/tabs/{index.d.ts → index.vue.d.ts} +30 -42
- package/dist/types/__VUE/tag/{index.d.ts → index.vue.d.ts} +21 -34
- package/dist/types/__VUE/tag/type.d.ts +5 -0
- package/dist/types/__VUE/textarea/{index.d.ts → index.vue.d.ts} +26 -45
- package/dist/types/__VUE/timedetail/{index.d.ts → index.vue.d.ts} +8 -11
- package/dist/types/__VUE/timepannel/{index.d.ts → index.vue.d.ts} +8 -11
- package/dist/types/__VUE/timeselect/{index.d.ts → index.vue.d.ts} +25 -29
- package/dist/types/__VUE/toast/index.d.ts +12 -145
- package/dist/types/__VUE/toast/index.vue.d.ts +134 -0
- package/dist/types/__VUE/uploader/{index.d.ts → index.vue.d.ts} +59 -106
- package/dist/types/__VUE/uploader/type.d.ts +18 -0
- package/dist/types/__VUE/video/{index.d.ts → index.vue.d.ts} +9 -26
- package/dist/types/index.d.ts +7 -2
- package/dist/types/nutui.d.ts +92 -92
- package/package.json +7 -3
- package/dist/packages/locale/locale/index.d.ts +0 -8
- package/dist/types/__VUE/audio/index.d.ts +0 -92
- package/dist/types/__VUE/audiooperate/index.d.ts +0 -68
|
@@ -1,169 +1,42 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { reactive, computed, inject, getCurrentInstance, resolveComponent, withDirectives, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, vShow, createVNode, mergeProps, withCtx, Fragment, renderList, createBlock, createCommentVNode, toDisplayString, renderSlot } from "vue";
|
|
7
|
-
import { c as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { _ as
|
|
6
|
+
import { reactive as e, computed as o, inject as l, getCurrentInstance as t, resolveComponent as a, withDirectives as s, openBlock as n, createElementBlock as p, normalizeClass as r, createElementVNode as i, normalizeStyle as u, vShow as c, createVNode as m, mergeProps as d, withCtx as h, Fragment as v, renderList as y, createBlock as f, createCommentVNode as w, toDisplayString as C, renderSlot as k } from "vue";
|
|
7
|
+
import { c as P } from "./component.js";
|
|
8
|
+
import _ from "./Icon.js";
|
|
9
|
+
import g from "./Popup.js";
|
|
10
|
+
import { _ as x } from "./plugin-vue_export-helper.js";
|
|
11
11
|
import "../locale/lang";
|
|
12
12
|
import "./pxCheck.js";
|
|
13
13
|
import "./OverLay.js";
|
|
14
|
-
const { componentName, create } =
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
default: []
|
|
21
|
-
},
|
|
22
|
-
disabled: {
|
|
23
|
-
type: Boolean,
|
|
24
|
-
default: false
|
|
25
|
-
},
|
|
26
|
-
modelValue: null,
|
|
27
|
-
cols: {
|
|
28
|
-
type: Number,
|
|
29
|
-
default: 1
|
|
30
|
-
},
|
|
31
|
-
titleIcon: {
|
|
32
|
-
type: String,
|
|
33
|
-
default: "down-arrow"
|
|
14
|
+
const { componentName: S, create: V } = P("menu-item"), b = V({ props: { title: String, options: { type: Array, default: [] }, disabled: { type: Boolean, default: false }, modelValue: null, cols: { type: Number, default: 1 }, titleIcon: { type: String, default: "down-arrow" } }, components: { [_.name]: _, [g.name]: g }, emits: ["update:modelValue", "change"], setup(a2, { emit: s2, slots: n2 }) {
|
|
15
|
+
const p2 = e({ showPopup: false, transition: true, showWrapper: false, isShowPlaceholderElement: false }), { parent: r2 } = (() => {
|
|
16
|
+
const e2 = l("menuParent", null);
|
|
17
|
+
if (e2) {
|
|
18
|
+
const o2 = t(), { link: l2 } = e2;
|
|
19
|
+
return l2(o2), { parent: e2 };
|
|
34
20
|
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
const { parent } = useParent();
|
|
60
|
-
const classes = computed(() => {
|
|
61
|
-
const prefixCls = componentName;
|
|
62
|
-
return {
|
|
63
|
-
[prefixCls]: true
|
|
64
|
-
};
|
|
65
|
-
});
|
|
66
|
-
const toggle = (show = !state.showPopup, options = {}) => {
|
|
67
|
-
if (show === state.showPopup) {
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
state.showPopup = show;
|
|
71
|
-
state.isShowPlaceholderElement = show;
|
|
72
|
-
if (show) {
|
|
73
|
-
state.showWrapper = true;
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
const renderTitle = () => {
|
|
77
|
-
var _a;
|
|
78
|
-
if (props.title) {
|
|
79
|
-
return props.title;
|
|
80
|
-
}
|
|
81
|
-
const match = (_a = props.options) == null ? void 0 : _a.find((option) => option.value === props.modelValue);
|
|
82
|
-
return match ? match.text : "";
|
|
83
|
-
};
|
|
84
|
-
const onClick = (option) => {
|
|
85
|
-
state.showPopup = false;
|
|
86
|
-
state.isShowPlaceholderElement = false;
|
|
87
|
-
if (option.value !== props.modelValue) {
|
|
88
|
-
emit("update:modelValue", option.value);
|
|
89
|
-
emit("change", option.value);
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
const handleClose = () => {
|
|
93
|
-
state.showWrapper = false;
|
|
94
|
-
state.isShowPlaceholderElement = false;
|
|
95
|
-
};
|
|
96
|
-
const handleClickOutside = () => {
|
|
97
|
-
state.showPopup = false;
|
|
98
|
-
};
|
|
99
|
-
return {
|
|
100
|
-
classes,
|
|
101
|
-
renderTitle,
|
|
102
|
-
state,
|
|
103
|
-
parent,
|
|
104
|
-
toggle,
|
|
105
|
-
onClick,
|
|
106
|
-
handleClose,
|
|
107
|
-
handleClickOutside
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
const _hoisted_1 = { class: "nut-menu-item__content" };
|
|
112
|
-
const _hoisted_2 = ["onClick"];
|
|
113
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
114
|
-
const _component_nut_icon = resolveComponent("nut-icon");
|
|
115
|
-
const _component_nut_popup = resolveComponent("nut-popup");
|
|
116
|
-
return withDirectives((openBlock(), createElementBlock("view", {
|
|
117
|
-
class: normalizeClass(_ctx.classes)
|
|
118
|
-
}, [
|
|
119
|
-
withDirectives(createElementVNode("div", {
|
|
120
|
-
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClickOutside && _ctx.handleClickOutside(...args)),
|
|
121
|
-
class: "placeholder-element",
|
|
122
|
-
style: normalizeStyle({ height: _ctx.parent.offset.value + "px" })
|
|
123
|
-
}, null, 4), [
|
|
124
|
-
[vShow, _ctx.state.isShowPlaceholderElement]
|
|
125
|
-
]),
|
|
126
|
-
createVNode(_component_nut_popup, mergeProps({
|
|
127
|
-
style: { top: _ctx.parent.offset.value + "px" },
|
|
128
|
-
overlayStyle: { top: _ctx.parent.offset.value + "px" }
|
|
129
|
-
}, _ctx.$attrs, {
|
|
130
|
-
visible: _ctx.state.showPopup,
|
|
131
|
-
"onUpdate:visible": _cache[1] || (_cache[1] = ($event) => _ctx.state.showPopup = $event),
|
|
132
|
-
position: "top",
|
|
133
|
-
duration: _ctx.parent.props.duration,
|
|
134
|
-
"pop-class": "nut-menu__pop",
|
|
135
|
-
overlayClass: "nut-menu__overlay",
|
|
136
|
-
overlay: _ctx.parent.props.overlay,
|
|
137
|
-
onClosed: _ctx.handleClose,
|
|
138
|
-
isWrapTeleport: false
|
|
139
|
-
}), {
|
|
140
|
-
default: withCtx(() => [
|
|
141
|
-
createElementVNode("view", _hoisted_1, [
|
|
142
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (option, index2) => {
|
|
143
|
-
return openBlock(), createElementBlock("view", {
|
|
144
|
-
key: index2,
|
|
145
|
-
class: normalizeClass(["nut-menu-item__option", { active: option.value === _ctx.modelValue }]),
|
|
146
|
-
style: normalizeStyle({ "flex-basis": 100 / _ctx.cols + "%" }),
|
|
147
|
-
onClick: ($event) => _ctx.onClick(option)
|
|
148
|
-
}, [
|
|
149
|
-
option.value === _ctx.modelValue ? (openBlock(), createBlock(_component_nut_icon, {
|
|
150
|
-
key: 0,
|
|
151
|
-
name: "Check",
|
|
152
|
-
color: _ctx.parent.props.activeColor
|
|
153
|
-
}, null, 8, ["color"])) : createCommentVNode("", true),
|
|
154
|
-
createElementVNode("view", {
|
|
155
|
-
style: normalizeStyle({ color: option.value === _ctx.modelValue ? _ctx.parent.props.activeColor : "" })
|
|
156
|
-
}, toDisplayString(option.text), 5)
|
|
157
|
-
], 14, _hoisted_2);
|
|
158
|
-
}), 128)),
|
|
159
|
-
renderSlot(_ctx.$slots, "default")
|
|
160
|
-
])
|
|
161
|
-
]),
|
|
162
|
-
_: 3
|
|
163
|
-
}, 16, ["style", "overlayStyle", "visible", "duration", "overlay", "onClosed"])
|
|
164
|
-
], 2)), [
|
|
165
|
-
[vShow, _ctx.state.showWrapper]
|
|
166
|
-
]);
|
|
167
|
-
}
|
|
168
|
-
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
169
|
-
export { index as default };
|
|
21
|
+
})();
|
|
22
|
+
return { classes: o(() => ({ [S]: true })), renderTitle: () => {
|
|
23
|
+
var _a;
|
|
24
|
+
if (a2.title)
|
|
25
|
+
return a2.title;
|
|
26
|
+
const e2 = (_a = a2.options) == null ? void 0 : _a.find((e3) => e3.value === a2.modelValue);
|
|
27
|
+
return e2 ? e2.text : "";
|
|
28
|
+
}, state: p2, parent: r2, toggle: (e2 = !p2.showPopup, o2 = {}) => {
|
|
29
|
+
e2 !== p2.showPopup && (p2.showPopup = e2, p2.isShowPlaceholderElement = e2, e2 && (p2.showWrapper = true));
|
|
30
|
+
}, onClick: (e2) => {
|
|
31
|
+
p2.showPopup = false, p2.isShowPlaceholderElement = false, e2.value !== a2.modelValue && (s2("update:modelValue", e2.value), s2("change", e2.value));
|
|
32
|
+
}, handleClose: () => {
|
|
33
|
+
p2.showWrapper = false, p2.isShowPlaceholderElement = false;
|
|
34
|
+
}, handleClickOutside: () => {
|
|
35
|
+
p2.showPopup = false;
|
|
36
|
+
} };
|
|
37
|
+
} }), j = { class: "nut-menu-item__content" }, O = ["onClick"];
|
|
38
|
+
var E = x(b, [["render", function(e2, o2, l2, t2, P2, _2) {
|
|
39
|
+
const g2 = a("nut-icon"), x2 = a("nut-popup");
|
|
40
|
+
return s((n(), p("view", { class: r(e2.classes) }, [s(i("div", { onClick: o2[0] || (o2[0] = (...o3) => e2.handleClickOutside && e2.handleClickOutside(...o3)), class: "placeholder-element", style: u({ height: e2.parent.offset.value + "px" }) }, null, 4), [[c, e2.state.isShowPlaceholderElement]]), m(x2, d({ style: { top: e2.parent.offset.value + "px" }, overlayStyle: { top: e2.parent.offset.value + "px" } }, e2.$attrs, { visible: e2.state.showPopup, "onUpdate:visible": o2[1] || (o2[1] = (o3) => e2.state.showPopup = o3), position: "top", duration: e2.parent.props.duration, "pop-class": "nut-menu__pop", overlayClass: "nut-menu__overlay", overlay: e2.parent.props.overlay, onClosed: e2.handleClose, isWrapTeleport: false, "close-on-click-overlay": e2.parent.props.closeOnClickOverlay }), { default: h(() => [i("view", j, [(n(true), p(v, null, y(e2.options, (o3, l3) => (n(), p("view", { key: l3, class: r(["nut-menu-item__option", { active: o3.value === e2.modelValue }]), style: u({ "flex-basis": 100 / e2.cols + "%" }), onClick: (l4) => e2.onClick(o3) }, [o3.value === e2.modelValue ? (n(), f(g2, { key: 0, name: "Check", color: e2.parent.props.activeColor }, null, 8, ["color"])) : w("", true), i("view", { style: u({ color: o3.value === e2.modelValue ? e2.parent.props.activeColor : "" }) }, C(o3.text), 5)], 14, O))), 128)), k(e2.$slots, "default")])]), _: 3 }, 16, ["style", "overlayStyle", "visible", "duration", "overlay", "onClosed", "close-on-click-overlay"])], 2)), [[c, e2.state.showWrapper]]);
|
|
41
|
+
}]]);
|
|
42
|
+
export { E as default };
|
|
@@ -1,100 +1,36 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { toRefs, computed, resolveComponent, openBlock, createElementBlock, normalizeClass,
|
|
7
|
-
import { c as
|
|
8
|
-
import { _ as
|
|
6
|
+
import { toRefs as e, ref as t, computed as l, onMounted as n, nextTick as a, resolveComponent as o, openBlock as i, createElementBlock as c, createElementVNode as s, normalizeClass as r, normalizeStyle as d, createBlock as u, createCommentVNode as f, toDisplayString as v, renderSlot as h } from "vue";
|
|
7
|
+
import { c as p } from "./component.js";
|
|
8
|
+
import { _ as k } from "./plugin-vue_export-helper.js";
|
|
9
9
|
import "../locale/lang";
|
|
10
|
-
const { componentName, create } =
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
safeAreaInsetTop: {
|
|
22
|
-
type: Boolean,
|
|
23
|
-
default: false
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
emits: ["on-click-back", "on-click-title", "on-click-icon", "on-click-right"],
|
|
27
|
-
setup(props, { emit }) {
|
|
28
|
-
const { fixed, safeAreaInsetTop } = toRefs(props);
|
|
29
|
-
const classes = computed(() => {
|
|
30
|
-
const prefixCls = componentName;
|
|
31
|
-
return {
|
|
32
|
-
[prefixCls]: true,
|
|
33
|
-
[`${prefixCls}--fixed`]: fixed.value,
|
|
34
|
-
[`${prefixCls}--safe-area-inset-top`]: safeAreaInsetTop.value
|
|
35
|
-
};
|
|
10
|
+
const { componentName: y, create: g } = p("navbar"), _ = g({ props: { leftShow: { type: Boolean, default: true }, title: { type: String, default: "" }, titIcon: { type: String, default: "" }, leftText: { type: String, default: "" }, desc: { type: String, default: "" }, fixed: { type: Boolean, default: false }, safeAreaInsetTop: { type: Boolean, default: false }, border: { type: Boolean, default: false }, placeholder: { type: Boolean, default: true }, zIndex: { type: [Number, String], default: 10 } }, emits: ["on-click-back", "on-click-title", "on-click-icon", "on-click-right"], setup(o2, { emit: i2 }) {
|
|
11
|
+
const { border: c2, fixed: s2, safeAreaInsetTop: r2, placeholder: d2, zIndex: u2 } = e(o2), f2 = t(null), v2 = t(null);
|
|
12
|
+
let h2 = t(0);
|
|
13
|
+
const p2 = l(() => {
|
|
14
|
+
const e2 = y;
|
|
15
|
+
return { [e2]: true, [`${e2}--border`]: c2.value, [`${e2}--fixed`]: s2.value, [`${e2}--safe-area-inset-top`]: r2.value };
|
|
16
|
+
}), k2 = l(() => ({ zIndex: u2.value }));
|
|
17
|
+
return n(() => {
|
|
18
|
+
s2.value && d2.value && a(() => {
|
|
19
|
+
var _a;
|
|
20
|
+
h2 = (_a = v2 == null ? void 0 : v2.value) == null ? void 0 : _a.getBoundingClientRect().height, f2.value.style.height = h2 + "px";
|
|
36
21
|
});
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
handleCenter,
|
|
53
|
-
handleCenterIcon,
|
|
54
|
-
handleRight
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
const _hoisted_1 = { class: "nut-navbar__left" };
|
|
59
|
-
const _hoisted_2 = { class: "nut-navbar__title" };
|
|
60
|
-
const _hoisted_3 = { class: "nut-navbar__right" };
|
|
61
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
62
|
-
const _component_nut_icon = resolveComponent("nut-icon");
|
|
63
|
-
return openBlock(), createElementBlock("view", {
|
|
64
|
-
class: normalizeClass(_ctx.classes)
|
|
65
|
-
}, [
|
|
66
|
-
createElementVNode("view", _hoisted_1, [
|
|
67
|
-
_ctx.leftShow ? (openBlock(), createBlock(_component_nut_icon, {
|
|
68
|
-
key: 0,
|
|
69
|
-
color: "#979797",
|
|
70
|
-
name: "left",
|
|
71
|
-
onClick: _ctx.handleLeft
|
|
72
|
-
}, null, 8, ["onClick"])) : createCommentVNode("", true),
|
|
73
|
-
renderSlot(_ctx.$slots, "left")
|
|
74
|
-
]),
|
|
75
|
-
createElementVNode("view", _hoisted_2, [
|
|
76
|
-
_ctx.title ? (openBlock(), createElementBlock("view", {
|
|
77
|
-
key: 0,
|
|
78
|
-
class: "title",
|
|
79
|
-
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleCenter && _ctx.handleCenter(...args))
|
|
80
|
-
}, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
|
|
81
|
-
_ctx.titIcon ? (openBlock(), createBlock(_component_nut_icon, {
|
|
82
|
-
key: 1,
|
|
83
|
-
class: "icon",
|
|
84
|
-
name: _ctx.titIcon,
|
|
85
|
-
onClick: _ctx.handleCenterIcon
|
|
86
|
-
}, null, 8, ["name", "onClick"])) : createCommentVNode("", true),
|
|
87
|
-
renderSlot(_ctx.$slots, "content")
|
|
88
|
-
]),
|
|
89
|
-
createElementVNode("view", _hoisted_3, [
|
|
90
|
-
_ctx.desc ? (openBlock(), createElementBlock("view", {
|
|
91
|
-
key: 0,
|
|
92
|
-
class: "right_text",
|
|
93
|
-
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.handleRight && _ctx.handleRight(...args))
|
|
94
|
-
}, toDisplayString(_ctx.desc), 1)) : createCommentVNode("", true),
|
|
95
|
-
renderSlot(_ctx.$slots, "right")
|
|
96
|
-
])
|
|
97
|
-
], 2);
|
|
98
|
-
}
|
|
99
|
-
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
100
|
-
export { index as default };
|
|
22
|
+
}), { navBarWrap: f2, navBarHtml: v2, classes: p2, styles: k2, handleLeft: function() {
|
|
23
|
+
i2("on-click-back");
|
|
24
|
+
}, handleCenter: function() {
|
|
25
|
+
i2("on-click-title");
|
|
26
|
+
}, handleCenterIcon: function() {
|
|
27
|
+
i2("on-click-icon");
|
|
28
|
+
}, handleRight: function() {
|
|
29
|
+
i2("on-click-right");
|
|
30
|
+
} };
|
|
31
|
+
} }), m = { key: 0, class: "nut-navbar--placeholder", ref: "navBarWrap" }, x = { key: 1, class: "nut-navbar__text" }, C = { class: "nut-navbar__title" }, b = { key: 0, class: "nut-navbar__text" }, w = { key: 1, class: "nut-navbar__text" }, I = { class: "nut-navbar__title" }, B = { key: 0, class: "nut-navbar__text" };
|
|
32
|
+
var $ = k(_, [["render", function(e2, t2, l2, n2, a2, p2) {
|
|
33
|
+
const k2 = o("nut-icon");
|
|
34
|
+
return e2.fixed && e2.placeholder ? (i(), c("view", m, [s("view", { class: r(e2.classes), style: d(e2.styles), ref: "navBarHtml" }, [s("view", { class: "nut-navbar__left", onClick: t2[0] || (t2[0] = (...t3) => e2.handleLeft && e2.handleLeft(...t3)) }, [e2.leftShow ? (i(), u(k2, { key: 0, color: "#979797", name: "left" })) : f("", true), e2.leftText ? (i(), c("view", x, v(e2.leftText), 1)) : f("", true), h(e2.$slots, "left")]), s("view", C, [e2.title ? (i(), c("view", { key: 0, class: "title", onClick: t2[1] || (t2[1] = (...t3) => e2.handleCenter && e2.handleCenter(...t3)) }, v(e2.title), 1)) : f("", true), e2.titIcon ? (i(), u(k2, { key: 1, class: "icon", name: e2.titIcon, onClick: e2.handleCenterIcon }, null, 8, ["name", "onClick"])) : f("", true), h(e2.$slots, "content")]), s("view", { class: "nut-navbar__right", onClick: t2[2] || (t2[2] = (...t3) => e2.handleRight && e2.handleRight(...t3)) }, [e2.desc ? (i(), c("view", b, v(e2.desc), 1)) : f("", true), h(e2.$slots, "right")])], 6)], 512)) : (i(), c("view", { key: 1, class: r(e2.classes), style: d(e2.styles) }, [s("view", { class: "nut-navbar__left", onClick: t2[3] || (t2[3] = (...t3) => e2.handleLeft && e2.handleLeft(...t3)) }, [e2.leftShow ? (i(), u(k2, { key: 0, color: "#979797", name: "left" })) : f("", true), e2.leftText ? (i(), c("view", w, v(e2.leftText), 1)) : f("", true), h(e2.$slots, "left")]), s("view", I, [e2.title ? (i(), c("view", { key: 0, class: "title", onClick: t2[4] || (t2[4] = (...t3) => e2.handleCenter && e2.handleCenter(...t3)) }, v(e2.title), 1)) : f("", true), e2.titIcon ? (i(), u(k2, { key: 1, class: "icon", name: e2.titIcon, onClick: e2.handleCenterIcon }, null, 8, ["name", "onClick"])) : f("", true), h(e2.$slots, "content")]), s("view", { class: "nut-navbar__right", onClick: t2[5] || (t2[5] = (...t3) => e2.handleRight && e2.handleRight(...t3)) }, [e2.desc ? (i(), c("view", B, v(e2.desc), 1)) : f("", true), h(e2.$slots, "right")])], 6));
|
|
35
|
+
}]]);
|
|
36
|
+
export { $ as default };
|