vant 4.6.1 → 4.6.3
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 +1 -1
- package/es/address-list/AddressList.d.ts +13 -0
- package/es/address-list/AddressList.mjs +3 -2
- package/es/address-list/index.d.ts +9 -0
- package/es/checkbox/Checkbox.d.ts +14 -23
- package/es/checkbox/Checkbox.mjs +2 -1
- package/es/checkbox/Checker.d.ts +6 -15
- package/es/checkbox/Checker.mjs +18 -6
- package/es/checkbox/index.d.ts +2 -9
- package/es/checkbox-group/CheckboxGroup.d.ts +14 -1
- package/es/checkbox-group/CheckboxGroup.mjs +2 -1
- package/es/checkbox-group/index.d.ts +9 -0
- package/es/field/Field.d.ts +25 -0
- package/es/field/Field.mjs +9 -0
- package/es/field/index.d.ts +13 -0
- package/es/floating-bubble/FloatingBubble.d.ts +16 -21
- package/es/floating-bubble/FloatingBubble.mjs +6 -8
- package/es/floating-bubble/index.css +1 -1
- package/es/floating-bubble/index.d.ts +19 -19
- package/es/floating-bubble/types.d.ts +12 -0
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/pagination/index.css +1 -1
- package/es/radio/Radio.d.ts +18 -25
- package/es/radio/Radio.mjs +5 -3
- package/es/radio/index.css +1 -1
- package/es/radio/index.d.ts +4 -9
- package/es/radio/types.d.ts +1 -0
- package/es/radio-group/RadioGroup.d.ts +4 -0
- package/es/radio-group/RadioGroup.mjs +1 -0
- package/es/radio-group/index.d.ts +2 -0
- package/es/search/Search.d.ts +19 -0
- package/es/search/index.d.ts +13 -0
- package/es/tab/Tab.mjs +2 -2
- package/es/text-ellipsis/TextEllipsis.d.ts +13 -0
- package/es/text-ellipsis/TextEllipsis.mjs +50 -19
- package/es/text-ellipsis/index.d.ts +9 -0
- package/es/utils/basic.d.ts +8 -0
- package/es/utils/basic.mjs +28 -7
- package/es/utils/create.mjs +1 -2
- package/es/utils/deep-assign.mjs +1 -1
- package/es/utils/deep-clone.mjs +1 -1
- package/es/utils/dom.mjs +1 -1
- package/es/utils/format.mjs +1 -1
- package/es/utils/index.d.ts +0 -1
- package/es/utils/index.mjs +0 -1
- package/es/utils/interceptor.mjs +1 -2
- package/lib/address-list/AddressList.d.ts +13 -0
- package/lib/address-list/AddressList.js +3 -2
- package/lib/address-list/index.d.ts +9 -0
- package/lib/checkbox/Checkbox.d.ts +14 -23
- package/lib/checkbox/Checkbox.js +1 -0
- package/lib/checkbox/Checker.d.ts +6 -15
- package/lib/checkbox/Checker.js +17 -5
- package/lib/checkbox/index.d.ts +2 -9
- package/lib/checkbox-group/CheckboxGroup.d.ts +14 -1
- package/lib/checkbox-group/CheckboxGroup.js +1 -0
- package/lib/checkbox-group/index.d.ts +9 -0
- package/lib/field/Field.d.ts +25 -0
- package/lib/field/Field.js +9 -0
- package/lib/field/index.d.ts +13 -0
- package/lib/floating-bubble/FloatingBubble.d.ts +16 -21
- package/lib/floating-bubble/FloatingBubble.js +6 -8
- package/lib/floating-bubble/index.css +1 -1
- package/lib/floating-bubble/index.d.ts +19 -19
- package/lib/floating-bubble/types.d.ts +12 -0
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/pagination/index.css +1 -1
- package/lib/radio/Radio.d.ts +18 -25
- package/lib/radio/Radio.js +4 -2
- package/lib/radio/index.css +1 -1
- package/lib/radio/index.d.ts +4 -9
- package/lib/radio/types.d.ts +1 -0
- package/lib/radio-group/RadioGroup.d.ts +4 -0
- package/lib/radio-group/RadioGroup.js +1 -0
- package/lib/radio-group/index.d.ts +2 -0
- package/lib/search/Search.d.ts +19 -0
- package/lib/search/index.d.ts +13 -0
- package/lib/tab/Tab.js +2 -2
- package/lib/text-ellipsis/TextEllipsis.d.ts +13 -0
- package/lib/text-ellipsis/TextEllipsis.js +49 -18
- package/lib/text-ellipsis/index.d.ts +9 -0
- package/lib/utils/basic.d.ts +8 -0
- package/lib/utils/basic.js +29 -8
- package/lib/utils/create.js +1 -2
- package/lib/utils/deep-assign.js +3 -3
- package/lib/utils/deep-clone.js +3 -3
- package/lib/utils/dom.js +2 -2
- package/lib/utils/format.js +4 -4
- package/lib/utils/index.d.ts +0 -1
- package/lib/utils/index.js +0 -1
- package/lib/utils/interceptor.js +1 -2
- package/lib/vant.cjs.js +107 -48
- package/lib/vant.es.js +107 -48
- package/lib/vant.js +172 -59
- package/lib/vant.min.js +1 -1
- package/lib/web-types.json +1 -1
- package/package.json +1 -1
- package/es/utils/validate.d.ts +0 -9
- package/es/utils/validate.mjs +0 -22
- package/lib/utils/validate.d.ts +0 -9
- package/lib/utils/validate.js +0 -41
@@ -1,21 +1,16 @@
|
|
1
1
|
import { PropType, type ExtractPropTypes } from 'vue';
|
2
|
-
|
3
|
-
export type FloatingBubbleMagnetic = 'x' | 'y';
|
4
|
-
export type FloatingBubbleOffset = {
|
5
|
-
x: number;
|
6
|
-
y: number;
|
7
|
-
};
|
2
|
+
import { FloatingBubbleAxis, FloatingBubbleMagnetic, FloatingBubbleOffset } from './types';
|
8
3
|
export declare const floatingBubbleProps: {
|
4
|
+
gap: {
|
5
|
+
type: NumberConstructor;
|
6
|
+
default: number;
|
7
|
+
};
|
8
|
+
icon: StringConstructor;
|
9
9
|
axis: {
|
10
10
|
type: PropType<FloatingBubbleAxis>;
|
11
11
|
default: FloatingBubbleAxis;
|
12
12
|
};
|
13
13
|
magnetic: PropType<FloatingBubbleMagnetic>;
|
14
|
-
icon: StringConstructor;
|
15
|
-
gap: {
|
16
|
-
type: NumberConstructor;
|
17
|
-
default: number;
|
18
|
-
};
|
19
14
|
offset: {
|
20
15
|
type: PropType<FloatingBubbleOffset>;
|
21
16
|
default: () => {
|
@@ -30,16 +25,16 @@ export declare const floatingBubbleProps: {
|
|
30
25
|
};
|
31
26
|
export type FloatingBubbleProps = ExtractPropTypes<typeof floatingBubbleProps>;
|
32
27
|
declare const _default: import("vue").DefineComponent<{
|
28
|
+
gap: {
|
29
|
+
type: NumberConstructor;
|
30
|
+
default: number;
|
31
|
+
};
|
32
|
+
icon: StringConstructor;
|
33
33
|
axis: {
|
34
34
|
type: PropType<FloatingBubbleAxis>;
|
35
35
|
default: FloatingBubbleAxis;
|
36
36
|
};
|
37
37
|
magnetic: PropType<FloatingBubbleMagnetic>;
|
38
|
-
icon: StringConstructor;
|
39
|
-
gap: {
|
40
|
-
type: NumberConstructor;
|
41
|
-
default: number;
|
42
|
-
};
|
43
38
|
offset: {
|
44
39
|
type: PropType<FloatingBubbleOffset>;
|
45
40
|
default: () => {
|
@@ -52,16 +47,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
52
47
|
default: string;
|
53
48
|
};
|
54
49
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "update:offset" | "offsetChange")[], "click" | "update:offset" | "offsetChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
50
|
+
gap: {
|
51
|
+
type: NumberConstructor;
|
52
|
+
default: number;
|
53
|
+
};
|
54
|
+
icon: StringConstructor;
|
55
55
|
axis: {
|
56
56
|
type: PropType<FloatingBubbleAxis>;
|
57
57
|
default: FloatingBubbleAxis;
|
58
58
|
};
|
59
59
|
magnetic: PropType<FloatingBubbleMagnetic>;
|
60
|
-
icon: StringConstructor;
|
61
|
-
gap: {
|
62
|
-
type: NumberConstructor;
|
63
|
-
default: number;
|
64
|
-
};
|
65
60
|
offset: {
|
66
61
|
type: PropType<FloatingBubbleOffset>;
|
67
62
|
default: () => {
|
@@ -1,14 +1,14 @@
|
|
1
1
|
import { withDirectives as _withDirectives, vShow as _vShow, createVNode as _createVNode } from "vue";
|
2
2
|
import { Teleport, computed, defineComponent, nextTick, onMounted, ref, watch, onActivated, onDeactivated } from "vue";
|
3
|
+
import { pick, addUnit, closest, createNamespace, makeNumberProp, makeStringProp, windowWidth, windowHeight } from "../utils/index.mjs";
|
3
4
|
import { useRect, useEventListener } from "@vant/use";
|
4
5
|
import { useTouch } from "../composables/use-touch.mjs";
|
5
|
-
import { addUnit, closest, createNamespace, makeNumberProp, makeStringProp, pick, windowWidth, windowHeight } from "../utils/index.mjs";
|
6
6
|
import Icon from "../icon/index.mjs";
|
7
7
|
const floatingBubbleProps = {
|
8
|
+
gap: makeNumberProp(24),
|
9
|
+
icon: String,
|
8
10
|
axis: makeStringProp("y"),
|
9
11
|
magnetic: String,
|
10
|
-
icon: String,
|
11
|
-
gap: makeNumberProp(24),
|
12
12
|
offset: {
|
13
13
|
type: Object,
|
14
14
|
default: () => ({
|
@@ -39,8 +39,8 @@ var stdin_default = defineComponent({
|
|
39
39
|
});
|
40
40
|
const boundary = computed(() => ({
|
41
41
|
top: props.gap,
|
42
|
-
right: windowWidth.value - state.value.
|
43
|
-
bottom: windowHeight.value - state.value.
|
42
|
+
right: windowWidth.value - state.value.width - props.gap,
|
43
|
+
bottom: windowHeight.value - state.value.height - props.gap,
|
44
44
|
left: props.gap
|
45
45
|
}));
|
46
46
|
const dragging = ref(false);
|
@@ -138,9 +138,7 @@ var stdin_default = defineComponent({
|
|
138
138
|
initialized = true;
|
139
139
|
});
|
140
140
|
});
|
141
|
-
watch([windowWidth, windowHeight, () => props.gap, () => props.offset],
|
142
|
-
deep: true
|
143
|
-
});
|
141
|
+
watch([windowWidth, windowHeight, () => props.gap, () => props.offset], updateState);
|
144
142
|
const show = ref(true);
|
145
143
|
onActivated(() => {
|
146
144
|
show.value = true;
|
@@ -1 +1 @@
|
|
1
|
-
:root{--van-floating-bubble-size: 48px;--van-floating-bubble-initial-gap: 24px;--van-floating-bubble-icon-size: 28px;--van-floating-bubble-background: var(--van-primary-color);--van-floating-bubble-color: var(--van-background-2);--van-floating-bubble-z-index: 999}.van-floating-bubble{position:fixed;left:0;top:0;right:var(--van-floating-bubble-initial-gap);bottom:var(--van-floating-bubble-initial-gap);width:var(--van-floating-bubble-size);height:var(--van-floating-bubble-size);box-sizing:border-box;display:flex;justify-content:center;align-items:center;overflow:hidden;cursor:pointer;-webkit-user-select:none;user-select:none;touch-action:none;background:var(--van-floating-bubble-background);color:var(--van-floating-bubble-color);border-radius:var(--van-radius
|
1
|
+
:root{--van-floating-bubble-size: 48px;--van-floating-bubble-initial-gap: 24px;--van-floating-bubble-icon-size: 28px;--van-floating-bubble-background: var(--van-primary-color);--van-floating-bubble-color: var(--van-background-2);--van-floating-bubble-z-index: 999;--van-floating-bubble-border-radius: var(--van-radius-max)}.van-floating-bubble{position:fixed;left:0;top:0;right:var(--van-floating-bubble-initial-gap);bottom:var(--van-floating-bubble-initial-gap);width:var(--van-floating-bubble-size);height:var(--van-floating-bubble-size);box-sizing:border-box;display:flex;justify-content:center;align-items:center;overflow:hidden;cursor:pointer;-webkit-user-select:none;user-select:none;touch-action:none;background:var(--van-floating-bubble-background);color:var(--van-floating-bubble-color);border-radius:var(--van-floating-bubble-border-radius);z-index:var(--van-floating-bubble-z-index);transition:transform var(--van-duration-base)}.van-floating-bubble:active{opacity:.8}.van-floating-bubble__icon{font-size:var(--van-floating-bubble-icon-size)}
|
@@ -1,16 +1,16 @@
|
|
1
1
|
export declare const FloatingBubble: import("../utils").WithInstall<import("vue").DefineComponent<{
|
2
|
-
axis: {
|
3
|
-
type: import("vue").PropType<import("./FloatingBubble").FloatingBubbleAxis>;
|
4
|
-
default: import("./FloatingBubble").FloatingBubbleAxis;
|
5
|
-
};
|
6
|
-
magnetic: import("vue").PropType<import("./FloatingBubble").FloatingBubbleMagnetic>;
|
7
|
-
icon: StringConstructor;
|
8
2
|
gap: {
|
9
3
|
type: NumberConstructor;
|
10
4
|
default: number;
|
11
5
|
};
|
6
|
+
icon: StringConstructor;
|
7
|
+
axis: {
|
8
|
+
type: import("vue").PropType<import("./types").FloatingBubbleAxis>;
|
9
|
+
default: import("./types").FloatingBubbleAxis;
|
10
|
+
};
|
11
|
+
magnetic: import("vue").PropType<import("./types").FloatingBubbleMagnetic>;
|
12
12
|
offset: {
|
13
|
-
type: import("vue").PropType<import("./
|
13
|
+
type: import("vue").PropType<import("./types").FloatingBubbleOffset>;
|
14
14
|
default: () => {
|
15
15
|
x: number;
|
16
16
|
y: number;
|
@@ -21,18 +21,18 @@ export declare const FloatingBubble: import("../utils").WithInstall<import("vue"
|
|
21
21
|
default: string;
|
22
22
|
};
|
23
23
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "update:offset" | "offsetChange")[], "click" | "update:offset" | "offsetChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
24
|
-
axis: {
|
25
|
-
type: import("vue").PropType<import("./FloatingBubble").FloatingBubbleAxis>;
|
26
|
-
default: import("./FloatingBubble").FloatingBubbleAxis;
|
27
|
-
};
|
28
|
-
magnetic: import("vue").PropType<import("./FloatingBubble").FloatingBubbleMagnetic>;
|
29
|
-
icon: StringConstructor;
|
30
24
|
gap: {
|
31
25
|
type: NumberConstructor;
|
32
26
|
default: number;
|
33
27
|
};
|
28
|
+
icon: StringConstructor;
|
29
|
+
axis: {
|
30
|
+
type: import("vue").PropType<import("./types").FloatingBubbleAxis>;
|
31
|
+
default: import("./types").FloatingBubbleAxis;
|
32
|
+
};
|
33
|
+
magnetic: import("vue").PropType<import("./types").FloatingBubbleMagnetic>;
|
34
34
|
offset: {
|
35
|
-
type: import("vue").PropType<import("./
|
35
|
+
type: import("vue").PropType<import("./types").FloatingBubbleOffset>;
|
36
36
|
default: () => {
|
37
37
|
x: number;
|
38
38
|
y: number;
|
@@ -47,17 +47,17 @@ export declare const FloatingBubble: import("../utils").WithInstall<import("vue"
|
|
47
47
|
"onUpdate:offset"?: ((...args: any[]) => any) | undefined;
|
48
48
|
onOffsetChange?: ((...args: any[]) => any) | undefined;
|
49
49
|
}, {
|
50
|
-
offset: import("./
|
50
|
+
offset: import("./types").FloatingBubbleOffset;
|
51
51
|
teleport: string | import("vue").RendererElement | null | undefined;
|
52
52
|
gap: number;
|
53
|
-
axis: import("./
|
53
|
+
axis: import("./types").FloatingBubbleAxis;
|
54
54
|
}, {}>>;
|
55
55
|
export default FloatingBubble;
|
56
56
|
export { floatingBubbleProps } from './FloatingBubble';
|
57
|
-
export type { FloatingBubbleProps
|
58
|
-
export type { FloatingBubbleThemeVars } from './types';
|
57
|
+
export type { FloatingBubbleProps } from './FloatingBubble';
|
58
|
+
export type { FloatingBubbleThemeVars, FloatingBubbleAxis, FloatingBubbleMagnetic, FloatingBubbleOffset, } from './types';
|
59
59
|
declare module 'vue' {
|
60
60
|
interface GlobalComponents {
|
61
|
-
|
61
|
+
VanFloatingBubble: typeof FloatingBubble;
|
62
62
|
}
|
63
63
|
}
|
@@ -6,3 +6,15 @@ export type FloatingBubbleThemeVars = {
|
|
6
6
|
floatingBubbleColor?: string;
|
7
7
|
floatingBubbleZIndex?: number | string;
|
8
8
|
};
|
9
|
+
export type FloatingBubbleAxis = 'x' | 'y' | 'xy' | 'lock';
|
10
|
+
export type FloatingBubbleMagnetic = 'x' | 'y';
|
11
|
+
export type FloatingBubbleOffset = {
|
12
|
+
x: number;
|
13
|
+
y: number;
|
14
|
+
};
|
15
|
+
export type FloatingBubbleBoundary = {
|
16
|
+
top: number;
|
17
|
+
right: number;
|
18
|
+
bottom: number;
|
19
|
+
left: number;
|
20
|
+
};
|
package/es/index.d.ts
CHANGED
package/es/index.mjs
CHANGED
@@ -98,7 +98,7 @@ import { Toast } from "./toast/index.mjs";
|
|
98
98
|
import { TreeSelect } from "./tree-select/index.mjs";
|
99
99
|
import { Uploader } from "./uploader/index.mjs";
|
100
100
|
import { Watermark } from "./watermark/index.mjs";
|
101
|
-
const version = "4.6.
|
101
|
+
const version = "4.6.3";
|
102
102
|
function install(app) {
|
103
103
|
const components = [
|
104
104
|
ActionBar,
|
package/es/pagination/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
:root{--van-pagination-height: 40px;--van-pagination-font-size: var(--van-font-size-md);--van-pagination-item-width: 36px;--van-pagination-item-default-color: var(--van-primary-color);--van-pagination-item-disabled-color: var(--van-gray-7);--van-pagination-item-disabled-background: var(--van-background);--van-pagination-background: var(--van-background-2);--van-pagination-desc-color: var(--van-gray-7);--van-pagination-disabled-opacity: var(--van-disabled-opacity)}.van-pagination{font-size:var(--van-pagination-font-size)}.van-pagination__items{display:flex}.van-pagination__item,.van-pagination__page-desc{display:flex;align-items:center;justify-content:center}.van-pagination__item{flex:1;box-sizing:border-box;min-width:var(--van-pagination-item-width);height:var(--van-pagination-height);color:var(--van-pagination-item-default-color);background:var(--van-pagination-background);cursor:pointer;-webkit-user-select:none;user-select:none}.van-pagination__item button{flex:1;height:100%;border:none;padding:0;background:transparent}.van-pagination__item button[disabled]{cursor:not-allowed}.van-pagination__item:active{color:var(--van-white);background-color:var(--van-pagination-item-default-color)}.van-pagination__item:not(:last-child):after{border-right-width:0}.van-pagination__item--active{color:var(--van-white);background-color:var(--van-pagination-item-default-color)}.van-pagination__item--page{flex-grow:0}.van-pagination__item--prev,.van-pagination__item--next{padding:0 var(--van-padding-base);cursor:pointer}.van-pagination__item--border:after{border-width:var(--van-border-width)}.van-pagination__item--disabled,.van-pagination__item--disabled:active{color:var(--van-pagination-item-disabled-color);background-color:var(--van-pagination-item-disabled-background);opacity:var(--van-pagination-disabled-opacity)}.van-pagination__page-desc{flex:1;height:var(--van-pagination-height);color:var(--van-pagination-desc-color)}
|
1
|
+
:root{--van-pagination-height: 40px;--van-pagination-font-size: var(--van-font-size-md);--van-pagination-item-width: 36px;--van-pagination-item-default-color: var(--van-primary-color);--van-pagination-item-disabled-color: var(--van-gray-7);--van-pagination-item-disabled-background: var(--van-background);--van-pagination-background: var(--van-background-2);--van-pagination-desc-color: var(--van-gray-7);--van-pagination-disabled-opacity: var(--van-disabled-opacity)}.van-pagination{font-size:var(--van-pagination-font-size)}.van-pagination__items{display:flex}.van-pagination__item,.van-pagination__page-desc{display:flex;align-items:center;justify-content:center}.van-pagination__item{flex:1;box-sizing:border-box;min-width:var(--van-pagination-item-width);height:var(--van-pagination-height);color:var(--van-pagination-item-default-color);background:var(--van-pagination-background);cursor:pointer;-webkit-user-select:none;user-select:none}.van-pagination__item button{flex:1;height:100%;border:none;padding:0;background:transparent}.van-pagination__item button[disabled]{cursor:not-allowed}.van-pagination__item:active{color:var(--van-white);background-color:var(--van-pagination-item-default-color)}.van-pagination__item:not(:last-child):after{border-right-width:0}.van-pagination__item--active{color:var(--van-white);background-color:var(--van-pagination-item-default-color)}.van-pagination__item--page{flex-grow:0}.van-pagination__item--prev,.van-pagination__item--next{padding:0 var(--van-padding-base);cursor:pointer}.van-pagination__item--border:first-child:after{border-right-width:var(--van-border-width)}.van-pagination__item--disabled,.van-pagination__item--disabled:active{color:var(--van-pagination-item-disabled-color);background-color:var(--van-pagination-item-disabled-background);opacity:var(--van-pagination-disabled-opacity)}.van-pagination__page-desc{flex:1;height:var(--van-pagination-height);color:var(--van-pagination-desc-color)}
|
package/es/radio/Radio.d.ts
CHANGED
@@ -1,50 +1,43 @@
|
|
1
|
-
import { type ExtractPropTypes } from 'vue';
|
2
|
-
import { CheckerShape, CheckerLabelPosition } from '../checkbox/Checker';
|
1
|
+
import { type PropType, type ExtractPropTypes } from 'vue';
|
2
|
+
import { type CheckerShape, type CheckerLabelPosition } from '../checkbox/Checker';
|
3
|
+
export type RadioShape = CheckerShape | 'dot';
|
3
4
|
export declare const radioProps: {
|
4
|
-
name:
|
5
|
-
shape: {
|
6
|
-
type: import("vue").PropType<CheckerShape>;
|
7
|
-
default: CheckerShape;
|
8
|
-
};
|
5
|
+
name: PropType<unknown>;
|
9
6
|
disabled: BooleanConstructor;
|
10
7
|
iconSize: (NumberConstructor | StringConstructor)[];
|
11
|
-
modelValue:
|
8
|
+
modelValue: PropType<unknown>;
|
12
9
|
checkedColor: StringConstructor;
|
13
|
-
labelPosition:
|
10
|
+
labelPosition: PropType<CheckerLabelPosition>;
|
14
11
|
labelDisabled: BooleanConstructor;
|
12
|
+
} & {
|
13
|
+
shape: PropType<RadioShape>;
|
15
14
|
};
|
16
|
-
export type RadioShape = CheckerShape;
|
17
15
|
export type RadioLabelPosition = CheckerLabelPosition;
|
18
16
|
export type RadioProps = ExtractPropTypes<typeof radioProps>;
|
19
17
|
declare const _default: import("vue").DefineComponent<{
|
20
|
-
name:
|
21
|
-
shape: {
|
22
|
-
type: import("vue").PropType<CheckerShape>;
|
23
|
-
default: CheckerShape;
|
24
|
-
};
|
18
|
+
name: PropType<unknown>;
|
25
19
|
disabled: BooleanConstructor;
|
26
20
|
iconSize: (NumberConstructor | StringConstructor)[];
|
27
|
-
modelValue:
|
21
|
+
modelValue: PropType<unknown>;
|
28
22
|
checkedColor: StringConstructor;
|
29
|
-
labelPosition:
|
23
|
+
labelPosition: PropType<CheckerLabelPosition>;
|
30
24
|
labelDisabled: BooleanConstructor;
|
25
|
+
} & {
|
26
|
+
shape: PropType<RadioShape>;
|
31
27
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
32
|
-
name:
|
33
|
-
shape: {
|
34
|
-
type: import("vue").PropType<CheckerShape>;
|
35
|
-
default: CheckerShape;
|
36
|
-
};
|
28
|
+
name: PropType<unknown>;
|
37
29
|
disabled: BooleanConstructor;
|
38
30
|
iconSize: (NumberConstructor | StringConstructor)[];
|
39
|
-
modelValue:
|
31
|
+
modelValue: PropType<unknown>;
|
40
32
|
checkedColor: StringConstructor;
|
41
|
-
labelPosition:
|
33
|
+
labelPosition: PropType<CheckerLabelPosition>;
|
42
34
|
labelDisabled: BooleanConstructor;
|
35
|
+
} & {
|
36
|
+
shape: PropType<RadioShape>;
|
43
37
|
}>> & {
|
44
38
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
45
39
|
}, {
|
46
40
|
disabled: boolean;
|
47
|
-
shape: CheckerShape;
|
48
41
|
labelDisabled: boolean;
|
49
42
|
}, {}>;
|
50
43
|
export default _default;
|
package/es/radio/Radio.mjs
CHANGED
@@ -1,14 +1,16 @@
|
|
1
1
|
import { createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
|
2
2
|
import { defineComponent } from "vue";
|
3
|
-
import { pick, createNamespace } from "../utils/index.mjs";
|
3
|
+
import { pick, extend, createNamespace } from "../utils/index.mjs";
|
4
4
|
import { RADIO_KEY } from "../radio-group/RadioGroup.mjs";
|
5
5
|
import { useParent } from "@vant/use";
|
6
6
|
import Checker, { checkerProps } from "../checkbox/Checker.mjs";
|
7
|
-
const radioProps = checkerProps
|
7
|
+
const radioProps = extend({}, checkerProps, {
|
8
|
+
shape: String
|
9
|
+
});
|
8
10
|
const [name, bem] = createNamespace("radio");
|
9
11
|
var stdin_default = defineComponent({
|
10
12
|
name,
|
11
|
-
props:
|
13
|
+
props: radioProps,
|
12
14
|
emits: ["update:modelValue"],
|
13
15
|
setup(props, {
|
14
16
|
emit,
|
package/es/radio/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
:root{--van-radio-size: 20px;--van-radio-border-color: var(--van-gray-5);--van-radio-duration: var(--van-duration-fast);--van-radio-label-margin: var(--van-padding-xs);--van-radio-label-color: var(--van-text-color);--van-radio-checked-icon-color: var(--van-primary-color);--van-radio-disabled-icon-color: var(--van-gray-5);--van-radio-disabled-label-color: var(--van-text-color-3);--van-radio-disabled-background: var(--van-border-color)}.van-radio{display:flex;align-items:center;overflow:hidden;cursor:pointer;-webkit-user-select:none;user-select:none}.van-radio--disabled{cursor:not-allowed}.van-radio--label-disabled{cursor:default}.van-radio--horizontal{margin-right:var(--van-padding-sm)}.van-radio__icon{flex:none;height:1em;font-size:var(--van-radio-size);line-height:1em;cursor:pointer}.van-radio__icon .van-icon{display:block;box-sizing:border-box;width:1.25em;height:1.25em;color:transparent;font-size:.8em;line-height:1.25;text-align:center;border:1px solid var(--van-radio-border-color);transition-duration:var(--van-radio-duration);transition-property:color,border-color,background-color}.van-radio__icon--round .van-icon{border-radius:100%}.van-radio__icon--checked .van-icon{color:var(--van-white);background-color:var(--van-radio-checked-icon-color);border-color:var(--van-radio-checked-icon-color)}.van-radio__icon--disabled{cursor:not-allowed}.van-radio__icon--disabled .van-icon{background-color:var(--van-radio-disabled-background);border-color:var(--van-radio-disabled-icon-color)}.van-radio__icon--disabled.van-radio__icon--checked .van-icon{color:var(--van-radio-disabled-icon-color)}.van-radio__label{margin-left:var(--van-radio-label-margin);color:var(--van-radio-label-color);line-height:var(--van-radio-size)}.van-radio__label--left{margin:0 var(--van-radio-label-margin) 0 0}.van-radio__label--disabled{color:var(--van-radio-disabled-label-color)}
|
1
|
+
:root{--van-radio-size: 20px;--van-radio-dot-size: 8px;--van-radio-border-color: var(--van-gray-5);--van-radio-duration: var(--van-duration-fast);--van-radio-label-margin: var(--van-padding-xs);--van-radio-label-color: var(--van-text-color);--van-radio-checked-icon-color: var(--van-primary-color);--van-radio-disabled-icon-color: var(--van-gray-5);--van-radio-disabled-label-color: var(--van-text-color-3);--van-radio-disabled-background: var(--van-border-color)}.van-radio{display:flex;align-items:center;overflow:hidden;cursor:pointer;-webkit-user-select:none;user-select:none}.van-radio--disabled{cursor:not-allowed}.van-radio--label-disabled{cursor:default}.van-radio--horizontal{margin-right:var(--van-padding-sm)}.van-radio__icon{flex:none;height:1em;font-size:var(--van-radio-size);line-height:1em;cursor:pointer}.van-radio__icon .van-icon{display:block;box-sizing:border-box;width:1.25em;height:1.25em;color:transparent;font-size:.8em;line-height:1.25;text-align:center;border:1px solid var(--van-radio-border-color);transition-duration:var(--van-radio-duration);transition-property:color,border-color,background-color}.van-radio__icon--round .van-icon{border-radius:100%}.van-radio__icon--dot{position:relative;border-radius:100%;box-sizing:border-box;width:var(--van-radio-size);height:var(--van-radio-size);border:1px solid var(--van-radio-border-color);transition-duration:var(--van-radio-duration);transition-property:border-color}.van-radio__icon--dot__icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:100%;height:calc(100% - var(--van-radio-dot-size));width:calc(100% - var(--van-radio-dot-size));transition-duration:var(--van-radio-duration);transition-property:background-color}.van-radio__icon--checked .van-icon{color:var(--van-white);background-color:var(--van-radio-checked-icon-color);border-color:var(--van-radio-checked-icon-color)}.van-radio__icon--checked.van-radio__icon--dot{border-color:var(--van-radio-checked-icon-color)}.van-radio__icon--checked.van-radio__icon--dot .van-radio__icon--dot__icon{background:var(--van-radio-checked-icon-color)}.van-radio__icon--disabled{cursor:not-allowed}.van-radio__icon--disabled .van-icon{background-color:var(--van-radio-disabled-background);border-color:var(--van-radio-disabled-icon-color)}.van-radio__icon--disabled.van-radio__icon--checked .van-icon{color:var(--van-radio-disabled-icon-color)}.van-radio__label{margin-left:var(--van-radio-label-margin);color:var(--van-radio-label-color);line-height:var(--van-radio-size)}.van-radio__label--left{margin:0 var(--van-radio-label-margin) 0 0}.van-radio__label--disabled{color:var(--van-radio-disabled-label-color)}
|
package/es/radio/index.d.ts
CHANGED
@@ -1,32 +1,27 @@
|
|
1
1
|
export declare const Radio: import("../utils").WithInstall<import("vue").DefineComponent<{
|
2
2
|
name: import("vue").PropType<unknown>;
|
3
|
-
shape: {
|
4
|
-
type: import("vue").PropType<import("../checkbox/Checker").CheckerShape>;
|
5
|
-
default: import("../checkbox/Checker").CheckerShape;
|
6
|
-
};
|
7
3
|
disabled: BooleanConstructor;
|
8
4
|
iconSize: (NumberConstructor | StringConstructor)[];
|
9
5
|
modelValue: import("vue").PropType<unknown>;
|
10
6
|
checkedColor: StringConstructor;
|
11
7
|
labelPosition: import("vue").PropType<import("../checkbox/Checker").CheckerLabelPosition>;
|
12
8
|
labelDisabled: BooleanConstructor;
|
9
|
+
} & {
|
10
|
+
shape: import("vue").PropType<import("./Radio").RadioShape>;
|
13
11
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
14
12
|
name: import("vue").PropType<unknown>;
|
15
|
-
shape: {
|
16
|
-
type: import("vue").PropType<import("../checkbox/Checker").CheckerShape>;
|
17
|
-
default: import("../checkbox/Checker").CheckerShape;
|
18
|
-
};
|
19
13
|
disabled: BooleanConstructor;
|
20
14
|
iconSize: (NumberConstructor | StringConstructor)[];
|
21
15
|
modelValue: import("vue").PropType<unknown>;
|
22
16
|
checkedColor: StringConstructor;
|
23
17
|
labelPosition: import("vue").PropType<import("../checkbox/Checker").CheckerLabelPosition>;
|
24
18
|
labelDisabled: BooleanConstructor;
|
19
|
+
} & {
|
20
|
+
shape: import("vue").PropType<import("./Radio").RadioShape>;
|
25
21
|
}>> & {
|
26
22
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
27
23
|
}, {
|
28
24
|
disabled: boolean;
|
29
|
-
shape: import("../checkbox/Checker").CheckerShape;
|
30
25
|
labelDisabled: boolean;
|
31
26
|
}, {}>>;
|
32
27
|
export default Radio;
|
package/es/radio/types.d.ts
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
import { type PropType, type InjectionKey, type ExtractPropTypes } from 'vue';
|
2
|
+
import type { RadioShape } from '../radio';
|
2
3
|
import type { CheckerDirection } from '../checkbox/Checker';
|
3
4
|
export type RadioGroupDirection = CheckerDirection;
|
4
5
|
export declare const radioGroupProps: {
|
6
|
+
shape: PropType<RadioShape>;
|
5
7
|
disabled: BooleanConstructor;
|
6
8
|
iconSize: (NumberConstructor | StringConstructor)[];
|
7
9
|
direction: PropType<CheckerDirection>;
|
@@ -15,12 +17,14 @@ export type RadioGroupProvide = {
|
|
15
17
|
};
|
16
18
|
export declare const RADIO_KEY: InjectionKey<RadioGroupProvide>;
|
17
19
|
declare const _default: import("vue").DefineComponent<{
|
20
|
+
shape: PropType<RadioShape>;
|
18
21
|
disabled: BooleanConstructor;
|
19
22
|
iconSize: (NumberConstructor | StringConstructor)[];
|
20
23
|
direction: PropType<CheckerDirection>;
|
21
24
|
modelValue: PropType<unknown>;
|
22
25
|
checkedColor: StringConstructor;
|
23
26
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
27
|
+
shape: PropType<RadioShape>;
|
24
28
|
disabled: BooleanConstructor;
|
25
29
|
iconSize: (NumberConstructor | StringConstructor)[];
|
26
30
|
direction: PropType<CheckerDirection>;
|
@@ -4,6 +4,7 @@ import { unknownProp, numericProp, createNamespace } from "../utils/index.mjs";
|
|
4
4
|
import { useChildren, useCustomFieldValue } from "@vant/use";
|
5
5
|
const [name, bem] = createNamespace("radio-group");
|
6
6
|
const radioGroupProps = {
|
7
|
+
shape: String,
|
7
8
|
disabled: Boolean,
|
8
9
|
iconSize: numericProp,
|
9
10
|
direction: String,
|
@@ -1,10 +1,12 @@
|
|
1
1
|
export declare const RadioGroup: import("../utils").WithInstall<import("vue").DefineComponent<{
|
2
|
+
shape: import("vue").PropType<import("..").RadioShape>;
|
2
3
|
disabled: BooleanConstructor;
|
3
4
|
iconSize: (NumberConstructor | StringConstructor)[];
|
4
5
|
direction: import("vue").PropType<import("../checkbox/Checker").CheckerDirection>;
|
5
6
|
modelValue: import("vue").PropType<unknown>;
|
6
7
|
checkedColor: StringConstructor;
|
7
8
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
9
|
+
shape: import("vue").PropType<import("..").RadioShape>;
|
8
10
|
disabled: BooleanConstructor;
|
9
11
|
iconSize: (NumberConstructor | StringConstructor)[];
|
10
12
|
direction: import("vue").PropType<import("../checkbox/Checker").CheckerDirection>;
|
package/es/search/Search.d.ts
CHANGED
@@ -20,8 +20,14 @@ export declare const searchProps: {
|
|
20
20
|
inputAlign: import("vue").PropType<import("../field").FieldTextAlign>;
|
21
21
|
placeholder: StringConstructor;
|
22
22
|
autocomplete: StringConstructor;
|
23
|
+
autocapitalize: StringConstructor;
|
24
|
+
autocorrect: StringConstructor;
|
23
25
|
errorMessage: StringConstructor;
|
24
26
|
enterkeyhint: StringConstructor;
|
27
|
+
spellcheck: {
|
28
|
+
type: BooleanConstructor;
|
29
|
+
default: null;
|
30
|
+
};
|
25
31
|
clearTrigger: {
|
26
32
|
type: import("vue").PropType<import("../field").FieldClearTrigger>;
|
27
33
|
default: import("../field").FieldClearTrigger;
|
@@ -81,8 +87,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
81
87
|
inputAlign: import("vue").PropType<import("../field").FieldTextAlign>;
|
82
88
|
placeholder: StringConstructor;
|
83
89
|
autocomplete: StringConstructor;
|
90
|
+
autocapitalize: StringConstructor;
|
91
|
+
autocorrect: StringConstructor;
|
84
92
|
errorMessage: StringConstructor;
|
85
93
|
enterkeyhint: StringConstructor;
|
94
|
+
spellcheck: {
|
95
|
+
type: BooleanConstructor;
|
96
|
+
default: null;
|
97
|
+
};
|
86
98
|
clearTrigger: {
|
87
99
|
type: import("vue").PropType<import("../field").FieldClearTrigger>;
|
88
100
|
default: import("../field").FieldClearTrigger;
|
@@ -140,8 +152,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
140
152
|
inputAlign: import("vue").PropType<import("../field").FieldTextAlign>;
|
141
153
|
placeholder: StringConstructor;
|
142
154
|
autocomplete: StringConstructor;
|
155
|
+
autocapitalize: StringConstructor;
|
156
|
+
autocorrect: StringConstructor;
|
143
157
|
errorMessage: StringConstructor;
|
144
158
|
enterkeyhint: StringConstructor;
|
159
|
+
spellcheck: {
|
160
|
+
type: BooleanConstructor;
|
161
|
+
default: null;
|
162
|
+
};
|
145
163
|
clearTrigger: {
|
146
164
|
type: import("vue").PropType<import("../field").FieldClearTrigger>;
|
147
165
|
default: import("../field").FieldClearTrigger;
|
@@ -197,6 +215,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
197
215
|
clearable: boolean;
|
198
216
|
clearIcon: string;
|
199
217
|
modelValue: string | number;
|
218
|
+
spellcheck: boolean;
|
200
219
|
clearTrigger: import("../field").FieldClearTrigger;
|
201
220
|
formatTrigger: import("../field").FieldFormatTrigger;
|
202
221
|
error: boolean;
|
package/es/search/index.d.ts
CHANGED
@@ -19,8 +19,14 @@ export declare const Search: import("../utils").WithInstall<import("vue").Define
|
|
19
19
|
inputAlign: import("vue").PropType<import("..").FieldTextAlign>;
|
20
20
|
placeholder: StringConstructor;
|
21
21
|
autocomplete: StringConstructor;
|
22
|
+
autocapitalize: StringConstructor;
|
23
|
+
autocorrect: StringConstructor;
|
22
24
|
errorMessage: StringConstructor;
|
23
25
|
enterkeyhint: StringConstructor;
|
26
|
+
spellcheck: {
|
27
|
+
type: BooleanConstructor;
|
28
|
+
default: null;
|
29
|
+
};
|
24
30
|
clearTrigger: {
|
25
31
|
type: import("vue").PropType<import("..").FieldClearTrigger>;
|
26
32
|
default: import("..").FieldClearTrigger;
|
@@ -78,8 +84,14 @@ export declare const Search: import("../utils").WithInstall<import("vue").Define
|
|
78
84
|
inputAlign: import("vue").PropType<import("..").FieldTextAlign>;
|
79
85
|
placeholder: StringConstructor;
|
80
86
|
autocomplete: StringConstructor;
|
87
|
+
autocapitalize: StringConstructor;
|
88
|
+
autocorrect: StringConstructor;
|
81
89
|
errorMessage: StringConstructor;
|
82
90
|
enterkeyhint: StringConstructor;
|
91
|
+
spellcheck: {
|
92
|
+
type: BooleanConstructor;
|
93
|
+
default: null;
|
94
|
+
};
|
83
95
|
clearTrigger: {
|
84
96
|
type: import("vue").PropType<import("..").FieldClearTrigger>;
|
85
97
|
default: import("..").FieldClearTrigger;
|
@@ -135,6 +147,7 @@ export declare const Search: import("../utils").WithInstall<import("vue").Define
|
|
135
147
|
clearable: boolean;
|
136
148
|
clearIcon: string;
|
137
149
|
modelValue: string | number;
|
150
|
+
spellcheck: boolean;
|
138
151
|
clearTrigger: import("..").FieldClearTrigger;
|
139
152
|
formatTrigger: import("..").FieldFormatTrigger;
|
140
153
|
error: boolean;
|
package/es/tab/Tab.mjs
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { withDirectives as _withDirectives, vShow as _vShow, createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
|
2
|
-
import { ref, watch, provide, computed, nextTick, watchEffect,
|
3
|
-
import { stringifyStyle } from "@vue/shared";
|
2
|
+
import { ref, watch, provide, computed, nextTick, watchEffect, defineComponent, getCurrentInstance } from "vue";
|
3
|
+
import { normalizeClass, normalizeStyle, stringifyStyle } from "@vue/shared";
|
4
4
|
import { pick, extend, truthProp, unknownProp, numericProp, createNamespace } from "../utils/index.mjs";
|
5
5
|
import { TABS_KEY } from "../tabs/Tabs.mjs";
|
6
6
|
import { doubleRaf, useParent } from "@vant/use";
|
@@ -20,6 +20,10 @@ export declare const textEllipsisProps: {
|
|
20
20
|
type: import("vue").PropType<string>;
|
21
21
|
default: string;
|
22
22
|
};
|
23
|
+
position: {
|
24
|
+
type: import("vue").PropType<string>;
|
25
|
+
default: string;
|
26
|
+
};
|
23
27
|
};
|
24
28
|
export type TextEllipsisProps = ExtractPropTypes<typeof textEllipsisProps>;
|
25
29
|
declare const _default: import("vue").DefineComponent<{
|
@@ -43,6 +47,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
43
47
|
type: import("vue").PropType<string>;
|
44
48
|
default: string;
|
45
49
|
};
|
50
|
+
position: {
|
51
|
+
type: import("vue").PropType<string>;
|
52
|
+
default: string;
|
53
|
+
};
|
46
54
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "clickAction"[], "clickAction", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
47
55
|
rows: {
|
48
56
|
type: (NumberConstructor | StringConstructor)[];
|
@@ -64,10 +72,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
64
72
|
type: import("vue").PropType<string>;
|
65
73
|
default: string;
|
66
74
|
};
|
75
|
+
position: {
|
76
|
+
type: import("vue").PropType<string>;
|
77
|
+
default: string;
|
78
|
+
};
|
67
79
|
}>> & {
|
68
80
|
onClickAction?: ((...args: any[]) => any) | undefined;
|
69
81
|
}, {
|
70
82
|
content: string;
|
83
|
+
position: string;
|
71
84
|
rows: string | number;
|
72
85
|
dots: string;
|
73
86
|
expandText: string;
|