x-next 0.0.0-alpha.1 → 0.0.0-alpha.3
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +24 -2
- package/package.json +50 -63
- package/x-next/_hooks/use-overflow.d.ts +5 -0
- package/x-next/_hooks/use-popup-manager.d.ts +11 -0
- package/x-next/_props/css.d.ts +13 -0
- package/x-next/_props/global.d.ts +1 -0
- package/x-next/_utils/config.d.ts +9 -0
- package/x-next/_utils/convert-case.d.ts +3 -0
- package/x-next/_utils/dom.d.ts +10 -0
- package/x-next/_utils/helpers.d.ts +12 -0
- package/x-next/_utils/icon.d.ts +59 -0
- package/{framework/es/util.d.ts → x-next/_utils/is.d.ts} +22 -36
- package/x-next/_utils/keyboard.d.ts +24 -0
- package/x-next/_utils/number.d.ts +0 -0
- package/x-next/_utils/vue-eco.d.ts +28 -0
- package/x-next/componets/button/index.vue.d.ts +162 -0
- package/x-next/componets/button/props.d.ts +45 -0
- package/x-next/componets/dialog/index.vue.d.ts +221 -0
- package/x-next/componets/dialog/props.d.ts +83 -0
- package/x-next/componets/dialog/use-props.d.ts +33 -0
- package/x-next/componets/dialog/use.d.ts +3 -0
- package/x-next/componets/dialog/warp.d.ts +2 -0
- package/x-next/componets/message/index.vue.d.ts +387 -0
- package/x-next/componets/message/props.d.ts +31 -0
- package/x-next/componets/message/warp.d.ts +3 -0
- package/x-next/componets/message-box/index.d.ts +3 -0
- package/x-next/componets/message-box/props.d.ts +52 -0
- package/x-next/componets/message-box/warp.d.ts +2 -0
- package/x-next/componets/notification/index.vue.d.ts +160 -0
- package/x-next/componets/notification/props.d.ts +54 -0
- package/x-next/componets/notification/warp.d.ts +3 -0
- package/x-next/componets/space/index.d.ts +42 -0
- package/x-next/componets/tag-cloud/index.d.ts +0 -0
- package/x-next/componets/trend-chart/components/trend-chart-curve.d.ts +114 -0
- package/x-next/componets/trend-chart/components/trend-chart-grid.d.ts +55 -0
- package/x-next/componets/trend-chart/components/trend-chart-labels.d.ts +22 -0
- package/x-next/componets/trend-chart/components/trend-chart.d.ts +270 -0
- package/x-next/componets/trend-chart/helpers/genPath.d.ts +8 -0
- package/x-next/componets/trend-chart/helpers/genPoints.d.ts +3 -0
- package/x-next/componets/trend-chart/helpers/getPadding.d.ts +7 -0
- package/x-next/componets/trend-chart/helpers/validatePadding.d.ts +2 -0
- package/x-next/componets/trend-chart/index.d.ts +2 -0
- package/x-next/componets/trend-chart/props.d.ts +206 -0
- package/x-next/icons/animation/animation-loading.vue.d.ts +55 -0
- package/x-next/icons/default/check-circle-fill.vue.d.ts +55 -0
- package/x-next/icons/default/close-circle-fill.vue.d.ts +55 -0
- package/x-next/icons/default/exclamation-circle-fill.vue.d.ts +55 -0
- package/x-next/icons/default/info-circle-fill.vue.d.ts +55 -0
- package/x-next/icons/default/minus-circle-fill.vue.d.ts +55 -0
- package/x-next/icons/index.d.ts +7 -0
- package/x-next/style.css +1 -0
- package/x-next/ui.d.ts +5 -0
- package/x-next/ui.js +1357 -0
- package/x-next/ui.umd.cjs +1 -0
- package/LICENSE +0 -21
- package/framework/es/client.io.js +0 -2
- package/framework/es/client.io.js.map +0 -1
- package/framework/es/exception.d.ts +0 -25
- package/framework/es/index.d.ts +0 -2
- package/framework/es/types.d.ts +0 -33
- package/framework/es/websocket.d.ts +0 -118
- package/framework/umd/client.io.js +0 -2
- package/framework/umd/client.io.js.map +0 -1
- package/framework/umd/exception.d.ts +0 -25
- package/framework/umd/index.d.ts +0 -2
- package/framework/umd/types.d.ts +0 -33
- package/framework/umd/util.d.ts +0 -36
- package/framework/umd/websocket.d.ts +0 -118
- package/index.d.ts +0 -159
package/README.md
CHANGED
@@ -1,4 +1,26 @@
|
|
1
|
-
#
|
2
|
-
xiaocaiyun.com 前端组件库。
|
1
|
+
# 简介
|
3
2
|
|
3
|
+
X-Next是Ringing Tech的基础UI库。
|
4
4
|
|
5
|
+
# 安装
|
6
|
+
|
7
|
+
### 运行
|
8
|
+
|
9
|
+
```
|
10
|
+
pnpm i x-next
|
11
|
+
```
|
12
|
+
|
13
|
+
### 引入
|
14
|
+
|
15
|
+
```
|
16
|
+
// main.ts
|
17
|
+
import { createApp } from 'vue'
|
18
|
+
import XNext from 'x-next'
|
19
|
+
import "x-next/packages/style.css"; //引入组件样式
|
20
|
+
import App from './App.vue'
|
21
|
+
|
22
|
+
const app = createApp(App)
|
23
|
+
|
24
|
+
app.use(XNext)
|
25
|
+
app.mount('#app')
|
26
|
+
```
|
package/package.json
CHANGED
@@ -1,65 +1,52 @@
|
|
1
1
|
{
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
"
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
"
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
"
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
"
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
"rollup-plugin-eslint": "^7.0.0",
|
53
|
-
"rollup-plugin-node-resolve": "^5.2.0",
|
54
|
-
"rollup-plugin-typescript": "^1.0.1",
|
55
|
-
"rollup-plugin-typescript2": "^0.31.1",
|
56
|
-
"rollup-plugin-uglify": "^6.0.4",
|
57
|
-
"tslib": "^2.6.3",
|
58
|
-
"typescript": "^4.4.4"
|
59
|
-
},
|
60
|
-
"files": [
|
61
|
-
"/framework",
|
62
|
-
"README.md",
|
63
|
-
"index.d.ts"
|
64
|
-
]
|
2
|
+
"name": "x-next",
|
3
|
+
"private": false,
|
4
|
+
"version": "0.0.0-alpha.3",
|
5
|
+
"description": "An amazing Vue3 UI library.",
|
6
|
+
"type": "module",
|
7
|
+
"main": "x-next/ui.umd.js",
|
8
|
+
"module": "x-next/ui.js",
|
9
|
+
"types": "x-next/types/ui.d.ts",
|
10
|
+
"scripts": {
|
11
|
+
"dev": "vite",
|
12
|
+
"build": "vue-tsc && vite build",
|
13
|
+
"preview": "vite preview",
|
14
|
+
"publish": "npm publish --access=public"
|
15
|
+
},
|
16
|
+
"repository": {
|
17
|
+
"type": "git",
|
18
|
+
"url": "git+https://github.com/ztes/x-next.git"
|
19
|
+
},
|
20
|
+
"bugs": {
|
21
|
+
"url": "https://github.com/ztes/x-next/issues"
|
22
|
+
},
|
23
|
+
"dependencies": {
|
24
|
+
"dayjs": "^1.11.11",
|
25
|
+
"vue": "^3.5.12"
|
26
|
+
},
|
27
|
+
"devDependencies": {
|
28
|
+
"@types/node": "^20.12.7",
|
29
|
+
"@vitejs/plugin-vue": "^5.0.4",
|
30
|
+
"sass": "^1.80.3",
|
31
|
+
"typescript": "^5.2.2",
|
32
|
+
"vite": "^5.2.0",
|
33
|
+
"vite-plugin-dts": "^4.3.0",
|
34
|
+
"vue-tsc": "^2.0.6"
|
35
|
+
},
|
36
|
+
"publishConfig": {
|
37
|
+
"access": "public"
|
38
|
+
},
|
39
|
+
"keywords": [
|
40
|
+
"vue",
|
41
|
+
"vue 3",
|
42
|
+
"component"
|
43
|
+
],
|
44
|
+
"author": {
|
45
|
+
"email": "xy@ztes.com",
|
46
|
+
"name": "XuYu"
|
47
|
+
},
|
48
|
+
"license": "MIT",
|
49
|
+
"files": [
|
50
|
+
"x-next"
|
51
|
+
]
|
65
52
|
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { Ref } from 'vue';
|
2
|
+
export type PopupType = 'popup' | 'dialog' | 'message';
|
3
|
+
export default function usePopupManager(type: PopupType, { visible, runOnMounted, }?: {
|
4
|
+
visible?: Ref<boolean>;
|
5
|
+
runOnMounted?: boolean;
|
6
|
+
}): {
|
7
|
+
zIndex: Readonly<Ref<number, number>>;
|
8
|
+
open: () => void;
|
9
|
+
close: () => void;
|
10
|
+
isLastDialog: () => boolean;
|
11
|
+
};
|
@@ -0,0 +1,13 @@
|
|
1
|
+
type NamedColor = 'aliceblue' | 'antiquewhite' | 'aqua' | 'aquamarine' | 'azure' | 'beige' | 'bisque' | 'black' | 'blanchedalmond' | 'blue' | 'blueviolet' | 'brown' | 'burlywood' | 'cadetblue' | 'chartreuse' | 'chocolate' | 'coral' | 'cornflowerblue' | 'cornsilk' | 'crimson' | 'cyan' | 'darkblue' | 'darkcyan' | 'darkgoldenrod' | 'darkgray' | 'darkgreen' | 'darkgrey' | 'darkkhaki' | 'darkmagenta' | 'darkolivegreen' | 'darkorange' | 'darkorchid' | 'darkred' | 'darksalmon' | 'darkseagreen' | 'darkslateblue' | 'darkslategray' | 'darkslategrey' | 'darkturquoise' | 'darkviolet' | 'deeppink' | 'deepskyblue' | 'dimgray' | 'dimgrey' | 'dodgerblue' | 'firebrick' | 'floralwhite' | 'forestgreen' | 'fuchsia' | 'gainsboro' | 'ghostwhite' | 'gold' | 'goldenrod' | 'gray' | 'green' | 'greenyellow' | 'grey' | 'honeydew' | 'hotpink' | 'indianred' | 'indigo' | 'ivory' | 'khaki' | 'lavender' | 'lavenderblush' | 'lawngreen' | 'lemonchiffon' | 'lightblue' | 'lightcoral' | 'lightcyan' | 'lightgoldenrodyellow' | 'lightgray' | 'lightgreen' | 'lightgrey' | 'lightpink' | 'lightsalmon' | 'lightseagreen' | 'lightskyblue' | 'lightslategray' | 'lightslategrey' | 'lightsteelblue' | 'lightyellow' | 'lime' | 'limegreen' | 'linen' | 'magenta' | 'maroon' | 'mediumaquamarine' | 'mediumblue' | 'mediumorchid' | 'mediumpurple' | 'mediumseagreen' | 'mediumslateblue' | 'mediumspringgreen' | 'mediumturquoise' | 'mediumvioletred' | 'midnightblue' | 'mintcream' | 'mistyrose' | 'moccasin' | 'navajowhite' | 'navy' | 'oldlace' | 'olive' | 'olivedrab' | 'orange' | 'orangered' | 'orchid' | 'palegoldenrod' | 'palegreen' | 'paleturquoise' | 'palevioletred' | 'papayawhip' | 'peachpuff' | 'peru' | 'pink' | 'plum' | 'powderblue' | 'purple' | 'red' | 'rosybrown' | 'royalblue' | 'saddlebrown' | 'salmon' | 'sandybrown' | 'seagreen' | 'seashell' | 'sienna' | 'silver' | 'skyblue' | 'slateblue' | 'slategray' | 'slategrey' | 'snow' | 'springgreen' | 'steelblue' | 'tan' | 'teal' | 'thistle' | 'tomato' | 'turquoise' | 'violet' | 'wheat' | 'white' | 'whitesmoke' | 'yellow' | 'yellowgreen';
|
2
|
+
type HexColor = `#${string}`;
|
3
|
+
type RgbColor = `rgb(${number}, ${number}, ${number})`;
|
4
|
+
type RgbaColor = `rgba(${number}, ${number}, ${number}, ${number})`;
|
5
|
+
type HslColor = `hsl(${number}, ${number}%, ${number}%)`;
|
6
|
+
type HslaColor = `hsla(${number}, ${number}%, ${number}%, ${number})`;
|
7
|
+
export type CSSColor = NamedColor | HexColor | RgbColor | RgbaColor | HslColor | HslaColor;
|
8
|
+
type CSSUnit = 'px' | 'em' | 'rem' | 'vw' | 'vh' | 'vmin' | 'vmax' | '%' | 'pt' | 'cm' | 'mm' | 'in' | 'pc' | 'ex' | 'ch';
|
9
|
+
export type LengthValue = `${number}${CSSUnit}`;
|
10
|
+
type GlobalValues = 'auto' | 'inherit' | 'initial' | 'unset';
|
11
|
+
type PaddingMarginValue = LengthValue | `${number}` | GlobalValues;
|
12
|
+
export type PaddingMargin = PaddingMarginValue | [PaddingMarginValue, PaddingMarginValue] | [PaddingMarginValue, PaddingMarginValue, PaddingMarginValue] | [PaddingMarginValue, PaddingMarginValue, PaddingMarginValue, PaddingMarginValue];
|
13
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export type ComponentSize = 'mini' | 'small' | 'medium' | 'large';
|
@@ -0,0 +1,9 @@
|
|
1
|
+
export declare const COMPONENT_INSTALLED_KEY: unique symbol;
|
2
|
+
export declare const getClassPrefix: (name?: string) => string;
|
3
|
+
export declare const getComponentPrefix: (name: string) => string;
|
4
|
+
export declare const getClassNameMixin: (name: string) => {
|
5
|
+
block: string;
|
6
|
+
element: (className: string) => string;
|
7
|
+
modifier: (className: string) => string;
|
8
|
+
is: (className: string) => string;
|
9
|
+
};
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { CSSProperties } from 'vue';
|
2
|
+
export declare const NOOP: () => void;
|
3
|
+
export declare const querySelector: (selectors: string, container?: Document | HTMLElement) => HTMLElement | undefined;
|
4
|
+
export declare const getScrollBarWidth: (element: HTMLElement) => number;
|
5
|
+
export declare const isScroll: (element: HTMLElement) => boolean;
|
6
|
+
export declare const getStyle: (element: HTMLElement, styleName: keyof CSSProperties) => string;
|
7
|
+
export declare const setStyle: (element: HTMLElement, styleName: CSSProperties | keyof CSSProperties, value?: string | number) => void;
|
8
|
+
export declare const getElement: (target: string | HTMLElement | undefined, container?: Document | HTMLElement) => HTMLElement | undefined;
|
9
|
+
export declare const on: <K extends keyof HTMLElementEventMap>(element: HTMLElement | Window, event: K, handler: (ev: HTMLElementEventMap[K]) => void, options?: boolean | AddEventListenerOptions) => void;
|
10
|
+
export declare const off: <K extends keyof HTMLElementEventMap>(element: HTMLElement | Window, type: K, handler: (ev: HTMLElementEventMap[K]) => void, options?: boolean | EventListenerOptions) => void;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
export declare const getProp: (target: any, path: any, defVal?: any) => any;
|
2
|
+
export declare const setProp: (target: any, path: any, value: any) => any;
|
3
|
+
export declare const deepClone: (obj: any, set?: any) => any;
|
4
|
+
export declare const NOOP: () => void;
|
5
|
+
export declare const addUnit: (value: string | number | undefined, unit?: string) => string;
|
6
|
+
export declare const upperFirstChar: (text: string) => string | undefined;
|
7
|
+
export declare const compose: <T>(...fns: ((...v: T[]) => T)[]) => (...v: T[]) => T;
|
8
|
+
export declare const pipe: <T>(...fns: ((...v: T[]) => T)[]) => (...v: T[]) => T;
|
9
|
+
export declare const findLastIndex: (arr: never[] | undefined, callback: (item: any, i: number, origin: any[]) => boolean) => number;
|
10
|
+
export declare const getUniqueId: (size?: number) => string;
|
11
|
+
export declare const genMatrix: (list: any[], row: number) => any[];
|
12
|
+
export declare const sleep: (delay?: number) => Promise<unknown>;
|
@@ -0,0 +1,59 @@
|
|
1
|
+
/**
|
2
|
+
* 首字母大写及-符号仅跟的字母大写
|
3
|
+
* @param str
|
4
|
+
*/
|
5
|
+
export declare const toPascalCase: (str: string) => string;
|
6
|
+
export declare function createIconComponent(name: string): import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
7
|
+
size: {
|
8
|
+
type: (StringConstructor | NumberConstructor)[];
|
9
|
+
default: undefined;
|
10
|
+
};
|
11
|
+
rotate: {
|
12
|
+
type: NumberConstructor;
|
13
|
+
default: undefined;
|
14
|
+
};
|
15
|
+
spin: {
|
16
|
+
type: BooleanConstructor;
|
17
|
+
default: boolean;
|
18
|
+
};
|
19
|
+
color: {
|
20
|
+
type: StringConstructor;
|
21
|
+
default: undefined;
|
22
|
+
};
|
23
|
+
fillColor: {
|
24
|
+
type: ArrayConstructor;
|
25
|
+
default: undefined;
|
26
|
+
};
|
27
|
+
}>, {
|
28
|
+
cls: import('vue').ComputedRef<(string | {
|
29
|
+
"x-icon-loading": boolean;
|
30
|
+
})[]>;
|
31
|
+
styles: import('vue').ComputedRef<import('vue').CSSProperties>;
|
32
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
33
|
+
size: {
|
34
|
+
type: (StringConstructor | NumberConstructor)[];
|
35
|
+
default: undefined;
|
36
|
+
};
|
37
|
+
rotate: {
|
38
|
+
type: NumberConstructor;
|
39
|
+
default: undefined;
|
40
|
+
};
|
41
|
+
spin: {
|
42
|
+
type: BooleanConstructor;
|
43
|
+
default: boolean;
|
44
|
+
};
|
45
|
+
color: {
|
46
|
+
type: StringConstructor;
|
47
|
+
default: undefined;
|
48
|
+
};
|
49
|
+
fillColor: {
|
50
|
+
type: ArrayConstructor;
|
51
|
+
default: undefined;
|
52
|
+
};
|
53
|
+
}>> & Readonly<{}>, {
|
54
|
+
size: string | number;
|
55
|
+
color: string;
|
56
|
+
rotate: number;
|
57
|
+
spin: boolean;
|
58
|
+
fillColor: unknown[];
|
59
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
@@ -1,36 +1,22 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
export declare function
|
4
|
-
export declare function
|
5
|
-
export declare
|
6
|
-
export declare function
|
7
|
-
export declare
|
8
|
-
export declare function
|
9
|
-
export declare function
|
10
|
-
export declare function
|
11
|
-
export declare function
|
12
|
-
export declare function
|
13
|
-
export declare function
|
14
|
-
export declare function
|
15
|
-
export declare function
|
16
|
-
export declare function isExist(obj: any): boolean;
|
17
|
-
export declare function isWindow(el: any): el is Window;
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
* @param bgColor
|
24
|
-
*/
|
25
|
-
export declare function consoleLog(name: string, message: string, color: string, bgColor: string): void;
|
26
|
-
/**
|
27
|
-
* 当前时间
|
28
|
-
* @description 用于控制台打印使用
|
29
|
-
*/
|
30
|
-
export declare function now(): string;
|
31
|
-
/**
|
32
|
-
* jsonStringify2Parse
|
33
|
-
* @param value
|
34
|
-
* @description 将JSON字符串转换为JSON对象
|
35
|
-
*/
|
36
|
-
export declare function jsonStringify2Parse(value: unknown): any;
|
1
|
+
import { ComponentPublicInstance, VNodeNormalizedChildren, VNode } from 'vue';
|
2
|
+
import { Dayjs } from 'dayjs';
|
3
|
+
export declare function isArray(obj: any): obj is any[];
|
4
|
+
export declare function isNull(obj: any): obj is null;
|
5
|
+
export declare function isBoolean(obj: unknown): obj is boolean;
|
6
|
+
export declare function isObject<T>(obj: T): obj is Extract<T, Record<string, any>>;
|
7
|
+
export declare const isPromise: <T>(obj: unknown) => obj is Promise<T>;
|
8
|
+
export declare function isString(obj: any): obj is string;
|
9
|
+
export declare function isNumber(obj: any): obj is number;
|
10
|
+
export declare function isRegExp(obj: any): boolean;
|
11
|
+
export declare function isDate(obj: any): boolean;
|
12
|
+
export declare function isColor(color: any): boolean;
|
13
|
+
export declare function isUndefined(obj: any): obj is undefined;
|
14
|
+
export declare function isFunction(obj: any): obj is (...args: any[]) => any;
|
15
|
+
export declare function isEmptyObject(obj: any): boolean;
|
16
|
+
export declare function isExist(obj: any): boolean;
|
17
|
+
export declare function isWindow(el: any): el is Window;
|
18
|
+
export declare const isComponentInstance: (value: any) => value is ComponentPublicInstance;
|
19
|
+
export declare const isArrayChildren: (children: VNodeNormalizedChildren) => children is VNode[];
|
20
|
+
export declare const isQuarter: (fromat: string) => boolean;
|
21
|
+
export declare function isDayjs(time: any): time is Dayjs;
|
22
|
+
export declare function isClient(): boolean;
|
@@ -0,0 +1,24 @@
|
|
1
|
+
export declare const KEYBOARD_KEY: {
|
2
|
+
ENTER: string;
|
3
|
+
ESC: string;
|
4
|
+
BACKSPACE: string;
|
5
|
+
TAB: string;
|
6
|
+
SPACE: string;
|
7
|
+
ARROW_UP: string;
|
8
|
+
ARROW_DOWN: string;
|
9
|
+
ARROW_LEFT: string;
|
10
|
+
ARROW_RIGHT: string;
|
11
|
+
};
|
12
|
+
export interface CodeKey {
|
13
|
+
/** Keyboard key */
|
14
|
+
key: string;
|
15
|
+
/** Ctrl / ⌃ */
|
16
|
+
ctrl?: boolean;
|
17
|
+
/** Shift key */
|
18
|
+
shift?: boolean;
|
19
|
+
/** Alt / ⌥ */
|
20
|
+
alt?: boolean;
|
21
|
+
/** meta ⌘ / ⊞ */
|
22
|
+
meta?: boolean;
|
23
|
+
}
|
24
|
+
export declare const getKeyDownHandler: (codeKeyMap: Map<CodeKey | string, (e: Event) => void>) => (event: KeyboardEvent) => void;
|
File without changes
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { VNodeTypes, VNode, PropType, Component, Slots, Plugin } from 'vue';
|
2
|
+
export type SFCWithInstall<T> = T & Plugin;
|
3
|
+
/**
|
4
|
+
* @description Vue生态操作封装
|
5
|
+
*/
|
6
|
+
export declare const definePropType: <T>(val: unknown) => PropType<T>;
|
7
|
+
export declare enum ShapeFlags {
|
8
|
+
ELEMENT = 1,
|
9
|
+
FUNCTIONAL_COMPONENT = 2,
|
10
|
+
STATEFUL_COMPONENT = 4,
|
11
|
+
COMPONENT = 6,
|
12
|
+
TEXT_CHILDREN = 8,
|
13
|
+
ARRAY_CHILDREN = 16,
|
14
|
+
SLOTS_CHILDREN = 32,
|
15
|
+
TELEPORT = 64,
|
16
|
+
SUSPENSE = 128,
|
17
|
+
COMPONENT_SHOULD_KEEP_ALIVE = 256,
|
18
|
+
COMPONENT_KEPT_ALIVE = 512
|
19
|
+
}
|
20
|
+
export declare const isElement: (vn: VNode) => boolean;
|
21
|
+
export declare const isComponent: (vn: VNode, type?: VNodeTypes) => type is Component;
|
22
|
+
export declare const isTextChildren: (child: VNode, children: VNode["children"]) => children is string;
|
23
|
+
export declare const isArrayChildren: (vn: VNode, children: VNode["children"]) => children is VNode[];
|
24
|
+
export declare const isSlotsChildren: (vn: VNode, children: VNode["children"]) => children is Slots;
|
25
|
+
export declare const getAllElements: (children: VNode[] | undefined, includeText?: boolean) => VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
26
|
+
[key: string]: any;
|
27
|
+
}>[];
|
28
|
+
export declare const withInstall: <T, E extends Record<string, any>>(main: T, extra?: E) => SFCWithInstall<T> & E;
|
@@ -0,0 +1,162 @@
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
2
|
+
disabled: BooleanConstructor;
|
3
|
+
block: BooleanConstructor;
|
4
|
+
loading: BooleanConstructor;
|
5
|
+
loadingFill: {
|
6
|
+
type: BooleanConstructor;
|
7
|
+
default: boolean;
|
8
|
+
};
|
9
|
+
debounce: {
|
10
|
+
type: NumberConstructor;
|
11
|
+
default: number;
|
12
|
+
};
|
13
|
+
shape: {
|
14
|
+
type: import('vue').PropType<import('./props').ButtonShape>;
|
15
|
+
default: undefined;
|
16
|
+
};
|
17
|
+
link: {
|
18
|
+
type: BooleanConstructor;
|
19
|
+
default: boolean;
|
20
|
+
};
|
21
|
+
type: {
|
22
|
+
type: import('vue').PropType<import('./props').ButtonType>;
|
23
|
+
default: undefined;
|
24
|
+
};
|
25
|
+
status: {
|
26
|
+
type: import('vue').PropType<import('./props').ButtonStatus>;
|
27
|
+
default: undefined;
|
28
|
+
};
|
29
|
+
plain: {
|
30
|
+
type: BooleanConstructor;
|
31
|
+
default: boolean;
|
32
|
+
};
|
33
|
+
size: {
|
34
|
+
type: import('vue').PropType<import('./props').ButtonSize>;
|
35
|
+
default: string;
|
36
|
+
};
|
37
|
+
border: {
|
38
|
+
type: BooleanConstructor;
|
39
|
+
default: boolean;
|
40
|
+
};
|
41
|
+
}>, {
|
42
|
+
cn: {
|
43
|
+
block: string;
|
44
|
+
element: (className: string) => string;
|
45
|
+
modifier: (className: string) => string;
|
46
|
+
is: (className: string) => string;
|
47
|
+
};
|
48
|
+
cls: import('vue').ComputedRef<(string | false | undefined)[]>;
|
49
|
+
handleClick: (event: MouseEvent) => Promise<void>;
|
50
|
+
isLoading: import('vue').ComputedRef<boolean>;
|
51
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "click"[], "click", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
52
|
+
disabled: BooleanConstructor;
|
53
|
+
block: BooleanConstructor;
|
54
|
+
loading: BooleanConstructor;
|
55
|
+
loadingFill: {
|
56
|
+
type: BooleanConstructor;
|
57
|
+
default: boolean;
|
58
|
+
};
|
59
|
+
debounce: {
|
60
|
+
type: NumberConstructor;
|
61
|
+
default: number;
|
62
|
+
};
|
63
|
+
shape: {
|
64
|
+
type: import('vue').PropType<import('./props').ButtonShape>;
|
65
|
+
default: undefined;
|
66
|
+
};
|
67
|
+
link: {
|
68
|
+
type: BooleanConstructor;
|
69
|
+
default: boolean;
|
70
|
+
};
|
71
|
+
type: {
|
72
|
+
type: import('vue').PropType<import('./props').ButtonType>;
|
73
|
+
default: undefined;
|
74
|
+
};
|
75
|
+
status: {
|
76
|
+
type: import('vue').PropType<import('./props').ButtonStatus>;
|
77
|
+
default: undefined;
|
78
|
+
};
|
79
|
+
plain: {
|
80
|
+
type: BooleanConstructor;
|
81
|
+
default: boolean;
|
82
|
+
};
|
83
|
+
size: {
|
84
|
+
type: import('vue').PropType<import('./props').ButtonSize>;
|
85
|
+
default: string;
|
86
|
+
};
|
87
|
+
border: {
|
88
|
+
type: BooleanConstructor;
|
89
|
+
default: boolean;
|
90
|
+
};
|
91
|
+
}>> & Readonly<{
|
92
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
93
|
+
}>, {
|
94
|
+
size: import('./props').ButtonSize;
|
95
|
+
border: boolean;
|
96
|
+
link: boolean;
|
97
|
+
block: boolean;
|
98
|
+
disabled: boolean;
|
99
|
+
type: import('./props').ButtonType;
|
100
|
+
loading: boolean;
|
101
|
+
loadingFill: boolean;
|
102
|
+
debounce: number;
|
103
|
+
shape: import('./props').ButtonShape;
|
104
|
+
status: import('./props').ButtonStatus;
|
105
|
+
plain: boolean;
|
106
|
+
}, {}, {
|
107
|
+
AnimationLoading: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
108
|
+
size: {
|
109
|
+
type: (StringConstructor | NumberConstructor)[];
|
110
|
+
default: undefined;
|
111
|
+
};
|
112
|
+
rotate: {
|
113
|
+
type: NumberConstructor;
|
114
|
+
default: undefined;
|
115
|
+
};
|
116
|
+
spin: {
|
117
|
+
type: BooleanConstructor;
|
118
|
+
default: boolean;
|
119
|
+
};
|
120
|
+
color: {
|
121
|
+
type: StringConstructor;
|
122
|
+
default: undefined;
|
123
|
+
};
|
124
|
+
fillColor: {
|
125
|
+
type: ArrayConstructor;
|
126
|
+
default: undefined;
|
127
|
+
};
|
128
|
+
}>, {
|
129
|
+
cls: import('vue').ComputedRef<(string | {
|
130
|
+
"x-icon-loading": boolean;
|
131
|
+
})[]>;
|
132
|
+
styles: import('vue').ComputedRef<import('vue').CSSProperties>;
|
133
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
134
|
+
size: {
|
135
|
+
type: (StringConstructor | NumberConstructor)[];
|
136
|
+
default: undefined;
|
137
|
+
};
|
138
|
+
rotate: {
|
139
|
+
type: NumberConstructor;
|
140
|
+
default: undefined;
|
141
|
+
};
|
142
|
+
spin: {
|
143
|
+
type: BooleanConstructor;
|
144
|
+
default: boolean;
|
145
|
+
};
|
146
|
+
color: {
|
147
|
+
type: StringConstructor;
|
148
|
+
default: undefined;
|
149
|
+
};
|
150
|
+
fillColor: {
|
151
|
+
type: ArrayConstructor;
|
152
|
+
default: undefined;
|
153
|
+
};
|
154
|
+
}>> & Readonly<{}>, {
|
155
|
+
size: string | number;
|
156
|
+
color: string;
|
157
|
+
rotate: number;
|
158
|
+
spin: boolean;
|
159
|
+
fillColor: unknown[];
|
160
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
161
|
+
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
162
|
+
export default _default;
|
@@ -0,0 +1,45 @@
|
|
1
|
+
export type ButtonSize = 'mini' | 'small' | 'medium' | 'large' | 'huge';
|
2
|
+
export type ButtonStatus = 'success' | 'warning' | 'strong' | 'danger' | 'info';
|
3
|
+
export type ButtonType = 'primary' | 'secondary' | 'dashed' | 'outline' | 'text';
|
4
|
+
export type ButtonShape = 'round' | 'circle' | 'square';
|
5
|
+
export declare const buttonProps: {
|
6
|
+
disabled: BooleanConstructor;
|
7
|
+
block: BooleanConstructor;
|
8
|
+
loading: BooleanConstructor;
|
9
|
+
loadingFill: {
|
10
|
+
type: BooleanConstructor;
|
11
|
+
default: boolean;
|
12
|
+
};
|
13
|
+
debounce: {
|
14
|
+
type: NumberConstructor;
|
15
|
+
default: number;
|
16
|
+
};
|
17
|
+
shape: {
|
18
|
+
type: import('vue').PropType<ButtonShape>;
|
19
|
+
default: undefined;
|
20
|
+
};
|
21
|
+
link: {
|
22
|
+
type: BooleanConstructor;
|
23
|
+
default: boolean;
|
24
|
+
};
|
25
|
+
type: {
|
26
|
+
type: import('vue').PropType<ButtonType>;
|
27
|
+
default: undefined;
|
28
|
+
};
|
29
|
+
status: {
|
30
|
+
type: import('vue').PropType<ButtonStatus>;
|
31
|
+
default: undefined;
|
32
|
+
};
|
33
|
+
plain: {
|
34
|
+
type: BooleanConstructor;
|
35
|
+
default: boolean;
|
36
|
+
};
|
37
|
+
size: {
|
38
|
+
type: import('vue').PropType<ButtonSize>;
|
39
|
+
default: string;
|
40
|
+
};
|
41
|
+
border: {
|
42
|
+
type: BooleanConstructor;
|
43
|
+
default: boolean;
|
44
|
+
};
|
45
|
+
};
|