@nutui/nutui 3.2.2 → 3.2.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 +53 -0
- package/dist/nutui.es.js +2127 -1414
- package/dist/nutui.umd.js +2136 -1422
- package/dist/packages/_es/ActionSheet.js +4 -22
- package/dist/packages/_es/Address.js +63 -57
- package/dist/packages/_es/AddressList.js +12 -9
- package/dist/packages/_es/Animate.js +2 -21
- package/dist/packages/_es/Audio.js +11 -25
- package/dist/packages/_es/AudioOperate.js +3 -23
- package/dist/packages/_es/Avatar.js +6 -21
- package/dist/packages/_es/AvatarGroup.js +1 -1
- package/dist/packages/_es/BackTop.js +1 -1
- package/dist/packages/_es/Badge.js +1 -1
- package/dist/packages/_es/Barrage.js +74 -22
- package/dist/packages/_es/Button.js +1 -1
- package/dist/packages/_es/Calendar.js +17 -9
- package/dist/packages/_es/CalendarItem.js +1 -1
- package/dist/packages/_es/Card.js +1 -1
- package/dist/packages/_es/Cascader.js +72 -68
- package/dist/packages/_es/Category.js +1 -1
- package/dist/packages/_es/CategoryPane.js +1 -1
- package/dist/packages/_es/Cell.js +1 -1
- package/dist/packages/_es/CellGroup.js +1 -1
- package/dist/packages/_es/Checkbox.js +31 -17
- package/dist/packages/_es/CheckboxGroup.js +14 -7
- package/dist/packages/_es/CircleProgress.js +4 -4
- package/dist/packages/_es/Col.js +1 -1
- package/dist/packages/_es/Collapse.js +22 -19
- package/dist/packages/_es/CollapseItem.js +18 -32
- package/dist/packages/_es/Comment.js +13 -9
- package/dist/packages/_es/ConfigProvider.js +8 -4
- package/dist/packages/_es/CountDown.js +40 -46
- package/dist/packages/_es/CountUp.js +41 -40
- package/dist/packages/_es/DatePicker.js +25 -33
- package/dist/packages/_es/Dialog.js +13 -28
- package/dist/packages/_es/Divider.js +7 -24
- package/dist/packages/_es/Drag.js +2 -2
- package/dist/packages/_es/Ecard.js +8 -5
- package/dist/packages/_es/Elevator.js +27 -39
- package/dist/packages/_es/Ellipsis.js +14 -28
- package/dist/packages/_es/Empty.js +1 -1
- package/dist/packages/_es/FixedNav.js +1 -1
- package/dist/packages/_es/Form.js +23 -12
- package/dist/packages/_es/FormItem.js +1 -1
- package/dist/packages/_es/Grid.js +1 -1
- package/dist/packages/_es/GridItem.js +1 -1
- package/dist/packages/_es/Icon.js +15 -11
- package/dist/packages/_es/Image.js +8 -24
- package/dist/packages/_es/ImagePreview.js +34 -48
- package/dist/packages/_es/Indicator.js +1 -1
- package/dist/packages/_es/InfiniteLoading.js +5 -24
- package/dist/packages/_es/Input.js +8 -5
- package/dist/packages/_es/InputNumber.js +1 -1
- package/dist/packages/_es/Invoice.js +10 -25
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/List.js +21 -30
- package/dist/packages/_es/Menu.js +13 -7
- package/dist/packages/_es/MenuItem.js +2 -21
- package/dist/packages/_es/Navbar.js +1 -1
- package/dist/packages/_es/NoticeBar.js +18 -29
- package/dist/packages/_es/Notify.js +16 -32
- package/dist/packages/_es/NumberKeyboard.js +23 -18
- package/dist/packages/_es/OldPicker.js +47 -46
- package/dist/packages/_es/OverLay.js +11 -23
- package/dist/packages/_es/Pagination.js +6 -6
- package/dist/packages/_es/Picker.js +66 -59
- package/dist/packages/_es/Popover.js +55 -52
- package/dist/packages/_es/Popup.js +35 -40
- package/dist/packages/_es/Price.js +1 -1
- package/dist/packages/_es/Progress.js +2 -2
- package/dist/packages/_es/PullRefresh.js +5 -20
- package/dist/packages/_es/Radio.js +25 -13
- package/dist/packages/_es/RadioGroup.js +12 -5
- package/dist/packages/_es/Range.js +20 -33
- package/dist/packages/_es/Rate.js +6 -24
- package/dist/packages/_es/Row.js +1 -1
- package/dist/packages/_es/SearchBar.js +6 -25
- package/dist/packages/_es/ShortPassword.js +18 -11
- package/dist/packages/_es/SideNavBar.js +6 -24
- package/dist/packages/_es/SideNavBarItem.js +1 -1
- package/dist/packages/_es/Signature.js +2 -21
- package/dist/packages/_es/Skeleton.js +1 -1
- package/dist/packages/_es/Sku.js +30 -35
- package/dist/packages/_es/Step.js +4 -22
- package/dist/packages/_es/Steps.js +8 -4
- package/dist/packages/_es/Sticky.js +23 -12
- package/dist/packages/_es/SubSideNavBar.js +4 -22
- package/dist/packages/_es/Swipe.js +5 -24
- package/dist/packages/_es/Swiper.js +23 -14
- package/dist/packages/_es/SwiperItem.js +1 -1
- package/dist/packages/_es/Switch.js +10 -7
- package/dist/packages/_es/TabPane.js +1 -1
- package/dist/packages/_es/Tabbar.js +7 -4
- package/dist/packages/_es/TabbarItem.js +1 -1
- package/dist/packages/_es/Table.js +10 -25
- package/dist/packages/_es/Tabs.js +99 -34
- package/dist/packages/_es/Tag.js +1 -2
- package/dist/packages/_es/TextArea.js +8 -5
- package/dist/packages/_es/TimeDetail.js +5 -24
- package/dist/packages/_es/TimePannel.js +4 -22
- package/dist/packages/_es/TimeSelect.js +1 -1
- package/dist/packages/_es/Toast.js +19 -35
- package/dist/packages/_es/TrendArrow.js +131 -0
- package/dist/packages/_es/Uploader.js +40 -34
- package/dist/packages/_es/Video.js +22 -33
- package/dist/packages/_es/WaterMark.js +31 -41
- package/dist/packages/_es/common.js +21 -11
- package/dist/packages/_es/component.js +13 -6
- package/dist/packages/_es/index.js +1 -1
- package/dist/packages/_es/index2.js +1 -1
- package/dist/packages/_es/index3.js +1 -1
- package/dist/packages/_es/index4.js +1 -1
- package/dist/packages/_es/index5.js +39 -41
- package/dist/packages/_es/plugin-vue_export-helper.js +1 -1
- package/dist/packages/_es/pxCheck.js +1 -1
- package/dist/packages/_es/raf.js +1 -1
- package/dist/packages/_es/style.css +16 -1
- package/dist/packages/barrage/index.scss +27 -18
- package/dist/packages/list/index.scss +0 -1
- package/dist/packages/locale/lang/baseLang.js +1 -1
- package/dist/packages/locale/lang/en-US.js +1 -1
- package/dist/packages/locale/lang/id-ID.js +1 -1
- package/dist/packages/locale/lang/index.js +1 -1
- package/dist/packages/locale/lang/zh-CN.js +1 -1
- package/dist/packages/locale/lang/zh-TW.js +1 -1
- package/dist/packages/picker/index.scss +14 -0
- package/dist/packages/tabbar/index.scss +2 -1
- package/dist/packages/trendarrow/index.scss +17 -0
- package/dist/smartips/attributes.json +70 -10
- package/dist/smartips/tags.json +26 -7
- package/dist/smartips/web-types.json +153 -11
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/font/config.json +3 -1
- package/dist/styles/font/demo_index.html +51 -5
- package/dist/styles/font/iconfont.css +11 -3
- package/dist/styles/font/iconfont.js +64 -61
- package/dist/styles/font/iconfont.json +14 -0
- 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/themes/default.scss +48 -47
- package/dist/styles/themes/jdb.scss +48 -47
- package/dist/styles/themes/jdt.scss +48 -47
- package/dist/styles/variables-jdb.scss +4 -1
- package/dist/styles/variables-jdt.scss +4 -1
- package/dist/styles/variables.scss +4 -1
- package/dist/types/__VUE/actionsheet/index.vue.d.ts +117 -63
- package/dist/types/__VUE/address/index.vue.d.ts +150 -80
- package/dist/types/__VUE/addresslist/components/GeneralShell.vue.d.ts +6 -5
- package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +10 -7
- package/dist/types/__VUE/addresslist/components/LongPressShell.vue.d.ts +6 -5
- package/dist/types/__VUE/addresslist/components/SwipeShell.vue.d.ts +6 -5
- package/dist/types/__VUE/addresslist/index.vue.d.ts +22 -13
- package/dist/types/__VUE/animate/index.vue.d.ts +14 -9
- package/dist/types/__VUE/audio/index.vue.d.ts +30 -17
- package/dist/types/__VUE/audiooperate/index.vue.d.ts +6 -5
- package/dist/types/__VUE/avatar/index.vue.d.ts +34 -21
- package/dist/types/__VUE/avatargroup/index.vue.d.ts +34 -19
- package/dist/types/__VUE/backtop/index.vue.d.ts +31 -18
- package/dist/types/__VUE/badge/index.vue.d.ts +33 -20
- package/dist/types/__VUE/barrage/index.vue.d.ts +28 -16
- package/dist/types/__VUE/button/index.vue.d.ts +44 -27
- package/dist/types/__VUE/calendar/index.vue.d.ts +62 -35
- package/dist/types/__VUE/calendaritem/index.vue.d.ts +72 -45
- package/dist/types/__VUE/card/index.vue.d.ts +34 -19
- package/dist/types/__VUE/cascader/cascader-item.vue.d.ts +25 -24
- package/dist/types/__VUE/cascader/index.vue.d.ts +109 -64
- package/dist/types/__VUE/category/index.vue.d.ts +10 -7
- package/dist/types/__VUE/categorypane/index.vue.d.ts +14 -9
- package/dist/types/__VUE/cell/index.vue.d.ts +55 -34
- package/dist/types/__VUE/cellgroup/index.vue.d.ts +10 -7
- package/dist/types/__VUE/checkbox/index.vue.d.ts +47 -26
- package/dist/types/__VUE/checkboxgroup/index.vue.d.ts +14 -9
- package/dist/types/__VUE/circleprogress/index.vue.d.ts +30 -17
- package/dist/types/__VUE/col/index.vue.d.ts +10 -7
- package/dist/types/__VUE/collapse/index.vue.d.ts +40 -24
- package/dist/types/__VUE/collapseitem/index.vue.d.ts +29 -21
- package/dist/types/__VUE/comment/components/CmtBottom.vue.d.ts +14 -9
- package/dist/types/__VUE/comment/components/CmtHeader.vue.d.ts +14 -9
- package/dist/types/__VUE/comment/components/CmtImages.vue.d.ts +14 -9
- package/dist/types/__VUE/comment/index.vue.d.ts +38 -21
- package/dist/types/__VUE/configprovider/index.vue.d.ts +10 -7
- package/dist/types/__VUE/countdown/index.vue.d.ts +34 -20
- package/dist/types/__VUE/countdown/util.d.ts +1 -1
- package/dist/types/__VUE/countup/index.vue.d.ts +73 -40
- package/dist/types/__VUE/datepicker/index.vue.d.ts +132 -71
- package/dist/types/__VUE/dialog/index.vue.d.ts +136 -74
- package/dist/types/__VUE/divider/index.vue.d.ts +18 -11
- package/dist/types/__VUE/drag/index.vue.d.ts +19 -9
- package/dist/types/__VUE/ecard/index.vue.d.ts +42 -23
- package/dist/types/__VUE/elevator/index.vue.d.ts +26 -15
- package/dist/types/__VUE/ellipsis/index.vue.d.ts +26 -15
- package/dist/types/__VUE/empty/index.vue.d.ts +14 -9
- package/dist/types/__VUE/fixednav/index.vue.d.ts +39 -21
- package/dist/types/__VUE/form/common.d.ts +4 -0
- package/dist/types/__VUE/form/index.vue.d.ts +16 -6
- package/dist/types/__VUE/formitem/index.vue.d.ts +42 -23
- package/dist/types/__VUE/grid/index.vue.d.ts +40 -24
- package/dist/types/__VUE/griditem/index.vue.d.ts +25 -18
- package/dist/types/__VUE/icon/index.vue.d.ts +26 -15
- package/dist/types/__VUE/image/index.vue.d.ts +37 -25
- package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +42 -29
- package/dist/types/__VUE/imagepreview/index.d.ts +4 -4
- package/dist/types/__VUE/imagepreview/index.vue.d.ts +64 -37
- package/dist/types/__VUE/indicator/index.vue.d.ts +24 -13
- package/dist/types/__VUE/infiniteloading/index.vue.d.ts +46 -25
- package/dist/types/__VUE/input/index.vue.d.ts +133 -70
- package/dist/types/__VUE/inputnumber/index.vue.d.ts +46 -25
- package/dist/types/__VUE/invoice/index.vue.d.ts +14 -9
- package/dist/types/__VUE/layout/index.vue.d.ts +1 -1
- package/dist/types/__VUE/list/index.vue.d.ts +15 -9
- package/dist/types/__VUE/menu/index.vue.d.ts +32 -22
- package/dist/types/__VUE/menuitem/index.vue.d.ts +22 -20
- package/dist/types/__VUE/navbar/index.vue.d.ts +42 -23
- package/dist/types/__VUE/noticebar/index.vue.d.ts +65 -36
- package/dist/types/__VUE/notify/index.vue.d.ts +42 -30
- package/dist/types/__VUE/numberkeyboard/index.vue.d.ts +65 -36
- package/dist/types/__VUE/oldpicker/Column.vue.d.ts +20 -15
- package/dist/types/__VUE/oldpicker/index.vue.d.ts +124 -71
- package/dist/types/__VUE/overlay/index.vue.d.ts +30 -1547
- package/dist/types/__VUE/pagination/index.vue.d.ts +42 -25
- package/dist/types/__VUE/picker/Column.vue.d.ts +25 -19
- package/dist/types/__VUE/picker/index.vue.d.ts +137 -79
- package/dist/types/__VUE/popover/index.vue.d.ts +107 -59
- package/dist/types/__VUE/popup/index.vue.d.ts +92 -62
- package/dist/types/__VUE/price/index.vue.d.ts +30 -17
- package/dist/types/__VUE/progress/index.vue.d.ts +51 -27
- package/dist/types/__VUE/pullrefresh/index.vue.d.ts +45 -17
- package/dist/types/__VUE/radio/index.vue.d.ts +34 -19
- package/dist/types/__VUE/radiogroup/index.vue.d.ts +14 -9
- package/dist/types/__VUE/range/index.vue.d.ts +46 -34
- package/dist/types/__VUE/rate/index.vue.d.ts +59 -32
- package/dist/types/__VUE/row/index.vue.d.ts +22 -13
- package/dist/types/__VUE/searchbar/index.vue.d.ts +58 -31
- package/dist/types/__VUE/shortpassword/index.vue.d.ts +42 -23
- package/dist/types/__VUE/sidenavbar/index.vue.d.ts +6 -5
- package/dist/types/__VUE/sidenavbaritem/index.vue.d.ts +10 -7
- package/dist/types/__VUE/signature/index.vue.d.ts +22 -13
- package/dist/types/__VUE/skeleton/common.d.ts +1 -1
- package/dist/types/__VUE/skeleton/index.vue.d.ts +43 -24
- package/dist/types/__VUE/sku/components/SkuHeader.vue.d.ts +6 -5
- package/dist/types/__VUE/sku/components/SkuOperate.vue.d.ts +22 -13
- package/dist/types/__VUE/sku/components/SkuSelect.vue.d.ts +6 -5
- package/dist/types/__VUE/sku/components/SkuStepper.vue.d.ts +18 -11
- package/dist/types/__VUE/sku/index.vue.d.ts +125 -67
- package/dist/types/__VUE/step/index.vue.d.ts +24 -15
- package/dist/types/__VUE/steps/index.vue.d.ts +14 -9
- package/dist/types/__VUE/sticky/index.vue.d.ts +21 -14
- package/dist/types/__VUE/subsidenavbar/index.vue.d.ts +14 -9
- package/dist/types/__VUE/swipe/index.vue.d.ts +19 -12
- package/dist/types/__VUE/swiper/index.vue.d.ts +54 -29
- package/dist/types/__VUE/swiperitem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/switch/index.vue.d.ts +50 -27
- package/dist/types/__VUE/tabbar/index.vue.d.ts +31 -18
- package/dist/types/__VUE/tabbaritem/index.vue.d.ts +42 -26
- package/dist/types/__VUE/table/common.d.ts +1 -1
- package/dist/types/__VUE/table/index.vue.d.ts +24 -15
- package/dist/types/__VUE/tabpane/index.vue.d.ts +14 -9
- package/dist/types/__VUE/tabs/common.d.ts +13 -0
- package/dist/types/__VUE/tabs/index.vue.d.ts +70 -26
- package/dist/types/__VUE/tag/index.vue.d.ts +30 -17
- package/dist/types/__VUE/textarea/index.vue.d.ts +43 -24
- package/dist/types/__VUE/timedetail/index.vue.d.ts +10 -7
- package/dist/types/__VUE/timepannel/index.vue.d.ts +10 -7
- package/dist/types/__VUE/timeselect/index.vue.d.ts +31 -18
- package/dist/types/__VUE/toast/index.d.ts +1 -1
- package/dist/types/__VUE/toast/index.vue.d.ts +58 -43
- package/dist/types/__VUE/trendarrow/index.vue.d.ts +138 -0
- package/dist/types/__VUE/uploader/index.vue.d.ts +108 -59
- package/dist/types/__VUE/video/index.vue.d.ts +27 -10
- package/dist/types/__VUE/watermark/index.vue.d.ts +70 -37
- package/dist/types/index.d.ts +1 -1
- package/dist/types/nutui.d.ts +2 -1
- package/package.json +4 -4
- package/dist/types/__VUE/animate/type.d.ts +0 -6
- package/dist/types/__VUE/button/type.d.ts +0 -7
- package/dist/types/__VUE/cascader/types.d.ts +0 -30
- package/dist/types/__VUE/datepicker/type.d.ts +0 -6
- package/dist/types/__VUE/form/types.d.ts +0 -13
- package/dist/types/__VUE/formitem/types.d.ts +0 -10
- package/dist/types/__VUE/image/type.d.ts +0 -6
- package/dist/types/__VUE/imagepreview/types.d.ts +0 -7
- package/dist/types/__VUE/input/type.d.ts +0 -13
- package/dist/types/__VUE/menuitem/type.d.ts +0 -8
- package/dist/types/__VUE/oldpicker/commonProps.d.ts +0 -22
- package/dist/types/__VUE/oldpicker/types.d.ts +0 -24
- package/dist/types/__VUE/picker/types.d.ts +0 -26
- package/dist/types/__VUE/popover/type.d.ts +0 -6
- package/dist/types/__VUE/range/type.d.ts +0 -5
- package/dist/types/__VUE/table/types.d.ts +0 -21
- package/dist/types/__VUE/tag/type.d.ts +0 -5
|
@@ -1,24 +1,5 @@
|
|
|
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
1
|
/*!
|
|
21
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.3 Fri Sep 30 2022 10:26:47 GMT+0800 (中国标准时间)
|
|
22
3
|
* (c) 2022 @jdf2e.
|
|
23
4
|
* Released under the MIT License.
|
|
24
5
|
*/
|
|
@@ -163,15 +144,15 @@ const _sfc_main = create({
|
|
|
163
144
|
}
|
|
164
145
|
}
|
|
165
146
|
};
|
|
166
|
-
return
|
|
147
|
+
return {
|
|
167
148
|
classes,
|
|
168
|
-
touchStyle
|
|
169
|
-
|
|
149
|
+
touchStyle,
|
|
150
|
+
...touchMethods,
|
|
170
151
|
leftRef,
|
|
171
152
|
rightRef,
|
|
172
153
|
open,
|
|
173
154
|
close
|
|
174
|
-
}
|
|
155
|
+
};
|
|
175
156
|
}
|
|
176
157
|
});
|
|
177
158
|
const _hoisted_1 = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.3 Fri Sep 30 2022 10:26:47 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -391,19 +391,28 @@ const _sfc_main = create({
|
|
|
391
391
|
onBeforeUnmount(() => {
|
|
392
392
|
stopAutoPlay();
|
|
393
393
|
});
|
|
394
|
-
watch(
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
394
|
+
watch(
|
|
395
|
+
() => props.initPage,
|
|
396
|
+
(val) => {
|
|
397
|
+
nextTick(() => {
|
|
398
|
+
init(Number(val));
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
);
|
|
402
|
+
watch(
|
|
403
|
+
() => state.children.length,
|
|
404
|
+
() => {
|
|
405
|
+
nextTick(() => {
|
|
406
|
+
init();
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
);
|
|
410
|
+
watch(
|
|
411
|
+
() => props.autoPlay,
|
|
412
|
+
(val) => {
|
|
413
|
+
val > 0 ? autoplay() : stopAutoPlay();
|
|
414
|
+
}
|
|
415
|
+
);
|
|
407
416
|
return {
|
|
408
417
|
state,
|
|
409
418
|
classes,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.3 Fri Sep 30 2022 10:26:47 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -85,13 +85,16 @@ const _sfc_main = create({
|
|
|
85
85
|
emit("update:modelValue", value);
|
|
86
86
|
emit("change", value, event);
|
|
87
87
|
};
|
|
88
|
-
watch(
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
88
|
+
watch(
|
|
89
|
+
() => props.modelValue,
|
|
90
|
+
(v) => {
|
|
91
|
+
if (updateType == "click") {
|
|
92
|
+
updateType = "";
|
|
93
|
+
} else {
|
|
94
|
+
emit("change", v);
|
|
95
|
+
}
|
|
93
96
|
}
|
|
94
|
-
|
|
97
|
+
);
|
|
95
98
|
return {
|
|
96
99
|
classes,
|
|
97
100
|
style,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.3 Fri Sep 30 2022 10:26:47 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -59,9 +59,12 @@ const _sfc_main = create({
|
|
|
59
59
|
changeIndex
|
|
60
60
|
});
|
|
61
61
|
provide("parent", parentData);
|
|
62
|
-
watch(
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
watch(
|
|
63
|
+
() => props.visible,
|
|
64
|
+
(value) => {
|
|
65
|
+
parentData.modelValue = value;
|
|
66
|
+
}
|
|
67
|
+
);
|
|
65
68
|
return {
|
|
66
69
|
changeIndex
|
|
67
70
|
};
|
|
@@ -1,24 +1,5 @@
|
|
|
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
1
|
/*!
|
|
21
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.3 Fri Sep 30 2022 10:26:47 GMT+0800 (中国标准时间)
|
|
22
3
|
* (c) 2022 @jdf2e.
|
|
23
4
|
* Released under the MIT License.
|
|
24
5
|
*/
|
|
@@ -107,10 +88,14 @@ const component = (componentName2, translate2) => {
|
|
|
107
88
|
return [columns.key, columns.render];
|
|
108
89
|
});
|
|
109
90
|
};
|
|
110
|
-
watch(
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
91
|
+
watch(
|
|
92
|
+
() => props.data,
|
|
93
|
+
(val) => {
|
|
94
|
+
state.curData = val.slice();
|
|
95
|
+
}
|
|
96
|
+
);
|
|
97
|
+
return {
|
|
98
|
+
...toRefs(state),
|
|
114
99
|
classes,
|
|
115
100
|
cellClasses,
|
|
116
101
|
getColumnItem,
|
|
@@ -120,7 +105,7 @@ const component = (componentName2, translate2) => {
|
|
|
120
105
|
translate: translate2,
|
|
121
106
|
stylehead,
|
|
122
107
|
stylecolumn
|
|
123
|
-
}
|
|
108
|
+
};
|
|
124
109
|
}
|
|
125
110
|
};
|
|
126
111
|
};
|
|
@@ -1,27 +1,12 @@
|
|
|
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
1
|
/*!
|
|
18
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.3 Fri Sep 30 2022 10:26:47 GMT+0800 (中国标准时间)
|
|
19
3
|
* (c) 2022 @jdf2e.
|
|
20
4
|
* Released under the MIT License.
|
|
21
5
|
*/
|
|
22
6
|
import { T as TypeOfFun, c as createComponent } from "./component.js";
|
|
23
7
|
import { p as pxCheck } from "./pxCheck.js";
|
|
24
|
-
import {
|
|
8
|
+
import { u as useRect } from "./index2.js";
|
|
9
|
+
import { ref, provide, computed, watch, onMounted, onActivated, resolveComponent, openBlock, createElementBlock, normalizeClass, createBlock, withCtx, createElementVNode, normalizeStyle, renderSlot, Fragment, renderList, createCommentVNode, createVNode, toDisplayString } from "vue";
|
|
25
10
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
26
11
|
import "../locale/lang";
|
|
27
12
|
class Title {
|
|
@@ -76,11 +61,21 @@ const component = {
|
|
|
76
61
|
titleGutter: {
|
|
77
62
|
type: [Number, String],
|
|
78
63
|
default: 0
|
|
64
|
+
},
|
|
65
|
+
sticky: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
default: false
|
|
68
|
+
},
|
|
69
|
+
top: {
|
|
70
|
+
type: Number,
|
|
71
|
+
default: 0
|
|
79
72
|
}
|
|
80
73
|
},
|
|
81
74
|
components: {},
|
|
82
75
|
emits: ["update:modelValue", "click", "change"],
|
|
83
76
|
setup(props, { emit, slots }) {
|
|
77
|
+
const container = ref(null);
|
|
78
|
+
let stickyFixed;
|
|
84
79
|
provide("activeKey", { activeKey: computed(() => props.modelValue) });
|
|
85
80
|
provide("autoHeight", { autoHeight: computed(() => props.autoHeight) });
|
|
86
81
|
const titles = ref([]);
|
|
@@ -122,20 +117,41 @@ const component = {
|
|
|
122
117
|
};
|
|
123
118
|
const init = (vnodes = ((_a) => (_a = slots.default) == null ? void 0 : _a.call(slots))()) => {
|
|
124
119
|
titles.value = [];
|
|
120
|
+
vnodes = vnodes == null ? void 0 : vnodes.filter((item) => typeof item.children !== "string");
|
|
125
121
|
if (vnodes && vnodes.length) {
|
|
126
122
|
renderTitles(vnodes);
|
|
127
123
|
}
|
|
128
124
|
findTabsIndex(props.modelValue);
|
|
129
125
|
};
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
126
|
+
const onStickyScroll = (params) => {
|
|
127
|
+
stickyFixed = params.fixed;
|
|
128
|
+
};
|
|
129
|
+
watch(
|
|
130
|
+
() => {
|
|
131
|
+
var _a;
|
|
132
|
+
return (_a = slots.default) == null ? void 0 : _a.call(slots);
|
|
133
|
+
},
|
|
134
|
+
(vnodes) => {
|
|
135
|
+
init(vnodes);
|
|
136
|
+
}
|
|
137
|
+
);
|
|
138
|
+
const getScrollTopRoot = () => {
|
|
139
|
+
return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
|
|
140
|
+
};
|
|
141
|
+
watch(
|
|
142
|
+
() => props.modelValue,
|
|
143
|
+
(value) => {
|
|
144
|
+
findTabsIndex(value);
|
|
145
|
+
if (stickyFixed) {
|
|
146
|
+
let top = useRect(container.value).top + getScrollTopRoot();
|
|
147
|
+
let value2 = Math.ceil(top - props.top);
|
|
148
|
+
window.scrollTo({
|
|
149
|
+
top: value2,
|
|
150
|
+
behavior: "smooth"
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
);
|
|
139
155
|
onMounted(init);
|
|
140
156
|
onActivated(init);
|
|
141
157
|
const contentStyle = computed(() => {
|
|
@@ -172,22 +188,71 @@ const component = {
|
|
|
172
188
|
emit("change", item);
|
|
173
189
|
}
|
|
174
190
|
};
|
|
175
|
-
return
|
|
191
|
+
return {
|
|
176
192
|
titles,
|
|
177
193
|
contentStyle,
|
|
178
194
|
tabsNavStyle,
|
|
179
195
|
titleStyle,
|
|
180
|
-
tabsActiveStyle
|
|
181
|
-
|
|
196
|
+
tabsActiveStyle,
|
|
197
|
+
container,
|
|
198
|
+
onStickyScroll,
|
|
199
|
+
...methods
|
|
200
|
+
};
|
|
182
201
|
}
|
|
183
202
|
};
|
|
184
203
|
const _hoisted_1 = ["onClick"];
|
|
204
|
+
const _hoisted_2 = ["onClick"];
|
|
185
205
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
186
206
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
207
|
+
const _component_nut_sticky = resolveComponent("nut-sticky");
|
|
187
208
|
return openBlock(), createElementBlock("view", {
|
|
188
|
-
class: normalizeClass(["nut-tabs", [_ctx.direction]])
|
|
209
|
+
class: normalizeClass(["nut-tabs", [_ctx.direction]]),
|
|
210
|
+
ref: "container",
|
|
211
|
+
id: "container"
|
|
189
212
|
}, [
|
|
190
|
-
|
|
213
|
+
_ctx.sticky ? (openBlock(), createBlock(_component_nut_sticky, {
|
|
214
|
+
key: 0,
|
|
215
|
+
top: _ctx.top,
|
|
216
|
+
container: _ctx.container,
|
|
217
|
+
onScroll: _ctx.onStickyScroll
|
|
218
|
+
}, {
|
|
219
|
+
default: withCtx(() => [
|
|
220
|
+
createElementVNode("view", {
|
|
221
|
+
class: normalizeClass(["nut-tabs__titles", { [_ctx.type]: _ctx.type, scrollable: _ctx.titleScroll, [_ctx.size]: _ctx.size }]),
|
|
222
|
+
style: normalizeStyle(_ctx.tabsNavStyle)
|
|
223
|
+
}, [
|
|
224
|
+
_ctx.$slots.titles ? renderSlot(_ctx.$slots, "titles", { key: 0 }) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.titles, (item, index2) => {
|
|
225
|
+
return openBlock(), createElementBlock("view", {
|
|
226
|
+
class: normalizeClass(["nut-tabs__titles-item", { active: item.paneKey == _ctx.modelValue, disabled: item.disabled }]),
|
|
227
|
+
style: normalizeStyle(_ctx.titleStyle),
|
|
228
|
+
onClick: ($event) => _ctx.tabChange(item, index2),
|
|
229
|
+
key: item.paneKey
|
|
230
|
+
}, [
|
|
231
|
+
_ctx.type == "line" ? (openBlock(), createElementBlock("view", {
|
|
232
|
+
key: 0,
|
|
233
|
+
class: "nut-tabs__titles-item__line",
|
|
234
|
+
style: normalizeStyle(_ctx.tabsActiveStyle)
|
|
235
|
+
}, null, 4)) : createCommentVNode("", true),
|
|
236
|
+
_ctx.type == "smile" ? (openBlock(), createElementBlock("view", {
|
|
237
|
+
key: 1,
|
|
238
|
+
class: "nut-tabs__titles-item__smile",
|
|
239
|
+
style: normalizeStyle(_ctx.tabsActiveStyle)
|
|
240
|
+
}, [
|
|
241
|
+
createVNode(_component_nut_icon, {
|
|
242
|
+
color: _ctx.color,
|
|
243
|
+
name: "joy-smile"
|
|
244
|
+
}, null, 8, ["color"])
|
|
245
|
+
], 4)) : createCommentVNode("", true),
|
|
246
|
+
createElementVNode("view", {
|
|
247
|
+
class: normalizeClass(["nut-tabs__titles-item__text", { ellipsis: _ctx.ellipsis }])
|
|
248
|
+
}, toDisplayString(item.title), 3)
|
|
249
|
+
], 14, _hoisted_1);
|
|
250
|
+
}), 128))
|
|
251
|
+
], 6)
|
|
252
|
+
]),
|
|
253
|
+
_: 3
|
|
254
|
+
}, 8, ["top", "container", "onScroll"])) : (openBlock(), createElementBlock("view", {
|
|
255
|
+
key: 1,
|
|
191
256
|
class: normalizeClass(["nut-tabs__titles", { [_ctx.type]: _ctx.type, scrollable: _ctx.titleScroll, [_ctx.size]: _ctx.size }]),
|
|
192
257
|
style: normalizeStyle(_ctx.tabsNavStyle)
|
|
193
258
|
}, [
|
|
@@ -216,9 +281,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
216
281
|
createElementVNode("view", {
|
|
217
282
|
class: normalizeClass(["nut-tabs__titles-item__text", { ellipsis: _ctx.ellipsis }])
|
|
218
283
|
}, toDisplayString(item.title), 3)
|
|
219
|
-
], 14,
|
|
284
|
+
], 14, _hoisted_2);
|
|
220
285
|
}), 128))
|
|
221
|
-
], 6),
|
|
286
|
+
], 6)),
|
|
222
287
|
createElementVNode("view", {
|
|
223
288
|
class: "nut-tabs__content",
|
|
224
289
|
style: normalizeStyle(_ctx.contentStyle)
|
package/dist/packages/_es/Tag.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.3 Fri Sep 30 2022 10:26:47 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -66,7 +66,6 @@ const _sfc_main = create({
|
|
|
66
66
|
emit("close", event);
|
|
67
67
|
};
|
|
68
68
|
const onClick = (event) => {
|
|
69
|
-
event.stopPropagation();
|
|
70
69
|
emit("click", event);
|
|
71
70
|
};
|
|
72
71
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.3 Fri Sep 30 2022 10:26:47 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -91,11 +91,14 @@ const _sfc_main = create({
|
|
|
91
91
|
textarea.style.height = height + "px";
|
|
92
92
|
}
|
|
93
93
|
};
|
|
94
|
-
watch(
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
watch(
|
|
95
|
+
() => props.modelValue,
|
|
96
|
+
() => {
|
|
97
|
+
if (props.autosize) {
|
|
98
|
+
nextTick(getContentHeight);
|
|
99
|
+
}
|
|
97
100
|
}
|
|
98
|
-
|
|
101
|
+
);
|
|
99
102
|
const emitChange = (value, event) => {
|
|
100
103
|
if (props.maxLength && value.length > Number(props.maxLength)) {
|
|
101
104
|
value = value.substring(0, Number(props.maxLength));
|
|
@@ -1,24 +1,5 @@
|
|
|
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
1
|
/*!
|
|
21
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.3 Fri Sep 30 2022 10:26:47 GMT+0800 (中国标准时间)
|
|
22
3
|
* (c) 2022 @jdf2e.
|
|
23
4
|
* Released under the MIT License.
|
|
24
5
|
*/
|
|
@@ -70,13 +51,13 @@ const _sfc_main = create({
|
|
|
70
51
|
const handleTime = (time) => {
|
|
71
52
|
context.emit("select", time);
|
|
72
53
|
};
|
|
73
|
-
return
|
|
74
|
-
classes
|
|
75
|
-
|
|
54
|
+
return {
|
|
55
|
+
classes,
|
|
56
|
+
...toRefs(state),
|
|
76
57
|
getClass,
|
|
77
58
|
renderData,
|
|
78
59
|
handleTime
|
|
79
|
-
}
|
|
60
|
+
};
|
|
80
61
|
}
|
|
81
62
|
});
|
|
82
63
|
const _hoisted_1 = { class: "nut-timedetail__detail nut-timedetail__detail--moring" };
|
|
@@ -1,24 +1,5 @@
|
|
|
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
1
|
/*!
|
|
21
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.3 Fri Sep 30 2022 10:26:47 GMT+0800 (中国标准时间)
|
|
22
3
|
* (c) 2022 @jdf2e.
|
|
23
4
|
* Released under the MIT License.
|
|
24
5
|
*/
|
|
@@ -55,10 +36,11 @@ const _sfc_main = create({
|
|
|
55
36
|
const handlePannel = (pannelKey) => {
|
|
56
37
|
context.emit("change", pannelKey);
|
|
57
38
|
};
|
|
58
|
-
return
|
|
39
|
+
return {
|
|
40
|
+
...toRefs(state),
|
|
59
41
|
classes,
|
|
60
42
|
handlePannel
|
|
61
|
-
}
|
|
43
|
+
};
|
|
62
44
|
}
|
|
63
45
|
});
|
|
64
46
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
@@ -1,24 +1,5 @@
|
|
|
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
1
|
/*!
|
|
21
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.3 Fri Sep 30 2022 10:26:47 GMT+0800 (中国标准时间)
|
|
22
3
|
* (c) 2022 @jdf2e.
|
|
23
4
|
* Released under the MIT License.
|
|
24
5
|
*/
|
|
@@ -125,11 +106,14 @@ const _sfc_main = create({
|
|
|
125
106
|
if (props.duration) {
|
|
126
107
|
show();
|
|
127
108
|
}
|
|
128
|
-
watch(
|
|
129
|
-
|
|
130
|
-
|
|
109
|
+
watch(
|
|
110
|
+
() => props.duration,
|
|
111
|
+
(val) => {
|
|
112
|
+
if (val) {
|
|
113
|
+
show();
|
|
114
|
+
}
|
|
131
115
|
}
|
|
132
|
-
|
|
116
|
+
);
|
|
133
117
|
const hasIcon = computed(() => {
|
|
134
118
|
if (props.type !== "text") {
|
|
135
119
|
return true;
|
|
@@ -264,9 +248,9 @@ const updateToast = (opts) => {
|
|
|
264
248
|
if (container) {
|
|
265
249
|
const currentOpt = optsMap.find((item) => item.id === opts.id);
|
|
266
250
|
if (currentOpt) {
|
|
267
|
-
opts =
|
|
251
|
+
opts = { ...defaultOptions, ...currentOpt, ...opts };
|
|
268
252
|
} else {
|
|
269
|
-
opts =
|
|
253
|
+
opts = { ...defaultOptions, ...opts };
|
|
270
254
|
}
|
|
271
255
|
const instance = createVNode(Toast, opts);
|
|
272
256
|
render(instance, container);
|
|
@@ -284,7 +268,7 @@ const mountToast = (opts) => {
|
|
|
284
268
|
} else {
|
|
285
269
|
_id = new Date().getTime() + "";
|
|
286
270
|
}
|
|
287
|
-
opts =
|
|
271
|
+
opts = { ...defaultOptions, ...opts };
|
|
288
272
|
opts.id = _id;
|
|
289
273
|
idsMap.push(opts.id);
|
|
290
274
|
optsMap.push(opts);
|
|
@@ -304,27 +288,27 @@ const errorMsg = (msg) => {
|
|
|
304
288
|
const ToastFunction = {
|
|
305
289
|
text(msg, opts = {}) {
|
|
306
290
|
errorMsg(msg);
|
|
307
|
-
return mountToast(
|
|
291
|
+
return mountToast({ ...opts, type: "text", msg });
|
|
308
292
|
},
|
|
309
293
|
success(msg, opts = {}) {
|
|
310
294
|
errorMsg(msg);
|
|
311
|
-
return mountToast(
|
|
295
|
+
return mountToast({ icon: "success", ...opts, msg, type: "success" });
|
|
312
296
|
},
|
|
313
297
|
fail(msg, opts = {}) {
|
|
314
298
|
errorMsg(msg);
|
|
315
|
-
return mountToast(
|
|
299
|
+
return mountToast({ icon: "failure", ...opts, msg, type: "fail" });
|
|
316
300
|
},
|
|
317
301
|
warn(msg, opts = {}) {
|
|
318
302
|
errorMsg(msg);
|
|
319
|
-
return mountToast(
|
|
303
|
+
return mountToast({ icon: "tips", ...opts, msg, type: "warn" });
|
|
320
304
|
},
|
|
321
305
|
loading(msg, opts = {}) {
|
|
322
|
-
return mountToast(
|
|
323
|
-
icon: "loading"
|
|
324
|
-
|
|
306
|
+
return mountToast({
|
|
307
|
+
icon: "loading",
|
|
308
|
+
...opts,
|
|
325
309
|
msg,
|
|
326
310
|
type: "loading"
|
|
327
|
-
})
|
|
311
|
+
});
|
|
328
312
|
},
|
|
329
313
|
hide(id) {
|
|
330
314
|
clearToast(id);
|