@nutui/nutui 4.1.0-beta.4 → 4.1.0-beta.6
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/dist/nutui.es.js +1 -1
- package/dist/nutui.js +5351 -5327
- package/dist/nutui.umd.js +1 -1
- package/dist/packages/_es/ActionSheet.js +2 -2
- package/dist/packages/_es/Address.js +4 -3
- package/dist/packages/_es/AddressList.js +1 -1
- package/dist/packages/_es/Animate.js +1 -1
- package/dist/packages/_es/Audio.js +2 -2
- package/dist/packages/_es/AudioOperate.js +3 -3
- package/dist/packages/_es/Avatar.js +17 -79
- package/dist/packages/_es/AvatarGroup.js +92 -21
- package/dist/packages/_es/Backtop.js +1 -1
- package/dist/packages/_es/Badge.js +1 -1
- package/dist/packages/_es/Barrage.js +1 -1
- package/dist/packages/_es/Button.js +2 -2
- package/dist/packages/_es/Calendar.js +22 -24
- package/dist/packages/_es/CalendarItem.js +2 -2
- package/dist/packages/_es/Card.js +2 -2
- package/dist/packages/_es/Cascader.js +4 -3
- package/dist/packages/_es/Category.js +3 -3
- package/dist/packages/_es/CategoryPane.js +2 -2
- package/dist/packages/_es/Cell.js +1 -1
- package/dist/packages/_es/CellGroup.js +1 -1
- package/dist/packages/_es/Checkbox.js +2 -2
- package/dist/packages/_es/CheckboxGroup.js +1 -1
- package/dist/packages/_es/CircleProgress.js +1 -1
- package/dist/packages/_es/Col.js +1 -1
- package/dist/packages/_es/Collapse.js +1 -1
- package/dist/packages/_es/CollapseItem.js +1 -1
- package/dist/packages/_es/Comment.js +4 -4
- package/dist/packages/_es/ConfigProvider.js +4 -4
- package/dist/packages/_es/Countdown.js +4 -4
- package/dist/packages/_es/Countup.js +9 -12
- package/dist/packages/_es/DatePicker.js +3 -3
- package/dist/packages/_es/Dialog.js +4 -4
- package/dist/packages/_es/Divider.js +1 -1
- package/dist/packages/_es/Drag.js +1 -1
- package/dist/packages/_es/Ecard.js +1 -1
- package/dist/packages/_es/Elevator.js +1 -1
- package/dist/packages/_es/Ellipsis.js +1 -1
- package/dist/packages/_es/Empty.js +2 -2
- package/dist/packages/_es/FixedNav.js +1 -1
- package/dist/packages/_es/Form.js +26 -21
- package/dist/packages/_es/FormItem.js +3 -3
- package/dist/packages/_es/Grid.js +2 -2
- package/dist/packages/_es/GridItem.js +2 -2
- package/dist/packages/_es/Image.js +2 -2
- package/dist/packages/_es/ImagePreview.js +4 -4
- package/dist/packages/_es/Indicator.js +1 -1
- package/dist/packages/_es/InfiniteLoading.js +2 -2
- package/dist/packages/_es/Input.js +2 -4
- package/dist/packages/_es/InputNumber.js +23 -2
- package/dist/packages/_es/{Interceptor-5415601e.js → Interceptor-c05a39f2.js} +1 -1
- package/dist/packages/_es/Invoice.js +3 -3
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/List.js +1 -1
- package/dist/packages/_es/Menu.js +2 -2
- package/dist/packages/_es/MenuItem.js +2 -2
- package/dist/packages/_es/Navbar.js +1 -1
- package/dist/packages/_es/Noticebar.js +5 -5
- package/dist/packages/_es/Notify.js +2 -2
- package/dist/packages/_es/NumberKeyboard.js +2 -2
- package/dist/packages/_es/Overlay.js +3 -1
- package/dist/packages/_es/Pagination.js +1 -1
- package/dist/packages/_es/Picker.js +7 -7
- package/dist/packages/_es/Popover.js +7 -7
- package/dist/packages/_es/Popup.js +2 -2
- package/dist/packages/_es/Price.js +1 -1
- package/dist/packages/_es/Progress.js +1 -1
- package/dist/packages/_es/PullRefresh.js +3 -2
- package/dist/packages/_es/Radio.js +2 -2
- package/dist/packages/_es/RadioGroup.js +2 -2
- package/dist/packages/_es/Range.js +1 -1
- package/dist/packages/_es/Rate.js +4 -4
- package/dist/packages/_es/Row.js +1 -1
- package/dist/packages/_es/Searchbar.js +1 -1
- package/dist/packages/_es/ShortPassword.js +2 -2
- package/dist/packages/_es/SideNavbar.js +1 -1
- package/dist/packages/_es/SideNavbarItem.js +1 -1
- package/dist/packages/_es/Signature.js +1 -1
- package/dist/packages/_es/Skeleton.js +1 -1
- package/dist/packages/_es/Sku.js +8 -8
- package/dist/packages/_es/Step.js +1 -1
- package/dist/packages/_es/Steps.js +1 -1
- package/dist/packages/_es/Sticky.js +125 -5
- package/dist/packages/_es/SubSideNavbar.js +1 -1
- package/dist/packages/_es/Swipe.js +1 -1
- package/dist/packages/_es/Swiper.js +2 -2
- package/dist/packages/_es/SwiperItem.js +2 -2
- package/dist/packages/_es/Switch.js +1 -1
- package/dist/packages/_es/TabPane.js +2 -2
- package/dist/packages/_es/Tabbar.js +2 -2
- package/dist/packages/_es/TabbarItem.js +2 -2
- package/dist/packages/_es/Table.js +12 -6
- package/dist/packages/_es/Tabs.js +5 -4
- package/dist/packages/_es/Tag.js +1 -1
- package/dist/packages/_es/Textarea.js +1 -1
- package/dist/packages/_es/TimeDetail.js +1 -1
- package/dist/packages/_es/TimePannel.js +1 -1
- package/dist/packages/_es/TimeSelect.js +2 -2
- package/dist/packages/_es/Toast.js +2 -2
- package/dist/packages/_es/Tour.js +2 -2
- package/dist/packages/_es/TrendArrow.js +1 -1
- package/dist/packages/_es/Uploader.js +5 -4
- package/dist/packages/_es/Video.js +1 -1
- package/dist/packages/_es/Watermark.js +2 -2
- package/dist/packages/_es/{common-21e9de3d.js → common-8775d905.js} +1 -1
- package/dist/packages/_es/{component-8f0be7eb.js → component-0fbad28e.js} +3 -3
- package/dist/packages/_es/{index-c9b21ed1.js → index-3a5098e4.js} +15 -12
- package/dist/packages/_es/{index-dc2ebe90.js → index-5ffbc437.js} +2 -2
- package/dist/packages/_es/{index-43c34ac6.js → index-97b44e6c.js} +1 -0
- package/dist/packages/_es/{index.vue_vue_type_script_lang-dba4283d.js → index.vue_vue_type_script_lang-2852286e.js} +1 -1
- package/dist/packages/_es/{index.vue_vue_type_script_lang-7b265520.js → index.vue_vue_type_script_lang-cdf21a24.js} +2 -2
- package/dist/packages/_es/{mountComponent-f2c53efb.js → mountComponent-a895e3f1.js} +1 -1
- package/dist/packages/avatargroup/index.scss +0 -3
- package/dist/packages/sticky/index.scss +0 -10
- package/dist/smartips/web-types.json +4 -10
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +54 -156
- package/dist/styles/themes/jdb.scss +54 -156
- package/dist/styles/themes/jddkh.scss +54 -156
- package/dist/styles/themes/jdt.scss +54 -156
- package/dist/types/__VUE/avatar/index.vue.d.ts +11 -27
- package/dist/types/__VUE/avatar/types.d.ts +3 -0
- package/dist/types/__VUE/avatargroup/index.vue.d.ts +18 -15
- package/dist/types/__VUE/calendar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/calendaritem/index.vue.d.ts +7 -8
- package/dist/types/__VUE/calendaritem/type.d.ts +0 -8
- package/dist/types/__VUE/circleprogress/index.vue.d.ts +3 -3
- package/dist/types/__VUE/configprovider/index.vue.d.ts +3 -4
- package/dist/types/__VUE/form/common.d.ts +2 -2
- package/dist/types/__VUE/form/index.vue.d.ts +4 -4
- package/dist/types/__VUE/formitem/types.d.ts +2 -2
- package/dist/types/__VUE/picker/common.d.ts +4 -4
- package/dist/types/__VUE/picker/index.vue.d.ts +9 -10
- package/dist/types/__VUE/pullrefresh/index.vue.d.ts +1 -1
- package/dist/types/__VUE/rate/index.vue.d.ts +2 -2
- package/dist/types/__VUE/sticky/index.vue.d.ts +11 -8
- package/dist/types/__VUE/swipe/index.vue.d.ts +2 -2
- package/dist/types/__VUE/swiper/index.vue.d.ts +1 -1
- package/dist/types/__VUE/table/common.d.ts +21 -6
- package/dist/types/__VUE/table/renderColumn.d.ts +20 -6
- package/dist/types/__VUE/tabs/hooks.d.ts +2 -2
- package/dist/types/__VUE/tabs/index.vue.d.ts +2 -2
- package/dist/types/__VUE/uploader/index.vue.d.ts +2 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/utils/useTaroRect/index.d.ts +1 -1
- package/dist/types/utils/useTouch/index.d.ts +2 -2
- package/package.json +1 -1
- package/dist/packages/_es/index.vue_vue_type_script_lang-89366761.js +0 -151
|
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { ref, reactive, computed, watch, toRefs, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, Fragment, renderList, renderSlot } from "vue";
|
|
21
|
-
import { c as createComponent } from "./component-
|
|
21
|
+
import { c as createComponent } from "./component-0fbad28e.js";
|
|
22
22
|
import { u as useRect } from "./index-29892cda.js";
|
|
23
23
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
24
24
|
import "../locale/lang";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref, computed, onMounted, onUnmounted, reactive, provide, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, normalizeStyle, toDisplayString, renderSlot, createBlock } from "vue";
|
|
2
|
-
import { c as createComponent } from "./component-
|
|
2
|
+
import { c as createComponent } from "./component-0fbad28e.js";
|
|
3
3
|
import { u as useRect } from "./index-29892cda.js";
|
|
4
4
|
import { ArrowUp2, ArrowDown2 } from "@nutui/icons-vue";
|
|
5
5
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
@@ -41,7 +41,7 @@ const _sfc_main = create({
|
|
|
41
41
|
},
|
|
42
42
|
titleClass: [String]
|
|
43
43
|
},
|
|
44
|
-
setup(props
|
|
44
|
+
setup(props) {
|
|
45
45
|
const barRef = ref();
|
|
46
46
|
const offset = ref(0);
|
|
47
47
|
const isScrollFixed = ref(false);
|
|
@@ -18,8 +18,8 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { reactive, computed, inject, getCurrentInstance, onUnmounted, resolveComponent, withDirectives, openBlock, createElementBlock, normalizeStyle, createElementVNode, vShow, createVNode, mergeProps, withCtx, Fragment, renderList, normalizeClass, renderSlot, createCommentVNode, toDisplayString } from "vue";
|
|
21
|
-
import { c as createComponent } from "./component-
|
|
22
|
-
import { P as Popup } from "./index-
|
|
21
|
+
import { c as createComponent } from "./component-0fbad28e.js";
|
|
22
|
+
import { P as Popup } from "./index-5ffbc437.js";
|
|
23
23
|
import { Check } from "@nutui/icons-vue";
|
|
24
24
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
25
25
|
import "../locale/lang";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { toRefs, ref, computed, onMounted, nextTick, resolveComponent, openBlock, createElementBlock, createElementVNode, normalizeClass, normalizeStyle, renderSlot, createVNode, createCommentVNode, toDisplayString } from "vue";
|
|
2
|
-
import { c as createComponent } from "./component-
|
|
2
|
+
import { c as createComponent } from "./component-0fbad28e.js";
|
|
3
3
|
import { Left } from "@nutui/icons-vue";
|
|
4
4
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
5
5
|
import "../locale/lang";
|
|
@@ -19,7 +19,7 @@ var __spreadValues = (a, b) => {
|
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { h, ref, reactive, computed, watch, onMounted, onActivated, onDeactivated, onUnmounted, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, withDirectives, normalizeStyle, createElementVNode, renderSlot, createBlock, createCommentVNode, createTextVNode, toDisplayString, withModifiers, vShow, Fragment, renderList } from "vue";
|
|
21
21
|
import { Notice, CircleClose } from "@nutui/icons-vue";
|
|
22
|
-
import { c as createComponent } from "./component-
|
|
22
|
+
import { c as createComponent } from "./component-0fbad28e.js";
|
|
23
23
|
import { p as pxCheck } from "./pxCheck-c6b9f6b7.js";
|
|
24
24
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
25
25
|
import "../locale/lang";
|
|
@@ -166,7 +166,7 @@ const _sfc_main = create({
|
|
|
166
166
|
});
|
|
167
167
|
watch(
|
|
168
168
|
() => props.text,
|
|
169
|
-
(
|
|
169
|
+
() => {
|
|
170
170
|
initScrollWrap();
|
|
171
171
|
}
|
|
172
172
|
);
|
|
@@ -176,7 +176,7 @@ const _sfc_main = create({
|
|
|
176
176
|
state.scrollList = [].concat(value);
|
|
177
177
|
}
|
|
178
178
|
);
|
|
179
|
-
const initScrollWrap = (
|
|
179
|
+
const initScrollWrap = () => {
|
|
180
180
|
if (state.showNoticebar == false) {
|
|
181
181
|
return;
|
|
182
182
|
}
|
|
@@ -265,7 +265,7 @@ const _sfc_main = create({
|
|
|
265
265
|
props.complexAm ? startRoll() : startRollEasy();
|
|
266
266
|
}, props.standTime);
|
|
267
267
|
} else {
|
|
268
|
-
initScrollWrap(
|
|
268
|
+
initScrollWrap();
|
|
269
269
|
}
|
|
270
270
|
});
|
|
271
271
|
const updateSlotChild = () => {
|
|
@@ -274,7 +274,7 @@ const _sfc_main = create({
|
|
|
274
274
|
};
|
|
275
275
|
const watchSlots = () => {
|
|
276
276
|
setTimeout(() => {
|
|
277
|
-
var observer = new MutationObserver((
|
|
277
|
+
var observer = new MutationObserver(() => {
|
|
278
278
|
state.showNotica = false;
|
|
279
279
|
setTimeout(() => {
|
|
280
280
|
state.showNotica = true;
|
|
@@ -18,8 +18,8 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { ref, watch, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, normalizeClass, normalizeStyle, renderSlot, createElementBlock, Fragment, createTextVNode, toDisplayString, createVNode, render, onMounted, h } from "vue";
|
|
21
|
-
import { c as createComponent } from "./component-
|
|
22
|
-
import { P as Popup } from "./index-
|
|
21
|
+
import { c as createComponent } from "./component-0fbad28e.js";
|
|
22
|
+
import { P as Popup } from "./index-5ffbc437.js";
|
|
23
23
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
24
24
|
import "../locale/lang";
|
|
25
25
|
import "./Overlay.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, computed, watch, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, toDisplayString, createCommentVNode, Fragment, renderList, normalizeClass, createTextVNode } from "vue";
|
|
2
|
-
import { c as createComponent } from "./component-
|
|
3
|
-
import { P as Popup } from "./index-
|
|
2
|
+
import { c as createComponent } from "./component-0fbad28e.js";
|
|
3
|
+
import { P as Popup } from "./index-5ffbc437.js";
|
|
4
4
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
5
5
|
import "../locale/lang";
|
|
6
6
|
import "./Overlay.js";
|
|
@@ -15,7 +15,7 @@ var __spreadValues = (a, b) => {
|
|
|
15
15
|
return a;
|
|
16
16
|
};
|
|
17
17
|
import { computed, watchEffect, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, withModifiers, normalizeStyle, renderSlot, vShow } from "vue";
|
|
18
|
-
import { b as body, c as createComponent } from "./component-
|
|
18
|
+
import { b as body, c as createComponent } from "./component-0fbad28e.js";
|
|
19
19
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
20
20
|
import "../locale/lang";
|
|
21
21
|
let count = 0;
|
|
@@ -27,6 +27,7 @@ const useLockScroll = (isLock) => {
|
|
|
27
27
|
!count && body.classList.add(CLSNAME);
|
|
28
28
|
count++;
|
|
29
29
|
} catch (error) {
|
|
30
|
+
console.warn("[NutUI] <useLockScroll>", error);
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
33
|
};
|
|
@@ -36,6 +37,7 @@ const useLockScroll = (isLock) => {
|
|
|
36
37
|
count--;
|
|
37
38
|
!count && body.classList.remove(CLSNAME);
|
|
38
39
|
} catch (error) {
|
|
40
|
+
console.warn("[NutUI] <unlock>", error);
|
|
39
41
|
}
|
|
40
42
|
}
|
|
41
43
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { toRefs, computed, watchEffect, openBlock, createElementBlock, createElementVNode, normalizeClass, renderSlot, createTextVNode, toDisplayString, Fragment, renderList, createCommentVNode } from "vue";
|
|
2
|
-
import { c as createComponent } from "./component-
|
|
2
|
+
import { c as createComponent } from "./component-0fbad28e.js";
|
|
3
3
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
4
4
|
import "../locale/lang";
|
|
5
5
|
const { create, translate } = createComponent("pagination");
|
|
@@ -18,12 +18,12 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { reactive, ref, computed, watch, toRefs, onMounted, openBlock, createElementBlock, createElementVNode, normalizeStyle, Fragment, renderList, normalizeClass, toDisplayString, createCommentVNode, resolveComponent, renderSlot, createVNode } from "vue";
|
|
21
|
-
import { c as createComponent, d as preventDefault, e as clamp } from "./component-
|
|
21
|
+
import { c as createComponent, d as preventDefault, e as clamp } from "./component-0fbad28e.js";
|
|
22
22
|
import { p as pxCheck } from "./pxCheck-c6b9f6b7.js";
|
|
23
23
|
import { u as useTouch } from "./index-7a7385e4.js";
|
|
24
24
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
25
25
|
import "../locale/lang";
|
|
26
|
-
const { componentName
|
|
26
|
+
const { componentName } = createComponent("picker");
|
|
27
27
|
const usePicker = (props, emit) => {
|
|
28
28
|
const state = reactive({
|
|
29
29
|
formattedColumns: props.columns
|
|
@@ -36,7 +36,7 @@ const usePicker = (props, emit) => {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
const classes = computed(() => {
|
|
39
|
-
const prefixCls = componentName
|
|
39
|
+
const prefixCls = componentName;
|
|
40
40
|
return {
|
|
41
41
|
[prefixCls]: true
|
|
42
42
|
};
|
|
@@ -110,7 +110,7 @@ const usePicker = (props, emit) => {
|
|
|
110
110
|
defaultValues.value = defaultValues.value.slice(0, index + 1);
|
|
111
111
|
}
|
|
112
112
|
} else {
|
|
113
|
-
defaultValues.value[columnIndex] =
|
|
113
|
+
defaultValues.value[columnIndex] = Object.prototype.hasOwnProperty.call(option, "value") ? option.value : "";
|
|
114
114
|
}
|
|
115
115
|
emit("change", {
|
|
116
116
|
columnIndex,
|
|
@@ -359,7 +359,7 @@ const _sfc_main$1 = create$1({
|
|
|
359
359
|
};
|
|
360
360
|
watch(
|
|
361
361
|
() => props.column,
|
|
362
|
-
(
|
|
362
|
+
() => {
|
|
363
363
|
if (props.column && props.column.length > 0) {
|
|
364
364
|
state.transformY = 0;
|
|
365
365
|
modifyStatus(false);
|
|
@@ -371,7 +371,7 @@ const _sfc_main$1 = create$1({
|
|
|
371
371
|
);
|
|
372
372
|
watch(
|
|
373
373
|
() => props.value,
|
|
374
|
-
(
|
|
374
|
+
() => {
|
|
375
375
|
state.transformY = 0;
|
|
376
376
|
modifyStatus(false);
|
|
377
377
|
},
|
|
@@ -479,7 +479,7 @@ const baseProps = {
|
|
|
479
479
|
default: 36
|
|
480
480
|
}
|
|
481
481
|
};
|
|
482
|
-
const {
|
|
482
|
+
const { create, translate } = createComponent("picker");
|
|
483
483
|
const _sfc_main = create({
|
|
484
484
|
components: {
|
|
485
485
|
[column.name]: column
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ref, computed, onMounted, watch, resolveComponent, openBlock, createElementBlock, Fragment, renderSlot, createCommentVNode, createElementVNode, normalizeClass, normalizeStyle, createVNode, withCtx, renderList, withModifiers, createBlock, resolveDynamicComponent, toDisplayString } from "vue";
|
|
2
|
-
import { i as isArray, c as createComponent } from "./component-
|
|
2
|
+
import { i as isArray, c as createComponent } from "./component-0fbad28e.js";
|
|
3
3
|
import { r as renderIcon } from "./renderIcon-3d0fd47c.js";
|
|
4
4
|
import { u as useRect } from "./index-29892cda.js";
|
|
5
|
-
import { P as Popup } from "./index-
|
|
5
|
+
import { P as Popup } from "./index-5ffbc437.js";
|
|
6
6
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
7
7
|
import "../locale/lang";
|
|
8
8
|
import "./Overlay.js";
|
|
@@ -80,7 +80,7 @@ const _sfc_main = create({
|
|
|
80
80
|
return styles;
|
|
81
81
|
});
|
|
82
82
|
const upperCaseFirst = (str) => {
|
|
83
|
-
|
|
83
|
+
str = str.toLowerCase();
|
|
84
84
|
str = str.replace(/\b\w+\b/g, (word) => word.substring(0, 1).toUpperCase() + word.substring(1));
|
|
85
85
|
return str;
|
|
86
86
|
};
|
|
@@ -97,13 +97,13 @@ const _sfc_main = create({
|
|
|
97
97
|
let cross = 0;
|
|
98
98
|
let parallel = 0;
|
|
99
99
|
if (isArray(offset) && offset.length == 2) {
|
|
100
|
-
cross +=
|
|
101
|
-
parallel +=
|
|
100
|
+
cross += Number(offset[1]);
|
|
101
|
+
parallel += Number(offset[0]);
|
|
102
102
|
}
|
|
103
103
|
if (width) {
|
|
104
104
|
if (["bottom", "top"].includes(direction)) {
|
|
105
|
-
const
|
|
106
|
-
styles.top = `${top +
|
|
105
|
+
const h = direction == "bottom" ? height + cross : -(conentHeight + cross);
|
|
106
|
+
styles.top = `${top + h}px`;
|
|
107
107
|
if (!skew) {
|
|
108
108
|
styles.left = `${-(conentWidth - width) / 2 + left + parallel}px`;
|
|
109
109
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { P } from "./index-
|
|
1
|
+
import { P } from "./index-5ffbc437.js";
|
|
2
2
|
import "vue";
|
|
3
3
|
import "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
4
|
-
import "./component-
|
|
4
|
+
import "./component-0fbad28e.js";
|
|
5
5
|
import "../locale/lang";
|
|
6
6
|
import "./Overlay.js";
|
|
7
7
|
import "@nutui/icons-vue";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed, openBlock, createElementBlock, normalizeClass, createCommentVNode, createElementVNode, toDisplayString } from "vue";
|
|
2
|
-
import { c as createComponent } from "./component-
|
|
2
|
+
import { c as createComponent } from "./component-0fbad28e.js";
|
|
3
3
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
4
4
|
import "../locale/lang";
|
|
5
5
|
const { componentName, create } = createComponent("price");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useSlots, ref, computed, onMounted, resolveComponent, openBlock, createElementBlock, createElementVNode, normalizeClass, normalizeStyle, toDisplayString, createCommentVNode, renderSlot, createVNode } from "vue";
|
|
2
|
-
import { c as createComponent } from "./component-
|
|
2
|
+
import { c as createComponent } from "./component-0fbad28e.js";
|
|
3
3
|
import { Checked } from "@nutui/icons-vue";
|
|
4
4
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
5
5
|
import "../locale/lang";
|
|
@@ -18,10 +18,10 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { ref, reactive, computed, watch, toRefs, nextTick, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, createBlock, createCommentVNode, toDisplayString, renderSlot } from "vue";
|
|
21
|
-
import { c as createComponent, l as getScrollTopRoot } from "./component-
|
|
21
|
+
import { c as createComponent, l as getScrollTopRoot } from "./component-0fbad28e.js";
|
|
22
22
|
import { u as useTouch } from "./index-7a7385e4.js";
|
|
23
23
|
import { p as pxCheck } from "./pxCheck-c6b9f6b7.js";
|
|
24
|
-
import { u as useScrollParent } from "./index-
|
|
24
|
+
import { u as useScrollParent } from "./index-97b44e6c.js";
|
|
25
25
|
import { Loading } from "@nutui/icons-vue";
|
|
26
26
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
27
27
|
import "../locale/lang";
|
|
@@ -87,6 +87,7 @@ const _sfc_main = create({
|
|
|
87
87
|
case "loading":
|
|
88
88
|
return !slots.loading ? props.loadingTxt : "";
|
|
89
89
|
}
|
|
90
|
+
return "";
|
|
90
91
|
});
|
|
91
92
|
const getStyle = computed(() => {
|
|
92
93
|
return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as _sfc_main } from "./index.vue_vue_type_script_lang-
|
|
1
|
+
import { _ as _sfc_main } from "./index.vue_vue_type_script_lang-cdf21a24.js";
|
|
2
2
|
import "vue";
|
|
3
|
-
import "./component-
|
|
3
|
+
import "./component-0fbad28e.js";
|
|
4
4
|
import "../locale/lang";
|
|
5
5
|
import "@nutui/icons-vue";
|
|
6
6
|
import "./pxCheck-c6b9f6b7.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as _sfc_main } from "./index.vue_vue_type_script_lang-
|
|
1
|
+
import { _ as _sfc_main } from "./index.vue_vue_type_script_lang-2852286e.js";
|
|
2
2
|
import "vue";
|
|
3
|
-
import "./component-
|
|
3
|
+
import "./component-0fbad28e.js";
|
|
4
4
|
import "../locale/lang";
|
|
5
5
|
export {
|
|
6
6
|
_sfc_main as default
|
|
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { ref, computed, toRefs, openBlock, createElementBlock, normalizeClass, toDisplayString, createCommentVNode, createElementVNode, normalizeStyle, withModifiers, Fragment, renderList, createTextVNode, renderSlot } from "vue";
|
|
21
|
-
import { c as createComponent, i as isArray } from "./component-
|
|
21
|
+
import { c as createComponent, i as isArray } from "./component-0fbad28e.js";
|
|
22
22
|
import { u as useTouch } from "./index-7a7385e4.js";
|
|
23
23
|
import { u as useRect } from "./index-29892cda.js";
|
|
24
24
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
@@ -19,7 +19,7 @@ var __spreadValues = (a, b) => {
|
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { ref, computed, openBlock, createElementBlock, normalizeClass, Fragment, renderList, normalizeStyle, createElementVNode, createBlock, resolveDynamicComponent, createCommentVNode } from "vue";
|
|
21
21
|
import { StarFillN } from "@nutui/icons-vue";
|
|
22
|
-
import { c as createComponent } from "./component-
|
|
22
|
+
import { c as createComponent } from "./component-0fbad28e.js";
|
|
23
23
|
import { r as renderIcon } from "./renderIcon-3d0fd47c.js";
|
|
24
24
|
import { p as pxCheck } from "./pxCheck-c6b9f6b7.js";
|
|
25
25
|
import { u as useTouch } from "./index-7a7385e4.js";
|
|
@@ -93,9 +93,9 @@ const _sfc_main = create({
|
|
|
93
93
|
if (props.disabled || props.readonly)
|
|
94
94
|
return;
|
|
95
95
|
let value = 0;
|
|
96
|
-
if (index === 1 && props.modelValue === index)
|
|
97
|
-
;
|
|
98
|
-
else {
|
|
96
|
+
if (index === 1 && props.modelValue === index) {
|
|
97
|
+
value = 0;
|
|
98
|
+
} else {
|
|
99
99
|
value = index;
|
|
100
100
|
if (props.allowHalf && e == 2) {
|
|
101
101
|
value -= 0.5;
|
package/dist/packages/_es/Row.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { provide, computed, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
|
|
2
|
-
import { c as createComponent } from "./component-
|
|
2
|
+
import { c as createComponent } from "./component-0fbad28e.js";
|
|
3
3
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
4
4
|
import "../locale/lang";
|
|
5
5
|
const { componentName, create } = createComponent("row");
|
|
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { reactive, computed, ref, onMounted, toRefs, openBlock, createElementBlock, normalizeStyle, toDisplayString, createCommentVNode, renderSlot, createElementVNode, normalizeClass, withModifiers, withDirectives, createBlock, resolveDynamicComponent, vShow } from "vue";
|
|
21
|
-
import { c as createComponent } from "./component-
|
|
21
|
+
import { c as createComponent } from "./component-0fbad28e.js";
|
|
22
22
|
import { r as renderIcon } from "./renderIcon-3d0fd47c.js";
|
|
23
23
|
import { CircleClose } from "@nutui/icons-vue";
|
|
24
24
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, computed, watch, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, toDisplayString, Fragment, renderList, createCommentVNode } from "vue";
|
|
2
|
-
import { c as createComponent } from "./component-
|
|
3
|
-
import { P as Popup } from "./index-
|
|
2
|
+
import { c as createComponent } from "./component-0fbad28e.js";
|
|
3
|
+
import { P as Popup } from "./index-5ffbc437.js";
|
|
4
4
|
import { Tips } from "@nutui/icons-vue";
|
|
5
5
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
6
6
|
import "../locale/lang";
|
|
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { ref, reactive, computed, onMounted, toRefs, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot } from "vue";
|
|
21
|
-
import { c as createComponent } from "./component-
|
|
21
|
+
import { c as createComponent } from "./component-0fbad28e.js";
|
|
22
22
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
23
23
|
import "../locale/lang";
|
|
24
24
|
const { componentName, create } = createComponent("side-navbar");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed, openBlock, createElementBlock, normalizeClass, withModifiers, createElementVNode, toDisplayString } from "vue";
|
|
2
|
-
import { c as createComponent } from "./component-
|
|
2
|
+
import { c as createComponent } from "./component-0fbad28e.js";
|
|
3
3
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
4
4
|
import "../locale/lang";
|
|
5
5
|
const { componentName, create } = createComponent("side-navbar-item");
|
|
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { ref, computed, reactive, onMounted, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, withDirectives, vShow, toDisplayString, createCommentVNode, createVNode, withCtx, createTextVNode } from "vue";
|
|
21
|
-
import { c as createComponent } from "./component-
|
|
21
|
+
import { c as createComponent } from "./component-0fbad28e.js";
|
|
22
22
|
import Button from "./Button.js";
|
|
23
23
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
24
24
|
import "../locale/lang";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as createComponent } from "./component-
|
|
1
|
+
import { c as createComponent } from "./component-0fbad28e.js";
|
|
2
2
|
import { toRefs, computed, resolveComponent, openBlock, createElementBlock, renderSlot, createCommentVNode, createElementVNode, createBlock, normalizeClass, normalizeStyle, Fragment, renderList } from "vue";
|
|
3
3
|
import Avatar from "./Avatar.js";
|
|
4
4
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
package/dist/packages/_es/Sku.js
CHANGED
|
@@ -19,15 +19,15 @@ var __spreadValues = (a, b) => {
|
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { resolveComponent, openBlock, createElementBlock, createElementVNode, renderSlot, createBlock, createCommentVNode, toDisplayString, ref, watch, onMounted, Fragment, renderList, normalizeClass, createVNode, withCtx, createSlots } from "vue";
|
|
21
21
|
import Price from "./Price.js";
|
|
22
|
-
import { c as createComponent, T as TypeOfFun } from "./component-
|
|
22
|
+
import { c as createComponent, T as TypeOfFun } from "./component-0fbad28e.js";
|
|
23
23
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
24
24
|
import InputNumber from "./InputNumber.js";
|
|
25
|
-
import { p as popupProps, P as Popup } from "./index-
|
|
25
|
+
import { p as popupProps, P as Popup } from "./index-5ffbc437.js";
|
|
26
26
|
import "../locale/lang";
|
|
27
27
|
import "./pxCheck-c6b9f6b7.js";
|
|
28
28
|
import "@nutui/icons-vue";
|
|
29
29
|
import "./Overlay.js";
|
|
30
|
-
const {
|
|
30
|
+
const { create: create$4, translate: translate$1 } = createComponent("sku-header");
|
|
31
31
|
const _sfc_main$4 = create$4({
|
|
32
32
|
props: {
|
|
33
33
|
goods: {
|
|
@@ -39,7 +39,7 @@ const _sfc_main$4 = create$4({
|
|
|
39
39
|
components: {
|
|
40
40
|
[Price.name]: Price
|
|
41
41
|
},
|
|
42
|
-
setup(props, {
|
|
42
|
+
setup(props, { slots }) {
|
|
43
43
|
const getSlots = (name) => slots[name];
|
|
44
44
|
return {
|
|
45
45
|
getSlots,
|
|
@@ -74,7 +74,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
74
74
|
]);
|
|
75
75
|
}
|
|
76
76
|
const SkuHeader = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4]]);
|
|
77
|
-
const {
|
|
77
|
+
const { create: create$3 } = createComponent("sku-select");
|
|
78
78
|
const _sfc_main$3 = create$3({
|
|
79
79
|
props: {
|
|
80
80
|
sku: {
|
|
@@ -140,7 +140,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
140
140
|
]);
|
|
141
141
|
}
|
|
142
142
|
const SkuSelect = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]);
|
|
143
|
-
const {
|
|
143
|
+
const { create: create$2 } = createComponent("sku-stepper");
|
|
144
144
|
const _sfc_main$2 = create$2({
|
|
145
145
|
props: {
|
|
146
146
|
// 购买数量最大值
|
|
@@ -233,7 +233,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
233
233
|
]);
|
|
234
234
|
}
|
|
235
235
|
const SkuStepper = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
|
|
236
|
-
const {
|
|
236
|
+
const { create: create$1 } = createComponent("sku-operate");
|
|
237
237
|
const _sfc_main$1 = create$1({
|
|
238
238
|
props: {
|
|
239
239
|
// 底部按钮配置 confirm cart buy
|
|
@@ -310,7 +310,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
310
310
|
])) : createCommentVNode("", true);
|
|
311
311
|
}
|
|
312
312
|
const SkuOperate = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
|
|
313
|
-
const {
|
|
313
|
+
const { create, translate } = createComponent("sku");
|
|
314
314
|
const _sfc_main = create({
|
|
315
315
|
props: __spreadProps(__spreadValues({}, popupProps), {
|
|
316
316
|
sku: {
|
|
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { getCurrentInstance, inject, reactive, computed, toRefs, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, Fragment, toDisplayString, createCommentVNode } from "vue";
|
|
21
|
-
import { c as createComponent } from "./component-
|
|
21
|
+
import { c as createComponent } from "./component-0fbad28e.js";
|
|
22
22
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
23
23
|
import "../locale/lang";
|
|
24
24
|
const { create, componentName } = createComponent("step");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { reactive, computed, provide, h } from "vue";
|
|
2
|
-
import { c as createComponent } from "./component-
|
|
2
|
+
import { c as createComponent } from "./component-0fbad28e.js";
|
|
3
3
|
import "../locale/lang";
|
|
4
4
|
const { create, componentName } = createComponent("steps");
|
|
5
5
|
const _sfc_main = create({
|
|
@@ -1,8 +1,128 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "
|
|
3
|
-
import "./
|
|
1
|
+
import { ref, reactive, computed, watch, onMounted, onUnmounted, openBlock, createElementBlock, normalizeStyle, createElementVNode, renderSlot } from "vue";
|
|
2
|
+
import { c as createComponent } from "./component-0fbad28e.js";
|
|
3
|
+
import { g as getScrollParent } from "./index-97b44e6c.js";
|
|
4
|
+
import { u as useRect } from "./index-29892cda.js";
|
|
5
|
+
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
4
6
|
import "../locale/lang";
|
|
5
|
-
|
|
7
|
+
const { create } = createComponent("sticky");
|
|
8
|
+
const _sfc_main = create({
|
|
9
|
+
props: {
|
|
10
|
+
position: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: "top"
|
|
13
|
+
},
|
|
14
|
+
top: {
|
|
15
|
+
type: [Number, String],
|
|
16
|
+
default: 0
|
|
17
|
+
},
|
|
18
|
+
bottom: {
|
|
19
|
+
type: [Number, String],
|
|
20
|
+
default: 0
|
|
21
|
+
},
|
|
22
|
+
container: {
|
|
23
|
+
type: Object
|
|
24
|
+
},
|
|
25
|
+
zIndex: {
|
|
26
|
+
type: [Number, String],
|
|
27
|
+
default: 99
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
emits: ["change"],
|
|
31
|
+
setup(props, { emit }) {
|
|
32
|
+
const rootRef = ref();
|
|
33
|
+
const stickyRef = ref();
|
|
34
|
+
const state = reactive({
|
|
35
|
+
fixed: false,
|
|
36
|
+
height: 0,
|
|
37
|
+
transform: 0
|
|
38
|
+
});
|
|
39
|
+
const threshold = computed(() => {
|
|
40
|
+
return props.position === "top" ? Number(props.top) : Number(props.bottom);
|
|
41
|
+
});
|
|
42
|
+
const rootStyle = computed(() => {
|
|
43
|
+
if (state.fixed)
|
|
44
|
+
return { height: `${state.height}px` };
|
|
45
|
+
return {};
|
|
46
|
+
});
|
|
47
|
+
const stickyStyle = computed(() => {
|
|
48
|
+
if (!state.fixed)
|
|
49
|
+
return {};
|
|
50
|
+
return {
|
|
51
|
+
[props.position]: `${threshold.value}px`,
|
|
52
|
+
transform: state.transform ? `translate3d(0, ${state.transform}px, 0)` : void 0,
|
|
53
|
+
position: state.fixed ? "fixed" : void 0,
|
|
54
|
+
zIndex: Number(props.zIndex)
|
|
55
|
+
};
|
|
56
|
+
});
|
|
57
|
+
const handleScroll = () => {
|
|
58
|
+
const containerEle = props.container;
|
|
59
|
+
if (!rootRef.value && !containerEle)
|
|
60
|
+
return;
|
|
61
|
+
const rootRect = useRect(rootRef);
|
|
62
|
+
const stCurrent = stickyRef.value;
|
|
63
|
+
const stickyRect = useRect(stCurrent);
|
|
64
|
+
const containerRect = useRect(containerEle);
|
|
65
|
+
state.height = rootRect.height;
|
|
66
|
+
const getFixed = () => {
|
|
67
|
+
let fixed = false;
|
|
68
|
+
if (props.position === "top") {
|
|
69
|
+
fixed = containerEle ? threshold.value > rootRect.top && containerRect.bottom > 0 : threshold.value > rootRect.top;
|
|
70
|
+
} else {
|
|
71
|
+
const clientHeight = document.documentElement.clientHeight;
|
|
72
|
+
fixed = containerEle ? containerRect.bottom > 0 && clientHeight - threshold.value - stickyRect.height > containerRect.top : clientHeight - threshold.value < rootRect.bottom;
|
|
73
|
+
}
|
|
74
|
+
return fixed;
|
|
75
|
+
};
|
|
76
|
+
const getTransform = () => {
|
|
77
|
+
if (containerEle) {
|
|
78
|
+
if (props.position === "top") {
|
|
79
|
+
const diff = containerRect.bottom - threshold.value - stickyRect.height;
|
|
80
|
+
return diff < 0 ? diff : 0;
|
|
81
|
+
} else {
|
|
82
|
+
const clientHeight = document.documentElement.clientHeight;
|
|
83
|
+
const diff = containerRect.bottom - (clientHeight - threshold.value);
|
|
84
|
+
return diff < 0 ? diff : 0;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return 0;
|
|
88
|
+
};
|
|
89
|
+
state.transform = getTransform();
|
|
90
|
+
state.fixed = getFixed();
|
|
91
|
+
};
|
|
92
|
+
watch(
|
|
93
|
+
() => state.fixed,
|
|
94
|
+
(val) => {
|
|
95
|
+
emit("change", val);
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
onMounted(() => {
|
|
99
|
+
handleScroll();
|
|
100
|
+
const el = getScrollParent(rootRef.value);
|
|
101
|
+
el.addEventListener("scroll", handleScroll, true);
|
|
102
|
+
});
|
|
103
|
+
onUnmounted(() => {
|
|
104
|
+
const el = getScrollParent(rootRef.value);
|
|
105
|
+
el.removeEventListener("scroll", handleScroll);
|
|
106
|
+
});
|
|
107
|
+
return { rootRef, rootStyle, stickyRef, stickyStyle };
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
111
|
+
return openBlock(), createElementBlock("div", {
|
|
112
|
+
class: "nut-sticky",
|
|
113
|
+
ref: "rootRef",
|
|
114
|
+
style: normalizeStyle(_ctx.rootStyle)
|
|
115
|
+
}, [
|
|
116
|
+
createElementVNode("div", {
|
|
117
|
+
class: "nut-sticky__box",
|
|
118
|
+
ref: "stickyRef",
|
|
119
|
+
style: normalizeStyle(_ctx.stickyStyle)
|
|
120
|
+
}, [
|
|
121
|
+
renderSlot(_ctx.$slots, "default")
|
|
122
|
+
], 4)
|
|
123
|
+
], 4);
|
|
124
|
+
}
|
|
125
|
+
const Sticky = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
6
126
|
export {
|
|
7
|
-
|
|
127
|
+
Sticky as default
|
|
8
128
|
};
|