@squirrel-cloud/ui-vue 0.2.33 → 0.2.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/button/button.d.ts +2 -1
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/form/form-item.d.ts +18 -0
- package/dist/components/form/form.d.ts +41 -0
- package/dist/components/form/index.d.ts +3 -0
- package/dist/components/form/injection-keys.d.ts +10 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/input/input.d.ts +9 -1
- package/dist/components/message/message.d.ts +5 -2
- package/dist/components/pagination/pagination-next.d.ts +11 -0
- package/dist/components/pagination/pagination-pager.d.ts +11 -0
- package/dist/components/pagination/pagination-prev.d.ts +11 -0
- package/dist/components/textarea/textarea.d.ts +8 -0
- package/dist/props/button/button-group.d.ts +1 -1
- package/dist/props/button/button.d.ts +4 -0
- package/dist/props/form/form-item.d.ts +29 -0
- package/dist/props/form/form.d.ts +46 -0
- package/dist/props/form/index.d.ts +2 -0
- package/dist/props/index.d.ts +1 -1
- package/dist/props/pagination/index.d.ts +2 -0
- package/dist/props/pagination/pagination-btn.d.ts +14 -0
- package/dist/props/pagination/pagination-pager.d.ts +18 -0
- package/dist/props/pagination/pagination.d.ts +9 -0
- package/dist/props/textarea/textarea.d.ts +1 -1
- package/dist/squirrel-cloud-ui-vue.js +3104 -2734
- package/dist/squirrel-cloud-ui-vue.umd.cjs +31 -31
- package/dist/style.css +1 -1
- package/package.json +6 -6
- package/typings/ComponentType.d.ts +4 -1
- package/typings/Form.d.ts +146 -0
- package/typings/Message.d.ts +51 -11
- package/typings/PaginationLayout.d.ts +4 -0
- package/typings/TagTheme.d.ts +4 -1
- package/typings/TriggerType.d.ts +4 -0
- package/typings/{ButtonGroupContext.d.ts → contexts/ButtonGroupContext.d.ts} +6 -1
- package/typings/contexts/FormContext.d.ts +31 -0
- package/typings/contexts/index.d.ts +2 -0
- package/typings/index.d.ts +9 -3
- package/typings/utils/Arrayable.d.ts +4 -0
- package/typings/utils/Promiseable.d.ts +4 -0
- package/typings/utils/index.d.ts +2 -0
- package/dist/props/message/index.d.ts +0 -1
- package/dist/props/message/message.d.ts +0 -34
- package/typings/ComponentTypeBase.d.ts +0 -4
- package/typings/TagThemeBase.d.ts +0 -4
|
@@ -13,7 +13,8 @@ declare const __VLS_component: import('vue').DefineComponent<ButtonProps, {}, {}
|
|
|
13
13
|
}, string, import('vue').PublicProps, Readonly<ButtonProps> & Readonly<{
|
|
14
14
|
onClick?: ((e: MouseEvent) => any) | undefined;
|
|
15
15
|
}>, {
|
|
16
|
-
|
|
16
|
+
round: boolean;
|
|
17
|
+
disabled: boolean;
|
|
17
18
|
nativeType: import('../..').ButtonType;
|
|
18
19
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
|
|
19
20
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FormItemProps } from '../../props';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: {
|
|
5
|
+
default?(_: {}): any;
|
|
6
|
+
};
|
|
7
|
+
refs: {};
|
|
8
|
+
rootEl: HTMLDivElement;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
|
+
declare const __VLS_component: import('vue').DefineComponent<FormItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FormItemProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
12
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { FormProps } from '../../props';
|
|
2
|
+
type __VLS_Props = FormProps;
|
|
3
|
+
/**
|
|
4
|
+
* 重置表单并清除验证结果
|
|
5
|
+
*/
|
|
6
|
+
declare function resetFields(): void;
|
|
7
|
+
/**
|
|
8
|
+
* 验证表单
|
|
9
|
+
* @param all 是否验证整个表单
|
|
10
|
+
*/
|
|
11
|
+
declare function validate(all?: boolean): Promise<(boolean | undefined)[]>;
|
|
12
|
+
type __VLS_PublicProps = {
|
|
13
|
+
'form-data': Record<string, unknown>;
|
|
14
|
+
} & __VLS_Props;
|
|
15
|
+
declare function __VLS_template(): {
|
|
16
|
+
attrs: Partial<{}>;
|
|
17
|
+
slots: Partial<Record<string, (_: {}) => any>>;
|
|
18
|
+
refs: {};
|
|
19
|
+
rootEl: HTMLFormElement;
|
|
20
|
+
};
|
|
21
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
22
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
23
|
+
resetFields: typeof resetFields;
|
|
24
|
+
validate: typeof validate;
|
|
25
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
26
|
+
validate: (key: string, status: boolean, list: string[]) => any;
|
|
27
|
+
"update:form-data": (value: Record<string, unknown>) => any;
|
|
28
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
29
|
+
onValidate?: ((key: string, status: boolean, list: string[]) => any) | undefined;
|
|
30
|
+
"onUpdate:form-data"?: ((value: Record<string, unknown>) => any) | undefined;
|
|
31
|
+
}>, {
|
|
32
|
+
size: import('../../../typings').ComponentSize;
|
|
33
|
+
showMessage: boolean;
|
|
34
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLFormElement>;
|
|
35
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
36
|
+
export default _default;
|
|
37
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
38
|
+
new (): {
|
|
39
|
+
$slots: S;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Ref, InjectionKey } from 'vue';
|
|
2
|
+
import { FormContext } from '../../../typings';
|
|
3
|
+
/**
|
|
4
|
+
* 表单注入键
|
|
5
|
+
*/
|
|
6
|
+
export declare const FormContextKeys: InjectionKey<Ref<FormContext>>;
|
|
7
|
+
/**
|
|
8
|
+
* 表单项ID注入键
|
|
9
|
+
*/
|
|
10
|
+
export declare const FormItemIdKeys: InjectionKey<Ref<string>>;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { InputProps } from '../../props';
|
|
2
2
|
type __VLS_Props = InputProps;
|
|
3
|
+
/**
|
|
4
|
+
* 使输入框聚焦
|
|
5
|
+
*/
|
|
3
6
|
declare function focus(): void;
|
|
7
|
+
/**
|
|
8
|
+
* 使输入框失焦
|
|
9
|
+
*/
|
|
4
10
|
declare function blur(): void;
|
|
5
11
|
type __VLS_PublicProps = {
|
|
6
12
|
'value'?: string;
|
|
@@ -34,7 +40,9 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
34
40
|
"onUpdate:value"?: ((value: string) => any) | undefined;
|
|
35
41
|
}>, {
|
|
36
42
|
type: import('../..').InputType;
|
|
37
|
-
|
|
43
|
+
round: boolean;
|
|
44
|
+
disabled: boolean;
|
|
45
|
+
readonly: boolean;
|
|
38
46
|
autocomplete: string;
|
|
39
47
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
40
48
|
inputRef: HTMLInputElement;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { MessageProps } from '
|
|
1
|
+
import { MessageProps } from '../../../typings';
|
|
2
|
+
/**
|
|
3
|
+
* 关闭消息提示
|
|
4
|
+
*/
|
|
2
5
|
declare function close(): void;
|
|
3
6
|
declare const _default: import('vue').DefineComponent<MessageProps, {
|
|
4
7
|
close: typeof close;
|
|
5
8
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<MessageProps> & Readonly<{}>, {
|
|
6
|
-
type: import('
|
|
9
|
+
type: import('../../../typings').ComponentType;
|
|
7
10
|
closeAfter: number;
|
|
8
11
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
12
|
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PaginationBtnProps } from '../../props';
|
|
2
|
+
type __VLS_Props = PaginationBtnProps;
|
|
3
|
+
type __VLS_PublicProps = {
|
|
4
|
+
'current': number;
|
|
5
|
+
} & __VLS_Props;
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
"update:current": (value: number) => any;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
9
|
+
"onUpdate:current"?: ((value: number) => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PaginationPagerProps } from '../../props';
|
|
2
|
+
type __VLS_Props = PaginationPagerProps;
|
|
3
|
+
type __VLS_PublicProps = {
|
|
4
|
+
'current': number;
|
|
5
|
+
} & __VLS_Props;
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
"update:current": (value: number) => any;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
9
|
+
"onUpdate:current"?: ((value: number) => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PaginationBtnProps } from '../../props';
|
|
2
|
+
type __VLS_Props = PaginationBtnProps;
|
|
3
|
+
type __VLS_PublicProps = {
|
|
4
|
+
'current': number;
|
|
5
|
+
} & __VLS_Props;
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
"update:current": (value: number) => any;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
9
|
+
"onUpdate:current"?: ((value: number) => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
|
|
11
|
+
export default _default;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { TextareaProps } from '../../props';
|
|
2
2
|
type __VLS_Props = TextareaProps;
|
|
3
|
+
/**
|
|
4
|
+
* 使文本域聚焦
|
|
5
|
+
*/
|
|
3
6
|
declare function focus(): void;
|
|
7
|
+
/**
|
|
8
|
+
* 使文本域失焦
|
|
9
|
+
*/
|
|
4
10
|
declare function blur(): void;
|
|
5
11
|
type __VLS_PublicProps = {
|
|
6
12
|
'value'?: string;
|
|
@@ -21,6 +27,8 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
|
21
27
|
onFocus?: ((e: FocusEvent) => any) | undefined;
|
|
22
28
|
"onUpdate:value"?: ((value: string) => any) | undefined;
|
|
23
29
|
}>, {
|
|
30
|
+
disabled: boolean;
|
|
31
|
+
readonly: boolean;
|
|
24
32
|
autocomplete: string;
|
|
25
33
|
resize: import('../..').TextareaResizeType;
|
|
26
34
|
rows: number | string;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 表单项属性
|
|
3
|
+
*/
|
|
4
|
+
export interface FormItemProps {
|
|
5
|
+
/**
|
|
6
|
+
* 标签
|
|
7
|
+
*/
|
|
8
|
+
label?: string;
|
|
9
|
+
/**
|
|
10
|
+
* 标签宽度
|
|
11
|
+
*/
|
|
12
|
+
labelWidth?: string;
|
|
13
|
+
/**
|
|
14
|
+
* 是否必填项
|
|
15
|
+
*/
|
|
16
|
+
isRequired?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* 无标签时是否显示标签
|
|
19
|
+
*/
|
|
20
|
+
showLabel?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* 类型
|
|
23
|
+
*/
|
|
24
|
+
type: string;
|
|
25
|
+
/**
|
|
26
|
+
* 错误信息
|
|
27
|
+
*/
|
|
28
|
+
errorMsg?: string;
|
|
29
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ComponentSize, FormConfig } from '../../../typings';
|
|
2
|
+
/**
|
|
3
|
+
* 表单属性
|
|
4
|
+
*/
|
|
5
|
+
export interface FormProps {
|
|
6
|
+
/**
|
|
7
|
+
* 是否圆角组件
|
|
8
|
+
*/
|
|
9
|
+
round?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* 是否显示状态图标
|
|
12
|
+
*/
|
|
13
|
+
showStatusIcon?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* 是否禁用
|
|
16
|
+
*/
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* 是否只读
|
|
20
|
+
*/
|
|
21
|
+
readonly?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* 标签宽度
|
|
24
|
+
*/
|
|
25
|
+
labelWidth?: string;
|
|
26
|
+
/**
|
|
27
|
+
* 组件大小
|
|
28
|
+
*/
|
|
29
|
+
size?: ComponentSize;
|
|
30
|
+
/**
|
|
31
|
+
* 使用分步表单
|
|
32
|
+
*/
|
|
33
|
+
step?: number;
|
|
34
|
+
/**
|
|
35
|
+
* 是否展示错误信息
|
|
36
|
+
*/
|
|
37
|
+
showMessage?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* 是否隐藏必填项星号标记
|
|
40
|
+
*/
|
|
41
|
+
hideRequiredAsterisk?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* 表单项配置
|
|
44
|
+
*/
|
|
45
|
+
config: FormConfig[];
|
|
46
|
+
}
|
package/dist/props/index.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ export * from './avatar';
|
|
|
3
3
|
export * from './backtop';
|
|
4
4
|
export * from './button';
|
|
5
5
|
export * from './card';
|
|
6
|
+
export * from './form';
|
|
6
7
|
export * from './input';
|
|
7
|
-
export * from './message';
|
|
8
8
|
export * from './pagination';
|
|
9
9
|
export * from './popover';
|
|
10
10
|
export * from './progress';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ComponentSize } from '../../../typings';
|
|
2
|
+
/**
|
|
3
|
+
* 分页器页数选择器属性
|
|
4
|
+
*/
|
|
5
|
+
export interface PaginationPagerProps {
|
|
6
|
+
/**
|
|
7
|
+
* 是否禁用
|
|
8
|
+
*/
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* 按钮大小
|
|
12
|
+
*/
|
|
13
|
+
size?: ComponentSize;
|
|
14
|
+
/**
|
|
15
|
+
* 按钮组
|
|
16
|
+
*/
|
|
17
|
+
list: number[];
|
|
18
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ComponentSize, PaginationLayout } from '../../../typings';
|
|
1
2
|
/**
|
|
2
3
|
* 分页器属性
|
|
3
4
|
*/
|
|
@@ -10,6 +11,14 @@ export interface PaginationProps {
|
|
|
10
11
|
* 是否禁用
|
|
11
12
|
*/
|
|
12
13
|
disabled?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* 分页器大小
|
|
16
|
+
*/
|
|
17
|
+
size?: ComponentSize;
|
|
18
|
+
/**
|
|
19
|
+
* 分页器布局
|
|
20
|
+
*/
|
|
21
|
+
layout?: PaginationLayout[];
|
|
13
22
|
/**
|
|
14
23
|
* 最大按钮数量
|
|
15
24
|
*/
|