geekin-devtoys 0.3.7 → 0.3.8
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/lib/GButton/index.js +1 -0
- package/lib/GButton/index.mjs +8 -0
- package/lib/GButton.d.ts +1 -0
- package/lib/GDialog/index.js +1 -1
- package/lib/GDialog/index.mjs +270 -340
- package/lib/GDialog/style.css +1 -1
- package/lib/GInputTreeTag/index.js +1 -1
- package/lib/GInputTreeTag/index.mjs +1 -1
- package/lib/GInputTreeTag/style.css +1 -1
- package/lib/GSteps/index.js +1 -1
- package/lib/GSteps/index.mjs +4 -4
- package/lib/GSteps/style.css +1 -1
- package/lib/GVideo/index.js +2 -2
- package/lib/GVideo/index.mjs +159 -158
- package/lib/GVideo/style.css +1 -1
- package/lib/components/GButton/index.d.ts +38 -0
- package/lib/components/GDialog/const.d.ts +4 -4
- package/lib/components/GDialog/icons.d.ts +4 -4
- package/lib/components/GInputTreeTag/index.d.ts +21 -13
- package/lib/components/GProgress/index.d.ts +1 -1
- package/lib/components/GRing/index.d.ts +1 -1
- package/lib/components/GScreen/index.d.ts +1 -1
- package/lib/index/index.js +1 -1
- package/lib/index/index.mjs +16 -12
- package/lib/index/style.css +1 -0
- package/lib/index-CWxEZ_zc.mjs +74 -0
- package/lib/index-Q0Ej8RIj.js +1 -0
- package/lib/index.d.ts +2 -1
- package/package.json +9 -1
- package/lib/components/GDialog/GButton.d.ts +0 -42
package/lib/GVideo/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.g-video-container[data-v-
|
|
1
|
+
.g-video-container[data-v-908e0405]{height:100%;width:100%;position:relative}.g-video-container .g-video-window[data-v-908e0405]{height:100%;width:100%;display:grid;place-items:center}.g-video-container .g-video-window-tips[data-v-908e0405]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:1000;color:#fff;font-size:.8rem}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
type ButtonType = 'primary' | 'success' | 'warning' | 'danger' | 'default' | 'link';
|
|
2
|
+
type ButtonSize = 'large' | 'middle' | 'small';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
/** 按钮类型 @default 'default' */
|
|
5
|
+
type?: ButtonType;
|
|
6
|
+
/** 按钮尺寸 @default 'middle' */
|
|
7
|
+
size?: ButtonSize;
|
|
8
|
+
/** 加载中状态 */
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
/** 禁用状态 */
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/** 宽度撑满父容器 */
|
|
13
|
+
block?: boolean;
|
|
14
|
+
/** 原生 button type @default 'button' */
|
|
15
|
+
nativeType?: 'button' | 'submit' | 'reset';
|
|
16
|
+
};
|
|
17
|
+
declare function __VLS_template(): {
|
|
18
|
+
attrs: Partial<{}>;
|
|
19
|
+
slots: {
|
|
20
|
+
icon?(_: {}): any;
|
|
21
|
+
default?(_: {}): any;
|
|
22
|
+
};
|
|
23
|
+
refs: {};
|
|
24
|
+
rootEl: HTMLButtonElement;
|
|
25
|
+
};
|
|
26
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
27
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
28
|
+
click: (event: MouseEvent) => any;
|
|
29
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
30
|
+
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
31
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
|
|
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
|
+
};
|
|
@@ -29,16 +29,16 @@ export interface FooterAction {
|
|
|
29
29
|
key: string;
|
|
30
30
|
/** 按钮文案 */
|
|
31
31
|
label: string;
|
|
32
|
-
/**
|
|
33
|
-
type?: 'primary' | '
|
|
32
|
+
/** 按钮类型(与 GButton 组件一致) */
|
|
33
|
+
type?: 'primary' | 'default' | 'link';
|
|
34
|
+
/** 是否危险按钮(红色,与 GButton 组件一致) */
|
|
35
|
+
danger?: boolean;
|
|
34
36
|
/** 按钮图标组件 */
|
|
35
37
|
icon?: Component;
|
|
36
38
|
/** loading 态 */
|
|
37
39
|
loading?: boolean;
|
|
38
40
|
/** 禁用态 */
|
|
39
41
|
disabled?: boolean;
|
|
40
|
-
/** 是否朴素按钮 */
|
|
41
|
-
plain?: boolean;
|
|
42
42
|
/** 点击回调(与 emit('action', key) 同时触发,回调返回 Promise 时按钮自动 loading) */
|
|
43
43
|
onClick?: () => void | Promise<void>;
|
|
44
44
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { FunctionalComponent } from 'vue';
|
|
2
|
-
/**
|
|
2
|
+
/** 关闭(圆环加叉,取消按钮默认图标) */
|
|
3
3
|
export declare const Remove: FunctionalComponent;
|
|
4
|
-
/**
|
|
4
|
+
/** 返回(撤销箭头,重置按钮默认图标) */
|
|
5
5
|
export declare const Refresh: FunctionalComponent;
|
|
6
|
-
/**
|
|
6
|
+
/** 圆环对勾(保存按钮默认图标) */
|
|
7
7
|
export declare const CircleCheck: FunctionalComponent;
|
|
8
|
-
/**
|
|
8
|
+
/** 退出(方框加右箭头,最小化图标默认图标) */
|
|
9
9
|
export declare const ChatDotRound: FunctionalComponent;
|
|
@@ -516,7 +516,7 @@ declare function __VLS_template(): {
|
|
|
516
516
|
readonly disabled: boolean;
|
|
517
517
|
readonly nextSibling: any | null;
|
|
518
518
|
readonly previousSibling: any | null;
|
|
519
|
-
contains: (target: import('element-plus/es/components/tree/src/model/node.mjs').default, deep
|
|
519
|
+
contains: (target: import('element-plus/es/components/tree/src/model/node.mjs').default, deep?: boolean) => boolean;
|
|
520
520
|
remove: () => void;
|
|
521
521
|
insertChild: (child?: import('element-plus').FakeNode | import('element-plus/es/components/tree/src/model/node.mjs').default, index?: number, batch?: boolean) => void;
|
|
522
522
|
insertBefore: (child: import('element-plus').FakeNode | import('element-plus/es/components/tree/src/model/node.mjs').default, ref: import('element-plus/es/components/tree/src/model/node.mjs').default) => void;
|
|
@@ -528,10 +528,12 @@ declare function __VLS_template(): {
|
|
|
528
528
|
collapse: () => void;
|
|
529
529
|
shouldLoadData: () => boolean;
|
|
530
530
|
updateLeafState: () => void;
|
|
531
|
-
setChecked: (value
|
|
531
|
+
setChecked: (value? /** 输入框是否可清空 */: boolean | string, deep?: boolean, recursion? /** tag 是否可关闭 */: boolean, passValue?: boolean) => void;
|
|
532
532
|
getChildren: (forceInit?: boolean) => import('element-plus').TreeNodeData | import('element-plus').TreeNodeData[] | null;
|
|
533
533
|
updateChildren: () => void;
|
|
534
|
-
loadData: (callback: (data?: import('element-plus').TreeNodeData[]) => void, defaultProps
|
|
534
|
+
loadData: (callback: (data?: import('element-plus').TreeNodeData[]) => void, defaultProps
|
|
535
|
+
/** 是否允许回车通过精确 label 匹配添加 */
|
|
536
|
+
? /** 是否允许回车通过精确 label 匹配添加 */: import('element-plus').TreeNodeLoadedDefaultProps) => void;
|
|
535
537
|
eachNode: (callback: (node: import('element-plus/es/components/tree/src/model/node.mjs').default) => void) => void;
|
|
536
538
|
reInitChecked: () => void;
|
|
537
539
|
};
|
|
@@ -1029,7 +1031,7 @@ declare function __VLS_template(): {
|
|
|
1029
1031
|
readonly disabled: boolean;
|
|
1030
1032
|
readonly nextSibling: any | null;
|
|
1031
1033
|
readonly previousSibling: any | null;
|
|
1032
|
-
contains: (target: import('element-plus/es/components/tree/src/model/node.mjs').default, deep
|
|
1034
|
+
contains: (target: import('element-plus/es/components/tree/src/model/node.mjs').default, deep?: boolean) => boolean;
|
|
1033
1035
|
remove: () => void;
|
|
1034
1036
|
insertChild: (child?: import('element-plus').FakeNode | import('element-plus/es/components/tree/src/model/node.mjs').default, index?: number, batch?: boolean) => void;
|
|
1035
1037
|
insertBefore: (child: import('element-plus').FakeNode | import('element-plus/es/components/tree/src/model/node.mjs').default, ref: import('element-plus/es/components/tree/src/model/node.mjs').default) => void;
|
|
@@ -1041,10 +1043,12 @@ declare function __VLS_template(): {
|
|
|
1041
1043
|
collapse: () => void;
|
|
1042
1044
|
shouldLoadData: () => boolean;
|
|
1043
1045
|
updateLeafState: () => void;
|
|
1044
|
-
setChecked: (value
|
|
1046
|
+
setChecked: (value? /** 输入框是否可清空 */: boolean | string, deep?: boolean, recursion? /** tag 是否可关闭 */: boolean, passValue?: boolean) => void;
|
|
1045
1047
|
getChildren: (forceInit?: boolean) => import('element-plus').TreeNodeData | import('element-plus').TreeNodeData[] | null;
|
|
1046
1048
|
updateChildren: () => void;
|
|
1047
|
-
loadData: (callback: (data?: import('element-plus').TreeNodeData[]) => void, defaultProps
|
|
1049
|
+
loadData: (callback: (data?: import('element-plus').TreeNodeData[]) => void, defaultProps
|
|
1050
|
+
/** 是否允许回车通过精确 label 匹配添加 */
|
|
1051
|
+
? /** 是否允许回车通过精确 label 匹配添加 */: import('element-plus').TreeNodeLoadedDefaultProps) => void;
|
|
1048
1052
|
eachNode: (callback: (node: import('element-plus/es/components/tree/src/model/node.mjs').default) => void) => void;
|
|
1049
1053
|
reInitChecked: () => void;
|
|
1050
1054
|
};
|
|
@@ -1132,9 +1136,9 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {
|
|
|
1132
1136
|
}>, {
|
|
1133
1137
|
props: TreeFieldProps;
|
|
1134
1138
|
data: any[];
|
|
1139
|
+
width: number | string;
|
|
1135
1140
|
disabled: boolean;
|
|
1136
1141
|
placeholder: string;
|
|
1137
|
-
width: number | string;
|
|
1138
1142
|
modelValue: any[];
|
|
1139
1143
|
nodeKey: string;
|
|
1140
1144
|
popperMaxHeight: number;
|
|
@@ -1581,7 +1585,7 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {
|
|
|
1581
1585
|
readonly disabled: boolean;
|
|
1582
1586
|
readonly nextSibling: any | null;
|
|
1583
1587
|
readonly previousSibling: any | null;
|
|
1584
|
-
contains: (target: import('element-plus/es/components/tree/src/model/node.mjs').default, deep
|
|
1588
|
+
contains: (target: import('element-plus/es/components/tree/src/model/node.mjs').default, deep?: boolean) => boolean;
|
|
1585
1589
|
remove: () => void;
|
|
1586
1590
|
insertChild: (child?: import('element-plus').FakeNode | import('element-plus/es/components/tree/src/model/node.mjs').default, index?: number, batch?: boolean) => void;
|
|
1587
1591
|
insertBefore: (child: import('element-plus').FakeNode | import('element-plus/es/components/tree/src/model/node.mjs').default, ref: import('element-plus/es/components/tree/src/model/node.mjs').default) => void;
|
|
@@ -1593,10 +1597,12 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {
|
|
|
1593
1597
|
collapse: () => void;
|
|
1594
1598
|
shouldLoadData: () => boolean;
|
|
1595
1599
|
updateLeafState: () => void;
|
|
1596
|
-
setChecked: (value
|
|
1600
|
+
setChecked: (value? /** 输入框是否可清空 */: boolean | string, deep?: boolean, recursion? /** tag 是否可关闭 */: boolean, passValue?: boolean) => void;
|
|
1597
1601
|
getChildren: (forceInit?: boolean) => import('element-plus').TreeNodeData | import('element-plus').TreeNodeData[] | null;
|
|
1598
1602
|
updateChildren: () => void;
|
|
1599
|
-
loadData: (callback: (data?: import('element-plus').TreeNodeData[]) => void, defaultProps
|
|
1603
|
+
loadData: (callback: (data?: import('element-plus').TreeNodeData[]) => void, defaultProps
|
|
1604
|
+
/** 是否允许回车通过精确 label 匹配添加 */
|
|
1605
|
+
? /** 是否允许回车通过精确 label 匹配添加 */: import('element-plus').TreeNodeLoadedDefaultProps) => void;
|
|
1600
1606
|
eachNode: (callback: (node: import('element-plus/es/components/tree/src/model/node.mjs').default) => void) => void;
|
|
1601
1607
|
reInitChecked: () => void;
|
|
1602
1608
|
};
|
|
@@ -2094,7 +2100,7 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {
|
|
|
2094
2100
|
readonly disabled: boolean;
|
|
2095
2101
|
readonly nextSibling: any | null;
|
|
2096
2102
|
readonly previousSibling: any | null;
|
|
2097
|
-
contains: (target: import('element-plus/es/components/tree/src/model/node.mjs').default, deep
|
|
2103
|
+
contains: (target: import('element-plus/es/components/tree/src/model/node.mjs').default, deep?: boolean) => boolean;
|
|
2098
2104
|
remove: () => void;
|
|
2099
2105
|
insertChild: (child?: import('element-plus').FakeNode | import('element-plus/es/components/tree/src/model/node.mjs').default, index?: number, batch?: boolean) => void;
|
|
2100
2106
|
insertBefore: (child: import('element-plus').FakeNode | import('element-plus/es/components/tree/src/model/node.mjs').default, ref: import('element-plus/es/components/tree/src/model/node.mjs').default) => void;
|
|
@@ -2106,10 +2112,12 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {
|
|
|
2106
2112
|
collapse: () => void;
|
|
2107
2113
|
shouldLoadData: () => boolean;
|
|
2108
2114
|
updateLeafState: () => void;
|
|
2109
|
-
setChecked: (value
|
|
2115
|
+
setChecked: (value? /** 输入框是否可清空 */: boolean | string, deep?: boolean, recursion? /** tag 是否可关闭 */: boolean, passValue?: boolean) => void;
|
|
2110
2116
|
getChildren: (forceInit?: boolean) => import('element-plus').TreeNodeData | import('element-plus').TreeNodeData[] | null;
|
|
2111
2117
|
updateChildren: () => void;
|
|
2112
|
-
loadData: (callback: (data?: import('element-plus').TreeNodeData[]) => void, defaultProps
|
|
2118
|
+
loadData: (callback: (data?: import('element-plus').TreeNodeData[]) => void, defaultProps
|
|
2119
|
+
/** 是否允许回车通过精确 label 匹配添加 */
|
|
2120
|
+
? /** 是否允许回车通过精确 label 匹配添加 */: import('element-plus').TreeNodeLoadedDefaultProps) => void;
|
|
2113
2121
|
eachNode: (callback: (node: import('element-plus/es/components/tree/src/model/node.mjs').default) => void) => void;
|
|
2114
2122
|
reInitChecked: () => void;
|
|
2115
2123
|
};
|
|
@@ -55,10 +55,10 @@ declare function __VLS_template(): {
|
|
|
55
55
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
56
56
|
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
57
57
|
height: number | string;
|
|
58
|
+
wave: boolean;
|
|
58
59
|
count: number | string;
|
|
59
60
|
gradient: string[];
|
|
60
61
|
textColor: string;
|
|
61
|
-
wave: boolean;
|
|
62
62
|
waveSpeed: number;
|
|
63
63
|
forceAnimation: boolean;
|
|
64
64
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -66,10 +66,10 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
|
66
66
|
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
67
67
|
size: number | string;
|
|
68
68
|
strokeWidth: number;
|
|
69
|
+
wave: boolean;
|
|
69
70
|
count: number | string;
|
|
70
71
|
gradient: string[];
|
|
71
72
|
textColor: string;
|
|
72
|
-
wave: boolean;
|
|
73
73
|
waveSpeed: number;
|
|
74
74
|
forceAnimation: boolean;
|
|
75
75
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
@@ -42,8 +42,8 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {
|
|
|
42
42
|
safeScaleX: import('vue').ComputedRef<number>;
|
|
43
43
|
yScaleRatio: import('vue').ComputedRef<number>;
|
|
44
44
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
45
|
-
height: number;
|
|
46
45
|
width: number;
|
|
46
|
+
height: number;
|
|
47
47
|
debounceDelay: number;
|
|
48
48
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
49
49
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
package/lib/index/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("../GCount/index.js"),l=require("../GDialog/index.js"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("../GCount/index.js"),l=require("../GDialog/index.js"),n=require("../GTable/index.js"),o=require("../GVideo/index.js"),a=require("../GBubble/index.js"),G=require("../GProgress/index.js"),d=require("../GScreen/index.js"),i=require("../GPluginVideo/index.js"),s=require("../GPie3D/index.js"),c=require("../GRing/index.js"),f=require("../GInputTreeTag/index.js"),q=require("../GFuzzyText/index.js"),e=require("../GCard/index.js"),g=require("../GScroller/index.js"),T=require("../GShinyText/index.js"),S=require("../GSteps/index.js");require("../GButton/index.js");const b=require("../index-Q0Ej8RIj.js"),u={GCount:r.default,GDialog:l.default,GTable:n.default,GVideo:o.default,GBubble:a.default,GProgress:G.default,GScreen:d.default,GPluginVideo:i.default,GPie3D:s.default,GRing:c.default,GInputTreeTag:f.default,GFuzzyText:q.default,GCard:e.default,GScroller:g.default,GShinyText:T.default,GSteps:S.default,GButton:b.GButton},x=P=>{Object.keys(u).forEach(p=>{const t=u[p];P.component(t.name,t)})},y={install:x};exports.GCount=r.default;exports.GDialog=l.default;exports.GTable=n.default;exports.GVideo=o.default;exports.GBubble=a.default;exports.GProgress=G.default;exports.GScreen=d.default;exports.GPluginVideo=i.default;exports.GPie3D=s.default;exports.GRing=c.default;exports.GInputTreeTag=f.default;exports.GFuzzyText=q.default;exports.GCard=e.default;exports.cardPresets=e.cardPresets;exports.GScroller=g.default;exports.GShinyText=T.default;exports.GSteps=S.default;exports.GButton=b.GButton;exports.default=y;
|
package/lib/index/index.mjs
CHANGED
|
@@ -8,13 +8,15 @@ import G from "../GScreen/index.mjs";
|
|
|
8
8
|
import a from "../GPluginVideo/index.mjs";
|
|
9
9
|
import c from "../GPie3D/index.mjs";
|
|
10
10
|
import l from "../GRing/index.mjs";
|
|
11
|
-
import
|
|
12
|
-
import
|
|
11
|
+
import u from "../GInputTreeTag/index.mjs";
|
|
12
|
+
import _ from "../GFuzzyText/index.mjs";
|
|
13
13
|
import d from "../GCard/index.mjs";
|
|
14
|
-
import { cardPresets as
|
|
14
|
+
import { cardPresets as J } from "../GCard/index.mjs";
|
|
15
15
|
import x from "../GScroller/index.mjs";
|
|
16
16
|
import T from "../GShinyText/index.mjs";
|
|
17
17
|
import g from "../GSteps/index.mjs";
|
|
18
|
+
import "../GButton/index.mjs";
|
|
19
|
+
import { G as S } from "../index-CWxEZ_zc.mjs";
|
|
18
20
|
const r = {
|
|
19
21
|
GCount: i,
|
|
20
22
|
GDialog: e,
|
|
@@ -26,25 +28,27 @@ const r = {
|
|
|
26
28
|
GPluginVideo: a,
|
|
27
29
|
GPie3D: c,
|
|
28
30
|
GRing: l,
|
|
29
|
-
GInputTreeTag:
|
|
30
|
-
GFuzzyText:
|
|
31
|
+
GInputTreeTag: u,
|
|
32
|
+
GFuzzyText: _,
|
|
31
33
|
GCard: d,
|
|
32
34
|
GScroller: x,
|
|
33
35
|
GShinyText: T,
|
|
34
|
-
GSteps: g
|
|
35
|
-
|
|
36
|
+
GSteps: g,
|
|
37
|
+
GButton: S
|
|
38
|
+
}, y = (m) => {
|
|
36
39
|
Object.keys(r).forEach((t) => {
|
|
37
40
|
const o = r[t];
|
|
38
41
|
m.component(o.name, o);
|
|
39
42
|
});
|
|
40
|
-
},
|
|
43
|
+
}, w = { install: y };
|
|
41
44
|
export {
|
|
42
45
|
p as GBubble,
|
|
46
|
+
S as GButton,
|
|
43
47
|
d as GCard,
|
|
44
48
|
i as GCount,
|
|
45
49
|
e as GDialog,
|
|
46
|
-
|
|
47
|
-
|
|
50
|
+
_ as GFuzzyText,
|
|
51
|
+
u as GInputTreeTag,
|
|
48
52
|
c as GPie3D,
|
|
49
53
|
a as GPluginVideo,
|
|
50
54
|
s as GProgress,
|
|
@@ -55,6 +59,6 @@ export {
|
|
|
55
59
|
g as GSteps,
|
|
56
60
|
n as GTable,
|
|
57
61
|
f as GVideo,
|
|
58
|
-
|
|
59
|
-
|
|
62
|
+
J as cardPresets,
|
|
63
|
+
w as default
|
|
60
64
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@charset "UTF-8";.g-button[data-v-f9df97c9]{--g-button-wave-color: currentcolor;position:relative;display:inline-flex;align-items:center;justify-content:center;gap:6px;height:32px;padding:0 15px;font-size:var(--g-button-font-size, 14px);line-height:1;white-space:nowrap;cursor:pointer;-webkit-user-select:none;user-select:none;overflow:hidden;color:var(--g-button-text-color, var(--el-text-color-regular, rgba(0, 0, 0, .88)));background:var(--g-button-bg-color, var(--g-button-default-color, #e8e8eb));border:none;border-radius:var(--g-button-radius, 6px);outline:none;transition:all .2s cubic-bezier(.645,.045,.355,1)}.g-button[data-v-f9df97c9]:not(.is-disabled):hover,.g-button[data-v-f9df97c9]:not(.is-disabled):focus-visible{border-color:var(--g-button-primary-color, #039be5);color:var(--g-button-primary-color, #039be5)}.g-button[data-v-f9df97c9]:not(.is-disabled):active{border-color:color-mix(in srgb,var(--g-button-primary-color, #039be5) 70%,#000);color:color-mix(in srgb,var(--g-button-primary-color, #039be5) 70%,#000)}.g-button.is-block[data-v-f9df97c9]{display:flex;width:100%}.g-button.is-disabled[data-v-f9df97c9]{cursor:not-allowed;opacity:.5}.g-button--large[data-v-f9df97c9]{height:40px;padding:0 20px;font-size:16px;border-radius:var(--g-button-radius, 8px)}.g-button--small[data-v-f9df97c9]{height:24px;padding:0 7px;font-size:12px;border-radius:calc(var(--g-button-radius, 6px) - 2px)}.g-button--primary[data-v-f9df97c9]{--g-button-wave-color: #fff;color:#fff;background:var(--g-button-primary-color, #039be5);border-color:var(--g-button-primary-color, #039be5)}.g-button--primary[data-v-f9df97c9]:not(.is-disabled):hover,.g-button--primary[data-v-f9df97c9]:not(.is-disabled):focus-visible{color:#fff;background:color-mix(in srgb,var(--g-button-primary-color, #039be5) 85%,#fff)}.g-button--primary[data-v-f9df97c9]:not(.is-disabled):active{color:#fff;background:color-mix(in srgb,var(--g-button-primary-color, #039be5) 70%,#000)}.g-button--success[data-v-f9df97c9],.g-button--warning[data-v-f9df97c9],.g-button--danger[data-v-f9df97c9]{--g-button-wave-color: #fff;color:#fff}.g-button--success[data-v-f9df97c9]:not(.is-disabled):hover,.g-button--success[data-v-f9df97c9]:not(.is-disabled):focus-visible,.g-button--warning[data-v-f9df97c9]:not(.is-disabled):hover,.g-button--warning[data-v-f9df97c9]:not(.is-disabled):focus-visible,.g-button--danger[data-v-f9df97c9]:not(.is-disabled):hover,.g-button--danger[data-v-f9df97c9]:not(.is-disabled):focus-visible{color:#fff;background:color-mix(in srgb,var(--g-button-type-color) 85%,#fff)}.g-button--success[data-v-f9df97c9]:not(.is-disabled):active,.g-button--warning[data-v-f9df97c9]:not(.is-disabled):active,.g-button--danger[data-v-f9df97c9]:not(.is-disabled):active{color:#fff;background:color-mix(in srgb,var(--g-button-type-color) 70%,#000)}.g-button--success[data-v-f9df97c9]{--g-button-type-color: var(--g-button-success-color, #50c189);background:var(--g-button-type-color);border-color:var(--g-button-type-color)}.g-button--warning[data-v-f9df97c9]{--g-button-type-color: var(--g-button-warning-color, #f78716);background:var(--g-button-type-color);border-color:var(--g-button-type-color)}.g-button--danger[data-v-f9df97c9]{--g-button-type-color: var(--g-button-danger-color, #e1594d);background:var(--g-button-type-color);border-color:var(--g-button-type-color)}.g-button--link[data-v-f9df97c9]{height:auto;padding:2px 5px;background:transparent;border-color:transparent}.g-button--link[data-v-f9df97c9]:not(.is-disabled):hover,.g-button--link[data-v-f9df97c9]:not(.is-disabled):focus-visible{color:color-mix(in srgb,var(--g-button-primary-color, #039be5) 85%,#fff);background:transparent}.g-button__loading[data-v-f9df97c9]{width:1em;height:1em;border:2px solid currentcolor;border-top-color:transparent;border-radius:50%;animation:g-button-spin-f9df97c9 .6s linear infinite}.g-button__icon[data-v-f9df97c9]{display:inline-flex;align-items:center}.g-button__icon[data-v-f9df97c9] svg{width:1em;height:1em;display:block}.g-button__wave[data-v-f9df97c9]{position:absolute;transform:translate(-50%,-50%) scale(0);border-radius:50%;background:var(--g-button-wave-color);opacity:.2;pointer-events:none;animation:g-button-wave-f9df97c9 .6s ease-out forwards}@keyframes g-button-wave-f9df97c9{to{transform:translate(-50%,-50%) scale(1);opacity:0}}@media(prefers-reduced-motion:reduce){.g-button__wave[data-v-f9df97c9]{animation:none;opacity:0}}@keyframes g-button-spin-f9df97c9{to{transform:rotate(360deg)}}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { defineComponent as m, ref as f, createElementBlock as o, openBlock as s, normalizeClass as _, createCommentVNode as l, renderSlot as r, Fragment as k, renderList as B, normalizeStyle as z } from "vue";
|
|
2
|
+
import { _ as C } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
3
|
+
const v = ["type", "disabled"], T = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "g-button__loading"
|
|
6
|
+
}, $ = {
|
|
7
|
+
key: 1,
|
|
8
|
+
class: "g-button__icon"
|
|
9
|
+
}, w = {
|
|
10
|
+
key: 2,
|
|
11
|
+
class: "g-button__text"
|
|
12
|
+
}, G = /* @__PURE__ */ m({
|
|
13
|
+
name: "GButton",
|
|
14
|
+
__name: "index",
|
|
15
|
+
props: {
|
|
16
|
+
type: {},
|
|
17
|
+
size: {},
|
|
18
|
+
loading: { type: Boolean },
|
|
19
|
+
disabled: { type: Boolean },
|
|
20
|
+
block: { type: Boolean },
|
|
21
|
+
nativeType: {}
|
|
22
|
+
},
|
|
23
|
+
emits: ["click"],
|
|
24
|
+
setup(c, { emit: p }) {
|
|
25
|
+
const i = c, u = p, g = (e) => {
|
|
26
|
+
if (!(i.disabled || i.loading)) {
|
|
27
|
+
if (i.type !== "link") {
|
|
28
|
+
const t = e.currentTarget.getBoundingClientRect(), a = e.clientX !== 0 || e.clientY !== 0, d = {
|
|
29
|
+
id: ++y,
|
|
30
|
+
x: a ? e.clientX - t.left : t.width / 2,
|
|
31
|
+
y: a ? e.clientY - t.top : t.height / 2,
|
|
32
|
+
// 直径覆盖整个按钮对角线,保证涟漪能填满按钮
|
|
33
|
+
size: Math.hypot(t.width, t.height) * 2
|
|
34
|
+
};
|
|
35
|
+
n.value.push(d), setTimeout(() => {
|
|
36
|
+
n.value = n.value.filter((h) => h.id !== d.id);
|
|
37
|
+
}, 600);
|
|
38
|
+
}
|
|
39
|
+
u("click", e);
|
|
40
|
+
}
|
|
41
|
+
}, n = f([]);
|
|
42
|
+
let y = 0;
|
|
43
|
+
return (e, b) => (s(), o("button", {
|
|
44
|
+
class: _(["g-button", [
|
|
45
|
+
"g-button--" + e.type,
|
|
46
|
+
"g-button--" + e.size,
|
|
47
|
+
{
|
|
48
|
+
"is-block": e.block,
|
|
49
|
+
"is-loading": e.loading,
|
|
50
|
+
"is-disabled": e.disabled
|
|
51
|
+
}
|
|
52
|
+
]]),
|
|
53
|
+
type: e.nativeType,
|
|
54
|
+
disabled: e.disabled || e.loading,
|
|
55
|
+
onClick: g
|
|
56
|
+
}, [
|
|
57
|
+
e.loading ? (s(), o("span", T)) : l("", !0),
|
|
58
|
+
e.$slots.icon ? (s(), o("span", $, [
|
|
59
|
+
r(e.$slots, "icon", {}, void 0, !0)
|
|
60
|
+
])) : l("", !0),
|
|
61
|
+
e.$slots.default ? (s(), o("span", w, [
|
|
62
|
+
r(e.$slots, "default", {}, void 0, !0)
|
|
63
|
+
])) : l("", !0),
|
|
64
|
+
(s(!0), o(k, null, B(n.value, (t) => (s(), o("span", {
|
|
65
|
+
key: t.id,
|
|
66
|
+
class: "g-button__wave",
|
|
67
|
+
style: z({ left: t.x + "px", top: t.y + "px", width: t.size + "px", height: t.size + "px" })
|
|
68
|
+
}, null, 4))), 128))
|
|
69
|
+
], 10, v));
|
|
70
|
+
}
|
|
71
|
+
}), X = /* @__PURE__ */ C(G, [["__scopeId", "data-v-f9df97c9"]]);
|
|
72
|
+
export {
|
|
73
|
+
X as G
|
|
74
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),m=require("./_plugin-vue_export-helper-BHFhmbuH.js"),g=["type","disabled"],y={key:0,class:"g-button__loading"},B={key:1,class:"g-button__icon"},b={key:2,class:"g-button__text"},h=e.defineComponent({name:"GButton",__name:"index",props:{type:{},size:{},loading:{type:Boolean},disabled:{type:Boolean},block:{type:Boolean},nativeType:{}},emits:["click"],setup(a,{emit:c}){const l=a,d=c,r=t=>{if(!(l.disabled||l.loading)){if(l.type!=="link"){const o=t.currentTarget.getBoundingClientRect(),s=t.clientX!==0||t.clientY!==0,i={id:++u,x:s?t.clientX-o.left:o.width/2,y:s?t.clientY-o.top:o.height/2,size:Math.hypot(o.width,o.height)*2};n.value.push(i),setTimeout(()=>{n.value=n.value.filter(k=>k.id!==i.id)},600)}d("click",t)}},n=e.ref([]);let u=0;return(t,p)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["g-button",["g-button--"+t.type,"g-button--"+t.size,{"is-block":t.block,"is-loading":t.loading,"is-disabled":t.disabled}]]),type:t.nativeType,disabled:t.disabled||t.loading,onClick:r},[t.loading?(e.openBlock(),e.createElementBlock("span",y)):e.createCommentVNode("",!0),t.$slots.icon?(e.openBlock(),e.createElementBlock("span",B,[e.renderSlot(t.$slots,"icon",{},void 0,!0)])):e.createCommentVNode("",!0),t.$slots.default?(e.openBlock(),e.createElementBlock("span",b,[e.renderSlot(t.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,o=>(e.openBlock(),e.createElementBlock("span",{key:o.id,class:"g-button__wave",style:e.normalizeStyle({left:o.x+"px",top:o.y+"px",width:o.size+"px",height:o.size+"px"})},null,4))),128))],10,g))}}),_=m._export_sfc(h,[["__scopeId","data-v-f9df97c9"]]);exports.GButton=_;
|
package/lib/index.d.ts
CHANGED
|
@@ -14,9 +14,10 @@ import { GCard, cardPresets, CardPreset } from './components/GCard';
|
|
|
14
14
|
import { GScroller } from './components/GScroller';
|
|
15
15
|
import { GShinyText } from './components/GShinyText';
|
|
16
16
|
import { GSteps } from './components/GSteps';
|
|
17
|
+
import { GButton } from './components/GButton';
|
|
17
18
|
declare const _default: {
|
|
18
19
|
install: (app: any) => void;
|
|
19
20
|
};
|
|
20
21
|
export default _default;
|
|
21
|
-
export { GCount, GDialog, GTable, GVideo, GBubble, GProgress, GScreen, GPluginVideo, GPie3D, GRing, GInputTreeTag, GFuzzyText, GCard, cardPresets, GScroller, GShinyText, GSteps };
|
|
22
|
+
export { GCount, GDialog, GTable, GVideo, GBubble, GProgress, GScreen, GPluginVideo, GPie3D, GRing, GInputTreeTag, GFuzzyText, GCard, cardPresets, GScroller, GShinyText, GSteps, GButton };
|
|
22
23
|
export type { CardPreset };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "geekin-devtoys",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.8",
|
|
4
4
|
"author": "leon",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "geekin-devtoys组件库",
|
|
@@ -74,6 +74,14 @@
|
|
|
74
74
|
"import": "./lib/GBubble/style.css",
|
|
75
75
|
"require": "./lib/GBubble/style.css"
|
|
76
76
|
},
|
|
77
|
+
"./GButton": {
|
|
78
|
+
"import": "./lib/GButton/index.mjs",
|
|
79
|
+
"require": "./lib/GButton/index.js"
|
|
80
|
+
},
|
|
81
|
+
"./GButton/style": {
|
|
82
|
+
"import": "./lib/GButton/style.css",
|
|
83
|
+
"require": "./lib/GButton/style.css"
|
|
84
|
+
},
|
|
77
85
|
"./GCard": {
|
|
78
86
|
"import": "./lib/GCard/index.mjs",
|
|
79
87
|
"require": "./lib/GCard/index.js"
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { Component } from 'vue';
|
|
2
|
-
interface Props {
|
|
3
|
-
/** 按钮类型 */
|
|
4
|
-
type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'default' | 'text';
|
|
5
|
-
/** 按钮图标组件 */
|
|
6
|
-
icon?: Component;
|
|
7
|
-
/** loading 态 */
|
|
8
|
-
loading?: boolean;
|
|
9
|
-
/** 禁用态 */
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
/** 是否朴素按钮 */
|
|
12
|
-
plain?: boolean;
|
|
13
|
-
/** 按钮尺寸 */
|
|
14
|
-
size?: 'small' | 'default' | 'large';
|
|
15
|
-
}
|
|
16
|
-
declare function __VLS_template(): {
|
|
17
|
-
attrs: Partial<{}>;
|
|
18
|
-
slots: {
|
|
19
|
-
default?(_: {}): any;
|
|
20
|
-
};
|
|
21
|
-
refs: {};
|
|
22
|
-
rootEl: HTMLButtonElement;
|
|
23
|
-
};
|
|
24
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
25
|
-
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
26
|
-
click: (evt: MouseEvent) => any;
|
|
27
|
-
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
28
|
-
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
29
|
-
}>, {
|
|
30
|
-
type: "primary" | "success" | "warning" | "danger" | "info" | "default" | "text";
|
|
31
|
-
size: "small" | "default" | "large";
|
|
32
|
-
disabled: boolean;
|
|
33
|
-
loading: boolean;
|
|
34
|
-
plain: boolean;
|
|
35
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
|
|
36
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
37
|
-
export default _default;
|
|
38
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
39
|
-
new (): {
|
|
40
|
-
$slots: S;
|
|
41
|
-
};
|
|
42
|
-
};
|