@nutui/nutui 3.2.5-beta.1 → 3.2.6-beta.1
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 +12 -0
- package/dist/nutui.es.js +4214 -4444
- package/dist/nutui.umd.js +4213 -4543
- package/dist/packages/_es/ActionSheet.js +18 -19
- package/dist/packages/_es/Address.js +94 -85
- package/dist/packages/_es/AddressList.js +25 -12
- package/dist/packages/_es/Animate.js +3 -3
- package/dist/packages/_es/Audio.js +9 -2
- package/dist/packages/_es/AudioOperate.js +5 -1
- package/dist/packages/_es/Avatar.js +10 -10
- package/dist/packages/_es/AvatarGroup.js +5 -5
- package/dist/packages/_es/BackTop.js +55 -108
- package/dist/packages/_es/Badge.js +6 -4
- package/dist/packages/_es/Barrage.js +79 -103
- package/dist/packages/_es/Button.js +5 -3
- package/dist/packages/_es/Calendar.js +36 -23
- package/dist/packages/_es/CalendarItem.js +4 -3
- package/dist/packages/_es/Card.js +15 -5
- package/dist/packages/_es/Cascader.js +12 -11
- package/dist/packages/_es/Category.js +13 -12
- package/dist/packages/_es/CategoryPane.js +17 -13
- package/dist/packages/_es/Cell.js +9 -12
- package/dist/packages/_es/CellGroup.js +4 -2
- package/dist/packages/_es/Checkbox.js +1 -1
- package/dist/packages/_es/CheckboxGroup.js +2 -2
- package/dist/packages/_es/CircleProgress.js +98 -82
- package/dist/packages/_es/Col.js +1 -1
- package/dist/packages/_es/Collapse.js +65 -34
- package/dist/packages/_es/CollapseItem.js +93 -60
- package/dist/packages/_es/Comment.js +43 -19
- package/dist/packages/_es/ConfigProvider.js +1 -1
- package/dist/packages/_es/CountDown.js +3 -3
- package/dist/packages/_es/CountUp.js +47 -52
- package/dist/packages/_es/DatePicker.js +37 -54
- package/dist/packages/_es/Dialog.js +9 -88
- package/dist/packages/_es/Divider.js +3 -3
- package/dist/packages/_es/Drag.js +75 -49
- package/dist/packages/_es/Ecard.js +20 -18
- package/dist/packages/_es/Elevator.js +101 -76
- package/dist/packages/_es/Ellipsis.js +140 -100
- package/dist/packages/_es/Empty.js +6 -4
- package/dist/packages/_es/FixedNav.js +11 -6
- package/dist/packages/_es/Form.js +4 -4
- package/dist/packages/_es/FormItem.js +3 -1
- package/dist/packages/_es/Grid.js +1 -1
- package/dist/packages/_es/GridItem.js +10 -27
- package/dist/packages/_es/Icon.js +1 -1
- package/dist/packages/_es/Image.js +13 -114
- package/dist/packages/_es/ImagePreview.js +154 -400
- package/dist/packages/_es/Indicator.js +3 -3
- package/dist/packages/_es/InfiniteLoading.js +103 -115
- package/dist/packages/_es/Input.js +54 -26
- package/dist/packages/_es/InputNumber.js +25 -16
- package/dist/packages/_es/Invoice.js +6 -5
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/List.js +47 -34
- package/dist/packages/_es/Menu.js +35 -35
- package/dist/packages/_es/MenuItem.js +56 -29
- package/dist/packages/_es/Navbar.js +49 -39
- package/dist/packages/_es/NoticeBar.js +52 -41
- package/dist/packages/_es/Notify.js +37 -166
- package/dist/packages/_es/NumberKeyboard.js +15 -20
- package/dist/packages/_es/OldPicker.js +130 -116
- package/dist/packages/_es/OverLay.js +5 -28
- package/dist/packages/_es/Pagination.js +8 -5
- package/dist/packages/_es/Picker.js +196 -65
- package/dist/packages/_es/Popover.js +201 -881
- package/dist/packages/_es/Popup.js +28 -84
- package/dist/packages/_es/Price.js +22 -6
- package/dist/packages/_es/Progress.js +18 -11
- package/dist/packages/_es/PullRefresh.js +4 -2
- package/dist/packages/_es/Radio.js +3 -3
- package/dist/packages/_es/RadioGroup.js +1 -1
- package/dist/packages/_es/Range.js +48 -34
- package/dist/packages/_es/Rate.js +15 -14
- package/dist/packages/_es/Row.js +1 -1
- package/dist/packages/_es/SearchBar.js +39 -36
- package/dist/packages/_es/ShortPassword.js +97 -66
- package/dist/packages/_es/SideNavBar.js +7 -18
- package/dist/packages/_es/SideNavBarItem.js +1 -1
- package/dist/packages/_es/Signature.js +113 -80
- package/dist/packages/_es/Skeleton.js +12 -11
- package/dist/packages/_es/Sku.js +63 -38
- package/dist/packages/_es/Step.js +7 -2
- package/dist/packages/_es/Steps.js +1 -1
- package/dist/packages/_es/Sticky.js +33 -23
- package/dist/packages/_es/SubSideNavBar.js +4 -2
- package/dist/packages/_es/Swipe.js +41 -26
- package/dist/packages/_es/Swiper.js +38 -21
- package/dist/packages/_es/SwiperItem.js +2 -2
- package/dist/packages/_es/Switch.js +8 -8
- package/dist/packages/_es/TabPane.js +1 -1
- package/dist/packages/_es/Tabbar.js +40 -9
- package/dist/packages/_es/TabbarItem.js +24 -30
- package/dist/packages/_es/Table.js +22 -17
- package/dist/packages/_es/Tabs.js +49 -16
- package/dist/packages/_es/Tag.js +6 -5
- package/dist/packages/_es/TextArea.js +114 -49
- package/dist/packages/_es/TimeDetail.js +4 -3
- package/dist/packages/_es/TimePannel.js +3 -3
- package/dist/packages/_es/TimeSelect.js +12 -10
- package/dist/packages/_es/Toast.js +53 -164
- package/dist/packages/_es/TrendArrow.js +6 -4
- package/dist/packages/_es/Uploader.js +141 -140
- package/dist/packages/_es/Video.js +72 -5
- package/dist/packages/_es/WaterMark.js +22 -14
- package/dist/packages/_es/common.js +1 -1
- package/dist/packages/_es/component.js +1 -1
- package/dist/packages/_es/index.js +44 -6
- package/dist/packages/_es/{index5.js → index.taro.js} +167 -154
- package/dist/packages/_es/index2.js +8 -31
- package/dist/packages/_es/index3.js +64 -7
- package/dist/packages/_es/index4.js +424 -62
- 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 +21 -3
- package/dist/packages/_es/use-lock-scroll.js +23 -0
- 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/signature/index.scss +4 -1
- package/dist/packages/swiperitem/index.scss +1 -1
- package/dist/smartips/attributes.json +4 -0
- package/dist/smartips/tags.json +2 -1
- package/dist/smartips/web-types.json +10 -1
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +44 -44
- package/dist/styles/themes/jdb.scss +44 -44
- package/dist/styles/themes/jddkh.scss +44 -44
- package/dist/styles/themes/jdt.scss +44 -44
- package/dist/types/__VUE/actionsheet/{index.vue.d.ts → index.taro.vue.d.ts} +9 -9
- package/dist/types/__VUE/address/{index.vue.d.ts → index.taro.vue.d.ts} +73 -33
- package/dist/types/__VUE/addresslist/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/animate/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/avatar/{index.vue.d.ts → index.taro.vue.d.ts} +6 -6
- package/dist/types/__VUE/avatargroup/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/backtop/{index.vue.d.ts → index.taro.vue.d.ts} +15 -37
- package/dist/types/__VUE/badge/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/barrage/{index.vue.d.ts → index.taro.vue.d.ts} +2 -2
- package/dist/types/__VUE/button/index.taro.vue.d.ts +116 -0
- package/dist/types/__VUE/button/index.vue.d.ts +1 -1
- package/dist/types/__VUE/calendar/{index.vue.d.ts → index.taro.vue.d.ts} +13 -1
- package/dist/types/__VUE/calendaritem/{index.vue.d.ts → index.taro.vue.d.ts} +17 -17
- package/dist/types/__VUE/card/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/cascader/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
- package/dist/types/__VUE/category/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/categorypane/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/cell/{index.vue.d.ts → index.taro.vue.d.ts} +13 -6
- package/dist/types/__VUE/checkbox/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/circleprogress/{index.vue.d.ts → index.taro.vue.d.ts} +14 -15
- package/dist/types/__VUE/collapse/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
- package/dist/types/__VUE/collapseitem/{index.vue.d.ts → index.taro.vue.d.ts} +2 -10
- package/dist/types/__VUE/comment/{index.vue.d.ts → index.taro.vue.d.ts} +1 -2
- package/dist/types/__VUE/configprovider/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/countdown/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/countup/{index.vue.d.ts → index.taro.vue.d.ts} +5 -7
- package/dist/types/__VUE/datepicker/{index.vue.d.ts → index.taro.vue.d.ts} +5 -5
- package/dist/types/__VUE/dialog/{index.vue.d.ts → index.taro.vue.d.ts} +9 -12
- package/dist/types/__VUE/divider/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
- package/dist/types/__VUE/drag/{index.vue.d.ts → index.taro.vue.d.ts} +2 -1
- package/dist/types/__VUE/ecard/{index.vue.d.ts → index.taro.vue.d.ts} +3 -3
- package/dist/types/__VUE/elevator/{index.vue.d.ts → index.taro.vue.d.ts} +11 -2
- package/dist/types/__VUE/ellipsis/{index.vue.d.ts → index.taro.vue.d.ts} +4 -0
- package/dist/types/__VUE/empty/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/fixednav/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/form/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/grid/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
- package/dist/types/__VUE/griditem/{index.vue.d.ts → index.taro.vue.d.ts} +2 -27
- package/dist/types/__VUE/icon/index.taro.vue.d.ts +74 -0
- package/dist/types/__VUE/image/index.taro.vue.d.ts +33 -0
- package/dist/types/__VUE/imagepreview/{index.vue.d.ts → index.taro.vue.d.ts} +40 -42
- package/dist/types/__VUE/indicator/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/infiniteloading/{index.vue.d.ts → index.taro.vue.d.ts} +15 -8
- package/dist/types/__VUE/input/{index.vue.d.ts → index.taro.vue.d.ts} +34 -16
- package/dist/types/__VUE/inputnumber/{index.vue.d.ts → index.taro.vue.d.ts} +2 -2
- package/dist/types/__VUE/invoice/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/layout/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/list/{index.vue.d.ts → index.taro.vue.d.ts} +2 -2
- package/dist/types/__VUE/menu/{index.vue.d.ts → index.taro.vue.d.ts} +1 -0
- package/dist/types/__VUE/menuitem/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/navbar/{index.vue.d.ts → index.taro.vue.d.ts} +1 -2
- package/dist/types/__VUE/noticebar/{index.vue.d.ts → index.taro.vue.d.ts} +4 -3
- package/dist/types/__VUE/notify/{index.vue.d.ts → index.taro.vue.d.ts} +10 -25
- package/dist/types/__VUE/numberkeyboard/{index.vue.d.ts → index.taro.vue.d.ts} +5 -29
- package/dist/types/__VUE/oldpicker/{Column.vue.d.ts → ColumnTaro.vue.d.ts} +28 -17
- package/dist/types/__VUE/oldpicker/{index.vue.d.ts → index.taro.vue.d.ts} +64 -44
- package/dist/types/__VUE/overlay/index.taro.vue.d.ts +85 -0
- package/dist/types/__VUE/pagination/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/picker/{Column.vue.d.ts → ColumnTaro.vue.d.ts} +16 -4
- package/dist/types/__VUE/picker/{index.vue.d.ts → index.taro.vue.d.ts} +53 -28
- package/dist/types/__VUE/popover/{index.vue.d.ts → index.taro.vue.d.ts} +15 -13
- package/dist/types/__VUE/popup/index.taro.vue.d.ts +1728 -0
- package/dist/types/__VUE/popup/index.vue.d.ts +1 -1
- package/dist/types/__VUE/price/{index.vue.d.ts → index.taro.vue.d.ts} +1 -0
- package/dist/types/__VUE/progress/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
- package/dist/types/__VUE/radio/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/range/{index.vue.d.ts → index.taro.vue.d.ts} +8 -7
- package/dist/types/__VUE/rate/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/searchbar/{index.vue.d.ts → index.taro.vue.d.ts} +19 -19
- package/dist/types/__VUE/shortpassword/{index.vue.d.ts → index.taro.vue.d.ts} +6 -21
- package/dist/types/__VUE/sidenavbar/{index.vue.d.ts → index.taro.vue.d.ts} +0 -5
- package/dist/types/__VUE/signature/{index.vue.d.ts → index.taro.vue.d.ts} +8 -5
- package/dist/types/__VUE/skeleton/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/sku/{index.vue.d.ts → index.taro.vue.d.ts} +54 -182
- package/dist/types/__VUE/step/index.vue.d.ts +1 -1
- package/dist/types/__VUE/steps/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/sticky/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/swipe/{index.vue.d.ts → index.taro.vue.d.ts} +2 -1
- package/dist/types/__VUE/swiper/{index.vue.d.ts → index.taro.vue.d.ts} +2 -1
- package/dist/types/__VUE/swiperitem/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/switch/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/tabbar/{index.vue.d.ts → index.taro.vue.d.ts} +10 -0
- package/dist/types/__VUE/tabbaritem/{index.vue.d.ts → index.taro.vue.d.ts} +9 -9
- package/dist/types/__VUE/table/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/tabs/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/tag/{index.vue.d.ts → index.taro.vue.d.ts} +4 -4
- package/dist/types/__VUE/textarea/{index.vue.d.ts → index.taro.vue.d.ts} +5 -3
- package/dist/types/__VUE/timedetail/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/timepannel/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/timeselect/{index.vue.d.ts → index.taro.vue.d.ts} +7 -8
- package/dist/types/__VUE/toast/{index.vue.d.ts → index.taro.vue.d.ts} +44 -22
- package/dist/types/__VUE/trendarrow/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/uploader/{index.vue.d.ts → index.taro.vue.d.ts} +22 -13
- package/dist/types/__VUE/video/index.vue.d.ts +3 -1
- package/dist/types/__VUE/watermark/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/nutui.d.ts +89 -89
- package/package.json +1 -1
- package/dist/types/__VUE/dialog/index.d.ts +0 -48
- package/dist/types/__VUE/image/index.vue.d.ts +0 -117
- package/dist/types/__VUE/image/type.d.ts +0 -6
- package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +0 -108
- package/dist/types/__VUE/imagepreview/index.d.ts +0 -25
- package/dist/types/__VUE/notify/index.d.ts +0 -26
- package/dist/types/__VUE/tag/type.d.ts +0 -5
- package/dist/types/__VUE/toast/index.d.ts +0 -16
|
@@ -1,70 +1,432 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.6-beta.1 Mon Oct 31 2022 19:38:22 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { ref } from "vue";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
import { computed, watch, onDeactivated, onBeforeUnmount, onMounted, onActivated, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, withModifiers, normalizeStyle, renderSlot, vShow, h, ref, reactive, onBeforeMount, toRefs, resolveComponent, Teleport, createCommentVNode, createTextVNode, createVNode, createElementBlock, mergeProps } from "vue";
|
|
7
|
+
import { u as useLockScroll } from "./use-lock-scroll.js";
|
|
8
|
+
import { c as createComponent } from "./component.js";
|
|
9
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
10
|
+
import { p as pxCheck } from "./pxCheck.js";
|
|
11
|
+
const { componentName: componentName$2, create: create$2 } = createComponent("overlay");
|
|
12
|
+
const overlayProps = {
|
|
13
|
+
visible: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: false
|
|
16
|
+
},
|
|
17
|
+
zIndex: {
|
|
18
|
+
type: [Number, String],
|
|
19
|
+
default: 2e3
|
|
20
|
+
},
|
|
21
|
+
duration: {
|
|
22
|
+
type: [Number, String],
|
|
23
|
+
default: 0.3
|
|
24
|
+
},
|
|
25
|
+
overlayClass: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: ""
|
|
28
|
+
},
|
|
29
|
+
lockScroll: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: false
|
|
32
|
+
},
|
|
33
|
+
overlayStyle: {
|
|
34
|
+
type: Object
|
|
35
|
+
},
|
|
36
|
+
closeOnClickOverlay: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: true
|
|
11
39
|
}
|
|
12
|
-
|
|
13
|
-
|
|
40
|
+
};
|
|
41
|
+
const _sfc_main$2 = create$2({
|
|
42
|
+
props: overlayProps,
|
|
43
|
+
emits: ["click", "update:visible"],
|
|
44
|
+
setup(props, { emit }) {
|
|
45
|
+
const classes = computed(() => {
|
|
46
|
+
const prefixCls = componentName$2;
|
|
47
|
+
return {
|
|
48
|
+
[prefixCls]: true,
|
|
49
|
+
[props.overlayClass]: true
|
|
50
|
+
};
|
|
51
|
+
});
|
|
52
|
+
watch(
|
|
53
|
+
() => props.visible,
|
|
54
|
+
(value) => {
|
|
55
|
+
value ? lock() : unlock();
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
const lock = () => {
|
|
59
|
+
if (props.lockScroll && props.visible) {
|
|
60
|
+
document.body.classList.add("nut-overflow-hidden");
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
const unlock = () => {
|
|
64
|
+
document.body.classList.remove("nut-overflow-hidden");
|
|
65
|
+
};
|
|
66
|
+
onDeactivated(unlock);
|
|
67
|
+
onBeforeUnmount(unlock);
|
|
68
|
+
onMounted(lock);
|
|
69
|
+
onActivated(lock);
|
|
70
|
+
const style = computed(() => {
|
|
71
|
+
return {
|
|
72
|
+
animationDuration: `${props.duration}s`,
|
|
73
|
+
zIndex: props.zIndex,
|
|
74
|
+
...props.overlayStyle
|
|
75
|
+
};
|
|
76
|
+
});
|
|
77
|
+
const touchmove = (e) => {
|
|
78
|
+
if (props.lockScroll)
|
|
79
|
+
e.preventDefault();
|
|
80
|
+
};
|
|
81
|
+
const onClick = (e) => {
|
|
82
|
+
emit("click", e);
|
|
83
|
+
if (props.closeOnClickOverlay) {
|
|
84
|
+
emit("update:visible", false);
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
return { classes, style, touchmove, onClick };
|
|
14
88
|
}
|
|
15
|
-
|
|
89
|
+
});
|
|
90
|
+
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
91
|
+
return openBlock(), createBlock(Transition, { name: "overlay-fade" }, {
|
|
92
|
+
default: withCtx(() => [
|
|
93
|
+
withDirectives(createElementVNode("view", {
|
|
94
|
+
class: normalizeClass(_ctx.classes),
|
|
95
|
+
onTouchmove: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.touchmove && _ctx.touchmove(...args), ["stop"])),
|
|
96
|
+
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.onClick && _ctx.onClick(...args)),
|
|
97
|
+
style: normalizeStyle(_ctx.style)
|
|
98
|
+
}, [
|
|
99
|
+
renderSlot(_ctx.$slots, "default")
|
|
100
|
+
], 38), [
|
|
101
|
+
[vShow, _ctx.visible]
|
|
102
|
+
])
|
|
103
|
+
]),
|
|
104
|
+
_: 3
|
|
105
|
+
});
|
|
16
106
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
107
|
+
var overlay = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1]]);
|
|
108
|
+
const { componentName: componentName$1, create: create$1 } = createComponent("icon");
|
|
109
|
+
const _sfc_main$1 = create$1({
|
|
110
|
+
props: {
|
|
111
|
+
name: { type: String, default: "" },
|
|
112
|
+
size: { type: [String, Number], default: "" },
|
|
113
|
+
classPrefix: { type: String, default: "nut-icon" },
|
|
114
|
+
fontClassName: { type: String, default: "nutui-iconfont" },
|
|
115
|
+
color: { type: String, default: "" },
|
|
116
|
+
tag: { type: String, default: "i" }
|
|
117
|
+
},
|
|
118
|
+
emits: ["click"],
|
|
119
|
+
setup(props, { emit, slots }) {
|
|
120
|
+
const handleClick = (event) => {
|
|
121
|
+
emit("click", event);
|
|
122
|
+
};
|
|
123
|
+
const isImage = () => {
|
|
124
|
+
return props.name ? props.name.indexOf("/") !== -1 : false;
|
|
125
|
+
};
|
|
126
|
+
return () => {
|
|
127
|
+
var _a;
|
|
128
|
+
const _isImage = isImage();
|
|
129
|
+
return h(
|
|
130
|
+
_isImage ? "img" : props.tag,
|
|
131
|
+
{
|
|
132
|
+
class: _isImage ? `${componentName$1}__img` : `${props.fontClassName} ${componentName$1} ${props.classPrefix}-${props.name}`,
|
|
133
|
+
style: {
|
|
134
|
+
color: props.color,
|
|
135
|
+
fontSize: pxCheck(props.size),
|
|
136
|
+
width: pxCheck(props.size),
|
|
137
|
+
height: pxCheck(props.size)
|
|
138
|
+
},
|
|
139
|
+
onClick: handleClick,
|
|
140
|
+
src: _isImage ? props.name : ""
|
|
141
|
+
},
|
|
142
|
+
(_a = slots.default) == null ? void 0 : _a.call(slots)
|
|
143
|
+
);
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
const { componentName, create } = createComponent("popup");
|
|
148
|
+
let _zIndex = 2e3;
|
|
149
|
+
const popupProps = {
|
|
150
|
+
...overlayProps,
|
|
151
|
+
position: {
|
|
152
|
+
type: String,
|
|
153
|
+
default: "center"
|
|
154
|
+
},
|
|
155
|
+
transition: String,
|
|
156
|
+
style: {
|
|
157
|
+
type: Object
|
|
158
|
+
},
|
|
159
|
+
popClass: {
|
|
160
|
+
type: String,
|
|
161
|
+
default: ""
|
|
162
|
+
},
|
|
163
|
+
closeable: {
|
|
164
|
+
type: Boolean,
|
|
165
|
+
default: false
|
|
166
|
+
},
|
|
167
|
+
closeIconPosition: {
|
|
168
|
+
type: String,
|
|
169
|
+
default: "top-right"
|
|
170
|
+
},
|
|
171
|
+
closeIcon: {
|
|
172
|
+
type: String,
|
|
173
|
+
default: "close"
|
|
174
|
+
},
|
|
175
|
+
destroyOnClose: {
|
|
176
|
+
type: Boolean,
|
|
177
|
+
default: true
|
|
178
|
+
},
|
|
179
|
+
teleport: {
|
|
180
|
+
type: [String, Element],
|
|
181
|
+
default: "body"
|
|
182
|
+
},
|
|
183
|
+
overlay: {
|
|
184
|
+
type: Boolean,
|
|
185
|
+
default: true
|
|
186
|
+
},
|
|
187
|
+
round: {
|
|
188
|
+
type: Boolean,
|
|
189
|
+
default: false
|
|
190
|
+
},
|
|
191
|
+
isWrapTeleport: {
|
|
192
|
+
type: Boolean,
|
|
193
|
+
default: true
|
|
194
|
+
},
|
|
195
|
+
safeAreaInsetBottom: {
|
|
196
|
+
type: Boolean,
|
|
197
|
+
default: false
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
const _sfc_main = create({
|
|
201
|
+
components: {
|
|
202
|
+
[overlay.name]: overlay,
|
|
203
|
+
[_sfc_main$1.name]: _sfc_main$1
|
|
204
|
+
},
|
|
205
|
+
props: {
|
|
206
|
+
...popupProps
|
|
207
|
+
},
|
|
208
|
+
emits: ["click", "click-close-icon", "open", "close", "opend", "closed", "update:visible", "click-overlay"],
|
|
209
|
+
setup(props, { emit }) {
|
|
210
|
+
const popupRef = ref();
|
|
211
|
+
const state = reactive({
|
|
212
|
+
zIndex: props.zIndex,
|
|
213
|
+
showSlot: true,
|
|
214
|
+
transitionName: `popup-fade-${props.position}`,
|
|
215
|
+
overLayCount: 1,
|
|
216
|
+
keepAlive: false,
|
|
217
|
+
closed: props.closeable
|
|
218
|
+
});
|
|
219
|
+
const [lockScroll, unlockScroll] = useLockScroll(() => props.lockScroll);
|
|
220
|
+
const classes = computed(() => {
|
|
221
|
+
const prefixCls = componentName;
|
|
222
|
+
return {
|
|
223
|
+
[prefixCls]: true,
|
|
224
|
+
["round"]: props.round,
|
|
225
|
+
[`popup-${props.position}`]: true,
|
|
226
|
+
[`popup-${props.position}--safebottom`]: props.position === "bottom" && props.safeAreaInsetBottom,
|
|
227
|
+
[props.popClass]: true
|
|
228
|
+
};
|
|
229
|
+
});
|
|
230
|
+
const popStyle = computed(() => {
|
|
231
|
+
return {
|
|
232
|
+
zIndex: state.zIndex,
|
|
233
|
+
animationDuration: props.duration ? `${props.duration}s` : "initial",
|
|
234
|
+
...props.style
|
|
235
|
+
};
|
|
236
|
+
});
|
|
237
|
+
const open = () => {
|
|
238
|
+
if (props.zIndex != 2e3) {
|
|
239
|
+
_zIndex = Number(props.zIndex);
|
|
240
|
+
}
|
|
241
|
+
emit("update:visible", true);
|
|
242
|
+
lockScroll();
|
|
243
|
+
state.zIndex = ++_zIndex;
|
|
244
|
+
if (props.destroyOnClose) {
|
|
245
|
+
state.showSlot = true;
|
|
246
|
+
}
|
|
247
|
+
emit("open");
|
|
248
|
+
};
|
|
249
|
+
const close = () => {
|
|
250
|
+
unlockScroll();
|
|
251
|
+
emit("update:visible", false);
|
|
252
|
+
emit("close");
|
|
253
|
+
if (props.destroyOnClose) {
|
|
254
|
+
setTimeout(() => {
|
|
255
|
+
state.showSlot = false;
|
|
256
|
+
}, +props.duration * 1e3);
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
const onClick = (e) => {
|
|
260
|
+
emit("click", e);
|
|
261
|
+
};
|
|
262
|
+
const onClickCloseIcon = (e) => {
|
|
263
|
+
emit("click-close-icon", e);
|
|
264
|
+
close();
|
|
265
|
+
};
|
|
266
|
+
const onClickOverlay = (e) => {
|
|
267
|
+
if (props.closeOnClickOverlay) {
|
|
268
|
+
emit("click-overlay", e);
|
|
269
|
+
close();
|
|
270
|
+
}
|
|
271
|
+
};
|
|
272
|
+
const onOpened = (e) => {
|
|
273
|
+
emit("opend", e);
|
|
274
|
+
};
|
|
275
|
+
const onClosed = (e) => {
|
|
276
|
+
emit("closed", e);
|
|
277
|
+
};
|
|
278
|
+
onMounted(() => {
|
|
279
|
+
props.transition ? state.transitionName = props.transition : state.transitionName = `popup-slide-${props.position}`;
|
|
280
|
+
props.visible && open();
|
|
281
|
+
});
|
|
282
|
+
onBeforeUnmount(() => {
|
|
283
|
+
props.visible && close();
|
|
284
|
+
});
|
|
285
|
+
onBeforeMount(() => {
|
|
286
|
+
if (props.visible) {
|
|
287
|
+
unlockScroll();
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
onActivated(() => {
|
|
291
|
+
if (state.keepAlive) {
|
|
292
|
+
emit("update:visible", true);
|
|
293
|
+
state.keepAlive = false;
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
onDeactivated(() => {
|
|
297
|
+
if (props.visible) {
|
|
298
|
+
close();
|
|
299
|
+
state.keepAlive = true;
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
watch(
|
|
303
|
+
() => props.visible,
|
|
304
|
+
(value) => {
|
|
305
|
+
if (value) {
|
|
306
|
+
open();
|
|
307
|
+
} else {
|
|
308
|
+
close();
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
);
|
|
312
|
+
watch(
|
|
313
|
+
() => props.position,
|
|
314
|
+
(value) => {
|
|
315
|
+
value === "center" ? state.transitionName = "popup-fade" : state.transitionName = `popup-slide-${value}`;
|
|
316
|
+
}
|
|
317
|
+
);
|
|
318
|
+
watch(
|
|
319
|
+
() => props.closeable,
|
|
320
|
+
(value) => {
|
|
321
|
+
state.closed = value;
|
|
322
|
+
}
|
|
323
|
+
);
|
|
324
|
+
return {
|
|
325
|
+
...toRefs(state),
|
|
326
|
+
popStyle,
|
|
327
|
+
classes,
|
|
328
|
+
onClick,
|
|
329
|
+
onClickCloseIcon,
|
|
330
|
+
onClickOverlay,
|
|
331
|
+
onOpened,
|
|
332
|
+
onClosed,
|
|
333
|
+
popupRef
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
const _hoisted_1 = { key: 1 };
|
|
338
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
339
|
+
const _component_nut_overlay = resolveComponent("nut-overlay");
|
|
340
|
+
const _component_nut_icon = resolveComponent("nut-icon");
|
|
341
|
+
return _ctx.isWrapTeleport ? (openBlock(), createBlock(Teleport, {
|
|
342
|
+
key: 0,
|
|
343
|
+
to: _ctx.teleport
|
|
344
|
+
}, [
|
|
345
|
+
_ctx.overlay ? (openBlock(), createBlock(_component_nut_overlay, {
|
|
346
|
+
key: 0,
|
|
347
|
+
visible: _ctx.visible,
|
|
348
|
+
"close-on-click-overlay": _ctx.closeOnClickOverlay,
|
|
349
|
+
class: normalizeClass(_ctx.overlayClass),
|
|
350
|
+
style: normalizeStyle(_ctx.overlayStyle),
|
|
351
|
+
"z-index": _ctx.zIndex,
|
|
352
|
+
"lock-scroll": _ctx.lockScroll,
|
|
353
|
+
duration: _ctx.duration,
|
|
354
|
+
onClick: _ctx.onClickOverlay
|
|
355
|
+
}, null, 8, ["visible", "close-on-click-overlay", "class", "style", "z-index", "lock-scroll", "duration", "onClick"])) : createCommentVNode("", true),
|
|
356
|
+
createTextVNode(),
|
|
357
|
+
createVNode(Transition, {
|
|
358
|
+
name: _ctx.transitionName,
|
|
359
|
+
onAfterEnter: _ctx.onOpened,
|
|
360
|
+
onAfterLeave: _ctx.onClosed
|
|
361
|
+
}, {
|
|
362
|
+
default: withCtx(() => [
|
|
363
|
+
withDirectives(createElementVNode("view", {
|
|
364
|
+
class: normalizeClass(_ctx.classes),
|
|
365
|
+
style: normalizeStyle(_ctx.popStyle),
|
|
366
|
+
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.onClick && _ctx.onClick(...args)),
|
|
367
|
+
ref: "popupRef"
|
|
368
|
+
}, [
|
|
369
|
+
_ctx.showSlot ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("", true),
|
|
370
|
+
createTextVNode(),
|
|
371
|
+
_ctx.closed ? (openBlock(), createElementBlock("view", {
|
|
372
|
+
key: 1,
|
|
373
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClickCloseIcon && _ctx.onClickCloseIcon(...args)),
|
|
374
|
+
class: normalizeClass(["nutui-popup__close-icon", "nutui-popup__close-icon--" + _ctx.closeIconPosition])
|
|
375
|
+
}, [
|
|
376
|
+
createVNode(_component_nut_icon, mergeProps(_ctx.$attrs, {
|
|
377
|
+
name: _ctx.closeIcon,
|
|
378
|
+
size: "12px"
|
|
379
|
+
}), null, 16, ["name"])
|
|
380
|
+
], 2)) : createCommentVNode("", true)
|
|
381
|
+
], 6), [
|
|
382
|
+
[vShow, _ctx.visible]
|
|
383
|
+
])
|
|
384
|
+
]),
|
|
385
|
+
_: 3
|
|
386
|
+
}, 8, ["name", "onAfterEnter", "onAfterLeave"])
|
|
387
|
+
], 8, ["to"])) : (openBlock(), createElementBlock("view", _hoisted_1, [
|
|
388
|
+
_ctx.overlay ? (openBlock(), createBlock(_component_nut_overlay, {
|
|
389
|
+
key: 0,
|
|
390
|
+
visible: _ctx.visible,
|
|
391
|
+
"close-on-click-overlay": _ctx.closeOnClickOverlay,
|
|
392
|
+
class: normalizeClass(_ctx.overlayClass),
|
|
393
|
+
style: normalizeStyle(_ctx.overlayStyle),
|
|
394
|
+
"z-index": _ctx.zIndex,
|
|
395
|
+
"lock-scroll": _ctx.lockScroll,
|
|
396
|
+
duration: _ctx.duration,
|
|
397
|
+
onClick: _ctx.onClickOverlay
|
|
398
|
+
}, null, 8, ["visible", "close-on-click-overlay", "class", "style", "z-index", "lock-scroll", "duration", "onClick"])) : createCommentVNode("", true),
|
|
399
|
+
createTextVNode(),
|
|
400
|
+
createVNode(Transition, {
|
|
401
|
+
name: _ctx.transitionName,
|
|
402
|
+
onAfterEnter: _ctx.onOpened,
|
|
403
|
+
onAfterLeave: _ctx.onClosed
|
|
404
|
+
}, {
|
|
405
|
+
default: withCtx(() => [
|
|
406
|
+
withDirectives(createElementVNode("view", {
|
|
407
|
+
class: normalizeClass(_ctx.classes),
|
|
408
|
+
style: normalizeStyle(_ctx.popStyle),
|
|
409
|
+
onClick: _cache[3] || (_cache[3] = (...args) => _ctx.onClick && _ctx.onClick(...args))
|
|
410
|
+
}, [
|
|
411
|
+
_ctx.showSlot ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("", true),
|
|
412
|
+
createTextVNode(),
|
|
413
|
+
_ctx.closed ? (openBlock(), createElementBlock("view", {
|
|
414
|
+
key: 1,
|
|
415
|
+
onClick: _cache[2] || (_cache[2] = (...args) => _ctx.onClickCloseIcon && _ctx.onClickCloseIcon(...args)),
|
|
416
|
+
class: normalizeClass(["nutui-popup__close-icon", "nutui-popup__close-icon--" + _ctx.closeIconPosition])
|
|
417
|
+
}, [
|
|
418
|
+
createVNode(_component_nut_icon, {
|
|
419
|
+
name: _ctx.closeIcon,
|
|
420
|
+
size: "12px"
|
|
421
|
+
}, null, 8, ["name"])
|
|
422
|
+
], 2)) : createCommentVNode("", true)
|
|
423
|
+
], 6), [
|
|
424
|
+
[vShow, _ctx.visible]
|
|
425
|
+
])
|
|
426
|
+
]),
|
|
427
|
+
_: 3
|
|
428
|
+
}, 8, ["name", "onAfterEnter", "onAfterLeave"])
|
|
429
|
+
]));
|
|
69
430
|
}
|
|
70
|
-
|
|
431
|
+
var Popup = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
432
|
+
export { Popup as P, _sfc_main$1 as _, popupProps as p };
|
package/dist/packages/_es/raf.js
CHANGED
|
@@ -1,9 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
.self-content {
|
|
2
|
+
width: 195px;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-wrap: wrap;
|
|
5
|
+
}
|
|
6
|
+
.self-content-item {
|
|
7
|
+
margin-top: 10px;
|
|
8
|
+
margin-bottom: 10px;
|
|
9
|
+
display: flex;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
align-items: center;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
}
|
|
14
|
+
.self-content-desc {
|
|
15
|
+
margin-top: 5px;
|
|
16
|
+
width: 60px;
|
|
17
|
+
font-size: 10px;
|
|
18
|
+
text-align: center;
|
|
19
|
+
}@keyframes moving {
|
|
2
20
|
from {
|
|
3
21
|
transform: translateX(100%);
|
|
4
22
|
}
|
|
5
23
|
to {
|
|
6
|
-
transform: translateX(var(--
|
|
24
|
+
transform: translateX(var(--9732a304));
|
|
7
25
|
}
|
|
8
26
|
}
|
|
9
27
|
@-webkit-keyframes moving {
|
|
@@ -11,6 +29,6 @@ from {
|
|
|
11
29
|
-webkit-transform: translateX(100%);
|
|
12
30
|
}
|
|
13
31
|
to {
|
|
14
|
-
transform: translateX(var(--
|
|
32
|
+
transform: translateX(var(--9732a304));
|
|
15
33
|
}
|
|
16
34
|
}/* @import './index.scss'; */
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @nutui/nutui v3.2.6-beta.1 Mon Oct 31 2022 19:38:22 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
|
+
* Released under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
let count = 0;
|
|
7
|
+
const CLSNAME = "nut-overflow-hidden";
|
|
8
|
+
const useLockScroll = (isLock) => {
|
|
9
|
+
const lock = () => {
|
|
10
|
+
if (isLock()) {
|
|
11
|
+
!count && document.body.classList.add(CLSNAME);
|
|
12
|
+
count++;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
const unlock = () => {
|
|
16
|
+
if (isLock() && count) {
|
|
17
|
+
count--;
|
|
18
|
+
!count && document.body.classList.remove(CLSNAME);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
return [lock, unlock];
|
|
22
|
+
};
|
|
23
|
+
export { useLockScroll as u };
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
.nut-signature {
|
|
2
2
|
.nut-signature-inner {
|
|
3
|
-
height: 10rem;
|
|
3
|
+
// height: 10rem;
|
|
4
4
|
margin-bottom: 1rem;
|
|
5
5
|
border: 1px solid #dadada;
|
|
6
6
|
display: flex;
|
|
7
7
|
justify-content: center;
|
|
8
8
|
align-items: center;
|
|
9
9
|
}
|
|
10
|
+
.spcanvas_WEAPP {
|
|
11
|
+
height: 10rem;
|
|
12
|
+
}
|
|
10
13
|
|
|
11
14
|
.nut-signature-btn {
|
|
12
15
|
margin-right: 15px;
|
|
@@ -1235,6 +1235,10 @@
|
|
|
1235
1235
|
"type": "number",
|
|
1236
1236
|
"description": "属性说明:手势缩放时,最小缩放比例`小程序暂不支持`,默认值:1/3"
|
|
1237
1237
|
},
|
|
1238
|
+
"nut-imagepreview/is-Loop": {
|
|
1239
|
+
"type": "boolean",
|
|
1240
|
+
"description": "属性说明:是否循环播放,默认值:`true`"
|
|
1241
|
+
},
|
|
1238
1242
|
"nut-indicator/current": {
|
|
1239
1243
|
"type": "number",
|
|
1240
1244
|
"description": "属性说明:当前步骤,默认值:1"
|