roui-element 1.0.0
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 +181 -0
- package/dist/es/favicon.ico +0 -0
- package/dist/es/r-element.js +1755 -0
- package/dist/style.css +1 -0
- package/dist/types/components/Button/Button.vue.d.ts +26 -0
- package/dist/types/components/Button/index.d.ts +3 -0
- package/dist/types/components/Button/types.d.ts +18 -0
- package/dist/types/components/Collapse/Collapse.vue.d.ts +24 -0
- package/dist/types/components/Collapse/CollapseItem.vue.d.ts +19 -0
- package/dist/types/components/Collapse/index.d.ts +5 -0
- package/dist/types/components/Collapse/types.d.ts +20 -0
- package/dist/types/components/Common/RenderVnode.d.ts +12 -0
- package/dist/types/components/Dropdown/Dropdown.d.ts +86 -0
- package/dist/types/components/Dropdown/Dropdown.vue.d.ts +191 -0
- package/dist/types/components/Dropdown/index.d.ts +3 -0
- package/dist/types/components/Dropdown/types.d.ts +20 -0
- package/dist/types/components/Form/Form.vue.d.ts +22 -0
- package/dist/types/components/Form/FormItem.vue.d.ts +28 -0
- package/dist/types/components/Form/index copy.d.ts +5 -0
- package/dist/types/components/Form/index.d.ts +5 -0
- package/dist/types/components/Form/types.d.ts +46 -0
- package/dist/types/components/Icon/Icon.vue.d.ts +3 -0
- package/dist/types/components/Icon/index.d.ts +3 -0
- package/dist/types/components/Icon/types.d.ts +32 -0
- package/dist/types/components/Input/Input.vue.d.ts +45 -0
- package/dist/types/components/Input/index.d.ts +3 -0
- package/dist/types/components/Input/types.d.ts +24 -0
- package/dist/types/components/Message/Message.vue.d.ts +30 -0
- package/dist/types/components/Message/index.d.ts +5 -0
- package/dist/types/components/Message/method.d.ts +23 -0
- package/dist/types/components/Message/types.d.ts +20 -0
- package/dist/types/components/Select/Select.vue.d.ts +191 -0
- package/dist/types/components/Select/index.d.ts +3 -0
- package/dist/types/components/Select/types.d.ts +20 -0
- package/dist/types/components/Switch/Switch.vue.d.ts +14 -0
- package/dist/types/components/Switch/index.d.ts +3 -0
- package/dist/types/components/Switch/types.d.ts +16 -0
- package/dist/types/components/Tooltip/Tooltip.vue.d.ts +38 -0
- package/dist/types/components/Tooltip/index.d.ts +3 -0
- package/dist/types/components/Tooltip/types.d.ts +16 -0
- package/dist/types/hooks/useClickOutSide.d.ts +3 -0
- package/dist/types/hooks/useEventListener.d.ts +2 -0
- package/dist/types/hooks/useZIndex.d.ts +6 -0
- package/dist/types/index.d.ts +17 -0
- package/dist/umd/favicon.ico +0 -0
- package/dist/umd/r-element.umd.cjs +577 -0
- package/dist/umd/style.css +1 -0
- package/package.json +108 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { InjectionKey } from 'vue';
|
|
2
|
+
import { RuleItem, ValidateError, ValidateFieldsError } from 'async-validator';
|
|
3
|
+
export interface FormItemProps {
|
|
4
|
+
label?: string;
|
|
5
|
+
prop?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface FormItemRule extends RuleItem {
|
|
8
|
+
trigger?: string;
|
|
9
|
+
}
|
|
10
|
+
export type FormRules = Record<string, FormItemRule[]>;
|
|
11
|
+
export interface FormProps {
|
|
12
|
+
model: Record<string, any>;
|
|
13
|
+
rules: FormRules;
|
|
14
|
+
}
|
|
15
|
+
export interface FormContext extends FormProps {
|
|
16
|
+
addField: (field: FormItemContext) => void;
|
|
17
|
+
removeField: (field: FormItemContext) => void;
|
|
18
|
+
}
|
|
19
|
+
export interface ValidateStatusProp {
|
|
20
|
+
state: 'init' | 'success' | 'error';
|
|
21
|
+
errorMsg: string;
|
|
22
|
+
loading: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface FormItemContext {
|
|
25
|
+
prop: string;
|
|
26
|
+
validate: (trigger?: string) => Promise<any>;
|
|
27
|
+
resetField(): void;
|
|
28
|
+
clearValidate(): void;
|
|
29
|
+
}
|
|
30
|
+
export interface FormValidateFailure {
|
|
31
|
+
errors: ValidateError[] | null;
|
|
32
|
+
fields: ValidateFieldsError;
|
|
33
|
+
}
|
|
34
|
+
export interface FormInstance {
|
|
35
|
+
validate: () => Promise<any>;
|
|
36
|
+
resetFields: (props?: string[]) => void;
|
|
37
|
+
clearValidate: (props?: string[]) => void;
|
|
38
|
+
}
|
|
39
|
+
export interface FormItemInstance {
|
|
40
|
+
validateStatus: ValidateStatusProp;
|
|
41
|
+
validate: (trigger?: string) => Promise<any>;
|
|
42
|
+
resetField(): void;
|
|
43
|
+
clearValidate(): void;
|
|
44
|
+
}
|
|
45
|
+
export declare const formContextKey: InjectionKey<FormContext>;
|
|
46
|
+
export declare const formItemContextKey: InjectionKey<FormItemContext>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { IconProps } from './types';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<IconProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IconProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
2
|
+
export interface IconProps {
|
|
3
|
+
border?: boolean;
|
|
4
|
+
fixedWidth?: boolean;
|
|
5
|
+
flip?: 'horizontal' | 'vertical' | 'both' | boolean;
|
|
6
|
+
icon: object | Array<string> | string | IconDefinition;
|
|
7
|
+
mask?: object | Array<string> | string;
|
|
8
|
+
maskId?: string;
|
|
9
|
+
listItem?: boolean;
|
|
10
|
+
pull?: 'right' | 'left';
|
|
11
|
+
pulse?: boolean;
|
|
12
|
+
rotation?: 90 | 180 | 270 | '90' | '180' | '270';
|
|
13
|
+
rotateBy?: boolean;
|
|
14
|
+
swapOpacity?: boolean;
|
|
15
|
+
size?: '2xs' | 'xs' | 'sm' | 'lg' | 'xl' | '2xl' | '1x' | '2x' | '3x' | '4x' | '5x' | '6x' | '7x' | '8x' | '9x' | '10x';
|
|
16
|
+
spin?: boolean;
|
|
17
|
+
transform?: object | string;
|
|
18
|
+
symbol?: boolean | string;
|
|
19
|
+
title?: string;
|
|
20
|
+
titleId?: string;
|
|
21
|
+
inverse?: boolean;
|
|
22
|
+
bounce?: boolean;
|
|
23
|
+
shake?: boolean;
|
|
24
|
+
beat?: boolean;
|
|
25
|
+
fade?: boolean;
|
|
26
|
+
beatFade?: boolean;
|
|
27
|
+
spinPulse?: boolean;
|
|
28
|
+
spinReverse?: boolean;
|
|
29
|
+
widthAuto?: boolean;
|
|
30
|
+
type?: 'primary' | 'success' | 'info' | 'warning' | 'danger' | 'link';
|
|
31
|
+
color?: string;
|
|
32
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { InputProps } from './types';
|
|
3
|
+
declare function __VLS_template(): {
|
|
4
|
+
attrs: Partial<{}>;
|
|
5
|
+
slots: {
|
|
6
|
+
prepend?(_: {}): any;
|
|
7
|
+
prefix?(_: {}): any;
|
|
8
|
+
suffix?(_: {}): any;
|
|
9
|
+
append?(_: {}): any;
|
|
10
|
+
};
|
|
11
|
+
refs: {
|
|
12
|
+
inputRef: HTMLTextAreaElement;
|
|
13
|
+
};
|
|
14
|
+
rootEl: any;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
17
|
+
declare const __VLS_component: import('vue').DefineComponent<InputProps, {
|
|
18
|
+
ref: Ref<HTMLInputElement, HTMLInputElement>;
|
|
19
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
20
|
+
input: (value: string) => any;
|
|
21
|
+
clear: () => any;
|
|
22
|
+
"update:modelValue": (value: string) => any;
|
|
23
|
+
change: (value: string) => any;
|
|
24
|
+
blur: (value: FocusEvent) => any;
|
|
25
|
+
focus: (value: FocusEvent) => any;
|
|
26
|
+
}, string, import('vue').PublicProps, Readonly<InputProps> & Readonly<{
|
|
27
|
+
onInput?: (value: string) => any;
|
|
28
|
+
onClear?: () => any;
|
|
29
|
+
"onUpdate:modelValue"?: (value: string) => any;
|
|
30
|
+
onChange?: (value: string) => any;
|
|
31
|
+
onBlur?: (value: FocusEvent) => any;
|
|
32
|
+
onFocus?: (value: FocusEvent) => any;
|
|
33
|
+
}>, {
|
|
34
|
+
type: string;
|
|
35
|
+
autocomplete: string;
|
|
36
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
37
|
+
inputRef: HTMLTextAreaElement;
|
|
38
|
+
}, any>;
|
|
39
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
40
|
+
export default _default;
|
|
41
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
42
|
+
new (): {
|
|
43
|
+
$slots: S;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface InputProps {
|
|
2
|
+
type?: string;
|
|
3
|
+
modelValue: string;
|
|
4
|
+
size?: 'large' | 'small';
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
clearable?: boolean;
|
|
7
|
+
showPassword?: boolean;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
readonly?: boolean;
|
|
10
|
+
autocomplete?: string;
|
|
11
|
+
autofocus?: boolean;
|
|
12
|
+
form?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface InputEmits {
|
|
15
|
+
(e: 'update:modelValue', value: string): void;
|
|
16
|
+
(e: 'input', value: string): void;
|
|
17
|
+
(e: 'change', value: string): void;
|
|
18
|
+
(e: 'focus', value: FocusEvent): void;
|
|
19
|
+
(e: 'blur', value: FocusEvent): void;
|
|
20
|
+
(e: 'clear'): void;
|
|
21
|
+
}
|
|
22
|
+
export interface InputInstance {
|
|
23
|
+
ref: HTMLInputElement | HTMLTextAreaElement;
|
|
24
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { MessageProps } from './types';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: {
|
|
5
|
+
default?(_: {}): any;
|
|
6
|
+
};
|
|
7
|
+
refs: {
|
|
8
|
+
messageRef: HTMLDivElement;
|
|
9
|
+
};
|
|
10
|
+
rootEl: any;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
13
|
+
declare const __VLS_component: import('vue').DefineComponent<MessageProps, {
|
|
14
|
+
bottomOffset: import('vue').ComputedRef<any>;
|
|
15
|
+
visible: import('vue').Ref<boolean, boolean>;
|
|
16
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<MessageProps> & Readonly<{}>, {
|
|
17
|
+
type: "success" | "info" | "warning" | "danger";
|
|
18
|
+
duration: number;
|
|
19
|
+
offset: number;
|
|
20
|
+
transitionName: string;
|
|
21
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
22
|
+
messageRef: HTMLDivElement;
|
|
23
|
+
}, any>;
|
|
24
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
25
|
+
export default _default;
|
|
26
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
27
|
+
new (): {
|
|
28
|
+
$slots: S;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { CreateMessageProps, MessageContext } from './types';
|
|
2
|
+
export declare const createMessage: (props: CreateMessageProps) => {
|
|
3
|
+
id: string;
|
|
4
|
+
vnode: import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
}>;
|
|
7
|
+
vm: import('vue').ComponentInternalInstance;
|
|
8
|
+
props: {
|
|
9
|
+
id: string;
|
|
10
|
+
zIndex: number;
|
|
11
|
+
onDestory: () => void;
|
|
12
|
+
type?: "success" | "info" | "warning" | "danger";
|
|
13
|
+
duration?: number;
|
|
14
|
+
message?: string | import('vue').VNode;
|
|
15
|
+
showClose?: boolean;
|
|
16
|
+
offset?: number;
|
|
17
|
+
transitionName?: string;
|
|
18
|
+
};
|
|
19
|
+
destory: () => void;
|
|
20
|
+
};
|
|
21
|
+
export declare const getLastInstance: () => MessageContext;
|
|
22
|
+
export declare const getLastBottomOffset: (id: string) => any;
|
|
23
|
+
export declare const closeAll: () => void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { VNode, ComponentInternalInstance } from 'vue';
|
|
2
|
+
export interface MessageProps {
|
|
3
|
+
message?: string | VNode;
|
|
4
|
+
duration?: number;
|
|
5
|
+
showClose?: boolean;
|
|
6
|
+
type?: 'success' | 'info' | 'warning' | 'danger';
|
|
7
|
+
onDestory: () => void;
|
|
8
|
+
id: string;
|
|
9
|
+
zIndex: number;
|
|
10
|
+
offset?: number;
|
|
11
|
+
transitionName?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface MessageContext {
|
|
14
|
+
id: string;
|
|
15
|
+
vnode: VNode;
|
|
16
|
+
vm: ComponentInternalInstance;
|
|
17
|
+
props: MessageProps;
|
|
18
|
+
destory: () => void;
|
|
19
|
+
}
|
|
20
|
+
export type CreateMessageProps = Omit<MessageProps, 'onDestory' | 'id' | 'zIndex'>;
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { SelectProps } from './types';
|
|
3
|
+
declare const _default: import('vue').DefineComponent<SelectProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
4
|
+
"update:modelValue": (value: string) => any;
|
|
5
|
+
change: (value: string) => any;
|
|
6
|
+
"visible-change": (value: boolean) => any;
|
|
7
|
+
}, string, import('vue').PublicProps, Readonly<SelectProps> & Readonly<{
|
|
8
|
+
"onUpdate:modelValue"?: (value: string) => any;
|
|
9
|
+
onChange?: (value: string) => any;
|
|
10
|
+
"onVisible-change"?: (value: boolean) => any;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
12
|
+
selectContainerRef: HTMLDivElement;
|
|
13
|
+
tooltipRef: {
|
|
14
|
+
$: import('vue').ComponentInternalInstance;
|
|
15
|
+
$data: {};
|
|
16
|
+
$props: Partial<{
|
|
17
|
+
transition: string;
|
|
18
|
+
trigger: "hover" | "click";
|
|
19
|
+
placement: import('@popperjs/core').Placement;
|
|
20
|
+
}> & Omit<{
|
|
21
|
+
readonly content?: string;
|
|
22
|
+
readonly trigger?: "hover" | "click";
|
|
23
|
+
readonly placement?: import('@popperjs/core').Placement;
|
|
24
|
+
readonly manual?: boolean;
|
|
25
|
+
readonly popperOptions?: Partial<import('@popperjs/core').Options>;
|
|
26
|
+
readonly transition?: string;
|
|
27
|
+
readonly "onVisible-change"?: (value: boolean) => any;
|
|
28
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "transition" | "trigger" | "placement">;
|
|
29
|
+
$attrs: {
|
|
30
|
+
[x: string]: unknown;
|
|
31
|
+
};
|
|
32
|
+
$refs: {
|
|
33
|
+
[x: string]: unknown;
|
|
34
|
+
} & {
|
|
35
|
+
popperContainerNode: HTMLDivElement;
|
|
36
|
+
triggerNode: HTMLDivElement;
|
|
37
|
+
popperNode: HTMLDivElement;
|
|
38
|
+
};
|
|
39
|
+
$slots: Readonly<{
|
|
40
|
+
[name: string]: import('vue').Slot<any>;
|
|
41
|
+
}>;
|
|
42
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
43
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
44
|
+
$host: Element | null;
|
|
45
|
+
$emit: (event: "visible-change", value: boolean) => void;
|
|
46
|
+
$el: HTMLDivElement;
|
|
47
|
+
$options: import('vue').ComponentOptionsBase<Readonly<import('../Tooltip').TooltipProps> & Readonly<{
|
|
48
|
+
"onVisible-change"?: (value: boolean) => any;
|
|
49
|
+
}>, {
|
|
50
|
+
show: () => void;
|
|
51
|
+
hide: () => void;
|
|
52
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
53
|
+
"visible-change": (value: boolean) => any;
|
|
54
|
+
}, string, {
|
|
55
|
+
transition: string;
|
|
56
|
+
trigger: "hover" | "click";
|
|
57
|
+
placement: import('@popperjs/core').Placement;
|
|
58
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
59
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
60
|
+
created?: (() => void) | (() => void)[];
|
|
61
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
62
|
+
mounted?: (() => void) | (() => void)[];
|
|
63
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
64
|
+
updated?: (() => void) | (() => void)[];
|
|
65
|
+
activated?: (() => void) | (() => void)[];
|
|
66
|
+
deactivated?: (() => void) | (() => void)[];
|
|
67
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
68
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
69
|
+
destroyed?: (() => void) | (() => void)[];
|
|
70
|
+
unmounted?: (() => void) | (() => void)[];
|
|
71
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
72
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
73
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
74
|
+
};
|
|
75
|
+
$forceUpdate: () => void;
|
|
76
|
+
$nextTick: typeof import('vue').nextTick;
|
|
77
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
78
|
+
} & Readonly<{
|
|
79
|
+
transition: string;
|
|
80
|
+
trigger: "hover" | "click";
|
|
81
|
+
placement: import('@popperjs/core').Placement;
|
|
82
|
+
}> & Omit<Readonly<import('../Tooltip').TooltipProps> & Readonly<{
|
|
83
|
+
"onVisible-change"?: (value: boolean) => any;
|
|
84
|
+
}>, ("transition" | "trigger" | "placement") | "show" | "hide"> & import('vue').ShallowUnwrapRef<{
|
|
85
|
+
show: () => void;
|
|
86
|
+
hide: () => void;
|
|
87
|
+
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
88
|
+
$slots: {
|
|
89
|
+
default?(_: {}): any;
|
|
90
|
+
content?(_: {}): any;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
inputRef: {
|
|
94
|
+
$: import('vue').ComponentInternalInstance;
|
|
95
|
+
$data: {};
|
|
96
|
+
$props: {
|
|
97
|
+
readonly type?: string;
|
|
98
|
+
readonly modelValue: string;
|
|
99
|
+
readonly size?: "large" | "small";
|
|
100
|
+
readonly disabled?: boolean;
|
|
101
|
+
readonly clearable?: boolean;
|
|
102
|
+
readonly showPassword?: boolean;
|
|
103
|
+
readonly placeholder?: string;
|
|
104
|
+
readonly readonly?: boolean;
|
|
105
|
+
readonly autocomplete?: string;
|
|
106
|
+
readonly autofocus?: boolean;
|
|
107
|
+
readonly form?: string;
|
|
108
|
+
readonly onInput?: (value: string) => any;
|
|
109
|
+
readonly onClear?: () => any;
|
|
110
|
+
readonly "onUpdate:modelValue"?: (value: string) => any;
|
|
111
|
+
readonly onChange?: (value: string) => any;
|
|
112
|
+
readonly onBlur?: (value: FocusEvent) => any;
|
|
113
|
+
readonly onFocus?: (value: FocusEvent) => any;
|
|
114
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
115
|
+
$attrs: {
|
|
116
|
+
[x: string]: unknown;
|
|
117
|
+
};
|
|
118
|
+
$refs: {
|
|
119
|
+
[x: string]: unknown;
|
|
120
|
+
} & {
|
|
121
|
+
inputRef: HTMLTextAreaElement;
|
|
122
|
+
};
|
|
123
|
+
$slots: Readonly<{
|
|
124
|
+
[name: string]: import('vue').Slot<any>;
|
|
125
|
+
}>;
|
|
126
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
127
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
128
|
+
$host: Element | null;
|
|
129
|
+
$emit: ((event: "input", value: string) => void) & ((event: "clear") => void) & ((event: "update:modelValue", value: string) => void) & ((event: "change", value: string) => void) & ((event: "blur", value: FocusEvent) => void) & ((event: "focus", value: FocusEvent) => void);
|
|
130
|
+
$el: any;
|
|
131
|
+
$options: import('vue').ComponentOptionsBase<Readonly<import('../Input').InputProps> & Readonly<{
|
|
132
|
+
onInput?: (value: string) => any;
|
|
133
|
+
onClear?: () => any;
|
|
134
|
+
"onUpdate:modelValue"?: (value: string) => any;
|
|
135
|
+
onChange?: (value: string) => any;
|
|
136
|
+
onBlur?: (value: FocusEvent) => any;
|
|
137
|
+
onFocus?: (value: FocusEvent) => any;
|
|
138
|
+
}>, {
|
|
139
|
+
ref: Ref<HTMLInputElement, HTMLInputElement>;
|
|
140
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
141
|
+
input: (value: string) => any;
|
|
142
|
+
clear: () => any;
|
|
143
|
+
"update:modelValue": (value: string) => any;
|
|
144
|
+
change: (value: string) => any;
|
|
145
|
+
blur: (value: FocusEvent) => any;
|
|
146
|
+
focus: (value: FocusEvent) => any;
|
|
147
|
+
}, string, {
|
|
148
|
+
type: string;
|
|
149
|
+
autocomplete: string;
|
|
150
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
151
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
152
|
+
created?: (() => void) | (() => void)[];
|
|
153
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
154
|
+
mounted?: (() => void) | (() => void)[];
|
|
155
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
156
|
+
updated?: (() => void) | (() => void)[];
|
|
157
|
+
activated?: (() => void) | (() => void)[];
|
|
158
|
+
deactivated?: (() => void) | (() => void)[];
|
|
159
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
160
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
161
|
+
destroyed?: (() => void) | (() => void)[];
|
|
162
|
+
unmounted?: (() => void) | (() => void)[];
|
|
163
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
164
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
165
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
166
|
+
};
|
|
167
|
+
$forceUpdate: () => void;
|
|
168
|
+
$nextTick: typeof import('vue').nextTick;
|
|
169
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
170
|
+
} & Readonly<{
|
|
171
|
+
type: string;
|
|
172
|
+
autocomplete: string;
|
|
173
|
+
}> & Omit<Readonly<import('../Input').InputProps> & Readonly<{
|
|
174
|
+
onInput?: (value: string) => any;
|
|
175
|
+
onClear?: () => any;
|
|
176
|
+
"onUpdate:modelValue"?: (value: string) => any;
|
|
177
|
+
onChange?: (value: string) => any;
|
|
178
|
+
onBlur?: (value: FocusEvent) => any;
|
|
179
|
+
onFocus?: (value: FocusEvent) => any;
|
|
180
|
+
}>, "ref" | ("type" | "autocomplete")> & import('vue').ShallowUnwrapRef<{
|
|
181
|
+
ref: Ref<HTMLInputElement, HTMLInputElement>;
|
|
182
|
+
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
183
|
+
$slots: {
|
|
184
|
+
prepend?(_: {}): any;
|
|
185
|
+
prefix?(_: {}): any;
|
|
186
|
+
suffix?(_: {}): any;
|
|
187
|
+
append?(_: {}): any;
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
}, HTMLDivElement>;
|
|
191
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface SelectOption {
|
|
2
|
+
label: string;
|
|
3
|
+
value: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface SelectProps {
|
|
7
|
+
modelValue: string;
|
|
8
|
+
options?: SelectOption[];
|
|
9
|
+
placeholder: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface SelectStates {
|
|
13
|
+
inputValue: string;
|
|
14
|
+
selectedOption?: null | SelectOption;
|
|
15
|
+
}
|
|
16
|
+
export interface SelectEmits {
|
|
17
|
+
(e: 'change', value: string): void;
|
|
18
|
+
(e: 'update:modelValue', value: string): void;
|
|
19
|
+
(e: 'visible-change', value: boolean): void;
|
|
20
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SwtichProps } from './types';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<SwtichProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
3
|
+
"update:modelValue": (value: import('./types').SwitchValueType) => any;
|
|
4
|
+
change: (value: import('./types').SwitchValueType) => any;
|
|
5
|
+
}, string, import('vue').PublicProps, Readonly<SwtichProps> & Readonly<{
|
|
6
|
+
"onUpdate:modelValue"?: (value: import('./types').SwitchValueType) => any;
|
|
7
|
+
onChange?: (value: import('./types').SwitchValueType) => any;
|
|
8
|
+
}>, {
|
|
9
|
+
activeValue: import('./types').SwitchValueType;
|
|
10
|
+
inactiveValue: import('./types').SwitchValueType;
|
|
11
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
12
|
+
input: HTMLInputElement;
|
|
13
|
+
}, any>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type SwitchValueType = boolean | string | number;
|
|
2
|
+
export interface SwtichProps {
|
|
3
|
+
modelValue: SwitchValueType;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
activeText?: string;
|
|
6
|
+
inactiveText?: string;
|
|
7
|
+
activeValue?: SwitchValueType;
|
|
8
|
+
inactiveValue?: SwitchValueType;
|
|
9
|
+
name?: string;
|
|
10
|
+
id?: string;
|
|
11
|
+
size?: 'small' | 'large';
|
|
12
|
+
}
|
|
13
|
+
export interface SwtichEmits {
|
|
14
|
+
(e: 'update:modelValue', value: SwitchValueType): void;
|
|
15
|
+
(e: 'change', value: SwitchValueType): void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { TooltipProps } from './types';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: {
|
|
5
|
+
default?(_: {}): any;
|
|
6
|
+
content?(_: {}): any;
|
|
7
|
+
};
|
|
8
|
+
refs: {
|
|
9
|
+
popperContainerNode: HTMLDivElement;
|
|
10
|
+
triggerNode: HTMLDivElement;
|
|
11
|
+
popperNode: HTMLDivElement;
|
|
12
|
+
};
|
|
13
|
+
rootEl: HTMLDivElement;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
|
+
declare const __VLS_component: import('vue').DefineComponent<TooltipProps, {
|
|
17
|
+
show: () => void;
|
|
18
|
+
hide: () => void;
|
|
19
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
20
|
+
"visible-change": (value: boolean) => any;
|
|
21
|
+
}, string, import('vue').PublicProps, Readonly<TooltipProps> & Readonly<{
|
|
22
|
+
"onVisible-change"?: (value: boolean) => any;
|
|
23
|
+
}>, {
|
|
24
|
+
transition: string;
|
|
25
|
+
trigger: "hover" | "click";
|
|
26
|
+
placement: import('@popperjs/core').Placement;
|
|
27
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
28
|
+
popperContainerNode: HTMLDivElement;
|
|
29
|
+
triggerNode: HTMLDivElement;
|
|
30
|
+
popperNode: HTMLDivElement;
|
|
31
|
+
}, HTMLDivElement>;
|
|
32
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
33
|
+
export default _default;
|
|
34
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
35
|
+
new (): {
|
|
36
|
+
$slots: S;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Placement, Options } from '@popperjs/core';
|
|
2
|
+
export interface TooltipProps {
|
|
3
|
+
content?: string;
|
|
4
|
+
trigger?: 'hover' | 'click';
|
|
5
|
+
placement?: Placement;
|
|
6
|
+
manual?: boolean;
|
|
7
|
+
popperOptions?: Partial<Options>;
|
|
8
|
+
transition?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface TooltipEmits {
|
|
11
|
+
(e: 'visible-change', value: boolean): void;
|
|
12
|
+
}
|
|
13
|
+
export interface TooltipInstance {
|
|
14
|
+
show: () => void;
|
|
15
|
+
hide: () => void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { default as RoButton } from './components/Button';
|
|
3
|
+
import { default as Collapse, CollapseItem } from './components/Collapse';
|
|
4
|
+
import { default as Dropdown } from './components/Dropdown';
|
|
5
|
+
import { default as Form, FormItem } from './components/Form';
|
|
6
|
+
import { default as Icon } from './components/Icon';
|
|
7
|
+
import { default as Message, createMessage, closeAll as closeMessageAll } from './components/Message';
|
|
8
|
+
import { default as Input } from './components/Input';
|
|
9
|
+
import { default as Select } from './components/Select';
|
|
10
|
+
import { default as Switch } from './components/Switch';
|
|
11
|
+
import { default as Tooltip } from './components/Tooltip';
|
|
12
|
+
declare const install: (app: App) => void;
|
|
13
|
+
export { install, RoButton, Collapse, CollapseItem, Dropdown, Form, FormItem, Icon, Message, Input, Select, Switch, Tooltip, createMessage, closeMessageAll, };
|
|
14
|
+
declare const _default: {
|
|
15
|
+
install: (app: App) => void;
|
|
16
|
+
};
|
|
17
|
+
export default _default;
|
|
Binary file
|