y-element-ultra 0.0.7 → 0.0.9
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/es/core-components.d.ts +2 -0
- package/es/core-components.js +128 -124
- package/es/utils/validate.d.ts +12 -0
- package/es/utils/validate.js +19 -1
- package/es/y-button/index.d.ts +63 -0
- package/es/y-button/index.js +53 -0
- package/es/y-button/props.d.ts +38 -0
- package/es/y-button/props.js +32 -0
- package/es/y-button/types.d.ts +0 -0
- package/es/y-config-provider/components/receiver-view.js +16 -30
- package/es/y-input/index.d.ts +63 -0
- package/es/y-input/index.js +115 -0
- package/es/y-input/props.d.ts +34 -0
- package/es/y-input/props.js +34 -0
- package/es/y-input/types.d.ts +0 -0
- package/es/y-loading/components/main-content.js +9 -9
- package/lib/core-components.cjs +128 -124
- package/lib/core-components.d.ts +2 -0
- package/lib/utils/validate.cjs +18 -0
- package/lib/utils/validate.d.ts +12 -0
- package/lib/y-button/index.cjs +52 -0
- package/lib/y-button/index.d.ts +63 -0
- package/lib/y-button/props.cjs +32 -0
- package/lib/y-button/props.d.ts +38 -0
- package/lib/y-button/types.d.ts +0 -0
- package/lib/y-config-provider/components/receiver-view.cjs +1 -1
- package/lib/y-input/index.cjs +114 -0
- package/lib/y-input/index.d.ts +63 -0
- package/lib/y-input/props.cjs +34 -0
- package/lib/y-input/props.d.ts +34 -0
- package/lib/y-input/types.d.ts +0 -0
- package/lib/y-loading/components/main-content.cjs +8 -8
- package/package.json +1 -1
- package/typings/global.d.ts +2 -0
package/es/core-components.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export { default as YBasicSelect } from './y-basic-select/index';
|
|
|
8
8
|
export { default as YBottomBar } from './y-bottom-bar/index';
|
|
9
9
|
export { default as YBreadcrumb } from './y-breadcrumb/index';
|
|
10
10
|
export { default as YButtons } from './y-buttons/index';
|
|
11
|
+
export { default as YButton } from './y-button/index';
|
|
11
12
|
export { default as YCard } from './y-card/index';
|
|
12
13
|
export { default as YCascader } from './y-cascader/index';
|
|
13
14
|
export { default as YCheckCard } from './y-check-card/index';
|
|
@@ -27,6 +28,7 @@ export { default as YEllipsis } from './y-ellipsis/index';
|
|
|
27
28
|
export { default as YFileList } from './y-file-list/index';
|
|
28
29
|
export { default as YFileListTool } from './y-file-list-tool/index';
|
|
29
30
|
export { default as YFormItemRest } from './y-form-item-rest/index';
|
|
31
|
+
export { default as YInput } from './y-input/index';
|
|
30
32
|
export { default as YIcon } from './y-icon/index';
|
|
31
33
|
export { default as YIconSelect } from './y-icon-select/index';
|
|
32
34
|
export { default as YImageViewer } from './y-image-viewer/index';
|
package/es/core-components.js
CHANGED
|
@@ -8,68 +8,70 @@ import { default as default8 } from "./y-basic-select/index";
|
|
|
8
8
|
import { default as default9 } from "./y-bottom-bar/index";
|
|
9
9
|
import { default as default10 } from "./y-breadcrumb/index";
|
|
10
10
|
import { default as default11 } from "./y-buttons/index";
|
|
11
|
-
import { default as default12 } from "./y-
|
|
12
|
-
import { default as default13 } from "./y-
|
|
13
|
-
import { default as default14 } from "./y-
|
|
14
|
-
import { default as default15 } from "./y-
|
|
15
|
-
import { default as default16 } from "./y-
|
|
16
|
-
import { default as default17 } from "./y-
|
|
17
|
-
import { default as default18 } from "./y-
|
|
18
|
-
import { default as default19 } from "./y-cron-
|
|
19
|
-
import { default as default20 } from "./y-
|
|
20
|
-
import { default as default21 } from "./y-
|
|
21
|
-
import { default as default22 } from "./y-
|
|
22
|
-
import { default as default23 } from "./y-
|
|
23
|
-
import { default as default24 } from "./y-
|
|
24
|
-
import { default as default25 } from "./y-dropdown
|
|
25
|
-
import { default as default26 } from "./y-
|
|
26
|
-
import { default as default27 } from "./y-
|
|
27
|
-
import { default as default28 } from "./y-
|
|
28
|
-
import { default as default29 } from "./y-file-list
|
|
29
|
-
import { default as default30 } from "./y-
|
|
30
|
-
import { default as default31 } from "./y-
|
|
31
|
-
import { default as default32 } from "./y-
|
|
32
|
-
import { default as default33 } from "./y-
|
|
33
|
-
import { default as default34 } from "./y-
|
|
34
|
-
import { default as default35 } from "./y-
|
|
35
|
-
import { default as default36 } from "./y-
|
|
36
|
-
import { default as default37 } from "./y-
|
|
37
|
-
import { default as default38 } from "./y-
|
|
38
|
-
import { default as default39 } from "./y-
|
|
39
|
-
import { default as default40 } from "./y-
|
|
40
|
-
import { default as default41 } from "./y-
|
|
41
|
-
import { default as default42 } from "./y-
|
|
42
|
-
import { default as default43 } from "./y-
|
|
43
|
-
import { default as default44 } from "./y-
|
|
44
|
-
import { default as default45 } from "./y-
|
|
45
|
-
import { default as default46 } from "./y-
|
|
46
|
-
import { default as default47 } from "./y-
|
|
47
|
-
import { default as default48 } from "./y-
|
|
48
|
-
import { default as default49 } from "./y-
|
|
49
|
-
import { default as default50 } from "./y-
|
|
50
|
-
import { default as default51 } from "./y-
|
|
51
|
-
import { default as default52 } from "./y-
|
|
52
|
-
import { default as default53 } from "./y-
|
|
53
|
-
import { default as default54 } from "./y-
|
|
54
|
-
import { default as default55 } from "./y-
|
|
55
|
-
import { default as default56 } from "./y-
|
|
56
|
-
import { default as default57 } from "./y-tab-
|
|
57
|
-
import { default as default58 } from "./y-
|
|
58
|
-
import { default as default59 } from "./y-
|
|
59
|
-
import { default as default60 } from "./y-
|
|
60
|
-
import { default as default61 } from "./y-
|
|
61
|
-
import { default as default62 } from "./y-
|
|
62
|
-
import { default as default63 } from "./y-
|
|
63
|
-
import { default as default64 } from "./y-
|
|
64
|
-
import { default as default65 } from "./y-
|
|
65
|
-
import { default as default66 } from "./y-
|
|
66
|
-
import { default as default67 } from "./y-
|
|
67
|
-
import { default as default68 } from "./y-
|
|
68
|
-
import { default as default69 } from "./y-
|
|
69
|
-
import { default as default70 } from "./y-
|
|
70
|
-
import { default as default71 } from "./y-
|
|
71
|
-
import { default as default72 } from "./y-
|
|
72
|
-
import { default as default73 } from "./y-
|
|
11
|
+
import { default as default12 } from "./y-button/index";
|
|
12
|
+
import { default as default13 } from "./y-card/index";
|
|
13
|
+
import { default as default14 } from "./y-cascader/index";
|
|
14
|
+
import { default as default15 } from "./y-check-card/index";
|
|
15
|
+
import { default as default16 } from "./y-checkbox-group/index";
|
|
16
|
+
import { default as default17 } from "./y-config-provider/index";
|
|
17
|
+
import { default as default18 } from "./y-copyable/index";
|
|
18
|
+
import { default as default19 } from "./y-cron-builder/index";
|
|
19
|
+
import { default as default20 } from "./y-cron-panel/index";
|
|
20
|
+
import { default as default21 } from "./y-dashboard/index";
|
|
21
|
+
import { default as default22 } from "./y-data-table/index";
|
|
22
|
+
import { default as default23 } from "./y-dot/index";
|
|
23
|
+
import { default as default24 } from "./y-drawer/index";
|
|
24
|
+
import { default as default25 } from "./y-dropdown/index";
|
|
25
|
+
import { default as default26 } from "./y-dropdown-provider/index";
|
|
26
|
+
import { default as default27 } from "./y-edit-tag/index";
|
|
27
|
+
import { default as default28 } from "./y-ellipsis/index";
|
|
28
|
+
import { default as default29 } from "./y-file-list/index";
|
|
29
|
+
import { default as default30 } from "./y-file-list-tool/index";
|
|
30
|
+
import { default as default31 } from "./y-form-item-rest/index";
|
|
31
|
+
import { default as default32 } from "./y-input/index";
|
|
32
|
+
import { default as default33 } from "./y-icon/index";
|
|
33
|
+
import { default as default34 } from "./y-icon-select/index";
|
|
34
|
+
import { default as default35 } from "./y-image-viewer/index";
|
|
35
|
+
import { default as default36 } from "./y-loading/index";
|
|
36
|
+
import { default as default37 } from "./y-mention/index";
|
|
37
|
+
import { default as default38 } from "./y-menus/index";
|
|
38
|
+
import { default as default39 } from "./y-modal/index";
|
|
39
|
+
import { default as default40 } from "./y-modal-render/index";
|
|
40
|
+
import { default as default41 } from "./y-page/index";
|
|
41
|
+
import { default as default42 } from "./y-pagination/index";
|
|
42
|
+
import { default as default43 } from "./y-popconfirm/index";
|
|
43
|
+
import { default as default44 } from "./y-popconfirm-provider/index";
|
|
44
|
+
import { default as default45 } from "./y-popover/index";
|
|
45
|
+
import { default as default46 } from "./y-printer/index";
|
|
46
|
+
import { default as default47 } from "./y-pro-layout/index";
|
|
47
|
+
import { default as default48 } from "./y-pro-table/index";
|
|
48
|
+
import { default as default49 } from "./y-qr-code/index";
|
|
49
|
+
import { default as default50 } from "./y-qr-code-svg/index";
|
|
50
|
+
import { default as default51 } from "./y-radio-group/index";
|
|
51
|
+
import { default as default52 } from "./y-segmented/index";
|
|
52
|
+
import { default as default53 } from "./y-select/index";
|
|
53
|
+
import { default as default54 } from "./y-select-tree/index";
|
|
54
|
+
import { default as default55 } from "./y-split-panel/index";
|
|
55
|
+
import { default as default56 } from "./y-steps/index";
|
|
56
|
+
import { default as default57 } from "./y-tab-bar/index";
|
|
57
|
+
import { default as default58 } from "./y-tabs/index";
|
|
58
|
+
import { default as default59 } from "./y-tab-tool/index";
|
|
59
|
+
import { default as default60 } from "./y-tab-wrap/index";
|
|
60
|
+
import { default as default61 } from "./y-table/index";
|
|
61
|
+
import { default as default62 } from "./y-table-select/index";
|
|
62
|
+
import { default as default63 } from "./y-text/index";
|
|
63
|
+
import { default as default64 } from "./y-timeline/index";
|
|
64
|
+
import { default as default65 } from "./y-tool/index";
|
|
65
|
+
import { default as default66 } from "./y-toolbar/index";
|
|
66
|
+
import { default as default67 } from "./y-tooltip/index";
|
|
67
|
+
import { default as default68 } from "./y-tour/index";
|
|
68
|
+
import { default as default69 } from "./y-transfer/index";
|
|
69
|
+
import { default as default70 } from "./y-tree-select/index";
|
|
70
|
+
import { default as default71 } from "./y-tree-table/index";
|
|
71
|
+
import { default as default72 } from "./y-upload-list/index";
|
|
72
|
+
import { default as default73 } from "./y-viewer/index";
|
|
73
|
+
import { default as default74 } from "./y-virtual-table/index";
|
|
74
|
+
import { default as default75 } from "./y-watermark/index";
|
|
73
75
|
export {
|
|
74
76
|
default2 as YAdminLayout,
|
|
75
77
|
default3 as YAlert,
|
|
@@ -80,67 +82,69 @@ export {
|
|
|
80
82
|
default8 as YBasicSelect,
|
|
81
83
|
default9 as YBottomBar,
|
|
82
84
|
default10 as YBreadcrumb,
|
|
85
|
+
default12 as YButton,
|
|
83
86
|
default11 as YButtons,
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
default57 as
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
87
|
+
default13 as YCard,
|
|
88
|
+
default14 as YCascader,
|
|
89
|
+
default15 as YCheckCard,
|
|
90
|
+
default16 as YCheckboxGroup,
|
|
91
|
+
default17 as YConfigProvider,
|
|
92
|
+
default18 as YCopyable,
|
|
93
|
+
default19 as YCronBuilder,
|
|
94
|
+
default20 as YCronPanel,
|
|
95
|
+
default21 as YDashboard,
|
|
96
|
+
default22 as YDataTable,
|
|
97
|
+
default23 as YDot,
|
|
98
|
+
default24 as YDrawer,
|
|
99
|
+
default25 as YDropdown,
|
|
100
|
+
default26 as YDropdownProvider,
|
|
101
|
+
default27 as YEditTag,
|
|
102
|
+
default28 as YEllipsis,
|
|
103
|
+
default29 as YFileList,
|
|
104
|
+
default30 as YFileListTool,
|
|
105
|
+
default31 as YFormItemRest,
|
|
106
|
+
default33 as YIcon,
|
|
107
|
+
default34 as YIconSelect,
|
|
108
|
+
default35 as YImageViewer,
|
|
109
|
+
default32 as YInput,
|
|
110
|
+
default36 as YLoading,
|
|
111
|
+
default37 as YMention,
|
|
112
|
+
default38 as YMenus,
|
|
113
|
+
default39 as YModal,
|
|
114
|
+
default40 as YModalRender,
|
|
115
|
+
default41 as YPage,
|
|
116
|
+
default42 as YPagination,
|
|
117
|
+
default43 as YPopconfirm,
|
|
118
|
+
default44 as YPopconfirmProvider,
|
|
119
|
+
default45 as YPopover,
|
|
120
|
+
default46 as YPrinter,
|
|
121
|
+
default47 as YProLayout,
|
|
122
|
+
default48 as YProTable,
|
|
123
|
+
default49 as YQrCode,
|
|
124
|
+
default50 as YQrCodeSvg,
|
|
125
|
+
default51 as YRadioGroup,
|
|
126
|
+
default52 as YSegmented,
|
|
127
|
+
default53 as YSelect,
|
|
128
|
+
default54 as YSelectTree,
|
|
129
|
+
default55 as YSplitPanel,
|
|
130
|
+
default56 as YSteps,
|
|
131
|
+
default57 as YTabBar,
|
|
132
|
+
default59 as YTabTool,
|
|
133
|
+
default60 as YTabWrap,
|
|
134
|
+
default61 as YTable,
|
|
135
|
+
default62 as YTableSelect,
|
|
136
|
+
default58 as YTabs,
|
|
137
|
+
default63 as YText,
|
|
138
|
+
default64 as YTimeline,
|
|
139
|
+
default65 as YTool,
|
|
140
|
+
default66 as YToolbar,
|
|
141
|
+
default67 as YTooltip,
|
|
142
|
+
default68 as YTour,
|
|
143
|
+
default69 as YTransfer,
|
|
144
|
+
default70 as YTreeSelect,
|
|
145
|
+
default71 as YTreeTable,
|
|
146
|
+
default72 as YUploadList,
|
|
147
|
+
default73 as YViewer,
|
|
148
|
+
default74 as YVirtualTable,
|
|
149
|
+
default75 as YWatermark
|
|
146
150
|
};
|
package/es/utils/validate.d.ts
CHANGED
|
@@ -23,6 +23,18 @@ export declare const urlReg: RegExp;
|
|
|
23
23
|
* 身份证正则表达式
|
|
24
24
|
*/
|
|
25
25
|
export declare const identityReg: RegExp;
|
|
26
|
+
/**
|
|
27
|
+
* 小数或整数(不可以负数)
|
|
28
|
+
* @param val 当前值字符串
|
|
29
|
+
* @returns 返回处理后的字符串
|
|
30
|
+
*/
|
|
31
|
+
export declare function verifyNumberIntegerAndFloat(val: string): string;
|
|
32
|
+
/**
|
|
33
|
+
* 金额用 `,` 区分开
|
|
34
|
+
* @param val 当前值字符串
|
|
35
|
+
* @returns 返回处理后的字符串
|
|
36
|
+
*/
|
|
37
|
+
export declare function verifyNumberComma(val: string): any;
|
|
26
38
|
/**
|
|
27
39
|
* 日期正则表达式
|
|
28
40
|
*/
|
package/es/utils/validate.js
CHANGED
|
@@ -4,6 +4,22 @@ const telReg = /^(400|800)([0-9\\-]{7,10})|(([0-9]{4}|[0-9]{3})(-| )?)?([0-9]{7,
|
|
|
4
4
|
const emailReg = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
|
|
5
5
|
const urlReg = /(^#)|(^http(s*):\/\/[^\s]+\.[^\s]+)/;
|
|
6
6
|
const identityReg = /(^\d{15}$)|(^\d{17}(x|X|\d)$)/;
|
|
7
|
+
function verifyNumberIntegerAndFloat(val) {
|
|
8
|
+
let v = val.replace(/(^\s*)|(\s*$)/g, "");
|
|
9
|
+
v = v.replace(/[^\d.]/g, "");
|
|
10
|
+
v = v.replace(/^0{2}$/g, "0");
|
|
11
|
+
v = v.replace(/^\./g, "");
|
|
12
|
+
v = v.replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
|
|
13
|
+
v = v.replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3");
|
|
14
|
+
return v;
|
|
15
|
+
}
|
|
16
|
+
function verifyNumberComma(val) {
|
|
17
|
+
let v = verifyNumberIntegerAndFloat(val);
|
|
18
|
+
v = v.toString().split(".");
|
|
19
|
+
v[0] = v[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
20
|
+
v = v.join(".");
|
|
21
|
+
return v;
|
|
22
|
+
}
|
|
7
23
|
const dateReg = /^(\d{4})[-/](\d{1}|0\d{1}|1[0-2])([-/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/;
|
|
8
24
|
const numberReg = /^[0-9]+\.?[0-9]*$/;
|
|
9
25
|
const integerReg = /^-?\d+$/;
|
|
@@ -193,5 +209,7 @@ export {
|
|
|
193
209
|
portReg,
|
|
194
210
|
positiveIntegerReg,
|
|
195
211
|
telReg,
|
|
196
|
-
urlReg
|
|
212
|
+
urlReg,
|
|
213
|
+
verifyNumberComma,
|
|
214
|
+
verifyNumberIntegerAndFloat
|
|
197
215
|
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
default?(_: {}): any;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
5
|
+
time: {
|
|
6
|
+
type: NumberConstructor;
|
|
7
|
+
default: number;
|
|
8
|
+
};
|
|
9
|
+
tip: {
|
|
10
|
+
type: StringConstructor;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
placement: {
|
|
14
|
+
type: import('vue').PropType<import('element-plus').Placement>;
|
|
15
|
+
default: string;
|
|
16
|
+
};
|
|
17
|
+
tipProps: {
|
|
18
|
+
type: ObjectConstructor;
|
|
19
|
+
default: () => {};
|
|
20
|
+
};
|
|
21
|
+
isDebounce: {
|
|
22
|
+
type: BooleanConstructor;
|
|
23
|
+
default: boolean;
|
|
24
|
+
};
|
|
25
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
26
|
+
click: (_e?: MouseEvent | undefined) => void;
|
|
27
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
28
|
+
time: {
|
|
29
|
+
type: NumberConstructor;
|
|
30
|
+
default: number;
|
|
31
|
+
};
|
|
32
|
+
tip: {
|
|
33
|
+
type: StringConstructor;
|
|
34
|
+
default: string;
|
|
35
|
+
};
|
|
36
|
+
placement: {
|
|
37
|
+
type: import('vue').PropType<import('element-plus').Placement>;
|
|
38
|
+
default: string;
|
|
39
|
+
};
|
|
40
|
+
tipProps: {
|
|
41
|
+
type: ObjectConstructor;
|
|
42
|
+
default: () => {};
|
|
43
|
+
};
|
|
44
|
+
isDebounce: {
|
|
45
|
+
type: BooleanConstructor;
|
|
46
|
+
default: boolean;
|
|
47
|
+
};
|
|
48
|
+
}>> & Readonly<{
|
|
49
|
+
onClick?: ((_e?: MouseEvent | undefined) => any) | undefined;
|
|
50
|
+
}>, {
|
|
51
|
+
time: number;
|
|
52
|
+
tip: string;
|
|
53
|
+
placement: import('element-plus').Placement;
|
|
54
|
+
tipProps: Record<string, any>;
|
|
55
|
+
isDebounce: boolean;
|
|
56
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
57
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
58
|
+
export default _default;
|
|
59
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
60
|
+
new (): {
|
|
61
|
+
$slots: S;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { defineComponent, reactive, resolveComponent, createBlock, openBlock, mergeProps, withCtx, createVNode, withModifiers, renderSlot } from "vue";
|
|
2
|
+
import { buttonEmits, buttonProps } from "./props";
|
|
3
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
|
+
...{ name: "YButton" },
|
|
5
|
+
__name: "index",
|
|
6
|
+
props: buttonProps,
|
|
7
|
+
emits: buttonEmits,
|
|
8
|
+
setup(__props, { emit: __emit }) {
|
|
9
|
+
const props = __props;
|
|
10
|
+
const emit = __emit;
|
|
11
|
+
const state = reactive({
|
|
12
|
+
record: 0
|
|
13
|
+
});
|
|
14
|
+
const handleClick = () => {
|
|
15
|
+
if (!props.isDebounce) return emit("click");
|
|
16
|
+
const newTime = /* @__PURE__ */ new Date();
|
|
17
|
+
if (newTime.getTime() - state.record > props.time) emit("click");
|
|
18
|
+
state.record = newTime.getTime();
|
|
19
|
+
};
|
|
20
|
+
return (_ctx, _cache) => {
|
|
21
|
+
const _component_el_button = resolveComponent("el-button");
|
|
22
|
+
const _component_el_tooltip = resolveComponent("el-tooltip");
|
|
23
|
+
return props.tip ? (openBlock(), createBlock(_component_el_tooltip, mergeProps({
|
|
24
|
+
key: 0,
|
|
25
|
+
content: props.tip,
|
|
26
|
+
placement: props.placement
|
|
27
|
+
}, props.tipProps), {
|
|
28
|
+
default: withCtx(() => [
|
|
29
|
+
createVNode(_component_el_button, mergeProps(_ctx.$attrs, {
|
|
30
|
+
class: "y-button-tip",
|
|
31
|
+
onClick: withModifiers(handleClick, ["stop"])
|
|
32
|
+
}), {
|
|
33
|
+
default: withCtx(() => [
|
|
34
|
+
renderSlot(_ctx.$slots, "default")
|
|
35
|
+
]),
|
|
36
|
+
_: 3
|
|
37
|
+
}, 16)
|
|
38
|
+
]),
|
|
39
|
+
_: 3
|
|
40
|
+
}, 16, ["content", "placement"])) : (openBlock(), createBlock(_component_el_button, mergeProps({ key: 1 }, _ctx.$attrs, {
|
|
41
|
+
onClick: withModifiers(handleClick, ["stop"])
|
|
42
|
+
}), {
|
|
43
|
+
default: withCtx(() => [
|
|
44
|
+
renderSlot(_ctx.$slots, "default")
|
|
45
|
+
]),
|
|
46
|
+
_: 3
|
|
47
|
+
}, 16));
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
export {
|
|
52
|
+
_sfc_main as default
|
|
53
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { PropType, ExtractPropTypes } from 'vue';
|
|
2
|
+
import { Placement } from 'element-plus';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 属性
|
|
6
|
+
*/
|
|
7
|
+
export declare const buttonProps: {
|
|
8
|
+
/** 防抖的时间 */
|
|
9
|
+
time: {
|
|
10
|
+
type: NumberConstructor;
|
|
11
|
+
default: number;
|
|
12
|
+
};
|
|
13
|
+
/** 提示文字,常用于 type='text' 或拥有 text,link 属性的 button */
|
|
14
|
+
tip: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
placement: {
|
|
19
|
+
type: PropType<Placement>;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
tipProps: {
|
|
23
|
+
type: ObjectConstructor;
|
|
24
|
+
default: () => {};
|
|
25
|
+
};
|
|
26
|
+
/** 是否开启防抖 */
|
|
27
|
+
isDebounce: {
|
|
28
|
+
type: BooleanConstructor;
|
|
29
|
+
default: boolean;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export type ButtonProps = ExtractPropTypes<typeof buttonProps>;
|
|
33
|
+
/**
|
|
34
|
+
* 事件
|
|
35
|
+
*/
|
|
36
|
+
export declare const buttonEmits: {
|
|
37
|
+
click: (_e?: MouseEvent) => boolean;
|
|
38
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const buttonProps = {
|
|
2
|
+
/** 防抖的时间 */
|
|
3
|
+
time: {
|
|
4
|
+
type: Number,
|
|
5
|
+
default: 1e3
|
|
6
|
+
},
|
|
7
|
+
/** 提示文字,常用于 type='text' 或拥有 text,link 属性的 button */
|
|
8
|
+
tip: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: ""
|
|
11
|
+
},
|
|
12
|
+
placement: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: "top"
|
|
15
|
+
},
|
|
16
|
+
tipProps: {
|
|
17
|
+
type: Object,
|
|
18
|
+
default: () => ({})
|
|
19
|
+
},
|
|
20
|
+
/** 是否开启防抖 */
|
|
21
|
+
isDebounce: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: true
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
const buttonEmits = {
|
|
27
|
+
click: (_e) => true
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
buttonEmits,
|
|
31
|
+
buttonProps
|
|
32
|
+
};
|
|
File without changes
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import x from "../../y-watermark/
|
|
3
|
-
|
|
4
|
-
const b = /* @__PURE__ */ v({
|
|
1
|
+
import { defineComponent as a, ref as f, computed as u, watch as l, createVNode as h } from "vue";
|
|
2
|
+
import { svgText as e, getProps as w, svgContents as r, svgProp as n, getOption as x } from "../../y-watermark/util";
|
|
3
|
+
const V = /* @__PURE__ */ a({
|
|
5
4
|
name: "ReceiverView",
|
|
6
5
|
props: {
|
|
7
6
|
wrapHeight: [String, Number]
|
|
8
7
|
},
|
|
9
|
-
setup(
|
|
10
|
-
slots:
|
|
8
|
+
setup(C, {
|
|
9
|
+
slots: i
|
|
11
10
|
}) {
|
|
12
|
-
const
|
|
11
|
+
const g = f(), o = e[e.length - 2], {
|
|
13
12
|
svgKey: p,
|
|
14
|
-
svgProps:
|
|
15
|
-
svgConfig:
|
|
13
|
+
svgProps: s,
|
|
14
|
+
svgConfig: c
|
|
16
15
|
// imageId
|
|
17
|
-
} =
|
|
18
|
-
return
|
|
19
|
-
|
|
16
|
+
} = w(r), d = u(() => c.key), v = n[e.findIndex((t) => t === e[e.length - 1])];
|
|
17
|
+
return l(d, (t) => {
|
|
18
|
+
g.value = x(t, v, s, 2, 13, o, p, r, n, n[e.findIndex((m) => m === o)]);
|
|
20
19
|
}, {
|
|
21
20
|
immediate: !0
|
|
22
21
|
}), () => (
|
|
@@ -24,29 +23,16 @@ const b = /* @__PURE__ */ v({
|
|
|
24
23
|
// width={236}
|
|
25
24
|
// height={74}
|
|
26
25
|
// wrapHeight={props.wrapHeight}
|
|
27
|
-
// disabled={
|
|
26
|
+
// disabled={false}
|
|
28
27
|
// fixed={!svgOptions.value}
|
|
29
|
-
// content={
|
|
28
|
+
// content={'水印'}
|
|
30
29
|
// wrapPosition={false}
|
|
31
|
-
// svgRender={
|
|
30
|
+
// svgRender={false}
|
|
32
31
|
// >
|
|
33
|
-
|
|
34
|
-
// </YWatermark>
|
|
35
|
-
w(x, {
|
|
36
|
-
width: 236,
|
|
37
|
-
height: 74,
|
|
38
|
-
wrapHeight: a.wrapHeight,
|
|
39
|
-
disabled: !1,
|
|
40
|
-
fixed: !o.value,
|
|
41
|
-
content: "\u6C34\u5370",
|
|
42
|
-
wrapPosition: !1,
|
|
43
|
-
svgRender: !0
|
|
44
|
-
}, {
|
|
45
|
-
default: () => [g.default?.(i)]
|
|
46
|
-
})
|
|
32
|
+
h("div", null, [i.default?.(s)])
|
|
47
33
|
);
|
|
48
34
|
}
|
|
49
35
|
});
|
|
50
36
|
export {
|
|
51
|
-
|
|
37
|
+
V as default
|
|
52
38
|
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
declare function __VLS_template(): Partial<Record<NonNullable<string | number>, (_: any) => any>> & {
|
|
2
|
+
append?(_: {}): any;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
5
|
+
modelValue: {
|
|
6
|
+
type: StringConstructor;
|
|
7
|
+
default: () => string;
|
|
8
|
+
};
|
|
9
|
+
inputType: {
|
|
10
|
+
type: StringConstructor;
|
|
11
|
+
default: () => string;
|
|
12
|
+
};
|
|
13
|
+
placeholder: {
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
default: () => string;
|
|
16
|
+
};
|
|
17
|
+
decimalLimit: {
|
|
18
|
+
type: NumberConstructor;
|
|
19
|
+
default: () => number;
|
|
20
|
+
};
|
|
21
|
+
showThousands: {
|
|
22
|
+
type: BooleanConstructor;
|
|
23
|
+
default: () => boolean;
|
|
24
|
+
};
|
|
25
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
26
|
+
"update:modelValue": (_value: any, _e?: MouseEvent | undefined) => void;
|
|
27
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
28
|
+
modelValue: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
default: () => string;
|
|
31
|
+
};
|
|
32
|
+
inputType: {
|
|
33
|
+
type: StringConstructor;
|
|
34
|
+
default: () => string;
|
|
35
|
+
};
|
|
36
|
+
placeholder: {
|
|
37
|
+
type: StringConstructor;
|
|
38
|
+
default: () => string;
|
|
39
|
+
};
|
|
40
|
+
decimalLimit: {
|
|
41
|
+
type: NumberConstructor;
|
|
42
|
+
default: () => number;
|
|
43
|
+
};
|
|
44
|
+
showThousands: {
|
|
45
|
+
type: BooleanConstructor;
|
|
46
|
+
default: () => boolean;
|
|
47
|
+
};
|
|
48
|
+
}>> & Readonly<{
|
|
49
|
+
"onUpdate:modelValue"?: ((_value: any, _e?: MouseEvent | undefined) => any) | undefined;
|
|
50
|
+
}>, {
|
|
51
|
+
modelValue: string;
|
|
52
|
+
inputType: string;
|
|
53
|
+
placeholder: string;
|
|
54
|
+
decimalLimit: number;
|
|
55
|
+
showThousands: boolean;
|
|
56
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
57
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
58
|
+
export default _default;
|
|
59
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
60
|
+
new (): {
|
|
61
|
+
$slots: S;
|
|
62
|
+
};
|
|
63
|
+
};
|