@gaozhenqi/v-element 0.1.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 +60 -0
- package/dist/VNode.d.ts +12 -0
- package/dist/components/Button/types.d.ts +39 -0
- package/dist/components/Collapse/types.d.ts +20 -0
- package/dist/components/Common/RenderVnode.d.ts +12 -0
- package/dist/components/Dropdown/Dropdown.d.ts +86 -0
- package/dist/components/Dropdown/types.d.ts +20 -0
- package/dist/components/Form/types.d.ts +45 -0
- package/dist/components/Icon/types.d.ts +28 -0
- package/dist/components/Input/types.d.ts +24 -0
- package/dist/components/Message/method.d.ts +25 -0
- package/dist/components/Message/types.d.ts +20 -0
- package/dist/components/Select/types.d.ts +50 -0
- package/dist/components/Switch/types.d.ts +16 -0
- package/dist/components/Tooltip/types.d.ts +19 -0
- package/dist/favicon.ico +0 -0
- package/dist/hooks/useClickOutside.d.ts +3 -0
- package/dist/hooks/useEventListener.d.ts +2 -0
- package/dist/hooks/useZIndex.d.ts +6 -0
- package/dist/index.cjs +766 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +5532 -0
- package/package.json +74 -0
package/README.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
## 进阶必学!最新 Vue3.3 + TS4 高仿 ElementPlus 打造自己的组件库
|
|
2
|
+
|
|
3
|
+
**v-element** 是为慕课网打造的一套教学组件库,使用最新的 Vue3.3 和 TS, 意在让大家从零到一,由浅入深的提高自己的 Vue 和 typescript 水平,地址: [https://coding.imooc.com/class/693.html](https://coding.imooc.com/class/693.html)
|
|
4
|
+
|
|
5
|
+
### 安装
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
npm i @vikingmute/v-element --save
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
### 开始使用
|
|
13
|
+
|
|
14
|
+
**全局使用**
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
```js
|
|
18
|
+
// 引入所有组件
|
|
19
|
+
import VElement from '@vikingmute/v-element'
|
|
20
|
+
// 引入样式
|
|
21
|
+
import '@vikingmute/v-element/dist/style.css'
|
|
22
|
+
|
|
23
|
+
import App from './App.vue'
|
|
24
|
+
// 全局使用
|
|
25
|
+
createApp(App).use(VElement).mount('#app')
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
```vue
|
|
29
|
+
<template>
|
|
30
|
+
<vk-button>我是 VkButton</vk-button>
|
|
31
|
+
</template>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**单个导入**
|
|
35
|
+
|
|
36
|
+
V Element 提供了基于 ES Module 的开箱即用的 Tree Shaking 功能。
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
```vue
|
|
40
|
+
<template>
|
|
41
|
+
<Button>我是 VkButton</Button>
|
|
42
|
+
</template>
|
|
43
|
+
<script>
|
|
44
|
+
import { Button } from ' @vikingmute/v-element'
|
|
45
|
+
export default {
|
|
46
|
+
components: { Button },
|
|
47
|
+
}
|
|
48
|
+
</script>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### 课程亮点
|
|
52
|
+
|
|
53
|
+
* 亮点1 🔥:“稀有”,目前上市面没有类似的高级课程,由浅入深的高仿 Element-Plus 完成组件库开发的全流程。
|
|
54
|
+
* 亮点2 💧: “专业”,传授大厂前端项目架构设计思想/开发模式/代码规范/流程,不搞小作坊式代码。
|
|
55
|
+
* 亮点3 ⛑️: “全”,精选十几个组件,可以涵盖大部分的主流组件的设计思想以及原理,知识覆盖面全。
|
|
56
|
+
* 亮点4 📚:“新”,使用目前2023年 Vue3 周边最新 ,最全技术:Vue3.2 + Typescript4, Vite,Vitest, Vitepress,Vue-test-utils2,Rollup, Postcss 一网打尽。
|
|
57
|
+
* 亮点5 🎉:“难”,难度逐渐上升,高薪必备敲门砖,包括:Message - Select - Form 这种高难度高复杂组件。
|
|
58
|
+
* 亮点6 🌹:单元测试,被常年忽略但是非常重要的内容,简历加分项,使用最新的 Vitest,Vue-test-utils2 完成单元测试。
|
|
59
|
+
* 亮点7 📚: 文档生成工具,组件库打包和发布以及其他周边流程应有尽有,提供一揽子解决方案。
|
|
60
|
+
* 亮点8 📦: 长期维护以及更新,会根据同学的反馈每年更新几个高频组件。
|
package/dist/VNode.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{
|
|
2
|
+
msg: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
}, () => JSX.Element, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<{
|
|
7
|
+
msg: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
}>>, {}>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
export declare type ButtonType = 'primary' | 'success' | 'warning' | 'danger' | 'info';
|
|
3
|
+
export declare type ButtonSize = 'large' | 'small';
|
|
4
|
+
export declare type NativeType = 'button' | 'submit' | 'reset';
|
|
5
|
+
export interface ButtonProps {
|
|
6
|
+
type?: ButtonType;
|
|
7
|
+
size?: ButtonSize;
|
|
8
|
+
plain?: boolean;
|
|
9
|
+
round?: boolean;
|
|
10
|
+
circle?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
nativeType?: NativeType;
|
|
13
|
+
autofocus?: boolean;
|
|
14
|
+
icon?: string;
|
|
15
|
+
loading?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface ButtonInstance {
|
|
18
|
+
ref: HTMLButtonElement;
|
|
19
|
+
}
|
|
20
|
+
export declare const buttonProps: {
|
|
21
|
+
type: {
|
|
22
|
+
type: PropType<ButtonType>;
|
|
23
|
+
};
|
|
24
|
+
size: {
|
|
25
|
+
type: PropType<ButtonSize>;
|
|
26
|
+
};
|
|
27
|
+
plain: {
|
|
28
|
+
type: BooleanConstructor;
|
|
29
|
+
};
|
|
30
|
+
round: {
|
|
31
|
+
type: BooleanConstructor;
|
|
32
|
+
};
|
|
33
|
+
circle: {
|
|
34
|
+
type: BooleanConstructor;
|
|
35
|
+
};
|
|
36
|
+
disabled: {
|
|
37
|
+
type: BooleanConstructor;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Ref, InjectionKey } from 'vue';
|
|
2
|
+
export declare type NameType = string | number;
|
|
3
|
+
export interface CollapseProps {
|
|
4
|
+
modelValue: NameType[];
|
|
5
|
+
accordion?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface CollapseItemProps {
|
|
8
|
+
name: NameType;
|
|
9
|
+
title?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface CollapseContext {
|
|
13
|
+
activeNames: Ref<NameType[]>;
|
|
14
|
+
handleItemClick: (name: NameType) => void;
|
|
15
|
+
}
|
|
16
|
+
export interface CollapseEmits {
|
|
17
|
+
(e: 'update:modelValue', values: NameType[]): void;
|
|
18
|
+
(e: 'change', values: NameType[]): void;
|
|
19
|
+
}
|
|
20
|
+
export declare const collapseContextKey: InjectionKey<CollapseContext>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const RenderVnode: import('vue').DefineComponent<{
|
|
2
|
+
vNode: {
|
|
3
|
+
type: (StringConstructor | ObjectConstructor)[];
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
}, () => string | Record<string, any>, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<{
|
|
7
|
+
vNode: {
|
|
8
|
+
type: (StringConstructor | ObjectConstructor)[];
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
}>>, {}>;
|
|
12
|
+
export default RenderVnode;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { Placement, Options } from '@popperjs/core';
|
|
3
|
+
import { MenuOption } from './types';
|
|
4
|
+
declare const _default: import('vue').DefineComponent<{
|
|
5
|
+
placement: {
|
|
6
|
+
type: PropType<Placement>;
|
|
7
|
+
default: string;
|
|
8
|
+
};
|
|
9
|
+
trigger: {
|
|
10
|
+
type: PropType<"hover" | "click">;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
transition: {
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
default: string;
|
|
16
|
+
};
|
|
17
|
+
openDelay: {
|
|
18
|
+
type: NumberConstructor;
|
|
19
|
+
default: number;
|
|
20
|
+
};
|
|
21
|
+
closeDelay: {
|
|
22
|
+
type: NumberConstructor;
|
|
23
|
+
default: number;
|
|
24
|
+
};
|
|
25
|
+
popperOptions: {
|
|
26
|
+
type: PropType<Options>;
|
|
27
|
+
};
|
|
28
|
+
menuOptions: {
|
|
29
|
+
type: PropType<MenuOption[]>;
|
|
30
|
+
required: true;
|
|
31
|
+
};
|
|
32
|
+
hideAfterClick: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
manual: {
|
|
37
|
+
type: BooleanConstructor;
|
|
38
|
+
};
|
|
39
|
+
}, () => JSX.Element, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("select" | "visible-change")[], "select" | "visible-change", import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<{
|
|
40
|
+
placement: {
|
|
41
|
+
type: PropType<Placement>;
|
|
42
|
+
default: string;
|
|
43
|
+
};
|
|
44
|
+
trigger: {
|
|
45
|
+
type: PropType<"hover" | "click">;
|
|
46
|
+
default: string;
|
|
47
|
+
};
|
|
48
|
+
transition: {
|
|
49
|
+
type: StringConstructor;
|
|
50
|
+
default: string;
|
|
51
|
+
};
|
|
52
|
+
openDelay: {
|
|
53
|
+
type: NumberConstructor;
|
|
54
|
+
default: number;
|
|
55
|
+
};
|
|
56
|
+
closeDelay: {
|
|
57
|
+
type: NumberConstructor;
|
|
58
|
+
default: number;
|
|
59
|
+
};
|
|
60
|
+
popperOptions: {
|
|
61
|
+
type: PropType<Options>;
|
|
62
|
+
};
|
|
63
|
+
menuOptions: {
|
|
64
|
+
type: PropType<MenuOption[]>;
|
|
65
|
+
required: true;
|
|
66
|
+
};
|
|
67
|
+
hideAfterClick: {
|
|
68
|
+
type: BooleanConstructor;
|
|
69
|
+
default: boolean;
|
|
70
|
+
};
|
|
71
|
+
manual: {
|
|
72
|
+
type: BooleanConstructor;
|
|
73
|
+
};
|
|
74
|
+
}>> & {
|
|
75
|
+
onSelect?: ((...args: any[]) => any) | undefined;
|
|
76
|
+
"onVisible-change"?: ((...args: any[]) => any) | undefined;
|
|
77
|
+
}, {
|
|
78
|
+
hideAfterClick: boolean;
|
|
79
|
+
placement: Placement;
|
|
80
|
+
trigger: "hover" | "click";
|
|
81
|
+
transition: string;
|
|
82
|
+
openDelay: number;
|
|
83
|
+
closeDelay: number;
|
|
84
|
+
manual: boolean;
|
|
85
|
+
}>;
|
|
86
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { VNode } from 'vue';
|
|
2
|
+
import { TooltipProps } from '../Tooltip/types';
|
|
3
|
+
export interface DropdownProps extends TooltipProps {
|
|
4
|
+
menuOptions: MenuOption[];
|
|
5
|
+
hideAfterClick?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface MenuOption {
|
|
8
|
+
label: string | VNode;
|
|
9
|
+
key: string | number;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
divided?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface DropdownEmits {
|
|
14
|
+
(e: 'visible-change', value: boolean): void;
|
|
15
|
+
(e: 'select', value: MenuOption): void;
|
|
16
|
+
}
|
|
17
|
+
export interface DropdownInstance {
|
|
18
|
+
show: () => void;
|
|
19
|
+
hide: () => void;
|
|
20
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { InjectionKey } from 'vue';
|
|
2
|
+
export declare type FormRuleValidator = (value: any, model: Record<string, any>) => boolean | string | Promise<boolean | string>;
|
|
3
|
+
export interface FormRule {
|
|
4
|
+
required?: boolean;
|
|
5
|
+
min?: number;
|
|
6
|
+
max?: number;
|
|
7
|
+
pattern?: RegExp;
|
|
8
|
+
message?: string;
|
|
9
|
+
validator?: FormRuleValidator;
|
|
10
|
+
}
|
|
11
|
+
export declare type FormRules = Record<string, FormRule | FormRule[]>;
|
|
12
|
+
export interface FormItemContext {
|
|
13
|
+
prop?: string;
|
|
14
|
+
validate: () => Promise<boolean>;
|
|
15
|
+
resetField: () => void;
|
|
16
|
+
clearValidate: () => void;
|
|
17
|
+
}
|
|
18
|
+
export interface FormItemValidateContext {
|
|
19
|
+
validate: () => Promise<boolean>;
|
|
20
|
+
prop?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface FormContext {
|
|
23
|
+
model: Record<string, any>;
|
|
24
|
+
rules?: FormRules;
|
|
25
|
+
labelWidth?: string | number;
|
|
26
|
+
addField: (field: FormItemContext) => void;
|
|
27
|
+
removeField: (field: FormItemContext) => void;
|
|
28
|
+
}
|
|
29
|
+
export interface FormProps {
|
|
30
|
+
model: Record<string, any>;
|
|
31
|
+
rules?: FormRules;
|
|
32
|
+
labelWidth?: string | number;
|
|
33
|
+
inline?: boolean;
|
|
34
|
+
}
|
|
35
|
+
export interface FormEmits {
|
|
36
|
+
(e: 'validate', prop: string | undefined, valid: boolean, message: string): void;
|
|
37
|
+
}
|
|
38
|
+
export interface FormInstance {
|
|
39
|
+
validate: (callback?: (valid: boolean) => void) => Promise<boolean>;
|
|
40
|
+
validateField: (prop: string) => Promise<boolean>;
|
|
41
|
+
resetFields: () => void;
|
|
42
|
+
clearValidate: (props?: string | string[]) => void;
|
|
43
|
+
}
|
|
44
|
+
export declare const FORM_CONTEXT_KEY: InjectionKey<FormContext>;
|
|
45
|
+
export declare const FORM_ITEM_CONTEXT_KEY: InjectionKey<FormItemValidateContext>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
2
|
+
export interface IconProps {
|
|
3
|
+
border?: boolean;
|
|
4
|
+
fixedWidth?: boolean;
|
|
5
|
+
flip?: 'horizontal' | 'vertical' | 'both';
|
|
6
|
+
icon: object | Array<string> | string | IconDefinition;
|
|
7
|
+
mask?: object | Array<string> | string;
|
|
8
|
+
listItem?: boolean;
|
|
9
|
+
pull?: 'right' | 'left';
|
|
10
|
+
pulse?: boolean;
|
|
11
|
+
rotation?: 90 | 180 | 270 | '90' | '180' | '270';
|
|
12
|
+
swapOpacity?: boolean;
|
|
13
|
+
size?: '2xs' | 'xs' | 'sm' | 'lg' | 'xl' | '2xl' | '1x' | '2x' | '3x' | '4x' | '5x' | '6x' | '7x' | '8x' | '9x' | '10x';
|
|
14
|
+
spin?: boolean;
|
|
15
|
+
transform?: object | string;
|
|
16
|
+
symbol?: boolean | string;
|
|
17
|
+
title?: string;
|
|
18
|
+
inverse?: boolean;
|
|
19
|
+
bounce?: boolean;
|
|
20
|
+
shake?: boolean;
|
|
21
|
+
beat?: boolean;
|
|
22
|
+
fade?: boolean;
|
|
23
|
+
beatFade?: boolean;
|
|
24
|
+
spinPulse?: boolean;
|
|
25
|
+
spinReverse?: boolean;
|
|
26
|
+
type?: 'primary' | 'success' | 'warning' | 'danger' | 'info';
|
|
27
|
+
color?: string;
|
|
28
|
+
}
|
|
@@ -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,25 @@
|
|
|
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" | "warning" | "danger" | "info" | undefined;
|
|
13
|
+
message?: string | import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}> | undefined;
|
|
16
|
+
duration?: number | undefined;
|
|
17
|
+
showClose?: boolean | undefined;
|
|
18
|
+
offset?: number | undefined;
|
|
19
|
+
transitionName?: string | undefined;
|
|
20
|
+
};
|
|
21
|
+
destory: () => void;
|
|
22
|
+
};
|
|
23
|
+
export declare const getLastInstance: () => MessageContext | undefined;
|
|
24
|
+
export declare const getLastBottomOffset: (id: string) => any;
|
|
25
|
+
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 declare type CreateMessageProps = Omit<MessageProps, 'onDestory' | 'id' | 'zIndex'>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
export interface SelectOption {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare type SelectFilterMethod = (query: string, option: SelectOption) => boolean;
|
|
8
|
+
export interface SelectProps {
|
|
9
|
+
modelValue: string;
|
|
10
|
+
options: SelectOption[];
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
filterable?: boolean;
|
|
14
|
+
filterMethod?: SelectFilterMethod;
|
|
15
|
+
}
|
|
16
|
+
export interface SelectStates {
|
|
17
|
+
inputValue: string;
|
|
18
|
+
selectedOption: null | SelectOption;
|
|
19
|
+
query: string;
|
|
20
|
+
}
|
|
21
|
+
export interface SelectEmits {
|
|
22
|
+
(e: 'change', value: string): void;
|
|
23
|
+
(e: 'update:modelValue', value: string): void;
|
|
24
|
+
(e: 'visible-change', value: boolean): void;
|
|
25
|
+
}
|
|
26
|
+
export declare const selectProps: {
|
|
27
|
+
modelValue: {
|
|
28
|
+
type: StringConstructor;
|
|
29
|
+
default: string;
|
|
30
|
+
};
|
|
31
|
+
options: {
|
|
32
|
+
type: PropType<SelectOption[]>;
|
|
33
|
+
default: () => never[];
|
|
34
|
+
};
|
|
35
|
+
placeholder: {
|
|
36
|
+
type: StringConstructor;
|
|
37
|
+
default: string;
|
|
38
|
+
};
|
|
39
|
+
disabled: {
|
|
40
|
+
type: BooleanConstructor;
|
|
41
|
+
default: boolean;
|
|
42
|
+
};
|
|
43
|
+
filterable: {
|
|
44
|
+
type: BooleanConstructor;
|
|
45
|
+
default: boolean;
|
|
46
|
+
};
|
|
47
|
+
filterMethod: {
|
|
48
|
+
type: PropType<SelectFilterMethod>;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare 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,19 @@
|
|
|
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
|
+
openDelay?: number;
|
|
10
|
+
closeDelay?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface TooltipEmits {
|
|
13
|
+
(e: 'visible-change', value: boolean): void;
|
|
14
|
+
(e: 'click-outside', value: boolean): void;
|
|
15
|
+
}
|
|
16
|
+
export interface TooltipInstance {
|
|
17
|
+
show: () => void;
|
|
18
|
+
hide: () => void;
|
|
19
|
+
}
|
package/dist/favicon.ico
ADDED
|
Binary file
|