@nutui/nutui 3.2.2-beta.1 → 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 +93 -0
- package/README.md +5 -3
- package/dist/nutui.es.js +1460 -973
- package/dist/nutui.umd.js +1470 -981
- package/dist/packages/_es/ActionSheet.js +1 -1
- package/dist/packages/_es/Address.js +1 -1
- package/dist/packages/_es/AddressList.js +6 -7
- package/dist/packages/_es/Animate.js +1 -1
- package/dist/packages/_es/Audio.js +1 -1
- package/dist/packages/_es/AudioOperate.js +2 -3
- package/dist/packages/_es/Avatar.js +2 -2
- package/dist/packages/_es/AvatarGroup.js +1 -1
- package/dist/packages/_es/BackTop.js +2 -2
- package/dist/packages/_es/Badge.js +1 -1
- package/dist/packages/_es/Barrage.js +70 -21
- 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 +22 -4
- 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 +1 -1
- package/dist/packages/_es/CheckboxGroup.js +1 -1
- package/dist/packages/_es/CircleProgress.js +4 -4
- package/dist/packages/_es/Col.js +1 -1
- package/dist/packages/_es/Collapse.js +1 -1
- package/dist/packages/_es/CollapseItem.js +1 -1
- package/dist/packages/_es/Comment.js +1 -1
- package/dist/packages/_es/ConfigProvider.js +1 -1
- package/dist/packages/_es/CountDown.js +1 -1
- package/dist/packages/_es/CountUp.js +3 -1
- package/dist/packages/_es/DatePicker.js +8 -3
- package/dist/packages/_es/Dialog.js +3 -3
- package/dist/packages/_es/Divider.js +1 -1
- package/dist/packages/_es/Drag.js +5 -5
- package/dist/packages/_es/Ecard.js +2 -2
- package/dist/packages/_es/Elevator.js +3 -2
- package/dist/packages/_es/Ellipsis.js +1 -1
- package/dist/packages/_es/Empty.js +1 -1
- package/dist/packages/_es/FixedNav.js +1 -1
- package/dist/packages/_es/Form.js +17 -10
- package/dist/packages/_es/FormItem.js +5 -4
- package/dist/packages/_es/Grid.js +1 -1
- package/dist/packages/_es/GridItem.js +1 -1
- package/dist/packages/_es/Icon.js +1 -1
- package/dist/packages/_es/Image.js +1 -1
- package/dist/packages/_es/ImagePreview.js +13 -15
- package/dist/packages/_es/Indicator.js +1 -1
- package/dist/packages/_es/InfiniteLoading.js +1 -1
- package/dist/packages/_es/Input.js +5 -6
- package/dist/packages/_es/InputNumber.js +1 -1
- package/dist/packages/_es/Invoice.js +141 -0
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/List.js +12 -6
- package/dist/packages/_es/Menu.js +1 -1
- package/dist/packages/_es/MenuItem.js +2 -2
- package/dist/packages/_es/Navbar.js +2 -2
- package/dist/packages/_es/NoticeBar.js +2 -2
- package/dist/packages/_es/Notify.js +7 -5
- package/dist/packages/_es/NumberKeyboard.js +12 -14
- package/dist/packages/_es/OldPicker.js +1 -1
- package/dist/packages/_es/OverLay.js +1 -1
- package/dist/packages/_es/Pagination.js +6 -6
- package/dist/packages/_es/Picker.js +19 -4
- package/dist/packages/_es/Popover.js +1 -1
- package/dist/packages/_es/Popup.js +1 -1
- package/dist/packages/_es/Price.js +1 -1
- package/dist/packages/_es/Progress.js +2 -2
- package/dist/packages/_es/PullRefresh.js +1 -1
- package/dist/packages/_es/Radio.js +3 -3
- package/dist/packages/_es/RadioGroup.js +1 -1
- package/dist/packages/_es/Range.js +1 -1
- package/dist/packages/_es/Rate.js +2 -1
- package/dist/packages/_es/Row.js +1 -1
- package/dist/packages/_es/SearchBar.js +21 -7
- package/dist/packages/_es/ShortPassword.js +1 -1
- package/dist/packages/_es/SideNavBar.js +3 -3
- package/dist/packages/_es/SideNavBarItem.js +1 -1
- package/dist/packages/_es/Signature.js +1 -1
- package/dist/packages/_es/Skeleton.js +1 -1
- package/dist/packages/_es/Sku.js +7 -4
- package/dist/packages/_es/Step.js +1 -1
- package/dist/packages/_es/Steps.js +1 -1
- package/dist/packages/_es/Sticky.js +1 -1
- package/dist/packages/_es/SubSideNavBar.js +1 -1
- package/dist/packages/_es/Swipe.js +1 -1
- package/dist/packages/_es/Swiper.js +1 -1
- package/dist/packages/_es/SwiperItem.js +1 -1
- package/dist/packages/_es/Switch.js +1 -1
- package/dist/packages/_es/TabPane.js +1 -1
- package/dist/packages/_es/Tabbar.js +1 -1
- package/dist/packages/_es/TabbarItem.js +1 -1
- package/dist/packages/_es/Table.js +1 -1
- package/dist/packages/_es/Tabs.js +92 -11
- package/dist/packages/_es/Tag.js +1 -2
- package/dist/packages/_es/TextArea.js +1 -1
- package/dist/packages/_es/TimeDetail.js +1 -1
- package/dist/packages/_es/TimePannel.js +1 -1
- package/dist/packages/_es/TimeSelect.js +1 -1
- package/dist/packages/_es/Toast.js +13 -10
- package/dist/packages/_es/TrendArrow.js +131 -0
- package/dist/packages/_es/Uploader.js +23 -8
- package/dist/packages/_es/Video.js +1 -1
- package/dist/packages/_es/WaterMark.js +1 -1
- package/dist/packages/_es/common.js +1 -1
- package/dist/packages/_es/component.js +9 -2
- 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 +18 -12
- 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/address/index.scss +17 -0
- package/dist/packages/barrage/index.scss +27 -18
- package/dist/packages/invoice/index.scss +33 -0
- 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/menuitem/index.scss +3 -1
- package/dist/packages/navbar/index.scss +6 -8
- package/dist/packages/picker/index.scss +22 -0
- package/dist/packages/price/index.scss +1 -1
- package/dist/packages/searchbar/index.scss +2 -0
- package/dist/packages/tabbar/index.scss +2 -1
- package/dist/packages/textarea/index.scss +4 -1
- package/dist/packages/toast/index.scss +3 -0
- package/dist/packages/trendarrow/index.scss +17 -0
- package/dist/smartips/attributes.json +106 -22
- package/dist/smartips/tags.json +46 -17
- package/dist/smartips/web-types.json +226 -23
- package/dist/style.css +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 +46 -44
- package/dist/styles/themes/jdb.scss +46 -44
- package/dist/styles/themes/jdt.scss +46 -44
- package/dist/styles/variables-jdb.scss +8 -2
- package/dist/styles/variables-jdt.scss +8 -2
- package/dist/styles/variables.scss +8 -2
- package/dist/types/__VUE/actionsheet/index.vue.d.ts +116 -62
- package/dist/types/__VUE/address/index.vue.d.ts +149 -79
- 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 +32 -19
- package/dist/types/__VUE/avatargroup/index.vue.d.ts +34 -19
- package/dist/types/__VUE/backtop/index.vue.d.ts +32 -22
- 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 +43 -26
- 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 +108 -63
- 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 +51 -30
- 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 +41 -25
- 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 +136 -68
- package/dist/types/__VUE/dialog/index.vue.d.ts +135 -73
- 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 +38 -20
- 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 +43 -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 +132 -70
- package/dist/types/__VUE/inputnumber/index.vue.d.ts +46 -25
- package/dist/types/__VUE/invoice/index.vue.d.ts +53 -0
- 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 +63 -34
- package/dist/types/__VUE/notify/index.d.ts +15 -5
- package/dist/types/__VUE/notify/index.vue.d.ts +42 -30
- package/dist/types/__VUE/numberkeyboard/index.vue.d.ts +64 -35
- package/dist/types/__VUE/oldpicker/Column.vue.d.ts +20 -15
- package/dist/types/__VUE/oldpicker/index.vue.d.ts +123 -70
- 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 +138 -78
- package/dist/types/__VUE/popover/index.vue.d.ts +104 -56
- package/dist/types/__VUE/popup/index.vue.d.ts +90 -60
- 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 +36 -21
- 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 +72 -30
- 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 +124 -66
- package/dist/types/__VUE/step/index.vue.d.ts +23 -14
- 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 +18 -11
- 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 +60 -42
- package/dist/types/__VUE/trendarrow/index.vue.d.ts +138 -0
- package/dist/types/__VUE/uploader/index.vue.d.ts +107 -58
- package/dist/types/__VUE/video/index.vue.d.ts +26 -9
- 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 +3 -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
package/dist/packages/_es/Sku.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
|
*/
|
|
@@ -453,13 +453,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
453
453
|
name: "sku-header-price",
|
|
454
454
|
fn: withCtx(() => [
|
|
455
455
|
renderSlot(_ctx.$slots, "sku-header-price")
|
|
456
|
-
])
|
|
456
|
+
]),
|
|
457
|
+
key: "0"
|
|
457
458
|
} : void 0,
|
|
458
459
|
_ctx.getSlots("sku-header-extra") ? {
|
|
459
460
|
name: "sku-header-extra",
|
|
460
461
|
fn: withCtx(() => [
|
|
461
462
|
renderSlot(_ctx.$slots, "sku-header-extra")
|
|
462
|
-
])
|
|
463
|
+
]),
|
|
464
|
+
key: "1"
|
|
463
465
|
} : void 0
|
|
464
466
|
]), 1032, ["goods"])) : createCommentVNode("", true),
|
|
465
467
|
createElementVNode("view", _hoisted_2, [
|
|
@@ -497,7 +499,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
497
499
|
name: "operate-btn",
|
|
498
500
|
fn: withCtx(() => [
|
|
499
501
|
renderSlot(_ctx.$slots, "sku-operate")
|
|
500
|
-
])
|
|
502
|
+
]),
|
|
503
|
+
key: "0"
|
|
501
504
|
} : void 0
|
|
502
505
|
]), 1032, ["btnOptions", "btnExtraText", "buyText", "addCartText", "confirmText", "onClickBtnOperate"])
|
|
503
506
|
])
|
|
@@ -1,11 +1,12 @@
|
|
|
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
|
*/
|
|
6
|
-
import { c as createComponent } from "./component.js";
|
|
6
|
+
import { T as TypeOfFun, c as createComponent } from "./component.js";
|
|
7
7
|
import { p as pxCheck } from "./pxCheck.js";
|
|
8
|
-
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";
|
|
9
10
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
10
11
|
import "../locale/lang";
|
|
11
12
|
class Title {
|
|
@@ -60,28 +61,45 @@ const component = {
|
|
|
60
61
|
titleGutter: {
|
|
61
62
|
type: [Number, String],
|
|
62
63
|
default: 0
|
|
64
|
+
},
|
|
65
|
+
sticky: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
default: false
|
|
68
|
+
},
|
|
69
|
+
top: {
|
|
70
|
+
type: Number,
|
|
71
|
+
default: 0
|
|
63
72
|
}
|
|
64
73
|
},
|
|
65
74
|
components: {},
|
|
66
75
|
emits: ["update:modelValue", "click", "change"],
|
|
67
76
|
setup(props, { emit, slots }) {
|
|
77
|
+
const container = ref(null);
|
|
78
|
+
let stickyFixed;
|
|
68
79
|
provide("activeKey", { activeKey: computed(() => props.modelValue) });
|
|
69
80
|
provide("autoHeight", { autoHeight: computed(() => props.autoHeight) });
|
|
70
81
|
const titles = ref([]);
|
|
71
82
|
const renderTitles = (vnodes) => {
|
|
72
83
|
vnodes.forEach((vnode, index2) => {
|
|
73
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
84
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
74
85
|
let type = vnode.type;
|
|
75
86
|
type = type.name || type;
|
|
76
87
|
if (type == "nut-tabpane") {
|
|
77
88
|
let title = new Title();
|
|
78
89
|
if (((_a = vnode.props) == null ? void 0 : _a.title) || ((_b = vnode.props) == null ? void 0 : _b["pane-key"]) || ((_c = vnode.props) == null ? void 0 : _c["paneKey"])) {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
90
|
+
let paneKeyType = TypeOfFun((_d = vnode.props) == null ? void 0 : _d["pane-key"]);
|
|
91
|
+
let paneIndex = paneKeyType == "number" || paneKeyType == "string" ? String((_e = vnode.props) == null ? void 0 : _e["pane-key"]) : null;
|
|
92
|
+
let camelPaneKeyType = TypeOfFun((_f = vnode.props) == null ? void 0 : _f["paneKey"]);
|
|
93
|
+
let camelPaneIndex = camelPaneKeyType == "number" || camelPaneKeyType == "string" ? String((_g = vnode.props) == null ? void 0 : _g["paneKey"]) : null;
|
|
94
|
+
title.title = (_h = vnode.props) == null ? void 0 : _h.title;
|
|
95
|
+
title.paneKey = paneIndex || camelPaneIndex || String(index2);
|
|
96
|
+
title.disabled = (_i = vnode.props) == null ? void 0 : _i.disabled;
|
|
82
97
|
}
|
|
83
98
|
titles.value.push(title);
|
|
84
99
|
} else {
|
|
100
|
+
if (vnode.children == " ") {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
85
103
|
renderTitles(vnode.children);
|
|
86
104
|
}
|
|
87
105
|
});
|
|
@@ -99,11 +117,15 @@ const component = {
|
|
|
99
117
|
};
|
|
100
118
|
const init = (vnodes = ((_a) => (_a = slots.default) == null ? void 0 : _a.call(slots))()) => {
|
|
101
119
|
titles.value = [];
|
|
120
|
+
vnodes = vnodes == null ? void 0 : vnodes.filter((item) => typeof item.children !== "string");
|
|
102
121
|
if (vnodes && vnodes.length) {
|
|
103
122
|
renderTitles(vnodes);
|
|
104
123
|
}
|
|
105
124
|
findTabsIndex(props.modelValue);
|
|
106
125
|
};
|
|
126
|
+
const onStickyScroll = (params) => {
|
|
127
|
+
stickyFixed = params.fixed;
|
|
128
|
+
};
|
|
107
129
|
watch(
|
|
108
130
|
() => {
|
|
109
131
|
var _a;
|
|
@@ -113,10 +135,21 @@ const component = {
|
|
|
113
135
|
init(vnodes);
|
|
114
136
|
}
|
|
115
137
|
);
|
|
138
|
+
const getScrollTopRoot = () => {
|
|
139
|
+
return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
|
|
140
|
+
};
|
|
116
141
|
watch(
|
|
117
142
|
() => props.modelValue,
|
|
118
143
|
(value) => {
|
|
119
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
|
+
}
|
|
120
153
|
}
|
|
121
154
|
);
|
|
122
155
|
onMounted(init);
|
|
@@ -161,17 +194,65 @@ const component = {
|
|
|
161
194
|
tabsNavStyle,
|
|
162
195
|
titleStyle,
|
|
163
196
|
tabsActiveStyle,
|
|
197
|
+
container,
|
|
198
|
+
onStickyScroll,
|
|
164
199
|
...methods
|
|
165
200
|
};
|
|
166
201
|
}
|
|
167
202
|
};
|
|
168
203
|
const _hoisted_1 = ["onClick"];
|
|
204
|
+
const _hoisted_2 = ["onClick"];
|
|
169
205
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
170
206
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
207
|
+
const _component_nut_sticky = resolveComponent("nut-sticky");
|
|
171
208
|
return openBlock(), createElementBlock("view", {
|
|
172
|
-
class: normalizeClass(["nut-tabs", [_ctx.direction]])
|
|
209
|
+
class: normalizeClass(["nut-tabs", [_ctx.direction]]),
|
|
210
|
+
ref: "container",
|
|
211
|
+
id: "container"
|
|
173
212
|
}, [
|
|
174
|
-
|
|
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,
|
|
175
256
|
class: normalizeClass(["nut-tabs__titles", { [_ctx.type]: _ctx.type, scrollable: _ctx.titleScroll, [_ctx.size]: _ctx.size }]),
|
|
176
257
|
style: normalizeStyle(_ctx.tabsNavStyle)
|
|
177
258
|
}, [
|
|
@@ -200,9 +281,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
200
281
|
createElementVNode("view", {
|
|
201
282
|
class: normalizeClass(["nut-tabs__titles-item__text", { ellipsis: _ctx.ellipsis }])
|
|
202
283
|
}, toDisplayString(item.title), 3)
|
|
203
|
-
], 14,
|
|
284
|
+
], 14, _hoisted_2);
|
|
204
285
|
}), 128))
|
|
205
|
-
], 6),
|
|
286
|
+
], 6)),
|
|
206
287
|
createElementVNode("view", {
|
|
207
288
|
class: "nut-tabs__content",
|
|
208
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
|
*/
|
|
@@ -132,6 +132,9 @@ const _sfc_main = create({
|
|
|
132
132
|
"nut-toast-" + props.size
|
|
133
133
|
];
|
|
134
134
|
});
|
|
135
|
+
const toastIconWrapperClass = computed(() => {
|
|
136
|
+
return ["nut-toast-icon-wrapper", { "nut-toast-icon-no-animation": !props.loadingRotate }];
|
|
137
|
+
});
|
|
135
138
|
const onAfterLeave = () => {
|
|
136
139
|
clearTimer();
|
|
137
140
|
props.unmount(props.id);
|
|
@@ -143,19 +146,16 @@ const _sfc_main = create({
|
|
|
143
146
|
clickCover,
|
|
144
147
|
hasIcon,
|
|
145
148
|
toastBodyClass,
|
|
149
|
+
toastIconWrapperClass,
|
|
146
150
|
onAfterLeave
|
|
147
151
|
};
|
|
148
152
|
}
|
|
149
153
|
});
|
|
150
154
|
const _hoisted_1 = {
|
|
151
|
-
key: 0,
|
|
152
|
-
class: "nut-toast-icon-wrapper"
|
|
153
|
-
};
|
|
154
|
-
const _hoisted_2 = {
|
|
155
155
|
key: 1,
|
|
156
156
|
class: "nut-toast-title"
|
|
157
157
|
};
|
|
158
|
-
const
|
|
158
|
+
const _hoisted_2 = ["innerHTML"];
|
|
159
159
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
160
160
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
161
161
|
return openBlock(), createBlock(Transition, {
|
|
@@ -178,17 +178,20 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
178
178
|
"background-color": _ctx.bgColor
|
|
179
179
|
})
|
|
180
180
|
}, [
|
|
181
|
-
_ctx.hasIcon ? (openBlock(), createElementBlock("view",
|
|
181
|
+
_ctx.hasIcon ? (openBlock(), createElementBlock("view", {
|
|
182
|
+
key: 0,
|
|
183
|
+
class: normalizeClass(_ctx.toastIconWrapperClass)
|
|
184
|
+
}, [
|
|
182
185
|
createVNode(_component_nut_icon, mergeProps({ size: _ctx.iconSize }, _ctx.$attrs, {
|
|
183
186
|
color: "#ffffff",
|
|
184
187
|
name: _ctx.icon
|
|
185
188
|
}), null, 16, ["size", "name"])
|
|
186
|
-
])) : createCommentVNode("", true),
|
|
187
|
-
_ctx.title ? (openBlock(), createElementBlock("div",
|
|
189
|
+
], 2)) : createCommentVNode("", true),
|
|
190
|
+
_ctx.title ? (openBlock(), createElementBlock("div", _hoisted_1, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
|
|
188
191
|
createElementVNode("view", {
|
|
189
192
|
class: "nut-toast-text",
|
|
190
193
|
innerHTML: _ctx.msg
|
|
191
|
-
}, null, 8,
|
|
194
|
+
}, null, 8, _hoisted_2)
|
|
192
195
|
], 4)
|
|
193
196
|
], 6), [
|
|
194
197
|
[vShow, _ctx.state.mounted]
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @nutui/nutui v3.2.3 Fri Sep 30 2022 10:26:47 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
|
+
* Released under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
import { reactive, computed, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, toDisplayString, createCommentVNode, renderSlot, createBlock } from "vue";
|
|
7
|
+
import { m as myFixed, c as createComponent } from "./component.js";
|
|
8
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
|
+
import "../locale/lang";
|
|
10
|
+
const { componentName, create } = createComponent("trendarrow");
|
|
11
|
+
const _sfc_main = create({
|
|
12
|
+
props: {
|
|
13
|
+
rate: {
|
|
14
|
+
type: Number,
|
|
15
|
+
default: 0
|
|
16
|
+
},
|
|
17
|
+
digits: {
|
|
18
|
+
type: Number,
|
|
19
|
+
default: 2
|
|
20
|
+
},
|
|
21
|
+
showSign: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: false
|
|
24
|
+
},
|
|
25
|
+
showZero: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: false
|
|
28
|
+
},
|
|
29
|
+
arrowLeft: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: false
|
|
32
|
+
},
|
|
33
|
+
syncTextColor: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: true
|
|
36
|
+
},
|
|
37
|
+
textColor: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: "#333"
|
|
40
|
+
},
|
|
41
|
+
riseColor: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: "#fa2c19"
|
|
44
|
+
},
|
|
45
|
+
dropColor: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: "#64b578"
|
|
48
|
+
},
|
|
49
|
+
iconSize: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: "12px"
|
|
52
|
+
},
|
|
53
|
+
upIconName: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: "triangle-up"
|
|
56
|
+
},
|
|
57
|
+
downIconName: {
|
|
58
|
+
type: String,
|
|
59
|
+
default: "triangle-down"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
setup(props) {
|
|
63
|
+
const state = reactive({
|
|
64
|
+
rateTrend: props.rate > 0 ? true : false
|
|
65
|
+
});
|
|
66
|
+
const classes = computed(() => {
|
|
67
|
+
const prefixCls = componentName;
|
|
68
|
+
return {
|
|
69
|
+
[prefixCls]: true
|
|
70
|
+
};
|
|
71
|
+
});
|
|
72
|
+
const calcRate = computed(() => {
|
|
73
|
+
const { rate, digits, showSign, showZero } = props;
|
|
74
|
+
state.rateTrend = rate > 0 ? true : false;
|
|
75
|
+
const absRate = Math.abs(rate);
|
|
76
|
+
if (!showZero && rate === 0) {
|
|
77
|
+
return "--";
|
|
78
|
+
}
|
|
79
|
+
let resultRate = `${showSign && rate !== 0 ? state.rateTrend ? "+" : "-" : ""}${myFixed(
|
|
80
|
+
Number(absRate),
|
|
81
|
+
digits
|
|
82
|
+
)}%`;
|
|
83
|
+
return resultRate;
|
|
84
|
+
});
|
|
85
|
+
const calcStyle = computed(() => {
|
|
86
|
+
const { dropColor, riseColor, syncTextColor, textColor, rate } = props;
|
|
87
|
+
let style = {
|
|
88
|
+
color: rate === 0 ? textColor : syncTextColor ? state.rateTrend ? riseColor : dropColor : textColor
|
|
89
|
+
};
|
|
90
|
+
return style;
|
|
91
|
+
});
|
|
92
|
+
const calcIconProps = computed(() => {
|
|
93
|
+
const { dropColor, riseColor, iconSize, upIconName, downIconName } = props;
|
|
94
|
+
let iconProps = {
|
|
95
|
+
name: state.rateTrend ? upIconName : downIconName,
|
|
96
|
+
color: state.rateTrend ? riseColor : dropColor,
|
|
97
|
+
size: iconSize
|
|
98
|
+
};
|
|
99
|
+
return iconProps;
|
|
100
|
+
});
|
|
101
|
+
return { ...toRefs(state), classes, calcRate, calcStyle, calcIconProps };
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
105
|
+
const _component_nut_icon = resolveComponent("nut-icon");
|
|
106
|
+
return openBlock(), createElementBlock("view", {
|
|
107
|
+
class: normalizeClass(_ctx.classes),
|
|
108
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
|
|
109
|
+
}, [
|
|
110
|
+
!_ctx.arrowLeft ? (openBlock(), createElementBlock("span", {
|
|
111
|
+
key: 0,
|
|
112
|
+
class: "nut-trendarrow-icon-before nut-trendarrow-rate",
|
|
113
|
+
style: normalizeStyle(_ctx.calcStyle)
|
|
114
|
+
}, toDisplayString(_ctx.calcRate), 5)) : createCommentVNode("", true),
|
|
115
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
116
|
+
Number(_ctx.rate) !== 0 ? (openBlock(), createBlock(_component_nut_icon, {
|
|
117
|
+
key: 0,
|
|
118
|
+
size: _ctx.calcIconProps.size,
|
|
119
|
+
name: _ctx.calcIconProps.name,
|
|
120
|
+
color: _ctx.calcIconProps.color
|
|
121
|
+
}, null, 8, ["size", "name", "color"])) : createCommentVNode("", true)
|
|
122
|
+
]),
|
|
123
|
+
_ctx.arrowLeft ? (openBlock(), createElementBlock("span", {
|
|
124
|
+
key: 1,
|
|
125
|
+
class: "nut-trendarrow-icon-after nut-trendarrow-rate",
|
|
126
|
+
style: normalizeStyle(_ctx.calcStyle)
|
|
127
|
+
}, toDisplayString(_ctx.calcRate), 5)) : createCommentVNode("", true)
|
|
128
|
+
], 2);
|
|
129
|
+
}
|
|
130
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
131
|
+
export { index as default };
|
|
@@ -1,10 +1,10 @@
|
|
|
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
|
*/
|
|
6
6
|
import { reactive, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, renderSlot, Fragment, createCommentVNode, renderList, createElementVNode, toDisplayString, createVNode, createBlock, createTextVNode, mergeProps } from "vue";
|
|
7
|
-
import { c as createComponent } from "./component.js";
|
|
7
|
+
import { c as createComponent, i as isPromise } from "./component.js";
|
|
8
8
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
9
|
import "../locale/lang";
|
|
10
10
|
class UploadOptions {
|
|
@@ -241,6 +241,7 @@ const _sfc_main = create({
|
|
|
241
241
|
uploadQueue.splice(index2, 1);
|
|
242
242
|
} else {
|
|
243
243
|
uploadQueue = [];
|
|
244
|
+
fileList.splice(0, fileList.length);
|
|
244
245
|
}
|
|
245
246
|
};
|
|
246
247
|
const submit = () => {
|
|
@@ -295,15 +296,29 @@ const _sfc_main = create({
|
|
|
295
296
|
}
|
|
296
297
|
return files;
|
|
297
298
|
};
|
|
299
|
+
const deleted = (file, index2) => {
|
|
300
|
+
fileList.splice(index2, 1);
|
|
301
|
+
emit("delete", {
|
|
302
|
+
file,
|
|
303
|
+
fileList,
|
|
304
|
+
index: index2
|
|
305
|
+
});
|
|
306
|
+
};
|
|
298
307
|
const onDelete = (file, index2) => {
|
|
299
308
|
clearUploadQueue(index2);
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
309
|
+
let fn = props.beforeDelete(file, fileList);
|
|
310
|
+
if (isPromise(fn)) {
|
|
311
|
+
fn.then((res) => {
|
|
312
|
+
if (res) {
|
|
313
|
+
deleted(file, index2);
|
|
314
|
+
}
|
|
315
|
+
}).catch((error) => {
|
|
316
|
+
console.log(error, "\u7528\u6237\u963B\u6B62\u4E86\u5220\u9664\uFF01");
|
|
306
317
|
});
|
|
318
|
+
} else if (fn) {
|
|
319
|
+
deleted(file, index2);
|
|
320
|
+
} else {
|
|
321
|
+
console.log("\u7528\u6237\u963B\u6B62\u4E86\u5220\u9664\uFF01");
|
|
307
322
|
}
|
|
308
323
|
};
|
|
309
324
|
const onChange = (event) => {
|