vant 4.9.20 → 4.9.21
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/es/checkbox/Checker.mjs +1 -1
- package/es/composables/use-tab-status.d.ts +3 -0
- package/es/composables/use-tab-status.mjs +16 -1
- package/es/floating-bubble/FloatingBubble.d.ts +3 -22
- package/es/floating-bubble/FloatingBubble.mjs +3 -9
- package/es/floating-bubble/index.d.ts +2 -15
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/list/List.mjs +2 -2
- package/es/progress/Progress.mjs +6 -3
- package/es/tab/Tab.mjs +3 -3
- package/es/tab/index.d.ts +1 -0
- package/es/tab/index.mjs +4 -1
- package/lib/checkbox/Checker.js +1 -1
- package/lib/composables/use-tab-status.d.ts +3 -0
- package/lib/composables/use-tab-status.js +15 -0
- package/lib/floating-bubble/FloatingBubble.d.ts +3 -22
- package/lib/floating-bubble/FloatingBubble.js +3 -9
- package/lib/floating-bubble/index.d.ts +2 -15
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/list/List.js +1 -1
- package/lib/progress/Progress.js +6 -3
- package/lib/tab/Tab.js +1 -1
- package/lib/tab/index.d.ts +1 -0
- package/lib/tab/index.js +4 -1
- package/lib/vant.cjs.js +27 -16
- package/lib/vant.es.js +27 -16
- package/lib/vant.js +28 -17
- package/lib/vant.min.js +3 -3
- package/lib/web-types.json +1 -1
- package/package.json +12 -12
package/es/checkbox/Checker.mjs
CHANGED
@@ -50,7 +50,7 @@ var stdin_default = defineComponent({
|
|
50
50
|
const direction = computed(() => getParentProp("direction"));
|
51
51
|
const iconStyle = computed(() => {
|
52
52
|
const checkedColor = props.checkedColor || getParentProp("checkedColor");
|
53
|
-
if (checkedColor && props.checked && !disabled.value) {
|
53
|
+
if (checkedColor && (props.checked || props.indeterminate) && !disabled.value) {
|
54
54
|
return {
|
55
55
|
borderColor: checkedColor,
|
56
56
|
backgroundColor: checkedColor
|
@@ -1,3 +1,6 @@
|
|
1
1
|
import { ComputedRef, InjectionKey } from 'vue';
|
2
2
|
export declare const TAB_STATUS_KEY: InjectionKey<ComputedRef<boolean>>;
|
3
|
+
export declare const ALL_TAB_STATUS_KEY: InjectionKey<ComputedRef<boolean>>;
|
3
4
|
export declare const useTabStatus: () => ComputedRef<boolean> | null;
|
5
|
+
export declare const useAllTabStatus: () => ComputedRef<boolean> | null;
|
6
|
+
export declare const useProvideTabStatus: (status: ComputedRef<boolean>) => void;
|
@@ -1,7 +1,22 @@
|
|
1
|
-
import { inject } from "vue";
|
1
|
+
import { inject, provide, computed } from "vue";
|
2
2
|
const TAB_STATUS_KEY = Symbol();
|
3
|
+
const ALL_TAB_STATUS_KEY = Symbol();
|
3
4
|
const useTabStatus = () => inject(TAB_STATUS_KEY, null);
|
5
|
+
const useAllTabStatus = () => inject(ALL_TAB_STATUS_KEY, null);
|
6
|
+
const useProvideTabStatus = (status) => {
|
7
|
+
const allTabStatus = useAllTabStatus();
|
8
|
+
provide(TAB_STATUS_KEY, status);
|
9
|
+
provide(
|
10
|
+
ALL_TAB_STATUS_KEY,
|
11
|
+
computed(() => {
|
12
|
+
return (allTabStatus == null || allTabStatus.value) && status.value;
|
13
|
+
})
|
14
|
+
);
|
15
|
+
};
|
4
16
|
export {
|
17
|
+
ALL_TAB_STATUS_KEY,
|
5
18
|
TAB_STATUS_KEY,
|
19
|
+
useAllTabStatus,
|
20
|
+
useProvideTabStatus,
|
6
21
|
useTabStatus
|
7
22
|
};
|
@@ -11,13 +11,7 @@ export declare const floatingBubbleProps: {
|
|
11
11
|
default: FloatingBubbleAxis;
|
12
12
|
};
|
13
13
|
magnetic: PropType<FloatingBubbleMagnetic>;
|
14
|
-
offset:
|
15
|
-
type: PropType<FloatingBubbleOffset>;
|
16
|
-
default: () => {
|
17
|
-
x: number;
|
18
|
-
y: number;
|
19
|
-
};
|
20
|
-
};
|
14
|
+
offset: PropType<FloatingBubbleOffset>;
|
21
15
|
teleport: {
|
22
16
|
type: PropType<TeleportProps["to"]>;
|
23
17
|
default: string;
|
@@ -35,13 +29,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
35
29
|
default: FloatingBubbleAxis;
|
36
30
|
};
|
37
31
|
magnetic: PropType<FloatingBubbleMagnetic>;
|
38
|
-
offset:
|
39
|
-
type: PropType<FloatingBubbleOffset>;
|
40
|
-
default: () => {
|
41
|
-
x: number;
|
42
|
-
y: number;
|
43
|
-
};
|
44
|
-
};
|
32
|
+
offset: PropType<FloatingBubbleOffset>;
|
45
33
|
teleport: {
|
46
34
|
type: PropType<TeleportProps["to"]>;
|
47
35
|
default: string;
|
@@ -57,13 +45,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
57
45
|
default: FloatingBubbleAxis;
|
58
46
|
};
|
59
47
|
magnetic: PropType<FloatingBubbleMagnetic>;
|
60
|
-
offset:
|
61
|
-
type: PropType<FloatingBubbleOffset>;
|
62
|
-
default: () => {
|
63
|
-
x: number;
|
64
|
-
y: number;
|
65
|
-
};
|
66
|
-
};
|
48
|
+
offset: PropType<FloatingBubbleOffset>;
|
67
49
|
teleport: {
|
68
50
|
type: PropType<TeleportProps["to"]>;
|
69
51
|
default: string;
|
@@ -73,7 +55,6 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
73
55
|
"onUpdate:offset"?: ((...args: any[]) => any) | undefined;
|
74
56
|
onOffsetChange?: ((...args: any[]) => any) | undefined;
|
75
57
|
}>, {
|
76
|
-
offset: FloatingBubbleOffset;
|
77
58
|
teleport: string | import("vue").RendererElement | null | undefined;
|
78
59
|
gap: FloatingBubbleGap;
|
79
60
|
axis: FloatingBubbleAxis;
|
@@ -11,13 +11,7 @@ const floatingBubbleProps = {
|
|
11
11
|
icon: String,
|
12
12
|
axis: makeStringProp("y"),
|
13
13
|
magnetic: String,
|
14
|
-
offset:
|
15
|
-
type: Object,
|
16
|
-
default: () => ({
|
17
|
-
x: -1,
|
18
|
-
y: -1
|
19
|
-
})
|
20
|
-
},
|
14
|
+
offset: Object,
|
21
15
|
teleport: {
|
22
16
|
type: [String, Object],
|
23
17
|
default: "body"
|
@@ -71,8 +65,8 @@ var stdin_default = defineComponent({
|
|
71
65
|
offset
|
72
66
|
} = props;
|
73
67
|
state.value = {
|
74
|
-
x: offset
|
75
|
-
y: offset
|
68
|
+
x: offset ? offset.x : windowWidth.value - width - gapX.value,
|
69
|
+
y: offset ? offset.y : windowHeight.value - height - gapY.value,
|
76
70
|
width,
|
77
71
|
height
|
78
72
|
};
|
@@ -9,13 +9,7 @@ export declare const FloatingBubble: import("../utils").WithInstall<import("vue"
|
|
9
9
|
default: import("./types").FloatingBubbleAxis;
|
10
10
|
};
|
11
11
|
magnetic: import("vue").PropType<import("./types").FloatingBubbleMagnetic>;
|
12
|
-
offset:
|
13
|
-
type: import("vue").PropType<import("./types").FloatingBubbleOffset>;
|
14
|
-
default: () => {
|
15
|
-
x: number;
|
16
|
-
y: number;
|
17
|
-
};
|
18
|
-
};
|
12
|
+
offset: import("vue").PropType<import("./types").FloatingBubbleOffset>;
|
19
13
|
teleport: {
|
20
14
|
type: import("vue").PropType<import("vue").TeleportProps["to"]>;
|
21
15
|
default: string;
|
@@ -31,13 +25,7 @@ export declare const FloatingBubble: import("../utils").WithInstall<import("vue"
|
|
31
25
|
default: import("./types").FloatingBubbleAxis;
|
32
26
|
};
|
33
27
|
magnetic: import("vue").PropType<import("./types").FloatingBubbleMagnetic>;
|
34
|
-
offset:
|
35
|
-
type: import("vue").PropType<import("./types").FloatingBubbleOffset>;
|
36
|
-
default: () => {
|
37
|
-
x: number;
|
38
|
-
y: number;
|
39
|
-
};
|
40
|
-
};
|
28
|
+
offset: import("vue").PropType<import("./types").FloatingBubbleOffset>;
|
41
29
|
teleport: {
|
42
30
|
type: import("vue").PropType<import("vue").TeleportProps["to"]>;
|
43
31
|
default: string;
|
@@ -47,7 +35,6 @@ export declare const FloatingBubble: import("../utils").WithInstall<import("vue"
|
|
47
35
|
"onUpdate:offset"?: ((...args: any[]) => any) | undefined;
|
48
36
|
onOffsetChange?: ((...args: any[]) => any) | undefined;
|
49
37
|
}>, {
|
50
|
-
offset: import("./types").FloatingBubbleOffset;
|
51
38
|
teleport: string | import("vue").RendererElement | null | undefined;
|
52
39
|
gap: import("./types").FloatingBubbleGap;
|
53
40
|
axis: import("./types").FloatingBubbleAxis;
|
package/es/index.d.ts
CHANGED
package/es/index.mjs
CHANGED
@@ -99,7 +99,7 @@ import { Toast } from "./toast/index.mjs";
|
|
99
99
|
import { TreeSelect } from "./tree-select/index.mjs";
|
100
100
|
import { Uploader } from "./uploader/index.mjs";
|
101
101
|
import { Watermark } from "./watermark/index.mjs";
|
102
|
-
const version = "4.9.
|
102
|
+
const version = "4.9.21";
|
103
103
|
function install(app) {
|
104
104
|
const components = [
|
105
105
|
ActionBar,
|
package/es/list/List.mjs
CHANGED
@@ -2,7 +2,7 @@ import { ref, watch, computed, nextTick, onUpdated, onMounted, defineComponent,
|
|
2
2
|
import { isHidden, truthProp, makeStringProp, makeNumericProp, createNamespace } from "../utils/index.mjs";
|
3
3
|
import { useRect, useScrollParent, useEventListener } from "@vant/use";
|
4
4
|
import { useExpose } from "../composables/use-expose.mjs";
|
5
|
-
import {
|
5
|
+
import { useAllTabStatus } from "../composables/use-tab-status.mjs";
|
6
6
|
import { Loading } from "../loading/index.mjs";
|
7
7
|
const [name, bem, t] = createNamespace("list");
|
8
8
|
const listProps = {
|
@@ -29,7 +29,7 @@ var stdin_default = defineComponent({
|
|
29
29
|
const loading = ref(props.loading);
|
30
30
|
const root = ref();
|
31
31
|
const placeholder = ref();
|
32
|
-
const tabStatus =
|
32
|
+
const tabStatus = useAllTabStatus();
|
33
33
|
const scrollParent = useScrollParent(root);
|
34
34
|
const scroller = computed(() => props.scroller || scrollParent.value);
|
35
35
|
const check = () => {
|
package/es/progress/Progress.mjs
CHANGED
@@ -21,6 +21,7 @@ var stdin_default = defineComponent({
|
|
21
21
|
props: progressProps,
|
22
22
|
setup(props) {
|
23
23
|
const background = computed(() => props.inactive ? void 0 : props.color);
|
24
|
+
const format = (rate) => Math.min(Math.max(+rate, 0), 100);
|
24
25
|
const renderPivot = () => {
|
25
26
|
const {
|
26
27
|
textColor,
|
@@ -28,12 +29,13 @@ var stdin_default = defineComponent({
|
|
28
29
|
pivotColor,
|
29
30
|
percentage
|
30
31
|
} = props;
|
32
|
+
const safePercentage = format(percentage);
|
31
33
|
const text = pivotText != null ? pivotText : `${percentage}%`;
|
32
34
|
if (props.showPivot && text) {
|
33
35
|
const style = {
|
34
36
|
color: textColor,
|
35
|
-
left: `${
|
36
|
-
transform: `translate(-${
|
37
|
+
left: `${safePercentage}%`,
|
38
|
+
transform: `translate(-${safePercentage}%,-50%)`,
|
37
39
|
background: pivotColor || background.value
|
38
40
|
};
|
39
41
|
return _createVNode("span", {
|
@@ -50,12 +52,13 @@ var stdin_default = defineComponent({
|
|
50
52
|
percentage,
|
51
53
|
strokeWidth
|
52
54
|
} = props;
|
55
|
+
const safePercentage = format(percentage);
|
53
56
|
const rootStyle = {
|
54
57
|
background: trackColor,
|
55
58
|
height: addUnit(strokeWidth)
|
56
59
|
};
|
57
60
|
const portionStyle = {
|
58
|
-
width: `${
|
61
|
+
width: `${safePercentage}%`,
|
59
62
|
background: background.value
|
60
63
|
};
|
61
64
|
return _createVNode("div", {
|
package/es/tab/Tab.mjs
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ref, watch,
|
1
|
+
import { ref, watch, computed, nextTick, watchEffect, defineComponent, getCurrentInstance, mergeProps as _mergeProps, createVNode as _createVNode, vShow as _vShow, withDirectives as _withDirectives } from "vue";
|
2
2
|
import { normalizeClass, normalizeStyle, stringifyStyle } from "@vue/shared";
|
3
3
|
import { pick, extend, truthProp, unknownProp, numericProp, createNamespace } from "../utils/index.mjs";
|
4
4
|
import { TABS_KEY } from "../tabs/Tabs.mjs";
|
@@ -6,7 +6,7 @@ import { doubleRaf, useParent } from "@vant/use";
|
|
6
6
|
import { useId } from "../composables/use-id.mjs";
|
7
7
|
import { useExpose } from "../composables/use-expose.mjs";
|
8
8
|
import { routeProps } from "../composables/use-route.mjs";
|
9
|
-
import {
|
9
|
+
import { useProvideTabStatus } from "../composables/use-tab-status.mjs";
|
10
10
|
import { TabTitle } from "./TabTitle.mjs";
|
11
11
|
import { SwipeItem } from "../swipe-item/index.mjs";
|
12
12
|
const [name, bem] = createNamespace("tab");
|
@@ -97,7 +97,7 @@ var stdin_default = defineComponent({
|
|
97
97
|
parent.setLine();
|
98
98
|
parent.scrollIntoView();
|
99
99
|
});
|
100
|
-
|
100
|
+
useProvideTabStatus(active);
|
101
101
|
useExpose({
|
102
102
|
id,
|
103
103
|
renderTitle
|
package/es/tab/index.d.ts
CHANGED
@@ -38,6 +38,7 @@ export declare const Tab: import("../utils").WithInstall<import("vue").DefineCom
|
|
38
38
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
|
39
39
|
export default Tab;
|
40
40
|
export { tabProps } from './Tab';
|
41
|
+
export { useTabStatus, useAllTabStatus } from '../composables/use-tab-status';
|
41
42
|
export type { TabProps } from './Tab';
|
42
43
|
declare module 'vue' {
|
43
44
|
interface GlobalComponents {
|
package/es/tab/index.mjs
CHANGED
@@ -3,8 +3,11 @@ import _Tab from "./Tab.mjs";
|
|
3
3
|
const Tab = withInstall(_Tab);
|
4
4
|
var stdin_default = Tab;
|
5
5
|
import { tabProps } from "./Tab.mjs";
|
6
|
+
import { useTabStatus, useAllTabStatus } from "../composables/use-tab-status.mjs";
|
6
7
|
export {
|
7
8
|
Tab,
|
8
9
|
stdin_default as default,
|
9
|
-
tabProps
|
10
|
+
tabProps,
|
11
|
+
useAllTabStatus,
|
12
|
+
useTabStatus
|
10
13
|
};
|
package/lib/checkbox/Checker.js
CHANGED
@@ -73,7 +73,7 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
73
73
|
const direction = (0, import_vue.computed)(() => getParentProp("direction"));
|
74
74
|
const iconStyle = (0, import_vue.computed)(() => {
|
75
75
|
const checkedColor = props.checkedColor || getParentProp("checkedColor");
|
76
|
-
if (checkedColor && props.checked && !disabled.value) {
|
76
|
+
if (checkedColor && (props.checked || props.indeterminate) && !disabled.value) {
|
77
77
|
return {
|
78
78
|
borderColor: checkedColor,
|
79
79
|
backgroundColor: checkedColor
|
@@ -1,3 +1,6 @@
|
|
1
1
|
import { ComputedRef, InjectionKey } from 'vue';
|
2
2
|
export declare const TAB_STATUS_KEY: InjectionKey<ComputedRef<boolean>>;
|
3
|
+
export declare const ALL_TAB_STATUS_KEY: InjectionKey<ComputedRef<boolean>>;
|
3
4
|
export declare const useTabStatus: () => ComputedRef<boolean> | null;
|
5
|
+
export declare const useAllTabStatus: () => ComputedRef<boolean> | null;
|
6
|
+
export declare const useProvideTabStatus: (status: ComputedRef<boolean>) => void;
|
@@ -17,10 +17,25 @@ var __copyProps = (to, from, except, desc) => {
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
18
18
|
var stdin_exports = {};
|
19
19
|
__export(stdin_exports, {
|
20
|
+
ALL_TAB_STATUS_KEY: () => ALL_TAB_STATUS_KEY,
|
20
21
|
TAB_STATUS_KEY: () => TAB_STATUS_KEY,
|
22
|
+
useAllTabStatus: () => useAllTabStatus,
|
23
|
+
useProvideTabStatus: () => useProvideTabStatus,
|
21
24
|
useTabStatus: () => useTabStatus
|
22
25
|
});
|
23
26
|
module.exports = __toCommonJS(stdin_exports);
|
24
27
|
var import_vue = require("vue");
|
25
28
|
const TAB_STATUS_KEY = Symbol();
|
29
|
+
const ALL_TAB_STATUS_KEY = Symbol();
|
26
30
|
const useTabStatus = () => (0, import_vue.inject)(TAB_STATUS_KEY, null);
|
31
|
+
const useAllTabStatus = () => (0, import_vue.inject)(ALL_TAB_STATUS_KEY, null);
|
32
|
+
const useProvideTabStatus = (status) => {
|
33
|
+
const allTabStatus = useAllTabStatus();
|
34
|
+
(0, import_vue.provide)(TAB_STATUS_KEY, status);
|
35
|
+
(0, import_vue.provide)(
|
36
|
+
ALL_TAB_STATUS_KEY,
|
37
|
+
(0, import_vue.computed)(() => {
|
38
|
+
return (allTabStatus == null || allTabStatus.value) && status.value;
|
39
|
+
})
|
40
|
+
);
|
41
|
+
};
|
@@ -11,13 +11,7 @@ export declare const floatingBubbleProps: {
|
|
11
11
|
default: FloatingBubbleAxis;
|
12
12
|
};
|
13
13
|
magnetic: PropType<FloatingBubbleMagnetic>;
|
14
|
-
offset:
|
15
|
-
type: PropType<FloatingBubbleOffset>;
|
16
|
-
default: () => {
|
17
|
-
x: number;
|
18
|
-
y: number;
|
19
|
-
};
|
20
|
-
};
|
14
|
+
offset: PropType<FloatingBubbleOffset>;
|
21
15
|
teleport: {
|
22
16
|
type: PropType<TeleportProps["to"]>;
|
23
17
|
default: string;
|
@@ -35,13 +29,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
35
29
|
default: FloatingBubbleAxis;
|
36
30
|
};
|
37
31
|
magnetic: PropType<FloatingBubbleMagnetic>;
|
38
|
-
offset:
|
39
|
-
type: PropType<FloatingBubbleOffset>;
|
40
|
-
default: () => {
|
41
|
-
x: number;
|
42
|
-
y: number;
|
43
|
-
};
|
44
|
-
};
|
32
|
+
offset: PropType<FloatingBubbleOffset>;
|
45
33
|
teleport: {
|
46
34
|
type: PropType<TeleportProps["to"]>;
|
47
35
|
default: string;
|
@@ -57,13 +45,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
57
45
|
default: FloatingBubbleAxis;
|
58
46
|
};
|
59
47
|
magnetic: PropType<FloatingBubbleMagnetic>;
|
60
|
-
offset:
|
61
|
-
type: PropType<FloatingBubbleOffset>;
|
62
|
-
default: () => {
|
63
|
-
x: number;
|
64
|
-
y: number;
|
65
|
-
};
|
66
|
-
};
|
48
|
+
offset: PropType<FloatingBubbleOffset>;
|
67
49
|
teleport: {
|
68
50
|
type: PropType<TeleportProps["to"]>;
|
69
51
|
default: string;
|
@@ -73,7 +55,6 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
73
55
|
"onUpdate:offset"?: ((...args: any[]) => any) | undefined;
|
74
56
|
onOffsetChange?: ((...args: any[]) => any) | undefined;
|
75
57
|
}>, {
|
76
|
-
offset: FloatingBubbleOffset;
|
77
58
|
teleport: string | import("vue").RendererElement | null | undefined;
|
78
59
|
gap: FloatingBubbleGap;
|
79
60
|
axis: FloatingBubbleAxis;
|
@@ -44,13 +44,7 @@ const floatingBubbleProps = {
|
|
44
44
|
icon: String,
|
45
45
|
axis: (0, import_utils.makeStringProp)("y"),
|
46
46
|
magnetic: String,
|
47
|
-
offset:
|
48
|
-
type: Object,
|
49
|
-
default: () => ({
|
50
|
-
x: -1,
|
51
|
-
y: -1
|
52
|
-
})
|
53
|
-
},
|
47
|
+
offset: Object,
|
54
48
|
teleport: {
|
55
49
|
type: [String, Object],
|
56
50
|
default: "body"
|
@@ -104,8 +98,8 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
104
98
|
offset
|
105
99
|
} = props;
|
106
100
|
state.value = {
|
107
|
-
x: offset
|
108
|
-
y: offset
|
101
|
+
x: offset ? offset.x : import_utils.windowWidth.value - width - gapX.value,
|
102
|
+
y: offset ? offset.y : import_utils.windowHeight.value - height - gapY.value,
|
109
103
|
width,
|
110
104
|
height
|
111
105
|
};
|
@@ -9,13 +9,7 @@ export declare const FloatingBubble: import("../utils").WithInstall<import("vue"
|
|
9
9
|
default: import("./types").FloatingBubbleAxis;
|
10
10
|
};
|
11
11
|
magnetic: import("vue").PropType<import("./types").FloatingBubbleMagnetic>;
|
12
|
-
offset:
|
13
|
-
type: import("vue").PropType<import("./types").FloatingBubbleOffset>;
|
14
|
-
default: () => {
|
15
|
-
x: number;
|
16
|
-
y: number;
|
17
|
-
};
|
18
|
-
};
|
12
|
+
offset: import("vue").PropType<import("./types").FloatingBubbleOffset>;
|
19
13
|
teleport: {
|
20
14
|
type: import("vue").PropType<import("vue").TeleportProps["to"]>;
|
21
15
|
default: string;
|
@@ -31,13 +25,7 @@ export declare const FloatingBubble: import("../utils").WithInstall<import("vue"
|
|
31
25
|
default: import("./types").FloatingBubbleAxis;
|
32
26
|
};
|
33
27
|
magnetic: import("vue").PropType<import("./types").FloatingBubbleMagnetic>;
|
34
|
-
offset:
|
35
|
-
type: import("vue").PropType<import("./types").FloatingBubbleOffset>;
|
36
|
-
default: () => {
|
37
|
-
x: number;
|
38
|
-
y: number;
|
39
|
-
};
|
40
|
-
};
|
28
|
+
offset: import("vue").PropType<import("./types").FloatingBubbleOffset>;
|
41
29
|
teleport: {
|
42
30
|
type: import("vue").PropType<import("vue").TeleportProps["to"]>;
|
43
31
|
default: string;
|
@@ -47,7 +35,6 @@ export declare const FloatingBubble: import("../utils").WithInstall<import("vue"
|
|
47
35
|
"onUpdate:offset"?: ((...args: any[]) => any) | undefined;
|
48
36
|
onOffsetChange?: ((...args: any[]) => any) | undefined;
|
49
37
|
}>, {
|
50
|
-
offset: import("./types").FloatingBubbleOffset;
|
51
38
|
teleport: string | import("vue").RendererElement | null | undefined;
|
52
39
|
gap: import("./types").FloatingBubbleGap;
|
53
40
|
axis: import("./types").FloatingBubbleAxis;
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
@@ -226,7 +226,7 @@ __reExport(stdin_exports, require("./toast"), module.exports);
|
|
226
226
|
__reExport(stdin_exports, require("./tree-select"), module.exports);
|
227
227
|
__reExport(stdin_exports, require("./uploader"), module.exports);
|
228
228
|
__reExport(stdin_exports, require("./watermark"), module.exports);
|
229
|
-
const version = "4.9.
|
229
|
+
const version = "4.9.21";
|
230
230
|
function install(app) {
|
231
231
|
const components = [
|
232
232
|
import_action_bar.ActionBar,
|
package/lib/list/List.js
CHANGED
@@ -52,7 +52,7 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
52
52
|
const loading = (0, import_vue.ref)(props.loading);
|
53
53
|
const root = (0, import_vue.ref)();
|
54
54
|
const placeholder = (0, import_vue.ref)();
|
55
|
-
const tabStatus = (0, import_use_tab_status.
|
55
|
+
const tabStatus = (0, import_use_tab_status.useAllTabStatus)();
|
56
56
|
const scrollParent = (0, import_use.useScrollParent)(root);
|
57
57
|
const scroller = (0, import_vue.computed)(() => props.scroller || scrollParent.value);
|
58
58
|
const check = () => {
|
package/lib/progress/Progress.js
CHANGED
@@ -44,6 +44,7 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
44
44
|
props: progressProps,
|
45
45
|
setup(props) {
|
46
46
|
const background = (0, import_vue.computed)(() => props.inactive ? void 0 : props.color);
|
47
|
+
const format = (rate) => Math.min(Math.max(+rate, 0), 100);
|
47
48
|
const renderPivot = () => {
|
48
49
|
const {
|
49
50
|
textColor,
|
@@ -51,12 +52,13 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
51
52
|
pivotColor,
|
52
53
|
percentage
|
53
54
|
} = props;
|
55
|
+
const safePercentage = format(percentage);
|
54
56
|
const text = pivotText != null ? pivotText : `${percentage}%`;
|
55
57
|
if (props.showPivot && text) {
|
56
58
|
const style = {
|
57
59
|
color: textColor,
|
58
|
-
left: `${
|
59
|
-
transform: `translate(-${
|
60
|
+
left: `${safePercentage}%`,
|
61
|
+
transform: `translate(-${safePercentage}%,-50%)`,
|
60
62
|
background: pivotColor || background.value
|
61
63
|
};
|
62
64
|
return (0, import_vue.createVNode)("span", {
|
@@ -73,12 +75,13 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
73
75
|
percentage,
|
74
76
|
strokeWidth
|
75
77
|
} = props;
|
78
|
+
const safePercentage = format(percentage);
|
76
79
|
const rootStyle = {
|
77
80
|
background: trackColor,
|
78
81
|
height: (0, import_utils.addUnit)(strokeWidth)
|
79
82
|
};
|
80
83
|
const portionStyle = {
|
81
|
-
width: `${
|
84
|
+
width: `${safePercentage}%`,
|
82
85
|
background: background.value
|
83
86
|
};
|
84
87
|
return (0, import_vue.createVNode)("div", {
|
package/lib/tab/Tab.js
CHANGED
@@ -120,7 +120,7 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
120
120
|
parent.setLine();
|
121
121
|
parent.scrollIntoView();
|
122
122
|
});
|
123
|
-
(0,
|
123
|
+
(0, import_use_tab_status.useProvideTabStatus)(active);
|
124
124
|
(0, import_use_expose.useExpose)({
|
125
125
|
id,
|
126
126
|
renderTitle
|
package/lib/tab/index.d.ts
CHANGED
@@ -38,6 +38,7 @@ export declare const Tab: import("../utils").WithInstall<import("vue").DefineCom
|
|
38
38
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
|
39
39
|
export default Tab;
|
40
40
|
export { tabProps } from './Tab';
|
41
|
+
export { useTabStatus, useAllTabStatus } from '../composables/use-tab-status';
|
41
42
|
export type { TabProps } from './Tab';
|
42
43
|
declare module 'vue' {
|
43
44
|
interface GlobalComponents {
|
package/lib/tab/index.js
CHANGED
@@ -29,11 +29,14 @@ var stdin_exports = {};
|
|
29
29
|
__export(stdin_exports, {
|
30
30
|
Tab: () => Tab,
|
31
31
|
default: () => stdin_default,
|
32
|
-
tabProps: () => import_Tab2.tabProps
|
32
|
+
tabProps: () => import_Tab2.tabProps,
|
33
|
+
useAllTabStatus: () => import_use_tab_status.useAllTabStatus,
|
34
|
+
useTabStatus: () => import_use_tab_status.useTabStatus
|
33
35
|
});
|
34
36
|
module.exports = __toCommonJS(stdin_exports);
|
35
37
|
var import_utils = require("../utils");
|
36
38
|
var import_Tab = __toESM(require("./Tab"));
|
37
39
|
var import_Tab2 = require("./Tab");
|
40
|
+
var import_use_tab_status = require("../composables/use-tab-status");
|
38
41
|
const Tab = (0, import_utils.withInstall)(import_Tab.default);
|
39
42
|
var stdin_default = Tab;
|