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
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.3";
|
228
228
|
function install(app) {
|
229
229
|
const components = [
|
230
230
|
import_action_bar.ActionBar,
|
package/lib/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/lib/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/lib/radio/Radio.js
CHANGED
@@ -37,11 +37,13 @@ var import_utils = require("../utils");
|
|
37
37
|
var import_RadioGroup = require("../radio-group/RadioGroup");
|
38
38
|
var import_use = require("@vant/use");
|
39
39
|
var import_Checker = __toESM(require("../checkbox/Checker"));
|
40
|
-
const radioProps = import_Checker.checkerProps
|
40
|
+
const radioProps = (0, import_utils.extend)({}, import_Checker.checkerProps, {
|
41
|
+
shape: String
|
42
|
+
});
|
41
43
|
const [name, bem] = (0, import_utils.createNamespace)("radio");
|
42
44
|
var stdin_default = (0, import_vue2.defineComponent)({
|
43
45
|
name,
|
44
|
-
props:
|
46
|
+
props: radioProps,
|
45
47
|
emits: ["update:modelValue"],
|
46
48
|
setup(props, {
|
47
49
|
emit,
|
package/lib/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/lib/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/lib/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>;
|
@@ -28,6 +28,7 @@ var import_utils = require("../utils");
|
|
28
28
|
var import_use = require("@vant/use");
|
29
29
|
const [name, bem] = (0, import_utils.createNamespace)("radio-group");
|
30
30
|
const radioGroupProps = {
|
31
|
+
shape: String,
|
31
32
|
disabled: Boolean,
|
32
33
|
iconSize: import_utils.numericProp,
|
33
34
|
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/lib/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/lib/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/lib/tab/Tab.js
CHANGED
@@ -89,8 +89,8 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
89
89
|
titleClass,
|
90
90
|
titleStyle
|
91
91
|
} = props;
|
92
|
-
parsedClass.value = titleClass ? (0,
|
93
|
-
parsedStyle.value = titleStyle && typeof titleStyle !== "string" ? (0, import_shared.stringifyStyle)((0,
|
92
|
+
parsedClass.value = titleClass ? (0, import_shared.normalizeClass)(titleClass) : "";
|
93
|
+
parsedStyle.value = titleStyle && typeof titleStyle !== "string" ? (0, import_shared.stringifyStyle)((0, import_shared.normalizeStyle)(titleStyle)) : titleStyle;
|
94
94
|
});
|
95
95
|
const renderTitle = (onClickTab) => (0, import_vue.createVNode)(import_TabTitle.TabTitle, (0, import_vue.mergeProps)({
|
96
96
|
"key": id,
|
@@ -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;
|
@@ -31,7 +31,8 @@ const textEllipsisProps = {
|
|
31
31
|
dots: (0, import_utils.makeStringProp)("..."),
|
32
32
|
content: (0, import_utils.makeStringProp)(""),
|
33
33
|
expandText: (0, import_utils.makeStringProp)(""),
|
34
|
-
collapseText: (0, import_utils.makeStringProp)("")
|
34
|
+
collapseText: (0, import_utils.makeStringProp)(""),
|
35
|
+
position: (0, import_utils.makeStringProp)("end")
|
35
36
|
};
|
36
37
|
var stdin_default = (0, import_vue2.defineComponent)({
|
37
38
|
name,
|
@@ -44,6 +45,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
44
45
|
const expanded = (0, import_vue2.ref)(false);
|
45
46
|
const hasAction = (0, import_vue2.ref)(false);
|
46
47
|
const root = (0, import_vue2.ref)();
|
48
|
+
const actionText = (0, import_vue2.computed)(() => expanded.value ? props.expandText : props.collapseText);
|
47
49
|
const pxToNum = (value) => {
|
48
50
|
if (!value)
|
49
51
|
return 0;
|
@@ -72,24 +74,53 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
72
74
|
};
|
73
75
|
const calcEllipsisText = (container2, maxHeight2) => {
|
74
76
|
const {
|
75
|
-
dots,
|
76
77
|
content,
|
77
|
-
|
78
|
+
position,
|
79
|
+
dots
|
78
80
|
} = props;
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
81
|
+
const end = content.length;
|
82
|
+
const calcEllipse = () => {
|
83
|
+
const tail = (left, right) => {
|
84
|
+
if (right - left <= 1) {
|
85
|
+
if (position === "end") {
|
86
|
+
return content.slice(0, left) + dots;
|
87
|
+
}
|
88
|
+
return dots + content.slice(right, end);
|
89
|
+
}
|
90
|
+
const middle2 = Math.round(left + right >> 1);
|
91
|
+
if (position === "end") {
|
92
|
+
container2.innerText = content.slice(0, middle2) + dots + actionText.value;
|
93
|
+
} else {
|
94
|
+
container2.innerText = dots + content.slice(middle2, end) + actionText.value;
|
95
|
+
}
|
96
|
+
if (container2.offsetHeight > maxHeight2) {
|
97
|
+
if (position === "end") {
|
98
|
+
return tail(left, middle2);
|
99
|
+
}
|
100
|
+
return tail(middle2, right);
|
101
|
+
}
|
102
|
+
if (position === "end") {
|
103
|
+
return tail(middle2, right);
|
104
|
+
}
|
105
|
+
return tail(left, middle2);
|
106
|
+
};
|
107
|
+
container2.innerText = tail(0, end);
|
108
|
+
};
|
109
|
+
const middleTail = (leftPart, rightPart) => {
|
110
|
+
if (leftPart[1] - leftPart[0] <= 1 && rightPart[1] - rightPart[0] <= 1) {
|
111
|
+
return content.slice(0, leftPart[1]) + dots + dots + content.slice(rightPart[1], end);
|
90
112
|
}
|
91
|
-
|
92
|
-
|
113
|
+
const leftMiddle = Math.floor(leftPart[0] + leftPart[1] >> 1);
|
114
|
+
const rightMiddle = Math.ceil(rightPart[0] + rightPart[1] >> 1);
|
115
|
+
container2.innerText = props.content.slice(0, leftMiddle) + props.dots + actionText.value + props.dots + props.content.slice(rightMiddle, end);
|
116
|
+
if (container2.offsetHeight >= maxHeight2) {
|
117
|
+
return middleTail([leftPart[0], leftMiddle], [rightMiddle, rightPart[1]]);
|
118
|
+
}
|
119
|
+
return middleTail([leftMiddle, leftPart[1]], [rightPart[0], rightMiddle]);
|
120
|
+
};
|
121
|
+
const middle = 0 + end >> 1;
|
122
|
+
props.position === "middle" ? container2.innerText = middleTail([0, middle], [middle, end]) : calcEllipse();
|
123
|
+
return container2.innerText;
|
93
124
|
};
|
94
125
|
const container = cloneContainer();
|
95
126
|
if (!container)
|
@@ -99,7 +130,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
99
130
|
paddingTop,
|
100
131
|
lineHeight
|
101
132
|
} = container.style;
|
102
|
-
const maxHeight = (Number(props.rows) + 0.5) * pxToNum(lineHeight) + pxToNum(paddingTop) + pxToNum(paddingBottom);
|
133
|
+
const maxHeight = Math.ceil((Number(props.rows) + 0.5) * pxToNum(lineHeight) + pxToNum(paddingTop) + pxToNum(paddingBottom));
|
103
134
|
if (maxHeight < container.offsetHeight) {
|
104
135
|
hasAction.value = true;
|
105
136
|
text.value = calcEllipsisText(container, maxHeight);
|
@@ -118,7 +149,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
118
149
|
"onClick": onClickAction
|
119
150
|
}, [expanded.value ? props.collapseText : props.expandText]);
|
120
151
|
(0, import_vue2.onMounted)(calcEllipsised);
|
121
|
-
(0, import_vue2.watch)(() => [props.content, props.rows], calcEllipsised);
|
152
|
+
(0, import_vue2.watch)(() => [props.content, props.rows, props.position], calcEllipsised);
|
122
153
|
(0, import_use.useEventListener)("resize", calcEllipsised);
|
123
154
|
return () => (0, import_vue.createVNode)("div", {
|
124
155
|
"ref": root,
|
@@ -19,6 +19,10 @@ export declare const TextEllipsis: import("../utils").WithInstall<import("vue").
|
|
19
19
|
type: import("vue").PropType<string>;
|
20
20
|
default: string;
|
21
21
|
};
|
22
|
+
position: {
|
23
|
+
type: import("vue").PropType<string>;
|
24
|
+
default: string;
|
25
|
+
};
|
22
26
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "clickAction"[], "clickAction", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
23
27
|
rows: {
|
24
28
|
type: (NumberConstructor | StringConstructor)[];
|
@@ -40,10 +44,15 @@ export declare const TextEllipsis: import("../utils").WithInstall<import("vue").
|
|
40
44
|
type: import("vue").PropType<string>;
|
41
45
|
default: string;
|
42
46
|
};
|
47
|
+
position: {
|
48
|
+
type: import("vue").PropType<string>;
|
49
|
+
default: string;
|
50
|
+
};
|
43
51
|
}>> & {
|
44
52
|
onClickAction?: ((...args: any[]) => any) | undefined;
|
45
53
|
}, {
|
46
54
|
content: string;
|
55
|
+
position: string;
|
47
56
|
rows: string | number;
|
48
57
|
dots: string;
|
49
58
|
expandText: string;
|
package/lib/utils/basic.d.ts
CHANGED
@@ -9,6 +9,14 @@ export declare const extend: {
|
|
9
9
|
export declare const inBrowser: boolean;
|
10
10
|
export type Numeric = number | string;
|
11
11
|
export type ComponentInstance = ComponentPublicInstance<{}, any>;
|
12
|
+
export declare const isObject: (val: unknown) => val is Record<any, any>;
|
13
|
+
export declare const isDef: <T>(val: T) => val is NonNullable<T>;
|
14
|
+
export declare const isFunction: (val: unknown) => val is Function;
|
15
|
+
export declare const isPromise: <T = any>(val: unknown) => val is Promise<T>;
|
16
|
+
export declare const isDate: (val: unknown) => val is Date;
|
17
|
+
export declare function isMobile(value: string): boolean;
|
18
|
+
export declare const isNumeric: (val: Numeric) => val is string;
|
19
|
+
export declare const isIOS: () => boolean;
|
12
20
|
export declare function get(object: any, path: string): any;
|
13
21
|
export type Writeable<T> = {
|
14
22
|
-readonly [P in keyof T]: T[P];
|
package/lib/utils/basic.js
CHANGED
@@ -20,33 +20,54 @@ __export(stdin_exports, {
|
|
20
20
|
extend: () => extend,
|
21
21
|
get: () => get,
|
22
22
|
inBrowser: () => inBrowser,
|
23
|
+
isDate: () => isDate,
|
24
|
+
isDef: () => isDef,
|
25
|
+
isFunction: () => isFunction,
|
26
|
+
isIOS: () => isIOS,
|
27
|
+
isMobile: () => isMobile,
|
28
|
+
isNumeric: () => isNumeric,
|
29
|
+
isObject: () => isObject,
|
30
|
+
isPromise: () => isPromise,
|
23
31
|
isSameValue: () => isSameValue,
|
24
32
|
noop: () => noop,
|
25
33
|
pick: () => pick,
|
26
34
|
toArray: () => toArray
|
27
35
|
});
|
28
36
|
module.exports = __toCommonJS(stdin_exports);
|
29
|
-
var import_validate = require("./validate");
|
30
37
|
function noop() {
|
31
38
|
}
|
32
39
|
const extend = Object.assign;
|
33
40
|
const inBrowser = typeof window !== "undefined";
|
41
|
+
const isObject = (val) => val !== null && typeof val === "object";
|
42
|
+
const isDef = (val) => val !== void 0 && val !== null;
|
43
|
+
const isFunction = (val) => typeof val === "function";
|
44
|
+
const isPromise = (val) => isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
45
|
+
const isDate = (val) => Object.prototype.toString.call(val) === "[object Date]" && !Number.isNaN(val.getTime());
|
46
|
+
function isMobile(value) {
|
47
|
+
value = value.replace(/[^-|\d]/g, "");
|
48
|
+
return /^((\+86)|(86))?(1)\d{10}$/.test(value) || /^0[0-9-]{10,13}$/.test(value);
|
49
|
+
}
|
50
|
+
const isNumeric = (val) => typeof val === "number" || /^\d+(\.\d+)?$/.test(val);
|
51
|
+
const isIOS = () => inBrowser ? /ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()) : false;
|
34
52
|
function get(object, path) {
|
35
53
|
const keys = path.split(".");
|
36
54
|
let result = object;
|
37
55
|
keys.forEach((key) => {
|
38
56
|
var _a;
|
39
|
-
result =
|
57
|
+
result = isObject(result) ? (_a = result[key]) != null ? _a : "" : "";
|
40
58
|
});
|
41
59
|
return result;
|
42
60
|
}
|
43
61
|
function pick(obj, keys, ignoreUndefined) {
|
44
|
-
return keys.reduce(
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
62
|
+
return keys.reduce(
|
63
|
+
(ret, key) => {
|
64
|
+
if (!ignoreUndefined || obj[key] !== void 0) {
|
65
|
+
ret[key] = obj[key];
|
66
|
+
}
|
67
|
+
return ret;
|
68
|
+
},
|
69
|
+
{}
|
70
|
+
);
|
50
71
|
}
|
51
72
|
const isSameValue = (newValue, oldValue) => JSON.stringify(newValue) === JSON.stringify(oldValue);
|
52
73
|
const toArray = (item) => Array.isArray(item) ? item : [item];
|
package/lib/utils/create.js
CHANGED
@@ -34,14 +34,13 @@ __export(stdin_exports, {
|
|
34
34
|
module.exports = __toCommonJS(stdin_exports);
|
35
35
|
var import_basic = require("./basic");
|
36
36
|
var import_format = require("./format");
|
37
|
-
var import_validate = require("./validate");
|
38
37
|
var import_locale = __toESM(require("../locale"));
|
39
38
|
function createTranslate(name) {
|
40
39
|
const prefix = (0, import_format.camelize)(name) + ".";
|
41
40
|
return (path, ...args) => {
|
42
41
|
const messages = import_locale.default.messages();
|
43
42
|
const message = (0, import_basic.get)(messages, prefix + path) || (0, import_basic.get)(messages, path);
|
44
|
-
return (0,
|
43
|
+
return (0, import_basic.isFunction)(message) ? message(...args) : message;
|
45
44
|
};
|
46
45
|
}
|
47
46
|
function genBem(name, mods) {
|
package/lib/utils/deep-assign.js
CHANGED
@@ -20,14 +20,14 @@ __export(stdin_exports, {
|
|
20
20
|
deepAssign: () => deepAssign
|
21
21
|
});
|
22
22
|
module.exports = __toCommonJS(stdin_exports);
|
23
|
-
var
|
23
|
+
var import_basic = require("./basic");
|
24
24
|
const { hasOwnProperty } = Object.prototype;
|
25
25
|
function assignKey(to, from, key) {
|
26
26
|
const val = from[key];
|
27
|
-
if (!(0,
|
27
|
+
if (!(0, import_basic.isDef)(val)) {
|
28
28
|
return;
|
29
29
|
}
|
30
|
-
if (!hasOwnProperty.call(to, key) || !(0,
|
30
|
+
if (!hasOwnProperty.call(to, key) || !(0, import_basic.isObject)(val)) {
|
31
31
|
to[key] = val;
|
32
32
|
} else {
|
33
33
|
to[key] = deepAssign(Object(to[key]), val);
|
package/lib/utils/deep-clone.js
CHANGED
@@ -20,15 +20,15 @@ __export(stdin_exports, {
|
|
20
20
|
deepClone: () => deepClone
|
21
21
|
});
|
22
22
|
module.exports = __toCommonJS(stdin_exports);
|
23
|
-
var
|
23
|
+
var import_basic = require("./basic");
|
24
24
|
function deepClone(obj) {
|
25
|
-
if (!(0,
|
25
|
+
if (!(0, import_basic.isDef)(obj)) {
|
26
26
|
return obj;
|
27
27
|
}
|
28
28
|
if (Array.isArray(obj)) {
|
29
29
|
return obj.map((item) => deepClone(item));
|
30
30
|
}
|
31
|
-
if ((0,
|
31
|
+
if ((0, import_basic.isObject)(obj)) {
|
32
32
|
const to = {};
|
33
33
|
Object.keys(obj).forEach((key) => {
|
34
34
|
to[key] = deepClone(obj[key]);
|