@nutui/nutui 4.0.0 → 4.0.1-2.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 +226 -0
- package/README.md +34 -65
- package/dist/nutui.es.js +10 -17
- package/dist/nutui.js +16202 -0
- package/dist/nutui.umd.js +1 -7
- package/dist/packages/_es/ActionSheet.js +79 -94
- package/dist/packages/_es/Address.js +260 -345
- package/dist/packages/_es/AddressList.js +269 -354
- package/dist/packages/_es/Animate.js +46 -38
- package/dist/packages/_es/Audio.js +128 -180
- package/dist/packages/_es/AudioOperate.js +60 -52
- package/dist/packages/_es/Avatar.js +67 -75
- package/dist/packages/_es/AvatarGroup.js +23 -31
- package/dist/packages/_es/Backtop.js +59 -99
- package/dist/packages/_es/Badge.js +39 -46
- package/dist/packages/_es/Barrage.js +68 -145
- package/dist/packages/_es/Button.js +47 -66
- package/dist/packages/_es/Calendar.js +135 -152
- package/dist/packages/_es/CalendarItem.js +6 -6
- package/dist/packages/_es/Card.js +42 -56
- package/dist/packages/_es/Cascader.js +323 -433
- package/dist/packages/_es/Category.js +29 -39
- package/dist/packages/_es/CategoryPane.js +57 -83
- package/dist/packages/_es/Cell.js +56 -71
- package/dist/packages/_es/CellGroup.js +19 -27
- package/dist/packages/_es/Checkbox.js +109 -138
- package/dist/packages/_es/CheckboxGroup.js +38 -61
- package/dist/packages/_es/CircleProgress.js +67 -96
- package/dist/packages/_es/Col.js +23 -31
- package/dist/packages/_es/Collapse.js +37 -67
- package/dist/packages/_es/CollapseItem.js +91 -184
- package/dist/packages/_es/Comment.js +207 -279
- package/dist/packages/_es/ConfigProvider.js +38 -56
- package/dist/packages/_es/Countdown.js +100 -194
- package/dist/packages/_es/Countup.js +232 -428
- package/dist/packages/_es/DatePicker.js +169 -245
- package/dist/packages/_es/Dialog.js +163 -188
- package/dist/packages/_es/Divider.js +42 -40
- package/dist/packages/_es/Drag.js +70 -153
- package/dist/packages/_es/Ecard.js +64 -104
- package/dist/packages/_es/Elevator.js +144 -201
- package/dist/packages/_es/Ellipsis.js +95 -159
- package/dist/packages/_es/Empty.js +23 -39
- package/dist/packages/_es/FixedNav.js +93 -116
- package/dist/packages/_es/Form.js +108 -164
- package/dist/packages/_es/FormItem.js +48 -61
- package/dist/packages/_es/Grid.js +5 -6
- package/dist/packages/_es/GridItem.js +58 -84
- package/dist/packages/_es/Image.js +98 -88
- package/dist/packages/_es/ImagePreview.js +262 -392
- package/dist/packages/_es/Indicator.js +30 -34
- package/dist/packages/_es/InfiniteLoading.js +83 -117
- package/dist/packages/_es/Input.js +176 -223
- package/dist/packages/_es/InputNumber.js +81 -117
- package/dist/packages/_es/Interceptor-6e26b757.js +18 -0
- package/dist/packages/_es/Invoice.js +105 -113
- package/dist/packages/_es/Layout.js +3 -4
- package/dist/packages/_es/List.js +147 -89
- package/dist/packages/_es/Menu.js +96 -152
- package/dist/packages/_es/MenuItem.js +117 -153
- package/dist/packages/_es/Navbar.js +103 -119
- package/dist/packages/_es/Noticebar.js +207 -273
- package/dist/packages/_es/Notify.js +110 -147
- package/dist/packages/_es/NumberKeyboard.js +127 -202
- package/dist/packages/_es/Overlay.js +53 -66
- package/dist/packages/_es/Pagination.js +70 -100
- package/dist/packages/_es/Picker.js +276 -425
- package/dist/packages/_es/Popover.js +122 -225
- package/dist/packages/_es/Popup.js +4 -4
- package/dist/packages/_es/Price.js +47 -80
- package/dist/packages/_es/Progress.js +63 -79
- package/dist/packages/_es/PullRefresh.js +96 -157
- package/dist/packages/_es/Radio.js +4 -4
- package/dist/packages/_es/RadioGroup.js +3 -3
- package/dist/packages/_es/Range.js +205 -329
- package/dist/packages/_es/Rate.js +93 -122
- package/dist/packages/_es/Row.js +21 -27
- package/dist/packages/_es/Searchbar.js +130 -160
- package/dist/packages/_es/ShortPassword.js +69 -93
- package/dist/packages/_es/SideNavbar.js +49 -59
- package/dist/packages/_es/SideNavbarItem.js +22 -32
- package/dist/packages/_es/Signature.js +83 -128
- package/dist/packages/_es/Skeleton.js +110 -130
- package/dist/packages/_es/Sku.js +251 -326
- package/dist/packages/_es/Step.js +60 -69
- package/dist/packages/_es/Steps.js +26 -31
- package/dist/packages/_es/Sticky.js +4 -4
- package/dist/packages/_es/SubSideNavbar.js +52 -56
- package/dist/packages/_es/Swipe.js +84 -137
- package/dist/packages/_es/Swiper.js +175 -310
- package/dist/packages/_es/SwiperItem.js +28 -44
- package/dist/packages/_es/Switch.js +55 -67
- package/dist/packages/_es/TabPane.js +32 -20
- package/dist/packages/_es/Tabbar.js +41 -52
- package/dist/packages/_es/TabbarItem.js +61 -81
- package/dist/packages/_es/Table.js +110 -148
- package/dist/packages/_es/Tabs.js +284 -205
- package/dist/packages/_es/Tag.js +44 -61
- package/dist/packages/_es/Textarea.js +80 -124
- package/dist/packages/_es/TimeDetail.js +49 -57
- package/dist/packages/_es/TimePannel.js +35 -31
- package/dist/packages/_es/TimeSelect.js +47 -68
- package/dist/packages/_es/Toast.js +150 -203
- package/dist/packages/_es/Tour.js +139 -175
- package/dist/packages/_es/TrendArrow.js +57 -58
- package/dist/packages/_es/Uploader.js +235 -359
- package/dist/packages/_es/Video.js +191 -298
- package/dist/packages/_es/Watermark.js +84 -98
- package/dist/packages/_es/_plugin-vue_export-helper-dad06003.js +9 -0
- package/dist/packages/_es/common-d218746f.js +116 -0
- package/dist/packages/_es/component-234624bc.js +89 -0
- package/dist/packages/_es/index-14dfadc4.js +561 -0
- package/dist/packages/_es/index-192a3ef6.js +29 -0
- package/dist/packages/_es/index-360c5092.js +210 -0
- package/dist/packages/_es/index-496e6e05.js +24 -0
- package/dist/packages/_es/index-50eed3d9.js +7 -0
- package/dist/packages/_es/index-53ec2d4d.js +34 -0
- package/dist/packages/_es/index-fadb0974.js +8 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-1139b29a.js +43 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-43b774dd.js +77 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-f44c159d.js +110 -0
- package/dist/packages/_es/mountComponent-6d4ff200.js +23 -0
- package/dist/packages/_es/pxCheck-38173291.js +4 -0
- package/dist/packages/_es/raf-a74f1a06.js +16 -0
- package/dist/packages/_es/renderIcon-47498b32.js +5 -0
- package/dist/packages/actionsheet/index.scss +2 -0
- package/dist/packages/actionsheet/style.mjs +0 -2
- package/dist/packages/address/index.scss +5 -2
- package/dist/packages/address/style.mjs +0 -3
- package/dist/packages/addresslist/index.scss +3 -0
- package/dist/packages/addresslist/style.mjs +0 -2
- package/dist/packages/audio/index.scss +2 -0
- package/dist/packages/audio/style.mjs +0 -1
- package/dist/packages/audiooperate/index.scss +2 -0
- package/dist/packages/audiooperate/style.mjs +0 -1
- package/dist/packages/badge/index.scss +3 -0
- package/dist/packages/button/index.scss +1 -1
- package/dist/packages/calendar/index.scss +3 -0
- package/dist/packages/calendar/style.mjs +0 -3
- package/dist/packages/card/index.scss +3 -0
- package/dist/packages/card/style.mjs +0 -2
- package/dist/packages/cascader/index.scss +4 -0
- package/dist/packages/cascader/style.mjs +0 -5
- package/dist/packages/cellgroup/index.scss +1 -1
- package/dist/packages/checkbox/index.scss +41 -0
- package/dist/packages/col/index.scss +2 -2
- package/dist/packages/comment/index.scss +2 -0
- package/dist/packages/comment/style.mjs +0 -1
- package/dist/packages/datepicker/index.scss +1 -2
- package/dist/packages/datepicker/style.mjs +0 -3
- package/dist/packages/dialog/index.scss +11 -0
- package/dist/packages/dialog/style.mjs +0 -3
- package/dist/packages/ecard/index.scss +2 -0
- package/dist/packages/ecard/style.mjs +0 -1
- package/dist/packages/fixednav/index.scss +2 -0
- package/dist/packages/fixednav/style.mjs +0 -1
- package/dist/packages/form/index.scss +1 -2
- package/dist/packages/form/style.mjs +0 -1
- package/dist/packages/formitem/index.scss +3 -0
- package/dist/packages/formitem/style.mjs +0 -1
- package/dist/packages/imagepreview/index.scss +5 -5
- package/dist/packages/imagepreview/style.mjs +0 -5
- package/dist/packages/input/index.scss +13 -13
- package/dist/packages/invoice/index.scss +6 -0
- package/dist/packages/invoice/style.mjs +0 -7
- package/dist/packages/list/index.scss +8 -8
- package/dist/packages/menuitem/index.scss +9 -10
- package/dist/packages/menuitem/style.mjs +0 -2
- package/dist/packages/navbar/index.scss +0 -1
- package/dist/packages/noticebar/index.scss +12 -2
- package/dist/packages/notify/index.scss +2 -0
- package/dist/packages/notify/style.mjs +0 -2
- package/dist/packages/numberkeyboard/index.scss +2 -0
- package/dist/packages/numberkeyboard/style.mjs +0 -2
- package/dist/packages/picker/index.scss +4 -9
- package/dist/packages/picker/style.mjs +0 -2
- package/dist/packages/popover/index.scss +2 -0
- package/dist/packages/popover/style.mjs +0 -2
- package/dist/packages/popup/index.scss +2 -0
- package/dist/packages/popup/style.mjs +0 -1
- package/dist/packages/price/index.scss +5 -10
- package/dist/packages/rate/index.scss +6 -9
- package/dist/packages/searchbar/index.scss +4 -0
- package/dist/packages/shortpassword/index.scss +18 -0
- package/dist/packages/shortpassword/style.mjs +0 -2
- package/dist/packages/signature/index.scss +2 -0
- package/dist/packages/signature/style.mjs +0 -1
- package/dist/packages/skeleton/index.scss +2 -0
- package/dist/packages/skeleton/style.mjs +0 -1
- package/dist/packages/sku/index.scss +4 -0
- package/dist/packages/sku/style.mjs +0 -4
- package/dist/packages/tabbaritem/index.scss +2 -0
- package/dist/packages/tabbaritem/style.mjs +0 -1
- package/dist/packages/tabs/index.scss +36 -2
- package/dist/packages/tabs/style.mjs +0 -1
- package/dist/packages/textarea/index.scss +2 -0
- package/dist/packages/timeselect/index.scss +2 -0
- package/dist/packages/timeselect/style.mjs +0 -2
- package/dist/packages/tour/index.scss +2 -0
- package/dist/packages/tour/style.mjs +0 -3
- package/dist/packages/uploader/index.scss +10 -2
- package/dist/packages/uploader/style.mjs +0 -2
- package/dist/resolver/index.d.ts +6 -0
- package/dist/resolver/index.js +1 -0
- package/dist/resolver/index.mjs +24 -0
- package/dist/resolver/package.json +20 -0
- package/dist/smartips/web-types.json +114 -15
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +155 -52
- package/dist/styles/themes/jdb.scss +155 -52
- package/dist/styles/themes/jddkh.scss +155 -52
- package/dist/styles/themes/jdt.scss +155 -52
- package/dist/styles/variables-jdb.scss +9 -1
- package/dist/styles/variables-jddkh.scss +9 -1
- package/dist/styles/variables-jdt.scss +9 -1
- package/dist/styles/variables.scss +8 -0
- package/dist/types/__VUE/address/index.vue.d.ts +2 -1
- package/dist/types/__VUE/addresslist/components/GeneralShell.vue.d.ts +1 -1
- package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +1 -1
- package/dist/types/__VUE/addresslist/index.vue.d.ts +1 -1
- package/dist/types/__VUE/animate/index.vue.d.ts +6 -0
- package/dist/types/__VUE/audiooperate/index.vue.d.ts +4 -4
- package/dist/types/__VUE/badge/index.vue.d.ts +9 -0
- package/dist/types/__VUE/button/type.d.ts +1 -0
- package/dist/types/__VUE/calendaritem/type.d.ts +1 -0
- package/dist/types/__VUE/collapse/index.vue.d.ts +31 -5
- package/dist/types/__VUE/collapseitem/index.vue.d.ts +117 -11
- package/dist/types/__VUE/configprovider/index.vue.d.ts +2 -2
- package/dist/types/__VUE/datepicker/index.vue.d.ts +1 -1
- package/dist/types/__VUE/dialog/index.d.ts +1 -0
- package/dist/types/__VUE/dialog/index.vue.d.ts +1 -0
- package/dist/types/__VUE/grid/index.vue.d.ts +1 -1
- package/dist/types/__VUE/image/index.vue.d.ts +14 -3
- package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +9 -0
- package/dist/types/__VUE/imagepreview/index.vue.d.ts +1 -1
- package/dist/types/__VUE/input/index.vue.d.ts +27 -2
- package/dist/types/__VUE/list/index.vue.d.ts +42 -13
- package/dist/types/__VUE/list/type.d.ts +13 -0
- package/dist/types/__VUE/menu/index.vue.d.ts +0 -2
- package/dist/types/__VUE/menuitem/index.vue.d.ts +9 -17
- package/dist/types/__VUE/navbar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/noticebar/index.vue.d.ts +5 -2
- package/dist/types/__VUE/picker/common.d.ts +2 -0
- package/dist/types/__VUE/picker/usePicker.d.ts +1 -1
- package/dist/types/__VUE/price/index.vue.d.ts +9 -0
- package/dist/types/__VUE/rate/index.vue.d.ts +110 -3
- package/dist/types/__VUE/row/index.vue.d.ts +1 -1
- package/dist/types/__VUE/searchbar/index.vue.d.ts +121 -5
- package/dist/types/__VUE/skeleton/index.vue.d.ts +2 -2
- package/dist/types/__VUE/swiper/index.vue.d.ts +9 -2
- package/dist/types/__VUE/switch/index.vue.d.ts +1 -0
- package/dist/types/__VUE/table/common.d.ts +55 -2
- package/dist/types/__VUE/tabpane/index.vue.d.ts +1 -4
- package/dist/types/__VUE/tabs/hooks.d.ts +12 -0
- package/dist/types/__VUE/tabs/index.vue.d.ts +35 -5
- package/dist/types/__VUE/tabs/types.d.ts +12 -0
- package/dist/types/__VUE/timeselect/index.vue.d.ts +1 -1
- package/dist/types/__VUE/toast/index.vue.d.ts +11 -4
- package/dist/types/__VUE/uploader/type.d.ts +2 -1
- package/dist/types/__VUE/watermark/index.vue.d.ts +1 -1
- package/dist/types/index.d.ts +1 -2
- package/dist/types/resolver/index.d.ts +6 -0
- package/dist/types/utils/date.d.ts +4 -0
- package/dist/types/utils/useTaroRect/index.d.ts +1 -1
- package/dist/types/utils/util.d.ts +1 -1
- package/package.json +13 -6
- package/dist/packages/_es/_plugin-vue_export-helper-cc2b3d55.js +0 -10
- package/dist/packages/_es/common-b9a5e726.js +0 -145
- package/dist/packages/_es/component-81a4c1d0.js +0 -145
- package/dist/packages/_es/index-29892cda.js +0 -33
- package/dist/packages/_es/index-2ae3ae87.js +0 -846
- package/dist/packages/_es/index-43c34ac6.js +0 -30
- package/dist/packages/_es/index-54d03fc1.js +0 -8
- package/dist/packages/_es/index-79c5dc33.js +0 -10
- package/dist/packages/_es/index-7a7385e4.js +0 -67
- package/dist/packages/_es/index-991c279f.js +0 -244
- package/dist/packages/_es/index.vue_vue_type_script_lang-22dfc112.js +0 -46
- package/dist/packages/_es/index.vue_vue_type_script_lang-442e4704.js +0 -98
- package/dist/packages/_es/index.vue_vue_type_script_lang-cc5c4086.js +0 -151
- package/dist/packages/_es/interceptor-956b24fc.js +0 -29
- package/dist/packages/_es/mountComponent-1ece4110.js +0 -39
- package/dist/packages/_es/pxCheck-c6b9f6b7.js +0 -6
- package/dist/packages/_es/raf-729dad54.js +0 -25
- package/dist/packages/_es/renderIcon-3d0fd47c.js +0 -9
- /package/dist/types/utils/{interceptor.d.ts → Interceptor.d.ts} +0 -0
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { ref, onMounted } from "vue";
|
|
2
|
-
const overflowScrollReg = /scroll|auto|overlay/i;
|
|
3
|
-
const defaultRoot = window;
|
|
4
|
-
function isElement(node) {
|
|
5
|
-
const ELEMENT_NODE_TYPE = 1;
|
|
6
|
-
return node.tagName !== "HTML" && node.tagName !== "BODY" && node.nodeType === ELEMENT_NODE_TYPE;
|
|
7
|
-
}
|
|
8
|
-
function getScrollParent(el, root = defaultRoot) {
|
|
9
|
-
let node = el;
|
|
10
|
-
while (node && node !== root && isElement(node)) {
|
|
11
|
-
const { overflowY } = window.getComputedStyle(node);
|
|
12
|
-
if (overflowScrollReg.test(overflowY)) {
|
|
13
|
-
return node;
|
|
14
|
-
}
|
|
15
|
-
node = node.parentNode;
|
|
16
|
-
}
|
|
17
|
-
return root;
|
|
18
|
-
}
|
|
19
|
-
function useScrollParent(el, root = defaultRoot) {
|
|
20
|
-
const scrollParent = ref();
|
|
21
|
-
onMounted(() => {
|
|
22
|
-
if (el.value) {
|
|
23
|
-
scrollParent.value = getScrollParent(el.value, root);
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
return scrollParent;
|
|
27
|
-
}
|
|
28
|
-
export {
|
|
29
|
-
useScrollParent as u
|
|
30
|
-
};
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { ref } from "vue";
|
|
2
|
-
const MIN_DISTANCE = 10;
|
|
3
|
-
function getDirection(x, y) {
|
|
4
|
-
if (x > y && x > MIN_DISTANCE) {
|
|
5
|
-
return "horizontal";
|
|
6
|
-
}
|
|
7
|
-
if (y > x && y > MIN_DISTANCE) {
|
|
8
|
-
return "vertical";
|
|
9
|
-
}
|
|
10
|
-
return "";
|
|
11
|
-
}
|
|
12
|
-
function useTouch() {
|
|
13
|
-
const startX = ref(0);
|
|
14
|
-
const startY = ref(0);
|
|
15
|
-
const moveX = ref(0);
|
|
16
|
-
const moveY = ref(0);
|
|
17
|
-
const deltaX = ref(0);
|
|
18
|
-
const deltaY = ref(0);
|
|
19
|
-
const offsetX = ref(0);
|
|
20
|
-
const offsetY = ref(0);
|
|
21
|
-
const direction = ref("");
|
|
22
|
-
const isVertical = () => direction.value === "vertical";
|
|
23
|
-
const isHorizontal = () => direction.value === "horizontal";
|
|
24
|
-
const reset = () => {
|
|
25
|
-
deltaX.value = 0;
|
|
26
|
-
deltaY.value = 0;
|
|
27
|
-
offsetX.value = 0;
|
|
28
|
-
offsetY.value = 0;
|
|
29
|
-
direction.value = "";
|
|
30
|
-
};
|
|
31
|
-
const start = (event) => {
|
|
32
|
-
reset();
|
|
33
|
-
startX.value = event.touches[0].clientX;
|
|
34
|
-
startY.value = event.touches[0].clientY;
|
|
35
|
-
};
|
|
36
|
-
const move = (event) => {
|
|
37
|
-
const touch = event.touches[0];
|
|
38
|
-
deltaX.value = touch.clientX - startX.value;
|
|
39
|
-
deltaY.value = touch.clientY - startY.value;
|
|
40
|
-
moveX.value = touch.clientX;
|
|
41
|
-
moveY.value = touch.clientY;
|
|
42
|
-
offsetX.value = Math.abs(deltaX.value);
|
|
43
|
-
offsetY.value = Math.abs(deltaY.value);
|
|
44
|
-
if (!direction.value) {
|
|
45
|
-
direction.value = getDirection(offsetX.value, offsetY.value);
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
return {
|
|
49
|
-
move,
|
|
50
|
-
start,
|
|
51
|
-
reset,
|
|
52
|
-
startX,
|
|
53
|
-
startY,
|
|
54
|
-
moveX,
|
|
55
|
-
moveY,
|
|
56
|
-
deltaX,
|
|
57
|
-
deltaY,
|
|
58
|
-
offsetX,
|
|
59
|
-
offsetY,
|
|
60
|
-
direction,
|
|
61
|
-
isVertical,
|
|
62
|
-
isHorizontal
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
export {
|
|
66
|
-
useTouch as u
|
|
67
|
-
};
|
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
2
|
-
import { reactive, computed, watch, watchEffect, toRefs, resolveComponent, openBlock, createBlock, Teleport, mergeProps, createCommentVNode, createVNode, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, renderSlot, createElementBlock, vShow } from "vue";
|
|
3
|
-
import Overlay from "./Overlay.js";
|
|
4
|
-
import { Close } from "@nutui/icons-vue";
|
|
5
|
-
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
6
|
-
const popupProps = {
|
|
7
|
-
visible: {
|
|
8
|
-
type: Boolean,
|
|
9
|
-
default: false
|
|
10
|
-
},
|
|
11
|
-
zIndex: {
|
|
12
|
-
type: [Number, String],
|
|
13
|
-
default: 2e3
|
|
14
|
-
},
|
|
15
|
-
duration: {
|
|
16
|
-
type: [Number, String],
|
|
17
|
-
default: 0.3
|
|
18
|
-
},
|
|
19
|
-
lockScroll: {
|
|
20
|
-
type: Boolean,
|
|
21
|
-
default: true
|
|
22
|
-
},
|
|
23
|
-
closeOnClickOverlay: {
|
|
24
|
-
type: Boolean,
|
|
25
|
-
default: true
|
|
26
|
-
},
|
|
27
|
-
position: {
|
|
28
|
-
type: String,
|
|
29
|
-
default: "center"
|
|
30
|
-
},
|
|
31
|
-
transition: {
|
|
32
|
-
type: String,
|
|
33
|
-
default: ""
|
|
34
|
-
},
|
|
35
|
-
style: {
|
|
36
|
-
type: Object,
|
|
37
|
-
default: {}
|
|
38
|
-
},
|
|
39
|
-
popClass: {
|
|
40
|
-
type: String,
|
|
41
|
-
default: ""
|
|
42
|
-
},
|
|
43
|
-
closeable: {
|
|
44
|
-
type: Boolean,
|
|
45
|
-
default: false
|
|
46
|
-
},
|
|
47
|
-
closeIconPosition: {
|
|
48
|
-
type: String,
|
|
49
|
-
default: "top-right"
|
|
50
|
-
},
|
|
51
|
-
closeIcon: {
|
|
52
|
-
type: String,
|
|
53
|
-
default: "close"
|
|
54
|
-
},
|
|
55
|
-
destroyOnClose: {
|
|
56
|
-
type: Boolean,
|
|
57
|
-
default: true
|
|
58
|
-
},
|
|
59
|
-
teleport: {
|
|
60
|
-
type: [String, Element],
|
|
61
|
-
default: "body"
|
|
62
|
-
},
|
|
63
|
-
overlay: {
|
|
64
|
-
type: Boolean,
|
|
65
|
-
default: true
|
|
66
|
-
},
|
|
67
|
-
round: {
|
|
68
|
-
type: Boolean,
|
|
69
|
-
default: false
|
|
70
|
-
},
|
|
71
|
-
teleportDisable: {
|
|
72
|
-
type: Boolean,
|
|
73
|
-
default: false
|
|
74
|
-
},
|
|
75
|
-
safeAreaInsetBottom: {
|
|
76
|
-
type: Boolean,
|
|
77
|
-
default: false
|
|
78
|
-
},
|
|
79
|
-
overlayClass: {
|
|
80
|
-
type: String,
|
|
81
|
-
default: ""
|
|
82
|
-
},
|
|
83
|
-
overlayStyle: {
|
|
84
|
-
type: Object,
|
|
85
|
-
default: {}
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
const initIndex = 2e3;
|
|
89
|
-
let _zIndex = initIndex;
|
|
90
|
-
const component = (componentName2, components) => {
|
|
91
|
-
return {
|
|
92
|
-
components,
|
|
93
|
-
props: {
|
|
94
|
-
...popupProps
|
|
95
|
-
},
|
|
96
|
-
emits: ["click-pop", "click-close-icon", "open", "close", "opend", "closed", "click-overlay", "update:visible"],
|
|
97
|
-
setup(props, { emit }) {
|
|
98
|
-
const state = reactive({
|
|
99
|
-
zIndex: props.zIndex,
|
|
100
|
-
showSlot: true,
|
|
101
|
-
closed: props.closeable
|
|
102
|
-
});
|
|
103
|
-
const classes = computed(() => {
|
|
104
|
-
const prefixCls = componentName2;
|
|
105
|
-
return {
|
|
106
|
-
[prefixCls]: true,
|
|
107
|
-
["round"]: props.round,
|
|
108
|
-
[`nut-popup--${props.position}`]: true,
|
|
109
|
-
[`nut-popup--${props.position}--safebottom`]: props.position === "bottom" && props.safeAreaInsetBottom,
|
|
110
|
-
[props.popClass]: true
|
|
111
|
-
};
|
|
112
|
-
});
|
|
113
|
-
const popStyle = computed(() => {
|
|
114
|
-
return {
|
|
115
|
-
zIndex: state.zIndex,
|
|
116
|
-
transitionDuration: `${props.duration}s`,
|
|
117
|
-
...props.style
|
|
118
|
-
};
|
|
119
|
-
});
|
|
120
|
-
const transitionName = computed(() => {
|
|
121
|
-
return props.transition ? props.transition : `nut-popup-slide-${props.position}`;
|
|
122
|
-
});
|
|
123
|
-
const open = () => {
|
|
124
|
-
if (props.zIndex !== initIndex) {
|
|
125
|
-
_zIndex = Number(props.zIndex);
|
|
126
|
-
}
|
|
127
|
-
emit("update:visible", true);
|
|
128
|
-
state.zIndex = ++_zIndex;
|
|
129
|
-
if (props.destroyOnClose) {
|
|
130
|
-
state.showSlot = true;
|
|
131
|
-
}
|
|
132
|
-
emit("open");
|
|
133
|
-
};
|
|
134
|
-
const close = () => {
|
|
135
|
-
emit("update:visible", false);
|
|
136
|
-
emit("close");
|
|
137
|
-
if (props.destroyOnClose) {
|
|
138
|
-
setTimeout(() => {
|
|
139
|
-
state.showSlot = false;
|
|
140
|
-
}, +props.duration * 1e3);
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
const onClick = (e) => {
|
|
144
|
-
emit("click-pop", e);
|
|
145
|
-
};
|
|
146
|
-
const onClickCloseIcon = (e) => {
|
|
147
|
-
e.stopPropagation();
|
|
148
|
-
emit("click-close-icon", e);
|
|
149
|
-
emit("update:visible", false);
|
|
150
|
-
};
|
|
151
|
-
const onClickOverlay = (e) => {
|
|
152
|
-
if (props.closeOnClickOverlay) {
|
|
153
|
-
emit("click-overlay", e);
|
|
154
|
-
emit("update:visible", false);
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
|
-
const onOpened = (e) => {
|
|
158
|
-
emit("opend", e);
|
|
159
|
-
};
|
|
160
|
-
const onClosed = (e) => {
|
|
161
|
-
emit("closed", e);
|
|
162
|
-
};
|
|
163
|
-
watch(
|
|
164
|
-
() => props.visible,
|
|
165
|
-
(val) => {
|
|
166
|
-
props.visible ? open() : close();
|
|
167
|
-
}
|
|
168
|
-
);
|
|
169
|
-
watchEffect(() => {
|
|
170
|
-
state.closed = props.closeable;
|
|
171
|
-
});
|
|
172
|
-
return {
|
|
173
|
-
...toRefs(state),
|
|
174
|
-
popStyle,
|
|
175
|
-
transitionName,
|
|
176
|
-
classes,
|
|
177
|
-
onClick,
|
|
178
|
-
onClickCloseIcon,
|
|
179
|
-
onClickOverlay,
|
|
180
|
-
onOpened,
|
|
181
|
-
onClosed
|
|
182
|
-
};
|
|
183
|
-
}
|
|
184
|
-
};
|
|
185
|
-
};
|
|
186
|
-
const { componentName, create } = createComponent("popup");
|
|
187
|
-
const _sfc_main = create(
|
|
188
|
-
component(componentName, {
|
|
189
|
-
[Overlay.name]: Overlay,
|
|
190
|
-
Close
|
|
191
|
-
})
|
|
192
|
-
);
|
|
193
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
194
|
-
const _component_nut_overlay = resolveComponent("nut-overlay");
|
|
195
|
-
const _component_Close = resolveComponent("Close");
|
|
196
|
-
return openBlock(), createBlock(Teleport, {
|
|
197
|
-
to: _ctx.teleport,
|
|
198
|
-
disabled: !_ctx.teleportDisable
|
|
199
|
-
}, [
|
|
200
|
-
_ctx.overlay ? (openBlock(), createBlock(_component_nut_overlay, mergeProps({
|
|
201
|
-
key: 0,
|
|
202
|
-
visible: _ctx.visible,
|
|
203
|
-
"close-on-click-overlay": _ctx.closeOnClickOverlay,
|
|
204
|
-
"z-index": _ctx.zIndex,
|
|
205
|
-
"lock-scroll": _ctx.lockScroll,
|
|
206
|
-
duration: _ctx.duration,
|
|
207
|
-
"overlay-class": _ctx.overlayClass,
|
|
208
|
-
"overlay-style": _ctx.overlayStyle,
|
|
209
|
-
onClick: _ctx.onClickOverlay
|
|
210
|
-
}, _ctx.$attrs), null, 16, ["visible", "close-on-click-overlay", "z-index", "lock-scroll", "duration", "overlay-class", "overlay-style", "onClick"])) : createCommentVNode("", true),
|
|
211
|
-
createVNode(Transition, {
|
|
212
|
-
name: _ctx.transitionName,
|
|
213
|
-
onAfterEnter: _ctx.onOpened,
|
|
214
|
-
onAfterLeave: _ctx.onClosed
|
|
215
|
-
}, {
|
|
216
|
-
default: withCtx(() => [
|
|
217
|
-
withDirectives(createElementVNode("view", {
|
|
218
|
-
class: normalizeClass(_ctx.classes),
|
|
219
|
-
style: normalizeStyle(_ctx.popStyle),
|
|
220
|
-
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.onClick && _ctx.onClick(...args))
|
|
221
|
-
}, [
|
|
222
|
-
_ctx.showSlot ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("", true),
|
|
223
|
-
_ctx.closed ? (openBlock(), createElementBlock("view", {
|
|
224
|
-
key: 1,
|
|
225
|
-
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClickCloseIcon && _ctx.onClickCloseIcon(...args)),
|
|
226
|
-
class: normalizeClass(["nut-popup__close-icon", "nut-popup__close-icon--" + _ctx.closeIconPosition])
|
|
227
|
-
}, [
|
|
228
|
-
renderSlot(_ctx.$slots, "close-icon", {}, () => [
|
|
229
|
-
createVNode(_component_Close, { height: "12px" })
|
|
230
|
-
])
|
|
231
|
-
], 2)) : createCommentVNode("", true)
|
|
232
|
-
], 6), [
|
|
233
|
-
[vShow, _ctx.visible]
|
|
234
|
-
])
|
|
235
|
-
]),
|
|
236
|
-
_: 3
|
|
237
|
-
}, 8, ["name", "onAfterEnter", "onAfterLeave"])
|
|
238
|
-
], 8, ["to", "disabled"]);
|
|
239
|
-
}
|
|
240
|
-
const Popup = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
241
|
-
export {
|
|
242
|
-
Popup as P,
|
|
243
|
-
popupProps as p
|
|
244
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { provide, readonly, computed, watch, h } from "vue";
|
|
2
|
-
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
3
|
-
const { componentName, create } = createComponent("radio-group");
|
|
4
|
-
const _sfc_main = create({
|
|
5
|
-
props: {
|
|
6
|
-
modelValue: {
|
|
7
|
-
type: [Number, String, Boolean],
|
|
8
|
-
default: ""
|
|
9
|
-
},
|
|
10
|
-
direction: {
|
|
11
|
-
type: String,
|
|
12
|
-
default: "vertical"
|
|
13
|
-
//horizontal
|
|
14
|
-
},
|
|
15
|
-
textPosition: {
|
|
16
|
-
type: String,
|
|
17
|
-
default: "right"
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
emits: ["change", "update:modelValue"],
|
|
21
|
-
setup(props, { emit, slots }) {
|
|
22
|
-
const updateValue = (value) => emit("update:modelValue", value);
|
|
23
|
-
provide("parent", {
|
|
24
|
-
label: readonly(computed(() => props.modelValue)),
|
|
25
|
-
position: props.textPosition,
|
|
26
|
-
updateValue
|
|
27
|
-
});
|
|
28
|
-
watch(
|
|
29
|
-
() => props.modelValue,
|
|
30
|
-
(value) => emit("change", value)
|
|
31
|
-
);
|
|
32
|
-
return () => {
|
|
33
|
-
var _a;
|
|
34
|
-
return h(
|
|
35
|
-
"view",
|
|
36
|
-
{
|
|
37
|
-
class: `${componentName} ${componentName}--${props.direction}`
|
|
38
|
-
},
|
|
39
|
-
(_a = slots.default) == null ? void 0 : _a.call(slots)
|
|
40
|
-
);
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
export {
|
|
45
|
-
_sfc_main as _
|
|
46
|
-
};
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { inject, computed, h } from "vue";
|
|
2
|
-
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
3
|
-
import { CheckNormal, CheckChecked } from "@nutui/icons-vue";
|
|
4
|
-
import { p as pxCheck } from "./pxCheck-c6b9f6b7.js";
|
|
5
|
-
const { componentName, create } = createComponent("radio");
|
|
6
|
-
const _sfc_main = create({
|
|
7
|
-
components: {
|
|
8
|
-
CheckNormal,
|
|
9
|
-
CheckChecked
|
|
10
|
-
},
|
|
11
|
-
props: {
|
|
12
|
-
disabled: {
|
|
13
|
-
type: Boolean,
|
|
14
|
-
default: false
|
|
15
|
-
},
|
|
16
|
-
shape: {
|
|
17
|
-
type: String,
|
|
18
|
-
default: "round"
|
|
19
|
-
// button
|
|
20
|
-
},
|
|
21
|
-
label: {
|
|
22
|
-
type: [String, Number, Boolean],
|
|
23
|
-
default: ""
|
|
24
|
-
},
|
|
25
|
-
iconSize: {
|
|
26
|
-
type: [String, Number],
|
|
27
|
-
default: ""
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
setup(props, { emit, slots }) {
|
|
31
|
-
let parent = inject("parent", null);
|
|
32
|
-
const isCurValue = computed(() => {
|
|
33
|
-
return parent.label.value === props.label;
|
|
34
|
-
});
|
|
35
|
-
const color = computed(() => {
|
|
36
|
-
return !props.disabled ? isCurValue.value ? "nut-radio__icon" : "nut-radio__icon--unchecked" : "nut-radio__icon--disable";
|
|
37
|
-
});
|
|
38
|
-
const position = computed(() => {
|
|
39
|
-
return parent.position;
|
|
40
|
-
});
|
|
41
|
-
const renderIcon = () => {
|
|
42
|
-
const { iconSize } = props;
|
|
43
|
-
const iconNodeMap = {
|
|
44
|
-
CheckNormal: slots.icon ? slots.icon : CheckNormal,
|
|
45
|
-
Checked: slots.checkedIcon ? slots.checkedIcon : CheckChecked
|
|
46
|
-
};
|
|
47
|
-
const iconNode = !isCurValue.value ? iconNodeMap.CheckNormal : iconNodeMap.Checked;
|
|
48
|
-
const size = pxCheck(iconSize);
|
|
49
|
-
return h(iconNode, {
|
|
50
|
-
width: size,
|
|
51
|
-
height: size,
|
|
52
|
-
size,
|
|
53
|
-
class: color.value
|
|
54
|
-
});
|
|
55
|
-
};
|
|
56
|
-
const renderLabel = () => {
|
|
57
|
-
var _a;
|
|
58
|
-
return h(
|
|
59
|
-
"view",
|
|
60
|
-
{
|
|
61
|
-
class: `${componentName}__label ${props.disabled ? `${componentName}__label--disabled` : ""}`
|
|
62
|
-
},
|
|
63
|
-
(_a = slots.default) == null ? void 0 : _a.call(slots)
|
|
64
|
-
);
|
|
65
|
-
};
|
|
66
|
-
const renderButton = () => {
|
|
67
|
-
var _a;
|
|
68
|
-
return h(
|
|
69
|
-
"view",
|
|
70
|
-
{
|
|
71
|
-
class: `${componentName}__button ${isCurValue.value && `${componentName}__button--active`} ${props.disabled ? `${componentName}__button--disabled` : ""}`
|
|
72
|
-
},
|
|
73
|
-
(_a = slots.default) == null ? void 0 : _a.call(slots)
|
|
74
|
-
);
|
|
75
|
-
};
|
|
76
|
-
const handleClick = () => {
|
|
77
|
-
if (isCurValue.value || props.disabled)
|
|
78
|
-
return;
|
|
79
|
-
parent.updateValue(props.label);
|
|
80
|
-
};
|
|
81
|
-
let reverseState = position.value === "left";
|
|
82
|
-
return () => {
|
|
83
|
-
return h(
|
|
84
|
-
"view",
|
|
85
|
-
{
|
|
86
|
-
class: `${componentName} ${componentName}--${props.shape} ${reverseState ? `${componentName}--reverse` : ""}`,
|
|
87
|
-
onClick: handleClick
|
|
88
|
-
},
|
|
89
|
-
[
|
|
90
|
-
props.shape == "button" ? renderButton() : reverseState ? [renderLabel(), renderIcon()] : [renderIcon(), renderLabel()]
|
|
91
|
-
]
|
|
92
|
-
);
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
export {
|
|
97
|
-
_sfc_main as _
|
|
98
|
-
};
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import { ref, reactive, computed, watch, onMounted, onUnmounted, h, unref } from "vue";
|
|
2
|
-
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
3
|
-
import { u as useRect } from "./index-29892cda.js";
|
|
4
|
-
const { componentName, create } = createComponent("sticky");
|
|
5
|
-
const _sfc_main = create({
|
|
6
|
-
props: {
|
|
7
|
-
position: {
|
|
8
|
-
type: String,
|
|
9
|
-
default: "top"
|
|
10
|
-
},
|
|
11
|
-
top: {
|
|
12
|
-
type: [Number, String],
|
|
13
|
-
default: 0
|
|
14
|
-
},
|
|
15
|
-
bottom: {
|
|
16
|
-
type: [Number, String],
|
|
17
|
-
default: 0
|
|
18
|
-
},
|
|
19
|
-
container: {
|
|
20
|
-
type: Object
|
|
21
|
-
},
|
|
22
|
-
zIndex: {
|
|
23
|
-
type: [Number, String],
|
|
24
|
-
default: 2e3
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
emits: ["change", "scroll"],
|
|
28
|
-
setup(props, { emit, slots }) {
|
|
29
|
-
const root = ref();
|
|
30
|
-
const state = reactive({
|
|
31
|
-
width: 0,
|
|
32
|
-
height: 0,
|
|
33
|
-
fixed: false,
|
|
34
|
-
transform: 0
|
|
35
|
-
});
|
|
36
|
-
const rootStyle = computed(() => {
|
|
37
|
-
const { fixed, width, height } = state;
|
|
38
|
-
if (fixed) {
|
|
39
|
-
return {
|
|
40
|
-
width: `${width}px`,
|
|
41
|
-
height: `${height}px`
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
const stickyStyle = computed(() => {
|
|
46
|
-
if (!state.fixed)
|
|
47
|
-
return;
|
|
48
|
-
const style = {
|
|
49
|
-
width: `${state.width}px`,
|
|
50
|
-
height: `${state.height}px`,
|
|
51
|
-
[props.position]: `${offset.value}px`,
|
|
52
|
-
zIndex: +props.zIndex
|
|
53
|
-
};
|
|
54
|
-
if (state.transform)
|
|
55
|
-
style.transform = `translate3d(0, ${state.transform}px, 0)`;
|
|
56
|
-
return style;
|
|
57
|
-
});
|
|
58
|
-
const offset = computed(() => {
|
|
59
|
-
return props.position === "top" ? props.top : props.bottom;
|
|
60
|
-
});
|
|
61
|
-
const isHidden = (elementRef) => {
|
|
62
|
-
const el = unref(elementRef);
|
|
63
|
-
if (!el)
|
|
64
|
-
return false;
|
|
65
|
-
const style = window.getComputedStyle(el);
|
|
66
|
-
const hidden = style.display === "none";
|
|
67
|
-
const parentHidden = el.offsetParent === null && style.position !== "fixed";
|
|
68
|
-
return hidden || parentHidden;
|
|
69
|
-
};
|
|
70
|
-
const isExistRoot = () => {
|
|
71
|
-
if (!root.value || isHidden(root))
|
|
72
|
-
return false;
|
|
73
|
-
return true;
|
|
74
|
-
};
|
|
75
|
-
const getScrollTop = (el) => {
|
|
76
|
-
return Math.max(0, "scrollTop" in el ? el.scrollTop : el.pageYOffset);
|
|
77
|
-
};
|
|
78
|
-
const renderFixed = () => {
|
|
79
|
-
var _a;
|
|
80
|
-
return h(
|
|
81
|
-
"view",
|
|
82
|
-
{
|
|
83
|
-
style: stickyStyle.value,
|
|
84
|
-
class: state.fixed ? `${componentName} nut-sticky--fixed` : componentName
|
|
85
|
-
},
|
|
86
|
-
(_a = slots.default) == null ? void 0 : _a.call(slots)
|
|
87
|
-
);
|
|
88
|
-
};
|
|
89
|
-
const onScroll = () => {
|
|
90
|
-
if (!isExistRoot())
|
|
91
|
-
return;
|
|
92
|
-
const { container, position } = props;
|
|
93
|
-
const scrollTop = getScrollTop(window);
|
|
94
|
-
const rootRect = useRect(root);
|
|
95
|
-
if (rootRect.width || rootRect.height) {
|
|
96
|
-
state.width = rootRect.width;
|
|
97
|
-
state.height = rootRect.height;
|
|
98
|
-
}
|
|
99
|
-
if (position === "top") {
|
|
100
|
-
if (container) {
|
|
101
|
-
const containerRect = useRect(container);
|
|
102
|
-
const diff = containerRect.bottom - +offset.value - state.height;
|
|
103
|
-
state.fixed = +offset.value > rootRect.top && containerRect.bottom > 0;
|
|
104
|
-
state.transform = diff < 0 ? diff : 0;
|
|
105
|
-
} else {
|
|
106
|
-
state.fixed = offset.value > rootRect.top;
|
|
107
|
-
}
|
|
108
|
-
} else if (position === "bottom") {
|
|
109
|
-
const clientHeight = document.documentElement.clientHeight;
|
|
110
|
-
if (container) {
|
|
111
|
-
const containerRect = useRect(container);
|
|
112
|
-
const diff = clientHeight - containerRect.top - +offset.value - state.height;
|
|
113
|
-
state.fixed = clientHeight - +offset.value < rootRect.bottom && clientHeight > containerRect.top;
|
|
114
|
-
state.transform = diff < 0 ? -diff : 0;
|
|
115
|
-
} else {
|
|
116
|
-
state.fixed = clientHeight - +offset.value < rootRect.bottom;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
emit("scroll", {
|
|
120
|
-
top: scrollTop,
|
|
121
|
-
fixed: state.fixed
|
|
122
|
-
});
|
|
123
|
-
};
|
|
124
|
-
watch(
|
|
125
|
-
() => state.fixed,
|
|
126
|
-
(val) => {
|
|
127
|
-
emit("change", val);
|
|
128
|
-
}
|
|
129
|
-
);
|
|
130
|
-
onMounted(() => {
|
|
131
|
-
window.addEventListener("scroll", onScroll);
|
|
132
|
-
onScroll();
|
|
133
|
-
});
|
|
134
|
-
onUnmounted(() => {
|
|
135
|
-
window.removeEventListener("scroll", onScroll);
|
|
136
|
-
});
|
|
137
|
-
return () => {
|
|
138
|
-
return h(
|
|
139
|
-
"view",
|
|
140
|
-
{
|
|
141
|
-
style: rootStyle.value,
|
|
142
|
-
ref: root
|
|
143
|
-
},
|
|
144
|
-
[renderFixed()]
|
|
145
|
-
);
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
});
|
|
149
|
-
export {
|
|
150
|
-
_sfc_main as _
|
|
151
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { f as isPromise } from "./component-81a4c1d0.js";
|
|
2
|
-
const funInterceptor = (interceptor, {
|
|
3
|
-
args = [],
|
|
4
|
-
done,
|
|
5
|
-
canceled
|
|
6
|
-
}) => {
|
|
7
|
-
if (interceptor) {
|
|
8
|
-
const returnVal = interceptor.apply(null, args);
|
|
9
|
-
if (isPromise(returnVal)) {
|
|
10
|
-
returnVal.then((value) => {
|
|
11
|
-
if (value) {
|
|
12
|
-
done(value);
|
|
13
|
-
} else if (canceled) {
|
|
14
|
-
canceled();
|
|
15
|
-
}
|
|
16
|
-
}).catch(() => {
|
|
17
|
-
});
|
|
18
|
-
} else if (returnVal) {
|
|
19
|
-
done();
|
|
20
|
-
} else if (canceled) {
|
|
21
|
-
canceled();
|
|
22
|
-
}
|
|
23
|
-
} else {
|
|
24
|
-
done();
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
export {
|
|
28
|
-
funInterceptor as f
|
|
29
|
-
};
|