@iooo/element 0.0.0-stage → 1.0.1
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 +47 -2
- package/dist/es/components/Alert/Alert.vue.d.ts +16 -0
- package/dist/es/components/Alert/types.d.ts +13 -0
- package/dist/es/components/Button/Button.vue.d.ts +16 -0
- package/dist/es/components/Button/index.d.ts +3 -0
- package/dist/es/components/Button/types.d.ts +12 -0
- package/dist/es/components/Collapse/Collapse.vue.d.ts +22 -0
- package/dist/es/components/Collapse/CollapseItem.vue.d.ts +18 -0
- package/dist/es/components/Collapse/index.d.ts +5 -0
- package/dist/es/components/Collapse/types.d.ts +20 -0
- package/dist/es/components/Common/RenderVnode.d.ts +11 -0
- package/dist/es/components/Dropdown/Dropdown.vue.d.ts +24 -0
- package/dist/es/components/Dropdown/types.d.ts +20 -0
- package/dist/es/components/Form/Form.vue.d.ts +16 -0
- package/dist/es/components/Form/FormItem.vue.d.ts +22 -0
- package/dist/es/components/Form/types.d.ts +46 -0
- package/dist/es/components/Icon/Icon.vue.d.ts +4 -0
- package/dist/es/components/Icon/types.d.ts +29 -0
- package/dist/es/components/Input/Input.vue.d.ts +55 -0
- package/dist/es/components/Input/types.d.ts +24 -0
- package/dist/es/components/Message/Message.vue.d.ts +35 -0
- package/dist/es/components/Message/index.d.ts +5 -0
- package/dist/es/components/Message/method.d.ts +23 -0
- package/dist/es/components/Message/types.d.ts +20 -0
- package/dist/es/components/Select/Select.vue.d.ts +16 -0
- package/dist/es/components/Select/types.d.ts +34 -0
- package/dist/es/components/Switch/Switch.vue.d.ts +13 -0
- package/dist/es/components/Switch/types.d.ts +16 -0
- package/dist/es/components/Tooltip/Tooltip.vue.d.ts +30 -0
- package/dist/es/components/Tooltip/types.d.ts +19 -0
- package/dist/es/favicon.ico +0 -0
- package/dist/es/hooks/useClickOutside.d.ts +2 -0
- package/dist/es/hooks/useEventListener.d.ts +2 -0
- package/dist/es/hooks/useZIndex.d.ts +5 -0
- package/dist/es/index.d.ts +7 -0
- package/dist/es/sp-element.js +1070 -0
- package/dist/index.css +2 -0
- package/dist/umd/favicon.ico +0 -0
- package/dist/umd/sp-element.css +2 -0
- package/dist/umd/sp-element.umd.cjs +1081 -0
- package/package.json +106 -3
package/README.md
CHANGED
|
@@ -1,3 +1,48 @@
|
|
|
1
|
-
#
|
|
1
|
+
# v-element
|
|
2
2
|
|
|
3
|
-
This
|
|
3
|
+
This template should help get you started developing with Vue 3 in Vite.
|
|
4
|
+
|
|
5
|
+
## Recommended IDE Setup
|
|
6
|
+
|
|
7
|
+
[VS Code](https://code.visualstudio.com/) + [Vue (Official)](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
|
|
8
|
+
|
|
9
|
+
## Recommended Browser Setup
|
|
10
|
+
|
|
11
|
+
- Chromium-based browsers (Chrome, Edge, Brave, etc.):
|
|
12
|
+
- [Vue.js devtools](https://chromewebstore.google.com/detail/vuejs-devtools/nhdogjmejiglipccpnnnanhbledajbpd)
|
|
13
|
+
- [Turn on Custom Object Formatter in Chrome DevTools](http://bit.ly/object-formatters)
|
|
14
|
+
- Firefox:
|
|
15
|
+
- [Vue.js devtools](https://addons.mozilla.org/en-US/firefox/addon/vue-js-devtools/)
|
|
16
|
+
- [Turn on Custom Object Formatter in Firefox DevTools](https://fxdx.dev/firefox-devtools-custom-object-formatters/)
|
|
17
|
+
|
|
18
|
+
## Type Support for `.vue` Imports in TS
|
|
19
|
+
|
|
20
|
+
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.
|
|
21
|
+
|
|
22
|
+
## Customize configuration
|
|
23
|
+
|
|
24
|
+
See [Vite Configuration Reference](https://vite.dev/config/).
|
|
25
|
+
|
|
26
|
+
## Project Setup
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
pnpm install
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Compile and Hot-Reload for Development
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
pnpm dev
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Type-Check, Compile and Minify for Production
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
pnpm build
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Lint with [ESLint](https://eslint.org/)
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
pnpm lint
|
|
48
|
+
```
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AlertProps } from './types';
|
|
2
|
+
declare const __VLS_template: () => {
|
|
3
|
+
__VLS_Slots: {
|
|
4
|
+
default?: (props: {}) => any;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
8
|
+
declare const __VLS_base: import('vue').DefineComponent<AlertProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AlertProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type NameType = string | number;
|
|
2
|
+
export interface AlertProps {
|
|
3
|
+
name?: NameType;
|
|
4
|
+
type?: "success" | "error" | "warning" | "info";
|
|
5
|
+
effect?: "light" | "dark";
|
|
6
|
+
content?: string;
|
|
7
|
+
closeable?: boolean;
|
|
8
|
+
center?: boolean;
|
|
9
|
+
visible?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface AlertEmits {
|
|
12
|
+
(e: "update:visible", value: boolean): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ButtonProps } from './types';
|
|
2
|
+
declare const __VLS_template: () => {
|
|
3
|
+
__VLS_Slots: {
|
|
4
|
+
default?: (props: {}) => any;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
8
|
+
declare const __VLS_base: import('vue').DefineComponent<ButtonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type ButtonType = "primary" | "success" | "info" | "warning" | "danger";
|
|
2
|
+
export type ButtonSize = "small" | "large";
|
|
3
|
+
export interface ButtonProps {
|
|
4
|
+
type?: ButtonType;
|
|
5
|
+
size?: ButtonSize;
|
|
6
|
+
plain?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
round?: boolean;
|
|
9
|
+
circle?: boolean;
|
|
10
|
+
icon?: string;
|
|
11
|
+
loading?: boolean;
|
|
12
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { NameType, CollapseProps } from './types';
|
|
2
|
+
declare const __VLS_template: () => {
|
|
3
|
+
__VLS_Slots: {
|
|
4
|
+
default?: (props: {}) => any;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
8
|
+
declare const __VLS_base: import('vue').DefineComponent<CollapseProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
9
|
+
"update:modelValue": (value: NameType[]) => any;
|
|
10
|
+
change: (value: NameType[]) => any;
|
|
11
|
+
}, string, import('vue').PublicProps, Readonly<CollapseProps> & Readonly<{
|
|
12
|
+
"onUpdate:modelValue"?: ((value: NameType[]) => any) | undefined;
|
|
13
|
+
onChange?: ((value: NameType[]) => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CollapseItemProps } from './types';
|
|
2
|
+
declare const __VLS_template: () => {
|
|
3
|
+
__VLS_Slots: {
|
|
4
|
+
title?: (props: {}) => any;
|
|
5
|
+
} & {
|
|
6
|
+
default?: (props: {}) => any;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
10
|
+
declare const __VLS_base: import('vue').DefineComponent<CollapseItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<CollapseItemProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Ref, InjectionKey } from 'vue';
|
|
2
|
+
export 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: (item: NameType) => void;
|
|
15
|
+
}
|
|
16
|
+
export interface CollapseEmits {
|
|
17
|
+
(e: "update:modelValue", value: NameType[]): void;
|
|
18
|
+
(e: "change", value: NameType[]): void;
|
|
19
|
+
}
|
|
20
|
+
export declare const collapseContextKey: InjectionKey<CollapseContext>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const RenderVnode: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
vnode: {
|
|
3
|
+
type: (ObjectConstructor | StringConstructor)[];
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
}>, () => string | Record<string, any>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
7
|
+
vnode: {
|
|
8
|
+
type: (ObjectConstructor | StringConstructor)[];
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DropdownProps, DropdownInstance, menuOption } from './types';
|
|
2
|
+
declare const __VLS_template: () => {
|
|
3
|
+
__VLS_Slots: {
|
|
4
|
+
default?: (props: {}) => any;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
8
|
+
declare const __VLS_base: import('vue').DefineComponent<DropdownProps, DropdownInstance, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
9
|
+
select: (value: menuOption) => any;
|
|
10
|
+
"visible-change": (value: boolean) => any;
|
|
11
|
+
}, string, import('vue').PublicProps, Readonly<DropdownProps> & Readonly<{
|
|
12
|
+
onSelect?: ((value: menuOption) => any) | undefined;
|
|
13
|
+
"onVisible-change"?: ((value: boolean) => any) | undefined;
|
|
14
|
+
}>, {
|
|
15
|
+
hideAfterClick: boolean;
|
|
16
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -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,16 @@
|
|
|
1
|
+
import { FormProps, FormInstance } from './types';
|
|
2
|
+
declare const __VLS_template: () => {
|
|
3
|
+
__VLS_Slots: {
|
|
4
|
+
default?: (props: {}) => any;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
8
|
+
declare const __VLS_base: import('vue').DefineComponent<FormProps, FormInstance, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FormProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { FormItemProps, FormItemInstance } from './types';
|
|
2
|
+
declare const __VLS_template: () => {
|
|
3
|
+
__VLS_Slots: {
|
|
4
|
+
label?: (props: {
|
|
5
|
+
label: string;
|
|
6
|
+
}) => any;
|
|
7
|
+
} & {
|
|
8
|
+
default?: (props: {
|
|
9
|
+
validate: (trigger?: string) => Promise<true | void>;
|
|
10
|
+
}) => any;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
14
|
+
declare const __VLS_base: import('vue').DefineComponent<FormItemProps, FormItemInstance, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FormItemProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -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 FormInstance {
|
|
16
|
+
validate: () => Promise<any>;
|
|
17
|
+
resetFields: (props?: string[]) => void;
|
|
18
|
+
clearValidate: (props?: string[]) => void;
|
|
19
|
+
}
|
|
20
|
+
export interface ValidateStatusProp {
|
|
21
|
+
state: "init" | "success" | "error";
|
|
22
|
+
errMessage: string;
|
|
23
|
+
loading: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface FormContext extends FormProps {
|
|
26
|
+
addField: (field: FormItemContext) => void;
|
|
27
|
+
removeField: (field: FormItemContext) => void;
|
|
28
|
+
}
|
|
29
|
+
export interface FormItemContext {
|
|
30
|
+
prop: string;
|
|
31
|
+
validate: (trigger?: string) => Promise<any>;
|
|
32
|
+
resetField: () => void;
|
|
33
|
+
clearValidate: () => void;
|
|
34
|
+
}
|
|
35
|
+
export interface FormItemInstance {
|
|
36
|
+
validateStatus: ValidateStatusProp;
|
|
37
|
+
validate: (trigger?: string) => Promise<any>;
|
|
38
|
+
resetField: () => void;
|
|
39
|
+
clearValidate: () => void;
|
|
40
|
+
}
|
|
41
|
+
export interface FormValidateFailure {
|
|
42
|
+
errors: ValidateError[] | null;
|
|
43
|
+
fields: ValidateFieldsError;
|
|
44
|
+
}
|
|
45
|
+
export declare const FormContextKey: InjectionKey<FormContext>;
|
|
46
|
+
export declare const FormItemContextKey: InjectionKey<FormItemContext>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SpIconProps } from './types';
|
|
2
|
+
declare const __VLS_export: import('vue').DefineComponent<SpIconProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SpIconProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
2
|
+
export interface SpIconProps {
|
|
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
|
+
small?: boolean;
|
|
14
|
+
size?: "2xs" | "xs" | "sm" | "lg" | "xl" | "2xl" | "1x" | "2x";
|
|
15
|
+
spin?: boolean;
|
|
16
|
+
transform?: object | string;
|
|
17
|
+
symbol?: boolean | string;
|
|
18
|
+
title?: string;
|
|
19
|
+
inverse?: boolean;
|
|
20
|
+
bounce?: boolean;
|
|
21
|
+
shake?: boolean;
|
|
22
|
+
beat?: boolean;
|
|
23
|
+
fade?: boolean;
|
|
24
|
+
beatFade?: boolean;
|
|
25
|
+
spinPulse?: boolean;
|
|
26
|
+
spinReverse?: boolean;
|
|
27
|
+
type?: "primary" | "success" | "info" | "warning" | "danger";
|
|
28
|
+
color?: string;
|
|
29
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
type?: string;
|
|
4
|
+
modelValue: string;
|
|
5
|
+
size?: "large" | "small";
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
clearable?: boolean;
|
|
8
|
+
showPassword?: boolean;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
readonly?: boolean;
|
|
11
|
+
autocomplete?: string;
|
|
12
|
+
autofocus?: boolean;
|
|
13
|
+
form?: string;
|
|
14
|
+
};
|
|
15
|
+
declare const __VLS_template: () => {
|
|
16
|
+
__VLS_Slots: {
|
|
17
|
+
prepend?: (props: {}) => any;
|
|
18
|
+
} & {
|
|
19
|
+
prefix?: (props: {}) => any;
|
|
20
|
+
} & {
|
|
21
|
+
suffix?: (props: {}) => any;
|
|
22
|
+
} & {
|
|
23
|
+
append?: (props: {}) => any;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
27
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
|
|
28
|
+
ref: Ref<HTMLInputElement, HTMLInputElement>;
|
|
29
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
30
|
+
input: (value: string) => any;
|
|
31
|
+
clear: () => any;
|
|
32
|
+
"update:modelValue": (value: string) => any;
|
|
33
|
+
change: (value: string) => any;
|
|
34
|
+
blur: (value: FocusEvent) => any;
|
|
35
|
+
focus: (value: FocusEvent) => any;
|
|
36
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
37
|
+
onInput?: ((value: string) => any) | undefined;
|
|
38
|
+
onClear?: (() => any) | undefined;
|
|
39
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
40
|
+
onChange?: ((value: string) => any) | undefined;
|
|
41
|
+
onBlur?: ((value: FocusEvent) => any) | undefined;
|
|
42
|
+
onFocus?: ((value: FocusEvent) => any) | undefined;
|
|
43
|
+
}>, {
|
|
44
|
+
type: string;
|
|
45
|
+
modelValue: string;
|
|
46
|
+
autocomplete: string;
|
|
47
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
48
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
49
|
+
declare const _default: typeof __VLS_export;
|
|
50
|
+
export default _default;
|
|
51
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
52
|
+
new (): {
|
|
53
|
+
$slots: S;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
@@ -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,35 @@
|
|
|
1
|
+
import { VNode } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
message?: string | VNode;
|
|
4
|
+
duration?: number;
|
|
5
|
+
showClose?: boolean;
|
|
6
|
+
type?: "success" | "danger" | "info" | "warning";
|
|
7
|
+
onDestroy: () => void;
|
|
8
|
+
offset?: number;
|
|
9
|
+
id: string;
|
|
10
|
+
zIndex: number;
|
|
11
|
+
transitionName?: string;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_template: () => {
|
|
14
|
+
__VLS_Slots: {
|
|
15
|
+
default?: (props: {}) => any;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
19
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
|
|
20
|
+
bottomOffset: import('vue').ComputedRef<any>;
|
|
21
|
+
visible: import('vue').Ref<boolean, boolean>;
|
|
22
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
23
|
+
type: "success" | "info" | "warning" | "danger";
|
|
24
|
+
duration: number;
|
|
25
|
+
offset: number;
|
|
26
|
+
transitionName: string;
|
|
27
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
28
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
29
|
+
declare const _default: typeof __VLS_export;
|
|
30
|
+
export default _default;
|
|
31
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
32
|
+
new (): {
|
|
33
|
+
$slots: S;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -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
|
+
onDestroy: () => void;
|
|
11
|
+
zIndex: number;
|
|
12
|
+
type?: "success" | "warning" | "info" | "danger" | undefined;
|
|
13
|
+
message?: (string | import('vue').VNode) | undefined;
|
|
14
|
+
duration?: number | undefined;
|
|
15
|
+
showClose?: boolean | undefined;
|
|
16
|
+
offset?: number | undefined;
|
|
17
|
+
transitionName?: string | undefined;
|
|
18
|
+
};
|
|
19
|
+
destroy: () => void;
|
|
20
|
+
};
|
|
21
|
+
export declare const getLastInstance: () => MessageContext | undefined;
|
|
22
|
+
export declare const getLastButtomOffset: (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" | "warning" | "info" | "danger";
|
|
7
|
+
onDestroy: () => void;
|
|
8
|
+
offset?: number;
|
|
9
|
+
id: string;
|
|
10
|
+
zIndex: number;
|
|
11
|
+
transitionName?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface MessageContext {
|
|
14
|
+
id: string;
|
|
15
|
+
vnode: VNode;
|
|
16
|
+
vm: ComponentInternalInstance;
|
|
17
|
+
props: MessageProps;
|
|
18
|
+
destroy: () => void;
|
|
19
|
+
}
|
|
20
|
+
export type createMessageProps = Omit<MessageProps, "onDestroy" | "id" | "zIndex">;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SelectOption, SelectProps } from './types';
|
|
2
|
+
declare const __VLS_export: import('vue').DefineComponent<SelectProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
3
|
+
clear: () => any;
|
|
4
|
+
"update:modelValue": (value: string) => any;
|
|
5
|
+
change: (value: string) => any;
|
|
6
|
+
"visible-change": (visible: boolean) => any;
|
|
7
|
+
}, string, import('vue').PublicProps, Readonly<SelectProps> & Readonly<{
|
|
8
|
+
onClear?: (() => any) | undefined;
|
|
9
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
10
|
+
onChange?: ((value: string) => any) | undefined;
|
|
11
|
+
"onVisible-change"?: ((visible: boolean) => any) | undefined;
|
|
12
|
+
}>, {
|
|
13
|
+
options: SelectOption[];
|
|
14
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { VNode } from 'vue';
|
|
2
|
+
export interface SelectOption {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface SelectProps {
|
|
8
|
+
modelValue: string;
|
|
9
|
+
options?: SelectOption[];
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
clearable?: boolean;
|
|
13
|
+
renderLabel?: RenderLableFunc;
|
|
14
|
+
filterable?: boolean;
|
|
15
|
+
filterMethod?: CustomFilterFunc;
|
|
16
|
+
remote?: boolean;
|
|
17
|
+
remoteMethod?: CustomFilterRemoteFunc;
|
|
18
|
+
}
|
|
19
|
+
export interface SelectStates {
|
|
20
|
+
inputValue: string;
|
|
21
|
+
selectedOption: SelectOption | null;
|
|
22
|
+
mouseHover: boolean;
|
|
23
|
+
loading: boolean;
|
|
24
|
+
highlightIndex: number;
|
|
25
|
+
}
|
|
26
|
+
export type RenderLableFunc = (option: SelectOption) => VNode;
|
|
27
|
+
export type CustomFilterFunc = (value: string) => SelectOption[];
|
|
28
|
+
export type CustomFilterRemoteFunc = (value: string) => Promise<SelectOption[]>;
|
|
29
|
+
export interface SelectEmits {
|
|
30
|
+
(e: "update:modelValue", value: string): void;
|
|
31
|
+
(e: "change", value: string): void;
|
|
32
|
+
(e: "visible-change", visible: boolean): void;
|
|
33
|
+
(e: "clear"): void;
|
|
34
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SwtichProps } from './types';
|
|
2
|
+
declare const __VLS_export: 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) | undefined;
|
|
7
|
+
onChange?: ((value: import('./types').SwitchValueType) => any) | undefined;
|
|
8
|
+
}>, {
|
|
9
|
+
activeValue: import('./types').SwitchValueType;
|
|
10
|
+
inactiveValue: import('./types').SwitchValueType;
|
|
11
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
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,30 @@
|
|
|
1
|
+
import { TooltipProps, TooltipInstance } from './types';
|
|
2
|
+
declare const __VLS_template: () => {
|
|
3
|
+
__VLS_Slots: {
|
|
4
|
+
default?: (props: {}) => any;
|
|
5
|
+
} & {
|
|
6
|
+
content?: (props: {}) => any;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
10
|
+
declare const __VLS_base: import('vue').DefineComponent<TooltipProps, TooltipInstance, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
11
|
+
"visible-change": (visible: boolean) => any;
|
|
12
|
+
"click-outside": (visible: boolean) => any;
|
|
13
|
+
}, string, import('vue').PublicProps, Readonly<TooltipProps> & Readonly<{
|
|
14
|
+
"onVisible-change"?: ((visible: boolean) => any) | undefined;
|
|
15
|
+
"onClick-outside"?: ((visible: boolean) => any) | undefined;
|
|
16
|
+
}>, {
|
|
17
|
+
transition: string;
|
|
18
|
+
trigger: "click" | "hover";
|
|
19
|
+
placement: import('@popperjs/core').Placement;
|
|
20
|
+
openDelay: number;
|
|
21
|
+
closeDelay: number;
|
|
22
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
26
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
27
|
+
new (): {
|
|
28
|
+
$slots: S;
|
|
29
|
+
};
|
|
30
|
+
};
|