@nutui/nutui 3.1.19-beta.1 → 3.1.19-beta.2
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/README.md +9 -8
- package/dist/nutui.es.js +2875 -3576
- package/dist/nutui.umd.js +2965 -3579
- package/dist/packages/_es/ActionSheet.js +18 -12
- package/dist/packages/_es/Address.js +69 -78
- package/dist/packages/_es/Audio.js +12 -12
- package/dist/packages/_es/AudioOperate.js +1 -1
- package/dist/packages/_es/Avatar.js +3 -3
- package/dist/packages/_es/BackTop.js +110 -68
- package/dist/packages/_es/Badge.js +3 -3
- package/dist/packages/_es/Barrage.js +55 -62
- package/dist/packages/_es/Button.js +2 -2
- package/dist/packages/_es/Calendar.js +27 -32
- package/dist/packages/_es/CalendarItem.js +3 -3
- package/dist/packages/_es/Card.js +5 -6
- package/dist/packages/_es/Cascader.js +7 -7
- package/dist/packages/_es/Cell.js +11 -4
- package/dist/packages/_es/CellGroup.js +1 -1
- package/dist/packages/_es/Checkbox.js +13 -3
- package/dist/packages/_es/CheckboxGroup.js +2 -2
- package/dist/packages/_es/CircleProgress.js +40 -149
- package/dist/packages/_es/Col.js +1 -1
- package/dist/packages/_es/Collapse.js +8 -34
- package/dist/packages/_es/CollapseItem.js +59 -90
- package/dist/packages/_es/CountDown.js +5 -5
- package/dist/packages/_es/CountUp.js +51 -43
- package/dist/packages/_es/DatePicker.js +20 -21
- package/dist/packages/_es/Dialog.js +91 -12
- package/dist/packages/_es/Divider.js +4 -4
- package/dist/packages/_es/Drag.js +54 -92
- package/dist/packages/_es/Elevator.js +50 -75
- package/dist/packages/_es/Empty.js +3 -3
- package/dist/packages/_es/FixedNav.js +10 -11
- package/dist/packages/_es/Form.js +5 -9
- package/dist/packages/_es/FormItem.js +1 -1
- package/dist/packages/_es/Grid.js +1 -1
- package/dist/packages/_es/GridItem.js +26 -8
- package/dist/packages/_es/Icon.js +1 -1
- package/dist/packages/_es/ImagePreview.js +83 -14
- package/dist/packages/_es/Indicator.js +3 -3
- package/dist/packages/_es/InfiniteLoading.js +107 -93
- package/dist/packages/_es/Input.js +8 -8
- package/dist/packages/_es/InputNumber.js +16 -23
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/List.js +34 -41
- package/dist/packages/_es/Menu.js +12 -15
- package/dist/packages/_es/MenuItem.js +7 -7
- package/dist/packages/_es/Navbar.js +4 -3
- package/dist/packages/_es/NoticeBar.js +40 -47
- package/dist/packages/_es/Notify.js +166 -27
- package/dist/packages/_es/NumberKeyboard.js +18 -8
- package/dist/packages/_es/OldPicker.js +120 -122
- package/dist/packages/_es/OverLay.js +25 -5
- package/dist/packages/_es/Pagination.js +14 -13
- package/dist/packages/_es/Picker.js +16 -39
- package/dist/packages/_es/Popover.js +29 -154
- package/dist/packages/_es/Popup.js +69 -6
- package/dist/packages/_es/Price.js +5 -17
- package/dist/packages/_es/Progress.js +8 -18
- package/dist/packages/_es/PullRefresh.js +1 -1
- package/dist/packages/_es/Radio.js +14 -4
- package/dist/packages/_es/RadioGroup.js +1 -1
- package/dist/packages/_es/Range.js +33 -46
- package/dist/packages/_es/Rate.js +19 -16
- package/dist/packages/_es/Row.js +1 -1
- package/dist/packages/_es/SearchBar.js +11 -12
- package/dist/packages/_es/ShortPassword.js +67 -89
- package/dist/packages/_es/SideNavBar.js +16 -5
- package/dist/packages/_es/SideNavBarItem.js +1 -1
- package/dist/packages/_es/Signature.js +88 -69
- package/dist/packages/_es/Skeleton.js +11 -8
- package/dist/packages/_es/Sku.js +57 -49
- package/dist/packages/_es/Step.js +1 -1
- package/dist/packages/_es/Steps.js +1 -1
- package/dist/packages/_es/Sticky.js +23 -28
- package/dist/packages/_es/SubSideNavBar.js +1 -1
- package/dist/packages/_es/Swipe.js +26 -39
- package/dist/packages/_es/Swiper.js +14 -32
- package/dist/packages/_es/SwiperItem.js +2 -2
- package/dist/packages/_es/Switch.js +3 -3
- package/dist/packages/_es/TabPane.js +1 -1
- package/dist/packages/_es/Tabbar.js +3 -3
- package/dist/packages/_es/TabbarItem.js +21 -11
- package/dist/packages/_es/Table.js +13 -13
- package/dist/packages/_es/Tabs.js +20 -21
- package/dist/packages/_es/Tag.js +4 -4
- package/dist/packages/_es/TextArea.js +42 -44
- package/dist/packages/_es/TimeDetail.js +3 -4
- package/dist/packages/_es/TimePannel.js +3 -3
- package/dist/packages/_es/TimeSelect.js +7 -8
- package/dist/packages/_es/Toast.js +170 -41
- package/dist/packages/_es/Uploader.js +138 -109
- package/dist/packages/_es/Video.js +9 -8
- package/dist/packages/_es/common.js +1 -1
- package/dist/packages/_es/component.js +135 -3
- package/dist/packages/_es/index.js +6 -44
- package/dist/packages/_es/index2.js +31 -8
- package/dist/packages/_es/index3.js +7 -58
- package/dist/packages/_es/index4.js +56 -413
- package/dist/packages/_es/{index.taro.js → index5.js} +113 -140
- 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 +19 -0
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +42 -42
- package/dist/styles/themes/jdt.scss +42 -42
- package/dist/types/__VUE/actionsheet/index.d.ts +269 -0
- package/dist/types/__VUE/address/index.d.ts +386 -0
- package/dist/types/__VUE/audio/index.d.ts +92 -0
- package/dist/types/__VUE/audiooperate/index.d.ts +68 -0
- package/dist/types/__VUE/avatar/index.d.ts +66 -0
- package/dist/types/__VUE/backtop/index.d.ts +105 -0
- package/dist/types/__VUE/badge/index.d.ts +94 -0
- package/dist/types/__VUE/barrage/index.d.ts +80 -0
- package/dist/types/__VUE/button/index.d.ts +116 -0
- package/dist/types/__VUE/calendar/index.d.ts +155 -0
- package/dist/types/__VUE/calendaritem/index.d.ts +195 -0
- package/dist/types/__VUE/card/index.d.ts +81 -0
- package/dist/types/__VUE/cascader/cascader-item.d.ts +76 -0
- package/dist/types/__VUE/cascader/helper.d.ts +8 -0
- package/dist/types/__VUE/cascader/index.d.ts +76 -0
- package/dist/types/__VUE/cascader/tree.d.ts +17 -0
- package/dist/types/__VUE/cascader/types.d.ts +30 -0
- package/dist/types/__VUE/cell/index.d.ts +109 -0
- package/dist/types/__VUE/cellgroup/index.d.ts +38 -0
- package/dist/types/__VUE/checkbox/index.d.ts +102 -0
- package/dist/types/__VUE/checkboxgroup/index.d.ts +39 -0
- package/dist/types/__VUE/circleprogress/index.d.ts +66 -0
- package/dist/types/__VUE/col/index.d.ts +42 -0
- package/dist/types/__VUE/collapse/index.d.ts +104 -0
- package/dist/types/__VUE/collapseitem/index.d.ts +83 -0
- package/dist/types/__VUE/countdown/index.d.ts +90 -0
- package/dist/types/__VUE/countup/index.d.ts +216 -0
- package/dist/types/__VUE/datepicker/index.d.ts +347 -0
- package/dist/types/__VUE/datepicker/utils.d.ts +5 -0
- package/dist/types/__VUE/dialog/index.d.ts +306 -0
- package/dist/types/__VUE/divider/index.d.ts +47 -0
- package/dist/types/__VUE/drag/index.d.ts +61 -0
- package/dist/types/__VUE/elevator/index.d.ts +71 -0
- package/dist/types/__VUE/empty/index.d.ts +46 -0
- package/dist/types/__VUE/fixednav/index.d.ts +96 -0
- package/dist/types/__VUE/form/common.d.ts +20 -0
- package/dist/types/__VUE/form/index.d.ts +32 -0
- package/dist/types/__VUE/form/types.d.ts +13 -0
- package/dist/types/__VUE/formitem/index.d.ts +120 -0
- package/dist/types/__VUE/formitem/types.d.ts +10 -0
- package/dist/types/__VUE/grid/common.d.ts +91 -0
- package/dist/types/__VUE/grid/index.d.ts +100 -0
- package/dist/types/__VUE/griditem/index.d.ts +80 -0
- package/dist/types/__VUE/icon/index.d.ts +74 -0
- package/dist/types/__VUE/imagepreview/index.d.ts +125 -0
- package/dist/types/__VUE/indicator/index.d.ts +70 -0
- package/dist/types/__VUE/infiniteloading/index.d.ts +140 -0
- package/dist/types/__VUE/input/index.d.ts +336 -0
- package/dist/types/__VUE/input/util.d.ts +5 -0
- package/dist/types/__VUE/inputnumber/index.d.ts +117 -0
- package/dist/types/__VUE/layout/index.d.ts +13 -0
- package/dist/types/__VUE/list/index.d.ts +48 -0
- package/dist/types/__VUE/menu/index.d.ts +51 -0
- package/dist/types/__VUE/menuitem/index.d.ts +77 -0
- package/dist/types/__VUE/navbar/index.d.ts +84 -0
- package/dist/types/__VUE/noticebar/index.d.ts +209 -0
- package/dist/types/__VUE/notify/index.d.ts +103 -0
- package/dist/types/__VUE/numberkeyboard/index.d.ts +123 -0
- package/dist/types/__VUE/oldpicker/Column.d.ts +96 -0
- package/dist/types/__VUE/oldpicker/commonProps.d.ts +22 -0
- package/dist/types/__VUE/oldpicker/index.d.ts +360 -0
- package/dist/types/__VUE/oldpicker/types.d.ts +24 -0
- package/dist/types/__VUE/overlay/index.d.ts +1614 -0
- package/dist/types/__VUE/pagination/index.d.ts +112 -0
- package/dist/types/__VUE/picker/Column.d.ts +90 -0
- package/dist/types/__VUE/picker/index.d.ts +342 -0
- package/dist/types/__VUE/picker/types.d.ts +26 -0
- package/dist/types/__VUE/popover/index.d.ts +233 -0
- package/dist/types/__VUE/popup/index.d.ts +1734 -0
- package/dist/types/__VUE/popup/use-lock-scroll.d.ts +5 -0
- package/dist/types/__VUE/price/index.d.ts +87 -0
- package/dist/types/__VUE/progress/index.d.ts +137 -0
- package/dist/types/__VUE/pullrefresh/index.d.ts +128 -0
- package/dist/types/__VUE/pullrefresh/use-touch.d.ts +20 -0
- package/dist/types/__VUE/pullrefresh/util.d.ts +6 -0
- package/dist/types/__VUE/radio/index.d.ts +90 -0
- package/dist/types/__VUE/radiogroup/index.d.ts +48 -0
- package/dist/types/__VUE/range/index.d.ts +156 -0
- package/dist/types/__VUE/rate/index.d.ts +142 -0
- package/dist/types/__VUE/row/index.d.ts +63 -0
- package/dist/types/__VUE/searchbar/index.d.ts +100 -0
- package/dist/types/__VUE/shortpassword/index.d.ts +136 -0
- package/dist/types/__VUE/sidenavbar/index.d.ts +36 -0
- package/dist/types/__VUE/sidenavbaritem/index.d.ts +41 -0
- package/dist/types/__VUE/signature/index.d.ts +73 -0
- package/dist/types/__VUE/skeleton/common.d.ts +63 -0
- package/dist/types/__VUE/skeleton/index.d.ts +117 -0
- package/dist/types/__VUE/sku/components/SkuHeader.d.ts +27 -0
- package/dist/types/__VUE/sku/components/SkuOperate.d.ts +70 -0
- package/dist/types/__VUE/sku/components/SkuSelect.d.ts +30 -0
- package/dist/types/__VUE/sku/components/SkuStepper.d.ts +67 -0
- package/dist/types/__VUE/sku/index.d.ts +300 -0
- package/dist/types/__VUE/step/index.d.ts +70 -0
- package/dist/types/__VUE/steps/index.d.ts +47 -0
- package/dist/types/__VUE/sticky/index.d.ts +63 -0
- package/dist/types/__VUE/subsidenavbar/index.d.ts +54 -0
- package/dist/types/__VUE/swipe/index.d.ts +69 -0
- package/dist/types/__VUE/swiper/index.d.ts +163 -0
- package/dist/types/__VUE/swiper/use-touch.d.ts +20 -0
- package/dist/types/__VUE/swiperitem/index.d.ts +24 -0
- package/dist/types/__VUE/switch/index.d.ts +136 -0
- package/dist/types/__VUE/tabbar/index.d.ts +84 -0
- package/dist/types/__VUE/tabbaritem/index.d.ts +108 -0
- package/dist/types/__VUE/table/common.d.ts +54 -0
- package/dist/types/__VUE/table/index.d.ts +75 -0
- package/dist/types/__VUE/table/renderColumn.d.ts +20 -0
- package/dist/types/__VUE/table/types.d.ts +19 -0
- package/dist/types/__VUE/tabpane/index.d.ts +47 -0
- package/dist/types/__VUE/tabs/index.d.ts +128 -0
- package/dist/types/__VUE/tag/index.d.ts +89 -0
- package/dist/types/__VUE/textarea/index.d.ts +120 -0
- package/dist/types/__VUE/timedetail/index.d.ts +48 -0
- package/dist/types/__VUE/timepannel/index.d.ts +43 -0
- package/dist/types/__VUE/timeselect/index.d.ts +82 -0
- package/dist/types/__VUE/toast/index.d.ts +149 -0
- package/dist/types/__VUE/uploader/index.d.ts +258 -0
- package/dist/types/__VUE/uploader/uploader.d.ts +25 -0
- package/dist/types/__VUE/video/index.d.ts +123 -0
- package/dist/{index.d.ts → types/index.d.ts} +0 -0
- package/dist/types/nutui.d.ts +92 -0
- package/package.json +14 -5
- package/dist/nutui.d.ts +0 -104
- package/dist/packages/_es/use-lock-scroll.js +0 -23
- package/dist/packages/_es/util.js +0 -47
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.19-beta.
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.2 Thu Apr 07 2022 17:52:31 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { ref, reactive, computed, watch, h, unref } from "vue";
|
|
7
|
-
import Taro from "@tarojs/taro";
|
|
6
|
+
import { ref, reactive, computed, watch, onMounted, onUnmounted, h, unref } from "vue";
|
|
8
7
|
import { c as createComponent } from "./component.js";
|
|
9
|
-
import { u as
|
|
8
|
+
import { u as useRect } from "./index2.js";
|
|
10
9
|
const { componentName, create } = createComponent("sticky");
|
|
11
10
|
const _sfc_main = create({
|
|
12
11
|
props: {
|
|
@@ -33,8 +32,6 @@ const _sfc_main = create({
|
|
|
33
32
|
emits: ["change", "scroll"],
|
|
34
33
|
setup(props, { emit, slots }) {
|
|
35
34
|
const root = ref();
|
|
36
|
-
const query = Taro.createSelectorQuery();
|
|
37
|
-
const refRandomId = Math.random().toString(36).slice(-8);
|
|
38
35
|
const state = reactive({
|
|
39
36
|
width: 0,
|
|
40
37
|
height: 0,
|
|
@@ -70,22 +67,19 @@ const _sfc_main = create({
|
|
|
70
67
|
const el = unref(elementRef);
|
|
71
68
|
if (!el)
|
|
72
69
|
return false;
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
const hidden = res.display === "none";
|
|
78
|
-
const parentHidden = el.offsetParent === null && res.position !== "fixed";
|
|
79
|
-
resolve(hidden || parentHidden);
|
|
80
|
-
}).exec();
|
|
81
|
-
});
|
|
70
|
+
const style = window.getComputedStyle(el);
|
|
71
|
+
const hidden = style.display === "none";
|
|
72
|
+
const parentHidden = el.offsetParent === null && style.position !== "fixed";
|
|
73
|
+
return hidden || parentHidden;
|
|
82
74
|
};
|
|
83
|
-
const isExistRoot =
|
|
84
|
-
|
|
85
|
-
if (!root.value || hidden)
|
|
75
|
+
const isExistRoot = () => {
|
|
76
|
+
if (!root.value || isHidden(root))
|
|
86
77
|
return false;
|
|
87
78
|
return true;
|
|
88
79
|
};
|
|
80
|
+
const getScrollTop = (el) => {
|
|
81
|
+
return Math.max(0, "scrollTop" in el ? el.scrollTop : el.pageYOffset);
|
|
82
|
+
};
|
|
89
83
|
const renderFixed = () => {
|
|
90
84
|
var _a;
|
|
91
85
|
return h("view", {
|
|
@@ -93,18 +87,19 @@ const _sfc_main = create({
|
|
|
93
87
|
class: state.fixed ? `${componentName} nut-sticky--fixed` : componentName
|
|
94
88
|
}, (_a = slots.default) == null ? void 0 : _a.call(slots));
|
|
95
89
|
};
|
|
96
|
-
const onScroll =
|
|
90
|
+
const onScroll = () => {
|
|
97
91
|
if (!isExistRoot())
|
|
98
92
|
return;
|
|
99
93
|
const { container, position } = props;
|
|
100
|
-
const
|
|
94
|
+
const scrollTop = getScrollTop(window);
|
|
95
|
+
const rootRect = useRect(root);
|
|
101
96
|
if (rootRect.width || rootRect.height) {
|
|
102
97
|
state.width = rootRect.width;
|
|
103
98
|
state.height = rootRect.height;
|
|
104
99
|
}
|
|
105
100
|
if (position === "top") {
|
|
106
101
|
if (container) {
|
|
107
|
-
const containerRect =
|
|
102
|
+
const containerRect = useRect(container);
|
|
108
103
|
const diff = containerRect.bottom - +offset.value - state.height;
|
|
109
104
|
state.fixed = +offset.value > rootRect.top && containerRect.bottom > 0;
|
|
110
105
|
state.transform = diff < 0 ? diff : 0;
|
|
@@ -112,9 +107,9 @@ const _sfc_main = create({
|
|
|
112
107
|
state.fixed = offset.value > rootRect.top;
|
|
113
108
|
}
|
|
114
109
|
} else if (position === "bottom") {
|
|
115
|
-
const clientHeight =
|
|
110
|
+
const clientHeight = document.documentElement.clientHeight;
|
|
116
111
|
if (container) {
|
|
117
|
-
const containerRect =
|
|
112
|
+
const containerRect = useRect(container);
|
|
118
113
|
const diff = clientHeight - containerRect.top - +offset.value - state.height;
|
|
119
114
|
state.fixed = clientHeight - +offset.value < rootRect.bottom && clientHeight > containerRect.top;
|
|
120
115
|
state.transform = diff < 0 ? -diff : 0;
|
|
@@ -130,16 +125,16 @@ const _sfc_main = create({
|
|
|
130
125
|
watch(() => state.fixed, (val) => {
|
|
131
126
|
emit("change", val);
|
|
132
127
|
});
|
|
133
|
-
|
|
134
|
-
onScroll
|
|
128
|
+
onMounted(() => {
|
|
129
|
+
window.addEventListener("scroll", onScroll);
|
|
130
|
+
onScroll();
|
|
135
131
|
});
|
|
136
|
-
|
|
137
|
-
onScroll
|
|
132
|
+
onUnmounted(() => {
|
|
133
|
+
window.removeEventListener("scroll", onScroll);
|
|
138
134
|
});
|
|
139
135
|
return () => {
|
|
140
136
|
return h("view", {
|
|
141
137
|
style: rootStyle.value,
|
|
142
|
-
id: `root-${refRandomId}`,
|
|
143
138
|
ref: root
|
|
144
139
|
}, [renderFixed()]);
|
|
145
140
|
};
|
|
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.19-beta.
|
|
21
|
+
* @nutui/nutui v3.1.19-beta.2 Thu Apr 07 2022 17:52:31 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2022 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
@@ -18,15 +18,13 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.19-beta.
|
|
21
|
+
* @nutui/nutui v3.1.19-beta.2 Thu Apr 07 2022 17:52:31 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2022 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
25
|
-
import
|
|
26
|
-
import {
|
|
27
|
-
import { computed, ref, onMounted, reactive, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot } from "vue";
|
|
25
|
+
import { u as useTouch } from "./index4.js";
|
|
26
|
+
import { computed, ref, reactive, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot } from "vue";
|
|
28
27
|
import { c as createComponent } from "./component.js";
|
|
29
|
-
import { u as useTaroRect } from "./index.js";
|
|
30
28
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
31
29
|
const { componentName, create } = createComponent("swipe");
|
|
32
30
|
const _sfc_main = create({
|
|
@@ -50,29 +48,21 @@ const _sfc_main = create({
|
|
|
50
48
|
},
|
|
51
49
|
emits: ["open", "close"],
|
|
52
50
|
setup(props, { emit }) {
|
|
53
|
-
const refRandomId = Math.random().toString(36).slice(-8);
|
|
54
51
|
const classes = computed(() => {
|
|
55
52
|
const prefixCls = componentName;
|
|
56
53
|
return {
|
|
57
54
|
[prefixCls]: true
|
|
58
55
|
};
|
|
59
56
|
});
|
|
60
|
-
const getRefWidth =
|
|
61
|
-
|
|
62
|
-
return
|
|
57
|
+
const getRefWidth = (ref2) => {
|
|
58
|
+
var _a;
|
|
59
|
+
return ((_a = ref2.value) == null ? void 0 : _a.clientWidth) || 0;
|
|
63
60
|
};
|
|
64
|
-
const leftRef = ref()
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
leftRefWidth.value = await getRefWidth(leftRef);
|
|
70
|
-
rightRefWidth.value = await getRefWidth(rightRef);
|
|
71
|
-
};
|
|
72
|
-
onMounted(() => {
|
|
73
|
-
setTimeout(() => {
|
|
74
|
-
initWidth();
|
|
75
|
-
}, 100);
|
|
61
|
+
const leftRef = ref(), leftRefWidth = computed(() => {
|
|
62
|
+
return getRefWidth(leftRef);
|
|
63
|
+
});
|
|
64
|
+
const rightRef = ref(), rightRefWidth = computed(() => {
|
|
65
|
+
return getRefWidth(rightRef);
|
|
76
66
|
});
|
|
77
67
|
let opened = false;
|
|
78
68
|
let position = "";
|
|
@@ -132,7 +122,7 @@ const _sfc_main = create({
|
|
|
132
122
|
return;
|
|
133
123
|
touch.start(event);
|
|
134
124
|
},
|
|
135
|
-
|
|
125
|
+
onTouchMove(event) {
|
|
136
126
|
if (props.disabled)
|
|
137
127
|
return;
|
|
138
128
|
touch.move(event);
|
|
@@ -178,15 +168,20 @@ const _sfc_main = create({
|
|
|
178
168
|
}, touchMethods), {
|
|
179
169
|
leftRef,
|
|
180
170
|
rightRef,
|
|
181
|
-
refRandomId,
|
|
182
171
|
open,
|
|
183
172
|
close
|
|
184
173
|
});
|
|
185
174
|
}
|
|
186
175
|
});
|
|
187
|
-
const _hoisted_1 =
|
|
176
|
+
const _hoisted_1 = {
|
|
177
|
+
class: "nut-swipe__left",
|
|
178
|
+
ref: "leftRef"
|
|
179
|
+
};
|
|
188
180
|
const _hoisted_2 = { class: "nut-swipe__content" };
|
|
189
|
-
const _hoisted_3 =
|
|
181
|
+
const _hoisted_3 = {
|
|
182
|
+
class: "nut-swipe__right",
|
|
183
|
+
ref: "rightRef"
|
|
184
|
+
};
|
|
190
185
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
191
186
|
return openBlock(), createElementBlock("view", {
|
|
192
187
|
class: normalizeClass(_ctx.classes),
|
|
@@ -196,24 +191,16 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
196
191
|
onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.onTouchEnd && _ctx.onTouchEnd(...args)),
|
|
197
192
|
onTouchcancel: _cache[3] || (_cache[3] = (...args) => _ctx.onTouchEnd && _ctx.onTouchEnd(...args))
|
|
198
193
|
}, [
|
|
199
|
-
createElementVNode("view",
|
|
200
|
-
class: "nut-swipe__left",
|
|
201
|
-
ref: "leftRef",
|
|
202
|
-
id: "leftRef-" + _ctx.refRandomId
|
|
203
|
-
}, [
|
|
194
|
+
createElementVNode("view", _hoisted_1, [
|
|
204
195
|
renderSlot(_ctx.$slots, "left")
|
|
205
|
-
],
|
|
196
|
+
], 512),
|
|
206
197
|
createElementVNode("view", _hoisted_2, [
|
|
207
198
|
renderSlot(_ctx.$slots, "default")
|
|
208
199
|
]),
|
|
209
|
-
createElementVNode("view",
|
|
210
|
-
class: "nut-swipe__right",
|
|
211
|
-
ref: "rightRef",
|
|
212
|
-
id: "rightRef-" + _ctx.refRandomId
|
|
213
|
-
}, [
|
|
200
|
+
createElementVNode("view", _hoisted_3, [
|
|
214
201
|
renderSlot(_ctx.$slots, "right")
|
|
215
|
-
],
|
|
202
|
+
], 512)
|
|
216
203
|
], 38);
|
|
217
204
|
}
|
|
218
|
-
var
|
|
219
|
-
export {
|
|
205
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
206
|
+
export { index as default };
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.19-beta.
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.2 Thu Apr 07 2022 17:52:31 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { reactive, ref, computed, provide, onMounted, onActivated, onDeactivated, onBeforeUnmount, watch, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, renderSlot, Fragment, renderList, createCommentVNode } from "vue";
|
|
6
|
+
import { reactive, ref, computed, provide, onMounted, nextTick, onActivated, onDeactivated, onBeforeUnmount, watch, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, renderSlot, Fragment, renderList, createCommentVNode } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as useExpose } from "./index2.js";
|
|
10
|
-
import Taro, { eventCenter, getCurrentInstance } from "@tarojs/taro";
|
|
8
|
+
import { u as useExpose } from "./index3.js";
|
|
11
9
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
12
10
|
const DISTANCE = 5;
|
|
13
11
|
function useTouch() {
|
|
@@ -112,7 +110,6 @@ const _sfc_main = create({
|
|
|
112
110
|
emits: ["change"],
|
|
113
111
|
setup(props, { emit, slots }) {
|
|
114
112
|
const container = ref();
|
|
115
|
-
const refRandomId = Math.random().toString(36).slice(-8);
|
|
116
113
|
const state = reactive({
|
|
117
114
|
active: 0,
|
|
118
115
|
num: 0,
|
|
@@ -168,7 +165,7 @@ const _sfc_main = create({
|
|
|
168
165
|
return Math.min(Math.max(num, min), max);
|
|
169
166
|
};
|
|
170
167
|
const requestFrame = (fn) => {
|
|
171
|
-
requestAnimationFrame.call(
|
|
168
|
+
window.requestAnimationFrame.call(window, fn);
|
|
172
169
|
};
|
|
173
170
|
const getOffset = (active, offset = 0) => {
|
|
174
171
|
let currentPosition = active * size.value;
|
|
@@ -280,9 +277,9 @@ const _sfc_main = create({
|
|
|
280
277
|
autoplay();
|
|
281
278
|
}, Number(props.autoPlay));
|
|
282
279
|
};
|
|
283
|
-
const init =
|
|
280
|
+
const init = (active = +props.initPage) => {
|
|
284
281
|
stopAutoPlay();
|
|
285
|
-
state.rect =
|
|
282
|
+
state.rect = container.value.getBoundingClientRect();
|
|
286
283
|
active = Math.min(childCount.value - 1, active);
|
|
287
284
|
state.width = props.width ? +props.width : state.rect.width;
|
|
288
285
|
state.height = props.height ? +props.height : state.rect.height;
|
|
@@ -349,26 +346,14 @@ const _sfc_main = create({
|
|
|
349
346
|
to
|
|
350
347
|
});
|
|
351
348
|
onMounted(() => {
|
|
352
|
-
|
|
349
|
+
nextTick(() => {
|
|
353
350
|
init();
|
|
354
|
-
}
|
|
355
|
-
Taro.nextTick(async () => {
|
|
356
|
-
state.rect = await useTaroRect(container, Taro);
|
|
357
|
-
state.rect && init();
|
|
358
|
-
});
|
|
359
|
-
eventCenter.once(getCurrentInstance().router.onReady, () => {
|
|
360
|
-
init();
|
|
361
|
-
});
|
|
362
|
-
}
|
|
351
|
+
});
|
|
363
352
|
});
|
|
364
353
|
onActivated(() => {
|
|
365
|
-
|
|
354
|
+
nextTick(() => {
|
|
366
355
|
init();
|
|
367
|
-
}
|
|
368
|
-
eventCenter.once(getCurrentInstance().router.onReady, () => {
|
|
369
|
-
init();
|
|
370
|
-
});
|
|
371
|
-
}
|
|
356
|
+
});
|
|
372
357
|
});
|
|
373
358
|
onDeactivated(() => {
|
|
374
359
|
stopAutoPlay();
|
|
@@ -377,12 +362,12 @@ const _sfc_main = create({
|
|
|
377
362
|
stopAutoPlay();
|
|
378
363
|
});
|
|
379
364
|
watch(() => props.initPage, (val) => {
|
|
380
|
-
|
|
381
|
-
init(
|
|
365
|
+
nextTick(() => {
|
|
366
|
+
init(Number(val));
|
|
382
367
|
});
|
|
383
368
|
});
|
|
384
369
|
watch(() => state.children.length, () => {
|
|
385
|
-
|
|
370
|
+
nextTick(() => {
|
|
386
371
|
init(state.active);
|
|
387
372
|
});
|
|
388
373
|
});
|
|
@@ -391,7 +376,6 @@ const _sfc_main = create({
|
|
|
391
376
|
});
|
|
392
377
|
return {
|
|
393
378
|
state,
|
|
394
|
-
refRandomId,
|
|
395
379
|
classes,
|
|
396
380
|
container,
|
|
397
381
|
componentName,
|
|
@@ -404,11 +388,9 @@ const _sfc_main = create({
|
|
|
404
388
|
};
|
|
405
389
|
}
|
|
406
390
|
});
|
|
407
|
-
const _hoisted_1 = ["id"];
|
|
408
391
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
409
392
|
return openBlock(), createElementBlock("view", {
|
|
410
393
|
ref: "container",
|
|
411
|
-
id: "container-" + _ctx.refRandomId,
|
|
412
394
|
class: normalizeClass(_ctx.classes),
|
|
413
395
|
onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.onTouchStart && _ctx.onTouchStart(...args)),
|
|
414
396
|
onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.onTouchMove && _ctx.onTouchMove(...args)),
|
|
@@ -441,7 +423,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
441
423
|
}, null, 4);
|
|
442
424
|
}), 128))
|
|
443
425
|
], 2)) : createCommentVNode("", true)
|
|
444
|
-
],
|
|
426
|
+
], 34);
|
|
445
427
|
}
|
|
446
428
|
var Swiper = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
447
429
|
export { Swiper as default };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.19-beta.
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.2 Thu Apr 07 2022 17:52:31 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { inject, getCurrentInstance, reactive, computed, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
|
-
import { u as useExpose } from "./
|
|
8
|
+
import { u as useExpose } from "./index3.js";
|
|
9
9
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
10
10
|
const { create, componentName } = createComponent("swiper-item");
|
|
11
11
|
const _sfc_main = create({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.19-beta.
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.2 Thu Apr 07 2022 17:52:31 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -116,5 +116,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
116
116
|
])
|
|
117
117
|
], 6);
|
|
118
118
|
}
|
|
119
|
-
var
|
|
120
|
-
export {
|
|
119
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
120
|
+
export { index as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.19-beta.
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.2 Thu Apr 07 2022 17:52:31 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -73,5 +73,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
73
73
|
renderSlot(_ctx.$slots, "default")
|
|
74
74
|
], 2);
|
|
75
75
|
}
|
|
76
|
-
var
|
|
77
|
-
export {
|
|
76
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
77
|
+
export { index as default };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.19-beta.
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.2 Thu Apr 07 2022 17:52:31 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { c as createComponent } from "./component.js";
|
|
7
|
+
import { u as useRouter } from "./index.js";
|
|
7
8
|
import { inject, reactive, getCurrentInstance, computed, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, Fragment, toDisplayString, createCommentVNode, createVNode, renderSlot } from "vue";
|
|
8
9
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
10
|
const { create } = createComponent("tabbar-item");
|
|
@@ -33,14 +34,14 @@ const _sfc_main = create({
|
|
|
33
34
|
type: String,
|
|
34
35
|
default: ""
|
|
35
36
|
},
|
|
36
|
-
dot: {
|
|
37
|
-
type: Boolean,
|
|
38
|
-
default: false
|
|
39
|
-
},
|
|
40
37
|
classPrefix: {
|
|
41
38
|
type: String,
|
|
42
39
|
default: "nut-icon"
|
|
43
40
|
},
|
|
41
|
+
dot: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: false
|
|
44
|
+
},
|
|
44
45
|
fontClassName: {
|
|
45
46
|
type: String,
|
|
46
47
|
default: "nutui-iconfont"
|
|
@@ -56,16 +57,17 @@ const _sfc_main = create({
|
|
|
56
57
|
active: parent.modelValue,
|
|
57
58
|
index: 0
|
|
58
59
|
});
|
|
60
|
+
const router = useRouter();
|
|
59
61
|
const relation = (child) => {
|
|
60
62
|
if (child.proxy) {
|
|
61
|
-
let
|
|
62
|
-
state.index =
|
|
63
|
+
let index2 = parent.children.length;
|
|
64
|
+
state.index = index2;
|
|
63
65
|
parent.children.push(child.proxy);
|
|
64
66
|
}
|
|
65
67
|
};
|
|
66
68
|
relation(getCurrentInstance());
|
|
67
|
-
function change(
|
|
68
|
-
parent.changeIndex(
|
|
69
|
+
function change(index2) {
|
|
70
|
+
parent.changeIndex(index2);
|
|
69
71
|
}
|
|
70
72
|
const choosed = computed(() => {
|
|
71
73
|
if (parent) {
|
|
@@ -79,6 +81,14 @@ const _sfc_main = create({
|
|
|
79
81
|
if (parent.children[value].href) {
|
|
80
82
|
window.location.href = parent.children[value].href;
|
|
81
83
|
}
|
|
84
|
+
if (parent.children[value].to) {
|
|
85
|
+
let to = parent.children[value].to;
|
|
86
|
+
if (to && router) {
|
|
87
|
+
router.push(to);
|
|
88
|
+
} else {
|
|
89
|
+
location.replace(to);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
82
92
|
});
|
|
83
93
|
});
|
|
84
94
|
return {
|
|
@@ -143,5 +153,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
143
153
|
])
|
|
144
154
|
], 6);
|
|
145
155
|
}
|
|
146
|
-
var
|
|
147
|
-
export {
|
|
156
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
157
|
+
export { index as default };
|
|
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.19-beta.
|
|
21
|
+
* @nutui/nutui v3.1.19-beta.2 Thu Apr 07 2022 17:52:31 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2022 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
@@ -114,17 +114,16 @@ const _hoisted_1 = { class: "nut-table__main__head" };
|
|
|
114
114
|
const _hoisted_2 = { class: "nut-table__main__head__tr" };
|
|
115
115
|
const _hoisted_3 = ["onClick"];
|
|
116
116
|
const _hoisted_4 = { class: "nut-table__main__body" };
|
|
117
|
-
const _hoisted_5 = {
|
|
118
|
-
const _hoisted_6 = {
|
|
117
|
+
const _hoisted_5 = {
|
|
119
118
|
key: 0,
|
|
120
119
|
class: "nut-table__summary"
|
|
121
120
|
};
|
|
122
|
-
const
|
|
123
|
-
const
|
|
121
|
+
const _hoisted_6 = ["innerHTML"];
|
|
122
|
+
const _hoisted_7 = {
|
|
124
123
|
key: 1,
|
|
125
124
|
class: "nut-table__nodata"
|
|
126
125
|
};
|
|
127
|
-
const
|
|
126
|
+
const _hoisted_8 = {
|
|
128
127
|
key: 0,
|
|
129
128
|
class: "nut-table__nodata__text"
|
|
130
129
|
};
|
|
@@ -167,31 +166,32 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
167
166
|
class: normalizeClass(["nut-table__main__body__tr__td", _ctx.cellClasses(_ctx.getColumnItem(value))]),
|
|
168
167
|
key: value
|
|
169
168
|
}, [
|
|
169
|
+
createTextVNode(toDisplayString(typeof item[value] !== "function" ? item[value] : "") + " ", 1),
|
|
170
170
|
typeof item[value] === "function" ? (openBlock(), createBlock(_component_RenderColumn, {
|
|
171
171
|
key: 0,
|
|
172
172
|
slots: item[value]
|
|
173
|
-
}, null, 8, ["slots"])) : (
|
|
173
|
+
}, null, 8, ["slots"])) : createCommentVNode("", true)
|
|
174
174
|
], 2);
|
|
175
175
|
}), 128))
|
|
176
176
|
]);
|
|
177
177
|
}), 128))
|
|
178
178
|
])
|
|
179
179
|
], 2),
|
|
180
|
-
_ctx.summary ? (openBlock(), createElementBlock("view",
|
|
180
|
+
_ctx.summary ? (openBlock(), createElementBlock("view", _hoisted_5, [
|
|
181
181
|
createElementVNode("span", {
|
|
182
182
|
class: "nut-table__summary__text",
|
|
183
183
|
innerHTML: _ctx.summary().value
|
|
184
|
-
}, null, 8,
|
|
184
|
+
}, null, 8, _hoisted_6)
|
|
185
185
|
])) : createCommentVNode("", true),
|
|
186
|
-
!_ctx.curData.length ? (openBlock(), createElementBlock("view",
|
|
186
|
+
!_ctx.curData.length ? (openBlock(), createElementBlock("view", _hoisted_7, [
|
|
187
187
|
createElementVNode("div", {
|
|
188
188
|
class: normalizeClass(["nut-table__nodata", { "nut-table__nodata--border": _ctx.bordered }])
|
|
189
189
|
}, [
|
|
190
190
|
renderSlot(_ctx.$slots, "nodata"),
|
|
191
|
-
!_ctx.$slots.nodata ? (openBlock(), createElementBlock("div",
|
|
191
|
+
!_ctx.$slots.nodata ? (openBlock(), createElementBlock("div", _hoisted_8, " \u6682\u65E0\u6570\u636E ")) : createCommentVNode("", true)
|
|
192
192
|
], 2)
|
|
193
193
|
])) : createCommentVNode("", true)
|
|
194
194
|
], 2);
|
|
195
195
|
}
|
|
196
|
-
var
|
|
197
|
-
export {
|
|
196
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
197
|
+
export { index as default };
|