vant 4.6.4 → 4.6.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/README.md +4 -1
- package/es/dropdown-item/DropdownItem.mjs +1 -1
- package/es/dropdown-item/types.d.ts +2 -1
- package/es/dropdown-menu/DropdownMenu.d.ts +3 -0
- package/es/dropdown-menu/DropdownMenu.mjs +7 -3
- package/es/dropdown-menu/index.css +1 -1
- package/es/dropdown-menu/index.d.ts +2 -0
- package/es/floating-bubble/FloatingBubble.mjs +11 -5
- package/es/floating-panel/FloatingPanel.d.ts +3 -12
- package/es/floating-panel/FloatingPanel.mjs +13 -8
- package/es/floating-panel/index.d.ts +2 -8
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/toast/index.d.ts +1 -1
- package/es/vue-tsx-shim.d.ts +1 -0
- package/lib/dropdown-item/DropdownItem.js +1 -1
- package/lib/dropdown-item/types.d.ts +2 -1
- package/lib/dropdown-menu/DropdownMenu.d.ts +3 -0
- package/lib/dropdown-menu/DropdownMenu.js +7 -3
- package/lib/dropdown-menu/index.css +1 -1
- package/lib/dropdown-menu/index.d.ts +2 -0
- package/lib/floating-bubble/FloatingBubble.js +10 -4
- package/lib/floating-panel/FloatingPanel.d.ts +3 -12
- package/lib/floating-panel/FloatingPanel.js +11 -6
- package/lib/floating-panel/index.d.ts +2 -8
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/toast/index.d.ts +1 -1
- package/lib/vant.cjs.js +30 -15
- package/lib/vant.es.js +30 -15
- package/lib/vant.js +30 -15
- package/lib/vant.min.js +1 -1
- package/lib/vue-tsx-shim.d.ts +1 -0
- package/lib/web-types.json +1 -1
- package/package.json +3 -3
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
@@ -224,7 +224,7 @@ __reExport(stdin_exports, require("./toast"), module.exports);
|
|
224
224
|
__reExport(stdin_exports, require("./tree-select"), module.exports);
|
225
225
|
__reExport(stdin_exports, require("./uploader"), module.exports);
|
226
226
|
__reExport(stdin_exports, require("./watermark"), module.exports);
|
227
|
-
const version = "4.6.
|
227
|
+
const version = "4.6.6";
|
228
228
|
function install(app) {
|
229
229
|
const components = [
|
230
230
|
import_action_bar.ActionBar,
|
package/lib/toast/index.d.ts
CHANGED
@@ -79,7 +79,7 @@ export default Toast;
|
|
79
79
|
export { toastProps } from './Toast';
|
80
80
|
export { showToast, closeToast, showFailToast, showLoadingToast, showSuccessToast, allowMultipleToast, setToastDefaultOptions, resetToastDefaultOptions, } from './function-call';
|
81
81
|
export type { ToastProps } from './Toast';
|
82
|
-
export type { ToastType, ToastOptions, ToastPosition, ToastThemeVars, ToastWordBreak, } from './types';
|
82
|
+
export type { ToastType, ToastOptions, ToastPosition, ToastThemeVars, ToastWordBreak, ToastWrapperInstance, } from './types';
|
83
83
|
declare module 'vue' {
|
84
84
|
interface GlobalComponents {
|
85
85
|
VanToast: typeof Toast;
|
package/lib/vant.cjs.js
CHANGED
@@ -9418,7 +9418,8 @@ const dropdownMenuProps = {
|
|
9418
9418
|
direction: makeStringProp("down"),
|
9419
9419
|
activeColor: String,
|
9420
9420
|
closeOnClickOutside: truthProp,
|
9421
|
-
closeOnClickOverlay: truthProp
|
9421
|
+
closeOnClickOverlay: truthProp,
|
9422
|
+
swipeThreshold: numericProp
|
9422
9423
|
};
|
9423
9424
|
const DROPDOWN_KEY = Symbol(name$K);
|
9424
9425
|
var stdin_default$T = vue.defineComponent({
|
@@ -9437,6 +9438,7 @@ var stdin_default$T = vue.defineComponent({
|
|
9437
9438
|
} = use.useChildren(DROPDOWN_KEY);
|
9438
9439
|
const scrollParent = use.useScrollParent(root);
|
9439
9440
|
const opened = vue.computed(() => children.some((item) => item.state.showWrapper));
|
9441
|
+
const scrollable = vue.computed(() => props2.swipeThreshold && children.length > +props2.swipeThreshold);
|
9440
9442
|
const barStyle = vue.computed(() => {
|
9441
9443
|
if (opened.value && isDef(props2.zIndex)) {
|
9442
9444
|
return {
|
@@ -9493,7 +9495,8 @@ var stdin_default$T = vue.defineComponent({
|
|
9493
9495
|
"role": "button",
|
9494
9496
|
"tabindex": disabled ? void 0 : 0,
|
9495
9497
|
"class": [bem$K("item", {
|
9496
|
-
disabled
|
9498
|
+
disabled,
|
9499
|
+
grow: scrollable.value
|
9497
9500
|
}), {
|
9498
9501
|
[HAPTICS_FEEDBACK]: !disabled
|
9499
9502
|
}],
|
@@ -9537,7 +9540,8 @@ var stdin_default$T = vue.defineComponent({
|
|
9537
9540
|
"ref": barRef,
|
9538
9541
|
"style": barStyle.value,
|
9539
9542
|
"class": bem$K("bar", {
|
9540
|
-
opened: opened.value
|
9543
|
+
opened: opened.value,
|
9544
|
+
scrollable: scrollable.value
|
9541
9545
|
})
|
9542
9546
|
}, [children.map(renderTitle)]), (_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
9543
9547
|
};
|
@@ -9635,7 +9639,7 @@ var stdin_default$S = vue.defineComponent({
|
|
9635
9639
|
};
|
9636
9640
|
return vue.createVNode(Cell, {
|
9637
9641
|
"role": "menuitem",
|
9638
|
-
"key": option.value,
|
9642
|
+
"key": String(option.value),
|
9639
9643
|
"icon": option.icon,
|
9640
9644
|
"title": option.text,
|
9641
9645
|
"class": bem$J("option", {
|
@@ -9736,11 +9740,13 @@ const floatingBubbleProps = {
|
|
9736
9740
|
const [name$I, bem$I] = createNamespace("floating-bubble");
|
9737
9741
|
var stdin_default$R = vue.defineComponent({
|
9738
9742
|
name: name$I,
|
9743
|
+
inheritAttrs: false,
|
9739
9744
|
props: floatingBubbleProps,
|
9740
9745
|
emits: ["click", "update:offset", "offsetChange"],
|
9741
9746
|
setup(props2, {
|
9742
9747
|
slots,
|
9743
|
-
emit
|
9748
|
+
emit,
|
9749
|
+
attrs
|
9744
9750
|
}) {
|
9745
9751
|
const rootRef = vue.ref();
|
9746
9752
|
const state = vue.ref({
|
@@ -9768,6 +9774,8 @@ var stdin_default$R = vue.defineComponent({
|
|
9768
9774
|
return style;
|
9769
9775
|
});
|
9770
9776
|
const updateState = () => {
|
9777
|
+
if (!show.value)
|
9778
|
+
return;
|
9771
9779
|
const {
|
9772
9780
|
width,
|
9773
9781
|
height
|
@@ -9843,6 +9851,8 @@ var stdin_default$R = vue.defineComponent({
|
|
9843
9851
|
const onClick = (e) => {
|
9844
9852
|
if (touch.isTap.value)
|
9845
9853
|
emit("click", e);
|
9854
|
+
else
|
9855
|
+
e.stopPropagation();
|
9846
9856
|
};
|
9847
9857
|
vue.onMounted(() => {
|
9848
9858
|
updateState();
|
@@ -9861,15 +9871,15 @@ var stdin_default$R = vue.defineComponent({
|
|
9861
9871
|
}
|
9862
9872
|
});
|
9863
9873
|
return () => {
|
9864
|
-
const Content = vue.withDirectives(vue.createVNode("div", {
|
9874
|
+
const Content = vue.withDirectives(vue.createVNode("div", vue.mergeProps({
|
9865
9875
|
"class": bem$I(),
|
9866
9876
|
"ref": rootRef,
|
9867
9877
|
"onTouchstartPassive": onTouchStart,
|
9868
9878
|
"onTouchend": onTouchEnd,
|
9869
9879
|
"onTouchcancel": onTouchEnd,
|
9870
|
-
"
|
9880
|
+
"onClickCapture": onClick,
|
9871
9881
|
"style": rootStyle.value
|
9872
|
-
}, [slots.default ? slots.default() : vue.createVNode(stdin_default$1P, {
|
9882
|
+
}, attrs), [slots.default ? slots.default() : vue.createVNode(stdin_default$1P, {
|
9873
9883
|
"name": props2.icon,
|
9874
9884
|
"class": bem$I("icon")
|
9875
9885
|
}, null)]), [[vue.vShow, show.value]]);
|
@@ -9887,11 +9897,10 @@ const floatingPanelProps = {
|
|
9887
9897
|
anchors: makeArrayProp(),
|
9888
9898
|
duration: makeNumericProp(0.2),
|
9889
9899
|
contentDraggable: truthProp,
|
9890
|
-
lockScroll:
|
9900
|
+
lockScroll: Boolean,
|
9891
9901
|
safeAreaInsetBottom: truthProp
|
9892
9902
|
};
|
9893
9903
|
const [name$H, bem$H] = createNamespace("floating-panel");
|
9894
|
-
const DAMP = 0.2;
|
9895
9904
|
var stdin_default$Q = vue.defineComponent({
|
9896
9905
|
name: name$H,
|
9897
9906
|
props: floatingPanelProps,
|
@@ -9900,6 +9909,7 @@ var stdin_default$Q = vue.defineComponent({
|
|
9900
9909
|
emit,
|
9901
9910
|
slots
|
9902
9911
|
}) {
|
9912
|
+
const DAMP = 0.2;
|
9903
9913
|
const rootRef = vue.ref();
|
9904
9914
|
const contentRef = vue.ref();
|
9905
9915
|
const height = useSyncPropRef(() => +props2.height, (value) => emit("update:height", value));
|
@@ -9932,24 +9942,28 @@ var stdin_default$Q = vue.defineComponent({
|
|
9932
9942
|
return moveY;
|
9933
9943
|
};
|
9934
9944
|
let startY;
|
9945
|
+
let maxScroll = -1;
|
9935
9946
|
const touch = useTouch();
|
9936
9947
|
const onTouchstart = (e) => {
|
9937
9948
|
touch.start(e);
|
9938
9949
|
dragging.value = true;
|
9939
9950
|
startY = -height.value;
|
9951
|
+
maxScroll = -1;
|
9940
9952
|
};
|
9941
9953
|
const onTouchmove = (e) => {
|
9942
9954
|
var _a;
|
9943
9955
|
touch.move(e);
|
9944
9956
|
const target = e.target;
|
9945
9957
|
if (contentRef.value === target || ((_a = contentRef.value) == null ? void 0 : _a.contains(target))) {
|
9958
|
+
const {
|
9959
|
+
scrollTop
|
9960
|
+
} = contentRef.value;
|
9961
|
+
maxScroll = Math.max(maxScroll, scrollTop);
|
9946
9962
|
if (!props2.contentDraggable)
|
9947
9963
|
return;
|
9948
9964
|
if (-startY < boundary.value.max) {
|
9949
|
-
|
9950
|
-
|
9951
|
-
e.stopPropagation();
|
9952
|
-
} else if (!(contentRef.value.scrollTop <= 0 && touch.deltaY.value > 0)) {
|
9965
|
+
preventDefault(e, true);
|
9966
|
+
} else if (!(scrollTop <= 0 && touch.deltaY.value > 0) || maxScroll > 0) {
|
9953
9967
|
return;
|
9954
9968
|
}
|
9955
9969
|
}
|
@@ -9957,6 +9971,7 @@ var stdin_default$Q = vue.defineComponent({
|
|
9957
9971
|
height.value = -ease(moveY);
|
9958
9972
|
};
|
9959
9973
|
const onTouchend = () => {
|
9974
|
+
maxScroll = -1;
|
9960
9975
|
dragging.value = false;
|
9961
9976
|
height.value = closest(anchors.value, height.value);
|
9962
9977
|
if (height.value !== -startY) {
|
@@ -16398,7 +16413,7 @@ const Lazyload = {
|
|
16398
16413
|
});
|
16399
16414
|
}
|
16400
16415
|
};
|
16401
|
-
const version = "4.6.
|
16416
|
+
const version = "4.6.6";
|
16402
16417
|
function install(app) {
|
16403
16418
|
const components = [
|
16404
16419
|
ActionBar,
|
package/lib/vant.es.js
CHANGED
@@ -9416,7 +9416,8 @@ const dropdownMenuProps = {
|
|
9416
9416
|
direction: makeStringProp("down"),
|
9417
9417
|
activeColor: String,
|
9418
9418
|
closeOnClickOutside: truthProp,
|
9419
|
-
closeOnClickOverlay: truthProp
|
9419
|
+
closeOnClickOverlay: truthProp,
|
9420
|
+
swipeThreshold: numericProp
|
9420
9421
|
};
|
9421
9422
|
const DROPDOWN_KEY = Symbol(name$K);
|
9422
9423
|
var stdin_default$T = defineComponent({
|
@@ -9435,6 +9436,7 @@ var stdin_default$T = defineComponent({
|
|
9435
9436
|
} = useChildren(DROPDOWN_KEY);
|
9436
9437
|
const scrollParent = useScrollParent(root);
|
9437
9438
|
const opened = computed(() => children.some((item) => item.state.showWrapper));
|
9439
|
+
const scrollable = computed(() => props2.swipeThreshold && children.length > +props2.swipeThreshold);
|
9438
9440
|
const barStyle = computed(() => {
|
9439
9441
|
if (opened.value && isDef(props2.zIndex)) {
|
9440
9442
|
return {
|
@@ -9491,7 +9493,8 @@ var stdin_default$T = defineComponent({
|
|
9491
9493
|
"role": "button",
|
9492
9494
|
"tabindex": disabled ? void 0 : 0,
|
9493
9495
|
"class": [bem$K("item", {
|
9494
|
-
disabled
|
9496
|
+
disabled,
|
9497
|
+
grow: scrollable.value
|
9495
9498
|
}), {
|
9496
9499
|
[HAPTICS_FEEDBACK]: !disabled
|
9497
9500
|
}],
|
@@ -9535,7 +9538,8 @@ var stdin_default$T = defineComponent({
|
|
9535
9538
|
"ref": barRef,
|
9536
9539
|
"style": barStyle.value,
|
9537
9540
|
"class": bem$K("bar", {
|
9538
|
-
opened: opened.value
|
9541
|
+
opened: opened.value,
|
9542
|
+
scrollable: scrollable.value
|
9539
9543
|
})
|
9540
9544
|
}, [children.map(renderTitle)]), (_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
9541
9545
|
};
|
@@ -9633,7 +9637,7 @@ var stdin_default$S = defineComponent({
|
|
9633
9637
|
};
|
9634
9638
|
return createVNode(Cell, {
|
9635
9639
|
"role": "menuitem",
|
9636
|
-
"key": option.value,
|
9640
|
+
"key": String(option.value),
|
9637
9641
|
"icon": option.icon,
|
9638
9642
|
"title": option.text,
|
9639
9643
|
"class": bem$J("option", {
|
@@ -9734,11 +9738,13 @@ const floatingBubbleProps = {
|
|
9734
9738
|
const [name$I, bem$I] = createNamespace("floating-bubble");
|
9735
9739
|
var stdin_default$R = defineComponent({
|
9736
9740
|
name: name$I,
|
9741
|
+
inheritAttrs: false,
|
9737
9742
|
props: floatingBubbleProps,
|
9738
9743
|
emits: ["click", "update:offset", "offsetChange"],
|
9739
9744
|
setup(props2, {
|
9740
9745
|
slots,
|
9741
|
-
emit
|
9746
|
+
emit,
|
9747
|
+
attrs
|
9742
9748
|
}) {
|
9743
9749
|
const rootRef = ref();
|
9744
9750
|
const state = ref({
|
@@ -9766,6 +9772,8 @@ var stdin_default$R = defineComponent({
|
|
9766
9772
|
return style;
|
9767
9773
|
});
|
9768
9774
|
const updateState = () => {
|
9775
|
+
if (!show.value)
|
9776
|
+
return;
|
9769
9777
|
const {
|
9770
9778
|
width,
|
9771
9779
|
height
|
@@ -9841,6 +9849,8 @@ var stdin_default$R = defineComponent({
|
|
9841
9849
|
const onClick = (e) => {
|
9842
9850
|
if (touch.isTap.value)
|
9843
9851
|
emit("click", e);
|
9852
|
+
else
|
9853
|
+
e.stopPropagation();
|
9844
9854
|
};
|
9845
9855
|
onMounted(() => {
|
9846
9856
|
updateState();
|
@@ -9859,15 +9869,15 @@ var stdin_default$R = defineComponent({
|
|
9859
9869
|
}
|
9860
9870
|
});
|
9861
9871
|
return () => {
|
9862
|
-
const Content = withDirectives(createVNode("div", {
|
9872
|
+
const Content = withDirectives(createVNode("div", mergeProps({
|
9863
9873
|
"class": bem$I(),
|
9864
9874
|
"ref": rootRef,
|
9865
9875
|
"onTouchstartPassive": onTouchStart,
|
9866
9876
|
"onTouchend": onTouchEnd,
|
9867
9877
|
"onTouchcancel": onTouchEnd,
|
9868
|
-
"
|
9878
|
+
"onClickCapture": onClick,
|
9869
9879
|
"style": rootStyle.value
|
9870
|
-
}, [slots.default ? slots.default() : createVNode(stdin_default$1P, {
|
9880
|
+
}, attrs), [slots.default ? slots.default() : createVNode(stdin_default$1P, {
|
9871
9881
|
"name": props2.icon,
|
9872
9882
|
"class": bem$I("icon")
|
9873
9883
|
}, null)]), [[vShow, show.value]]);
|
@@ -9885,11 +9895,10 @@ const floatingPanelProps = {
|
|
9885
9895
|
anchors: makeArrayProp(),
|
9886
9896
|
duration: makeNumericProp(0.2),
|
9887
9897
|
contentDraggable: truthProp,
|
9888
|
-
lockScroll:
|
9898
|
+
lockScroll: Boolean,
|
9889
9899
|
safeAreaInsetBottom: truthProp
|
9890
9900
|
};
|
9891
9901
|
const [name$H, bem$H] = createNamespace("floating-panel");
|
9892
|
-
const DAMP = 0.2;
|
9893
9902
|
var stdin_default$Q = defineComponent({
|
9894
9903
|
name: name$H,
|
9895
9904
|
props: floatingPanelProps,
|
@@ -9898,6 +9907,7 @@ var stdin_default$Q = defineComponent({
|
|
9898
9907
|
emit,
|
9899
9908
|
slots
|
9900
9909
|
}) {
|
9910
|
+
const DAMP = 0.2;
|
9901
9911
|
const rootRef = ref();
|
9902
9912
|
const contentRef = ref();
|
9903
9913
|
const height = useSyncPropRef(() => +props2.height, (value) => emit("update:height", value));
|
@@ -9930,24 +9940,28 @@ var stdin_default$Q = defineComponent({
|
|
9930
9940
|
return moveY;
|
9931
9941
|
};
|
9932
9942
|
let startY;
|
9943
|
+
let maxScroll = -1;
|
9933
9944
|
const touch = useTouch();
|
9934
9945
|
const onTouchstart = (e) => {
|
9935
9946
|
touch.start(e);
|
9936
9947
|
dragging.value = true;
|
9937
9948
|
startY = -height.value;
|
9949
|
+
maxScroll = -1;
|
9938
9950
|
};
|
9939
9951
|
const onTouchmove = (e) => {
|
9940
9952
|
var _a;
|
9941
9953
|
touch.move(e);
|
9942
9954
|
const target = e.target;
|
9943
9955
|
if (contentRef.value === target || ((_a = contentRef.value) == null ? void 0 : _a.contains(target))) {
|
9956
|
+
const {
|
9957
|
+
scrollTop
|
9958
|
+
} = contentRef.value;
|
9959
|
+
maxScroll = Math.max(maxScroll, scrollTop);
|
9944
9960
|
if (!props2.contentDraggable)
|
9945
9961
|
return;
|
9946
9962
|
if (-startY < boundary.value.max) {
|
9947
|
-
|
9948
|
-
|
9949
|
-
e.stopPropagation();
|
9950
|
-
} else if (!(contentRef.value.scrollTop <= 0 && touch.deltaY.value > 0)) {
|
9963
|
+
preventDefault(e, true);
|
9964
|
+
} else if (!(scrollTop <= 0 && touch.deltaY.value > 0) || maxScroll > 0) {
|
9951
9965
|
return;
|
9952
9966
|
}
|
9953
9967
|
}
|
@@ -9955,6 +9969,7 @@ var stdin_default$Q = defineComponent({
|
|
9955
9969
|
height.value = -ease(moveY);
|
9956
9970
|
};
|
9957
9971
|
const onTouchend = () => {
|
9972
|
+
maxScroll = -1;
|
9958
9973
|
dragging.value = false;
|
9959
9974
|
height.value = closest(anchors.value, height.value);
|
9960
9975
|
if (height.value !== -startY) {
|
@@ -16396,7 +16411,7 @@ const Lazyload = {
|
|
16396
16411
|
});
|
16397
16412
|
}
|
16398
16413
|
};
|
16399
|
-
const version = "4.6.
|
16414
|
+
const version = "4.6.6";
|
16400
16415
|
function install(app) {
|
16401
16416
|
const components = [
|
16402
16417
|
ActionBar,
|
package/lib/vant.js
CHANGED
@@ -9854,7 +9854,8 @@
|
|
9854
9854
|
direction: makeStringProp("down"),
|
9855
9855
|
activeColor: String,
|
9856
9856
|
closeOnClickOutside: truthProp,
|
9857
|
-
closeOnClickOverlay: truthProp
|
9857
|
+
closeOnClickOverlay: truthProp,
|
9858
|
+
swipeThreshold: numericProp
|
9858
9859
|
};
|
9859
9860
|
const DROPDOWN_KEY = Symbol(name$K);
|
9860
9861
|
var stdin_default$T = vue.defineComponent({
|
@@ -9873,6 +9874,7 @@
|
|
9873
9874
|
} = useChildren(DROPDOWN_KEY);
|
9874
9875
|
const scrollParent = useScrollParent(root);
|
9875
9876
|
const opened = vue.computed(() => children.some((item) => item.state.showWrapper));
|
9877
|
+
const scrollable = vue.computed(() => props2.swipeThreshold && children.length > +props2.swipeThreshold);
|
9876
9878
|
const barStyle = vue.computed(() => {
|
9877
9879
|
if (opened.value && isDef(props2.zIndex)) {
|
9878
9880
|
return {
|
@@ -9929,7 +9931,8 @@
|
|
9929
9931
|
"role": "button",
|
9930
9932
|
"tabindex": disabled ? void 0 : 0,
|
9931
9933
|
"class": [bem$K("item", {
|
9932
|
-
disabled
|
9934
|
+
disabled,
|
9935
|
+
grow: scrollable.value
|
9933
9936
|
}), {
|
9934
9937
|
[HAPTICS_FEEDBACK]: !disabled
|
9935
9938
|
}],
|
@@ -9973,7 +9976,8 @@
|
|
9973
9976
|
"ref": barRef,
|
9974
9977
|
"style": barStyle.value,
|
9975
9978
|
"class": bem$K("bar", {
|
9976
|
-
opened: opened.value
|
9979
|
+
opened: opened.value,
|
9980
|
+
scrollable: scrollable.value
|
9977
9981
|
})
|
9978
9982
|
}, [children.map(renderTitle)]), (_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
9979
9983
|
};
|
@@ -10068,7 +10072,7 @@
|
|
10068
10072
|
};
|
10069
10073
|
return vue.createVNode(Cell, {
|
10070
10074
|
"role": "menuitem",
|
10071
|
-
"key": option.value,
|
10075
|
+
"key": String(option.value),
|
10072
10076
|
"icon": option.icon,
|
10073
10077
|
"title": option.text,
|
10074
10078
|
"class": bem$J("option", {
|
@@ -10169,11 +10173,13 @@
|
|
10169
10173
|
const [name$I, bem$I] = createNamespace("floating-bubble");
|
10170
10174
|
var stdin_default$R = vue.defineComponent({
|
10171
10175
|
name: name$I,
|
10176
|
+
inheritAttrs: false,
|
10172
10177
|
props: floatingBubbleProps,
|
10173
10178
|
emits: ["click", "update:offset", "offsetChange"],
|
10174
10179
|
setup(props2, {
|
10175
10180
|
slots,
|
10176
|
-
emit
|
10181
|
+
emit,
|
10182
|
+
attrs
|
10177
10183
|
}) {
|
10178
10184
|
const rootRef = vue.ref();
|
10179
10185
|
const state = vue.ref({
|
@@ -10201,6 +10207,8 @@
|
|
10201
10207
|
return style;
|
10202
10208
|
});
|
10203
10209
|
const updateState = () => {
|
10210
|
+
if (!show.value)
|
10211
|
+
return;
|
10204
10212
|
const {
|
10205
10213
|
width: width2,
|
10206
10214
|
height: height2
|
@@ -10276,6 +10284,8 @@
|
|
10276
10284
|
const onClick = (e) => {
|
10277
10285
|
if (touch.isTap.value)
|
10278
10286
|
emit("click", e);
|
10287
|
+
else
|
10288
|
+
e.stopPropagation();
|
10279
10289
|
};
|
10280
10290
|
vue.onMounted(() => {
|
10281
10291
|
updateState();
|
@@ -10294,15 +10304,15 @@
|
|
10294
10304
|
}
|
10295
10305
|
});
|
10296
10306
|
return () => {
|
10297
|
-
const Content = vue.withDirectives(vue.createVNode("div", {
|
10307
|
+
const Content = vue.withDirectives(vue.createVNode("div", vue.mergeProps({
|
10298
10308
|
"class": bem$I(),
|
10299
10309
|
"ref": rootRef,
|
10300
10310
|
"onTouchstartPassive": onTouchStart,
|
10301
10311
|
"onTouchend": onTouchEnd,
|
10302
10312
|
"onTouchcancel": onTouchEnd,
|
10303
|
-
"
|
10313
|
+
"onClickCapture": onClick,
|
10304
10314
|
"style": rootStyle.value
|
10305
|
-
}, [slots.default ? slots.default() : vue.createVNode(stdin_default$1P, {
|
10315
|
+
}, attrs), [slots.default ? slots.default() : vue.createVNode(stdin_default$1P, {
|
10306
10316
|
"name": props2.icon,
|
10307
10317
|
"class": bem$I("icon")
|
10308
10318
|
}, null)]), [[vue.vShow, show.value]]);
|
@@ -10320,11 +10330,10 @@
|
|
10320
10330
|
anchors: makeArrayProp(),
|
10321
10331
|
duration: makeNumericProp(0.2),
|
10322
10332
|
contentDraggable: truthProp,
|
10323
|
-
lockScroll:
|
10333
|
+
lockScroll: Boolean,
|
10324
10334
|
safeAreaInsetBottom: truthProp
|
10325
10335
|
};
|
10326
10336
|
const [name$H, bem$H] = createNamespace("floating-panel");
|
10327
|
-
const DAMP = 0.2;
|
10328
10337
|
var stdin_default$Q = vue.defineComponent({
|
10329
10338
|
name: name$H,
|
10330
10339
|
props: floatingPanelProps,
|
@@ -10333,6 +10342,7 @@
|
|
10333
10342
|
emit,
|
10334
10343
|
slots
|
10335
10344
|
}) {
|
10345
|
+
const DAMP = 0.2;
|
10336
10346
|
const rootRef = vue.ref();
|
10337
10347
|
const contentRef = vue.ref();
|
10338
10348
|
const height2 = useSyncPropRef(() => +props2.height, (value) => emit("update:height", value));
|
@@ -10365,24 +10375,28 @@
|
|
10365
10375
|
return moveY;
|
10366
10376
|
};
|
10367
10377
|
let startY;
|
10378
|
+
let maxScroll = -1;
|
10368
10379
|
const touch = useTouch();
|
10369
10380
|
const onTouchstart = (e) => {
|
10370
10381
|
touch.start(e);
|
10371
10382
|
dragging.value = true;
|
10372
10383
|
startY = -height2.value;
|
10384
|
+
maxScroll = -1;
|
10373
10385
|
};
|
10374
10386
|
const onTouchmove = (e) => {
|
10375
10387
|
var _a;
|
10376
10388
|
touch.move(e);
|
10377
10389
|
const target = e.target;
|
10378
10390
|
if (contentRef.value === target || ((_a = contentRef.value) == null ? void 0 : _a.contains(target))) {
|
10391
|
+
const {
|
10392
|
+
scrollTop
|
10393
|
+
} = contentRef.value;
|
10394
|
+
maxScroll = Math.max(maxScroll, scrollTop);
|
10379
10395
|
if (!props2.contentDraggable)
|
10380
10396
|
return;
|
10381
10397
|
if (-startY < boundary.value.max) {
|
10382
|
-
|
10383
|
-
|
10384
|
-
e.stopPropagation();
|
10385
|
-
} else if (!(contentRef.value.scrollTop <= 0 && touch.deltaY.value > 0)) {
|
10398
|
+
preventDefault(e, true);
|
10399
|
+
} else if (!(scrollTop <= 0 && touch.deltaY.value > 0) || maxScroll > 0) {
|
10386
10400
|
return;
|
10387
10401
|
}
|
10388
10402
|
}
|
@@ -10390,6 +10404,7 @@
|
|
10390
10404
|
height2.value = -ease(moveY);
|
10391
10405
|
};
|
10392
10406
|
const onTouchend = () => {
|
10407
|
+
maxScroll = -1;
|
10393
10408
|
dragging.value = false;
|
10394
10409
|
height2.value = closest(anchors.value, height2.value);
|
10395
10410
|
if (height2.value !== -startY) {
|
@@ -17608,7 +17623,7 @@
|
|
17608
17623
|
});
|
17609
17624
|
}
|
17610
17625
|
};
|
17611
|
-
const version = "4.6.
|
17626
|
+
const version = "4.6.6";
|
17612
17627
|
function install(app) {
|
17613
17628
|
const components = [
|
17614
17629
|
ActionBar,
|