@nutui/nutui 4.3.7 → 4.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/CHANGELOG.md +17 -0
- package/dist/nutui.es.js +1 -1
- package/dist/nutui.js +4275 -4416
- package/dist/nutui.umd.js +1 -1
- package/dist/packages/actionsheet/ActionSheet.js +1 -1
- package/dist/packages/address/Address.js +1 -1
- package/dist/packages/badge/Badge.js +60 -72
- package/dist/packages/calendar/Calendar.js +1 -1
- package/dist/packages/cascader/Cascader.js +1 -1
- package/dist/packages/countdown/Countdown.js +2 -2
- package/dist/packages/dialog/Dialog.js +3 -3
- package/dist/packages/fixednav/FixedNav.js +2 -2
- package/dist/packages/imagepreview/ImagePreview.js +3 -3
- package/dist/packages/{index-uHBD4dfS.js → index-wLaOjIn1.js} +2 -2
- package/dist/packages/menuitem/MenuItem.js +1 -1
- package/dist/packages/notify/Notify.js +1 -1
- package/dist/packages/numberkeyboard/NumberKeyboard.js +1 -1
- package/dist/packages/overlay/Overlay.js +40 -54
- package/dist/packages/popover/Popover.js +1 -1
- package/dist/packages/popup/Popup.js +1 -1
- package/dist/packages/shortpassword/ShortPassword.js +1 -1
- package/dist/packages/sku/Sku.js +1 -1
- package/dist/packages/tabbaritem/TabbarItem.js +3 -3
- package/dist/packages/timeselect/TimeSelect.js +1 -1
- package/dist/packages/watermark/Watermark.js +69 -159
- package/dist/smartips/web-types.json +3 -3
- package/dist/types/__VUE/actionsheet/index.vue.d.ts +3 -3
- package/dist/types/__VUE/address/index.vue.d.ts +5 -5
- package/dist/types/__VUE/badge/badge.vue.d.ts +93 -0
- package/dist/types/__VUE/badge/index.d.ts +5 -0
- package/dist/types/__VUE/calendar/index.vue.d.ts +2 -2
- package/dist/types/__VUE/cascader/index.vue.d.ts +2 -2
- package/dist/types/__VUE/circleprogress/circle-progress.vue.d.ts +2 -2
- package/dist/types/__VUE/collapseitem/collapse-item.vue.d.ts +1 -1
- package/dist/types/__VUE/dialog/index.vue.d.ts +4 -4
- package/dist/types/__VUE/divider/divider.vue.d.ts +1 -1
- package/dist/types/__VUE/fixednav/index.vue.d.ts +1 -1
- package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +1 -1
- package/dist/types/__VUE/input/input.vue.d.ts +1 -1
- package/dist/types/__VUE/list/index.vue.d.ts +1 -1
- package/dist/types/__VUE/menu/index.vue.d.ts +1 -1
- package/dist/types/__VUE/menuitem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/numberkeyboard/index.vue.d.ts +2 -2
- package/dist/types/__VUE/overlay/index.d.ts +5 -0
- package/dist/types/__VUE/overlay/overlay.vue.d.ts +87 -0
- package/dist/types/__VUE/picker/index.vue.d.ts +1 -1
- package/dist/types/__VUE/popover/index.vue.d.ts +4 -4
- package/dist/types/__VUE/popup/index.vue.d.ts +3 -3
- package/dist/types/__VUE/row/row.vue.d.ts +1 -1
- package/dist/types/__VUE/shortpassword/index.vue.d.ts +2 -2
- package/dist/types/__VUE/sku/index.vue.d.ts +2 -2
- package/dist/types/__VUE/swipe/swipe.vue.d.ts +1 -1
- package/dist/types/__VUE/tabs/index.vue.d.ts +1 -1
- package/dist/types/__VUE/tour/index.vue.d.ts +1 -1
- package/dist/types/__VUE/watermark/index.d.ts +6 -0
- package/dist/types/__VUE/watermark/watermark.vue.d.ts +127 -0
- package/dist/types/index.d.ts +7 -4
- package/dist/types/utils/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/types/__VUE/badge/index.vue.d.ts +0 -102
- package/dist/types/__VUE/overlay/index.vue.d.ts +0 -85
- package/dist/types/__VUE/watermark/index.vue.d.ts +0 -201
|
@@ -17,198 +17,108 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
import { defineComponent, ref, computed, watchEffect, openBlock, createElementBlock, normalizeClass, normalizeStyle } from "vue";
|
|
21
|
+
import { w as withInstall } from "../with-install-Ch3FF0uS.js";
|
|
22
|
+
const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
|
|
23
|
+
name: "NutWatermark"
|
|
24
|
+
}), {
|
|
25
|
+
__name: "watermark",
|
|
25
26
|
props: {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
width: {
|
|
43
|
-
type: Number,
|
|
44
|
-
default: 120
|
|
45
|
-
},
|
|
46
|
-
height: {
|
|
47
|
-
type: Number,
|
|
48
|
-
default: 64
|
|
49
|
-
},
|
|
50
|
-
rotate: {
|
|
51
|
-
type: Number,
|
|
52
|
-
default: -22
|
|
53
|
-
},
|
|
54
|
-
image: {
|
|
55
|
-
type: String,
|
|
56
|
-
default: ""
|
|
57
|
-
},
|
|
58
|
-
imageWidth: {
|
|
59
|
-
type: Number,
|
|
60
|
-
default: 120
|
|
61
|
-
},
|
|
62
|
-
imageHeight: {
|
|
63
|
-
type: Number,
|
|
64
|
-
default: 64
|
|
65
|
-
},
|
|
66
|
-
content: {
|
|
67
|
-
type: [String, Array],
|
|
68
|
-
default: ""
|
|
69
|
-
},
|
|
70
|
-
fontColor: {
|
|
71
|
-
type: String,
|
|
72
|
-
default: "rgba(0,0,0,.15)"
|
|
73
|
-
},
|
|
74
|
-
fontStyle: {
|
|
75
|
-
type: String,
|
|
76
|
-
default: "normal"
|
|
77
|
-
},
|
|
78
|
-
fontFamily: {
|
|
79
|
-
type: String,
|
|
80
|
-
default: "PingFang SC"
|
|
81
|
-
},
|
|
82
|
-
fontWeight: {
|
|
83
|
-
type: String,
|
|
84
|
-
default: "normal"
|
|
85
|
-
},
|
|
86
|
-
fontSize: {
|
|
87
|
-
type: [String, Number],
|
|
88
|
-
default: 14
|
|
89
|
-
},
|
|
90
|
-
fullPage: {
|
|
91
|
-
type: Boolean,
|
|
92
|
-
default: ""
|
|
93
|
-
}
|
|
27
|
+
gapX: { default: 24 },
|
|
28
|
+
gapY: { default: 48 },
|
|
29
|
+
zIndex: { default: 2e3 },
|
|
30
|
+
width: { default: 120 },
|
|
31
|
+
height: { default: 64 },
|
|
32
|
+
rotate: { default: -22 },
|
|
33
|
+
image: {},
|
|
34
|
+
imageWidth: { default: 120 },
|
|
35
|
+
imageHeight: { default: 64 },
|
|
36
|
+
content: { default: "" },
|
|
37
|
+
fontColor: { default: "rgba(0,0,0,.15)" },
|
|
38
|
+
fontStyle: { default: "normal" },
|
|
39
|
+
fontFamily: { default: "PingFang SC" },
|
|
40
|
+
fontWeight: { default: "normal" },
|
|
41
|
+
fontSize: { default: 14 },
|
|
42
|
+
fullPage: { type: Boolean, default: true }
|
|
94
43
|
},
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
const
|
|
98
|
-
|
|
44
|
+
setup(__props) {
|
|
45
|
+
const props = __props;
|
|
46
|
+
const base64Url = ref("");
|
|
47
|
+
const classes = computed(() => {
|
|
48
|
+
const prefixCls = "nut-watermark";
|
|
49
|
+
return {
|
|
50
|
+
[prefixCls]: true,
|
|
51
|
+
[`${prefixCls}-full-page`]: props.fullPage
|
|
52
|
+
};
|
|
99
53
|
});
|
|
100
|
-
const {
|
|
101
|
-
zIndex,
|
|
102
|
-
gapX,
|
|
103
|
-
gapY,
|
|
104
|
-
width,
|
|
105
|
-
height,
|
|
106
|
-
rotate,
|
|
107
|
-
image,
|
|
108
|
-
imageWidth,
|
|
109
|
-
imageHeight,
|
|
110
|
-
content,
|
|
111
|
-
fontStyle,
|
|
112
|
-
fontWeight,
|
|
113
|
-
fontColor,
|
|
114
|
-
fontSize,
|
|
115
|
-
fontFamily
|
|
116
|
-
} = props;
|
|
117
54
|
const init = () => {
|
|
118
55
|
const canvas = document.createElement("canvas");
|
|
119
56
|
const ratio = window.devicePixelRatio;
|
|
120
57
|
const ctx = canvas.getContext("2d");
|
|
121
|
-
const canvasWidth = `${(gapX + width) * ratio}px`;
|
|
122
|
-
const canvasHeight = `${(gapY + height) * ratio}px`;
|
|
123
|
-
const markWidth = width * ratio;
|
|
124
|
-
const markHeight = height * ratio;
|
|
58
|
+
const canvasWidth = `${(props.gapX + props.width) * ratio}px`;
|
|
59
|
+
const canvasHeight = `${(props.gapY + props.height) * ratio}px`;
|
|
60
|
+
const markWidth = props.width * ratio;
|
|
61
|
+
const markHeight = props.height * ratio;
|
|
125
62
|
canvas.setAttribute("width", canvasWidth);
|
|
126
63
|
canvas.setAttribute("height", canvasHeight);
|
|
127
64
|
if (ctx) {
|
|
128
|
-
if (image) {
|
|
65
|
+
if (props.image) {
|
|
129
66
|
ctx.translate(markWidth / 2, markHeight / 2);
|
|
130
|
-
ctx.rotate(Math.PI / 180 * Number(rotate));
|
|
67
|
+
ctx.rotate(Math.PI / 180 * Number(props.rotate));
|
|
131
68
|
const img = new Image();
|
|
132
69
|
img.crossOrigin = "anonymous";
|
|
133
70
|
img.referrerPolicy = "no-referrer";
|
|
134
|
-
img.src = image;
|
|
71
|
+
img.src = props.image;
|
|
135
72
|
img.onload = () => {
|
|
136
73
|
ctx.drawImage(
|
|
137
74
|
img,
|
|
138
|
-
-imageWidth * ratio / 2,
|
|
139
|
-
-imageHeight * ratio / 2,
|
|
140
|
-
imageWidth * ratio,
|
|
141
|
-
imageHeight * ratio
|
|
75
|
+
-props.imageWidth * ratio / 2,
|
|
76
|
+
-props.imageHeight * ratio / 2,
|
|
77
|
+
props.imageWidth * ratio,
|
|
78
|
+
props.imageHeight * ratio
|
|
142
79
|
);
|
|
143
80
|
ctx.restore();
|
|
144
|
-
|
|
81
|
+
base64Url.value = canvas.toDataURL();
|
|
145
82
|
};
|
|
146
|
-
} else if (content) {
|
|
83
|
+
} else if (props.content) {
|
|
147
84
|
ctx.textBaseline = "middle";
|
|
148
85
|
ctx.textAlign = "center";
|
|
149
86
|
ctx.translate(markWidth / 2, markHeight / 2);
|
|
150
|
-
ctx.rotate(Math.PI / 180 * Number(rotate));
|
|
151
|
-
const markSize = Number(fontSize) * ratio;
|
|
152
|
-
ctx.font = `${fontStyle} normal ${fontWeight} ${markSize}px/${markHeight}px ${fontFamily}`;
|
|
153
|
-
ctx.fillStyle = fontColor;
|
|
154
|
-
if (Array.isArray(content)) {
|
|
155
|
-
content.map((item,
|
|
156
|
-
ctx.fillText(item, 0, (
|
|
87
|
+
ctx.rotate(Math.PI / 180 * Number(props.rotate));
|
|
88
|
+
const markSize = Number(props.fontSize) * ratio;
|
|
89
|
+
ctx.font = `${props.fontStyle} normal ${props.fontWeight} ${markSize}px/${markHeight}px ${props.fontFamily}`;
|
|
90
|
+
ctx.fillStyle = props.fontColor;
|
|
91
|
+
if (Array.isArray(props.content)) {
|
|
92
|
+
props.content.map((item, index) => {
|
|
93
|
+
ctx.fillText(item, 0, (index - 1) * markSize);
|
|
157
94
|
});
|
|
158
95
|
} else {
|
|
159
|
-
ctx.fillText(content, 0, 0);
|
|
96
|
+
ctx.fillText(props.content, 0, 0);
|
|
160
97
|
}
|
|
161
98
|
ctx.restore();
|
|
162
|
-
|
|
99
|
+
base64Url.value = canvas.toDataURL();
|
|
163
100
|
}
|
|
164
101
|
} else {
|
|
165
102
|
throw new Error("当前环境不支持Canvas");
|
|
166
103
|
}
|
|
167
104
|
};
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
() => [
|
|
171
|
-
zIndex,
|
|
172
|
-
gapX,
|
|
173
|
-
gapY,
|
|
174
|
-
width,
|
|
175
|
-
height,
|
|
176
|
-
rotate,
|
|
177
|
-
image,
|
|
178
|
-
imageWidth,
|
|
179
|
-
imageHeight,
|
|
180
|
-
content,
|
|
181
|
-
fontStyle,
|
|
182
|
-
fontWeight,
|
|
183
|
-
fontColor,
|
|
184
|
-
fontSize,
|
|
185
|
-
fontFamily
|
|
186
|
-
],
|
|
187
|
-
() => {
|
|
188
|
-
init();
|
|
189
|
-
}
|
|
190
|
-
);
|
|
191
|
-
const classes = computed(() => {
|
|
192
|
-
const prefixCls = componentName;
|
|
193
|
-
return {
|
|
194
|
-
[prefixCls]: true,
|
|
195
|
-
[`${prefixCls}-full-page`]: props.fullPage
|
|
196
|
-
};
|
|
105
|
+
watchEffect(() => {
|
|
106
|
+
init();
|
|
197
107
|
});
|
|
198
|
-
return
|
|
108
|
+
return (_ctx, _cache) => {
|
|
109
|
+
return openBlock(), createElementBlock("view", {
|
|
110
|
+
class: normalizeClass(classes.value),
|
|
111
|
+
style: normalizeStyle({
|
|
112
|
+
zIndex: _ctx.zIndex,
|
|
113
|
+
backgroundSize: `${_ctx.gapX + _ctx.width}px`,
|
|
114
|
+
backgroundImage: `url('${base64Url.value}')`
|
|
115
|
+
})
|
|
116
|
+
}, null, 6);
|
|
117
|
+
};
|
|
199
118
|
}
|
|
200
|
-
});
|
|
201
|
-
|
|
202
|
-
return openBlock(), createElementBlock("view", {
|
|
203
|
-
class: normalizeClass(_ctx.classes),
|
|
204
|
-
style: normalizeStyle({
|
|
205
|
-
zIndex: _ctx.zIndex,
|
|
206
|
-
backgroundSize: `${_ctx.gapX + _ctx.width}px`,
|
|
207
|
-
backgroundImage: `url('${_ctx.base64Url}')`
|
|
208
|
-
})
|
|
209
|
-
}, null, 6);
|
|
210
|
-
}
|
|
211
|
-
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
119
|
+
}));
|
|
120
|
+
withInstall(_sfc_main);
|
|
212
121
|
export {
|
|
213
|
-
|
|
122
|
+
_sfc_main as Watermark,
|
|
123
|
+
_sfc_main as default
|
|
214
124
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"framework": "vue",
|
|
4
4
|
"name": "NutUI",
|
|
5
|
-
"version": "4.3.
|
|
5
|
+
"version": "4.3.8",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"tags": [
|
|
@@ -7684,10 +7684,10 @@
|
|
|
7684
7684
|
},
|
|
7685
7685
|
{
|
|
7686
7686
|
"name": "font-family",
|
|
7687
|
-
"default": "`
|
|
7687
|
+
"default": "`PingFang SC`",
|
|
7688
7688
|
"description": "水印文字字体",
|
|
7689
7689
|
"value": {
|
|
7690
|
-
"type": "
|
|
7690
|
+
"type": "string",
|
|
7691
7691
|
"kind": "expression"
|
|
7692
7692
|
}
|
|
7693
7693
|
}
|
|
@@ -133,7 +133,7 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
133
133
|
cancelActionSheet: () => void;
|
|
134
134
|
chooseItem: (item: ActionSheetMenuItems, index: number) => void;
|
|
135
135
|
close: (e: Event) => void;
|
|
136
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
136
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:visible" | "cancel" | "close" | "choose")[], "update:visible" | "cancel" | "close" | "choose", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
137
137
|
cancelTxt: {
|
|
138
138
|
type: StringConstructor;
|
|
139
139
|
default: string;
|
|
@@ -250,9 +250,9 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
250
250
|
default: () => {};
|
|
251
251
|
};
|
|
252
252
|
}>> & {
|
|
253
|
+
"onUpdate:visible"?: ((...args: any[]) => any) | undefined;
|
|
253
254
|
onCancel?: ((...args: any[]) => any) | undefined;
|
|
254
255
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
255
|
-
"onUpdate:visible"?: ((...args: any[]) => any) | undefined;
|
|
256
256
|
onChoose?: ((...args: any[]) => any) | undefined;
|
|
257
257
|
}, {
|
|
258
258
|
round: boolean;
|
|
@@ -260,7 +260,6 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
260
260
|
style: Record<string, any>;
|
|
261
261
|
title: string;
|
|
262
262
|
transition: string;
|
|
263
|
-
overlay: boolean;
|
|
264
263
|
visible: boolean;
|
|
265
264
|
zIndex: string | number;
|
|
266
265
|
duration: string | number;
|
|
@@ -268,6 +267,7 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
268
267
|
overlayClass: string;
|
|
269
268
|
overlayStyle: Record<string, any>;
|
|
270
269
|
closeOnClickOverlay: boolean;
|
|
270
|
+
overlay: boolean;
|
|
271
271
|
position: import("../popup/types").PopupPosition;
|
|
272
272
|
popClass: string;
|
|
273
273
|
closeable: boolean;
|
|
@@ -146,7 +146,6 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
146
146
|
height: Ref<string | number>;
|
|
147
147
|
style: Ref<Record<string, any>>;
|
|
148
148
|
transition: Ref<string>;
|
|
149
|
-
overlay: Ref<boolean>;
|
|
150
149
|
visible: Ref<boolean>;
|
|
151
150
|
zIndex: Ref<string | number>;
|
|
152
151
|
duration: Ref<string | number>;
|
|
@@ -154,6 +153,7 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
154
153
|
overlayClass: Ref<string>;
|
|
155
154
|
overlayStyle: Ref<Record<string, any>>;
|
|
156
155
|
closeOnClickOverlay: Ref<boolean>;
|
|
156
|
+
overlay: Ref<boolean>;
|
|
157
157
|
position: Ref<import("../popup/types").PopupPosition>;
|
|
158
158
|
popClass: Ref<string>;
|
|
159
159
|
closeable: Ref<boolean>;
|
|
@@ -174,8 +174,8 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
174
174
|
customAndExistTitle: Ref<string>;
|
|
175
175
|
columnsPlaceholder: Ref<string | unknown[]>;
|
|
176
176
|
onChange: Ref<((...args: any[]) => any) | undefined>;
|
|
177
|
-
onClose: Ref<((...args: any[]) => any) | undefined>;
|
|
178
177
|
"onUpdate:visible": Ref<((...args: any[]) => any) | undefined>;
|
|
178
|
+
onClose: Ref<((...args: any[]) => any) | undefined>;
|
|
179
179
|
onSelected: Ref<((...args: any[]) => any) | undefined>;
|
|
180
180
|
"onUpdate:modelValue": Ref<((...args: any[]) => any) | undefined>;
|
|
181
181
|
onType: Ref<((...args: any[]) => any) | undefined>;
|
|
@@ -204,7 +204,7 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
204
204
|
handClose: (type?: string) => void;
|
|
205
205
|
handleElevatorItem: (key: string, item: AddressData) => void;
|
|
206
206
|
initCustomSelected: () => void;
|
|
207
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("type" | "
|
|
207
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("type" | "update:visible" | "change" | "close" | "selected" | "update:modelValue" | "closeMask" | "switchModule")[], "type" | "update:visible" | "change" | "close" | "selected" | "update:modelValue" | "closeMask" | "switchModule", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
208
208
|
modelValue: {
|
|
209
209
|
type: ArrayConstructor;
|
|
210
210
|
default: () => never[];
|
|
@@ -338,8 +338,8 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
338
338
|
};
|
|
339
339
|
}>> & {
|
|
340
340
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
341
|
-
onClose?: ((...args: any[]) => any) | undefined;
|
|
342
341
|
"onUpdate:visible"?: ((...args: any[]) => any) | undefined;
|
|
342
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
343
343
|
onSelected?: ((...args: any[]) => any) | undefined;
|
|
344
344
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
345
345
|
onType?: ((...args: any[]) => any) | undefined;
|
|
@@ -351,7 +351,6 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
351
351
|
height: string | number;
|
|
352
352
|
style: Record<string, any>;
|
|
353
353
|
transition: string;
|
|
354
|
-
overlay: boolean;
|
|
355
354
|
visible: boolean;
|
|
356
355
|
zIndex: string | number;
|
|
357
356
|
duration: string | number;
|
|
@@ -359,6 +358,7 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
359
358
|
overlayClass: string;
|
|
360
359
|
overlayStyle: Record<string, any>;
|
|
361
360
|
closeOnClickOverlay: boolean;
|
|
361
|
+
overlay: boolean;
|
|
362
362
|
position: import("../popup/types").PopupPosition;
|
|
363
363
|
popClass: string;
|
|
364
364
|
closeable: boolean;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import type { WithInstall } from '../../utils';
|
|
2
|
+
export type BadgeProps = Partial<{
|
|
3
|
+
value: string | number;
|
|
4
|
+
max: number;
|
|
5
|
+
dot: boolean;
|
|
6
|
+
bubble: boolean;
|
|
7
|
+
hidden: boolean;
|
|
8
|
+
top: string;
|
|
9
|
+
right: string;
|
|
10
|
+
zIndex: number;
|
|
11
|
+
color: string;
|
|
12
|
+
}>;
|
|
13
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Partial<{
|
|
14
|
+
value: string | number;
|
|
15
|
+
max: number;
|
|
16
|
+
dot: boolean;
|
|
17
|
+
bubble: boolean;
|
|
18
|
+
hidden: boolean;
|
|
19
|
+
top: string;
|
|
20
|
+
right: string;
|
|
21
|
+
zIndex: number;
|
|
22
|
+
color: string;
|
|
23
|
+
}>>, {
|
|
24
|
+
max: number;
|
|
25
|
+
dot: boolean;
|
|
26
|
+
bubble: boolean;
|
|
27
|
+
hidden: boolean;
|
|
28
|
+
top: string;
|
|
29
|
+
right: string;
|
|
30
|
+
zIndex: number;
|
|
31
|
+
color: string;
|
|
32
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Partial<{
|
|
33
|
+
value: string | number;
|
|
34
|
+
max: number;
|
|
35
|
+
dot: boolean;
|
|
36
|
+
bubble: boolean;
|
|
37
|
+
hidden: boolean;
|
|
38
|
+
top: string;
|
|
39
|
+
right: string;
|
|
40
|
+
zIndex: number;
|
|
41
|
+
color: string;
|
|
42
|
+
}>>, {
|
|
43
|
+
max: number;
|
|
44
|
+
dot: boolean;
|
|
45
|
+
bubble: boolean;
|
|
46
|
+
hidden: boolean;
|
|
47
|
+
top: string;
|
|
48
|
+
right: string;
|
|
49
|
+
zIndex: number;
|
|
50
|
+
color: string;
|
|
51
|
+
}>>>, {
|
|
52
|
+
color: string;
|
|
53
|
+
right: string;
|
|
54
|
+
top: string;
|
|
55
|
+
zIndex: number;
|
|
56
|
+
hidden: boolean;
|
|
57
|
+
dot: boolean;
|
|
58
|
+
max: number;
|
|
59
|
+
bubble: boolean;
|
|
60
|
+
}, {}>, {
|
|
61
|
+
icon?(_: {}): any;
|
|
62
|
+
default?(_: {}): any;
|
|
63
|
+
}>;
|
|
64
|
+
declare const _nut_default: WithInstall<typeof _default>;
|
|
65
|
+
export default _nut_default;
|
|
66
|
+
|
|
67
|
+
declare module 'vue' {
|
|
68
|
+
interface GlobalComponents {
|
|
69
|
+
NutBadge: typeof _default;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
73
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
74
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
75
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
76
|
+
} : {
|
|
77
|
+
type: import('vue').PropType<T[K]>;
|
|
78
|
+
required: true;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
type __VLS_WithDefaults<P, D> = {
|
|
82
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
83
|
+
default: D[K];
|
|
84
|
+
}> : P[K];
|
|
85
|
+
};
|
|
86
|
+
type __VLS_Prettify<T> = {
|
|
87
|
+
[K in keyof T]: T[K];
|
|
88
|
+
} & {};
|
|
89
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
90
|
+
new (): {
|
|
91
|
+
$slots: S;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
@@ -87,7 +87,7 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
87
87
|
dayInfo: import("vue").ComputedRef<import("vue").Slot<any> | undefined>;
|
|
88
88
|
bottomInfo: import("vue").ComputedRef<import("vue").Slot<any> | undefined>;
|
|
89
89
|
footerInfo: import("vue").ComputedRef<import("vue").Slot<any> | undefined>;
|
|
90
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "
|
|
90
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "update:visible" | "close" | "choose")[], "select" | "update:visible" | "close" | "choose", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
91
91
|
type: {
|
|
92
92
|
type: StringConstructor;
|
|
93
93
|
default: string;
|
|
@@ -159,8 +159,8 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
159
159
|
disabledDate: FunctionConstructor;
|
|
160
160
|
}>> & {
|
|
161
161
|
onSelect?: ((...args: any[]) => any) | undefined;
|
|
162
|
-
onClose?: ((...args: any[]) => any) | undefined;
|
|
163
162
|
"onUpdate:visible"?: ((...args: any[]) => any) | undefined;
|
|
163
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
164
164
|
onChoose?: ((...args: any[]) => any) | undefined;
|
|
165
165
|
}, {
|
|
166
166
|
type: string;
|
|
@@ -111,7 +111,7 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
111
111
|
onPathChange: (pathNodes: CascaderOption[]) => void;
|
|
112
112
|
innerValue: Ref<CascaderValue>;
|
|
113
113
|
innerVisible: import("vue").WritableComputedRef<boolean>;
|
|
114
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
114
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:visible" | "change" | "update:modelValue" | "pathChange")[], "update:visible" | "change" | "update:modelValue" | "pathChange", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
115
115
|
modelValue: ArrayConstructor;
|
|
116
116
|
visible: BooleanConstructor;
|
|
117
117
|
title: StringConstructor;
|
|
@@ -222,7 +222,6 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
222
222
|
round: boolean;
|
|
223
223
|
style: Record<string, any>;
|
|
224
224
|
transition: string;
|
|
225
|
-
overlay: boolean;
|
|
226
225
|
visible: boolean;
|
|
227
226
|
zIndex: string | number;
|
|
228
227
|
duration: string | number;
|
|
@@ -230,6 +229,7 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
230
229
|
overlayClass: string;
|
|
231
230
|
overlayStyle: Record<string, any>;
|
|
232
231
|
closeOnClickOverlay: boolean;
|
|
232
|
+
overlay: boolean;
|
|
233
233
|
position: import("../popup/types").PopupPosition;
|
|
234
234
|
popClass: string;
|
|
235
235
|
closeable: boolean;
|
|
@@ -48,9 +48,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
48
48
|
}>>>, {
|
|
49
49
|
color: any;
|
|
50
50
|
progress: string | number;
|
|
51
|
-
radius: string | number;
|
|
52
|
-
strokeWidth: string | number;
|
|
53
51
|
strokeLinecap: CircleProgressStrokeLinecap;
|
|
52
|
+
strokeWidth: string | number;
|
|
53
|
+
radius: string | number;
|
|
54
54
|
pathColor: string;
|
|
55
55
|
clockwise: boolean;
|
|
56
56
|
}, {}>, {
|
|
@@ -160,8 +160,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
160
160
|
title: string;
|
|
161
161
|
icon: any;
|
|
162
162
|
border: boolean;
|
|
163
|
-
value: string;
|
|
164
163
|
rotate: string | number;
|
|
164
|
+
value: string;
|
|
165
165
|
}, {}>, {
|
|
166
166
|
title?(_: {}): any;
|
|
167
167
|
value?(_: {}): any;
|
|
@@ -151,7 +151,7 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
151
151
|
onClickOverlay: () => void;
|
|
152
152
|
contentStyle: import("vue").ComputedRef<CSSProperties>;
|
|
153
153
|
translate: (keyPath: string, ...args: unknown[]) => any;
|
|
154
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
154
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:visible" | "cancel" | "opened" | "closed" | "update" | "ok")[], "update:visible" | "cancel" | "opened" | "closed" | "update" | "ok", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
155
155
|
closeOnClickOverlay: {
|
|
156
156
|
type: BooleanConstructor;
|
|
157
157
|
default: boolean;
|
|
@@ -290,8 +290,8 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
290
290
|
default: () => {};
|
|
291
291
|
};
|
|
292
292
|
}>> & {
|
|
293
|
-
onCancel?: ((...args: any[]) => any) | undefined;
|
|
294
293
|
"onUpdate:visible"?: ((...args: any[]) => any) | undefined;
|
|
294
|
+
onCancel?: ((...args: any[]) => any) | undefined;
|
|
295
295
|
onOpened?: ((...args: any[]) => any) | undefined;
|
|
296
296
|
onClosed?: ((...args: any[]) => any) | undefined;
|
|
297
297
|
onUpdate?: ((...args: any[]) => any) | undefined;
|
|
@@ -301,7 +301,6 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
301
301
|
style: Record<string, any>;
|
|
302
302
|
title: string;
|
|
303
303
|
transition: string;
|
|
304
|
-
overlay: boolean;
|
|
305
304
|
visible: boolean;
|
|
306
305
|
zIndex: string | number;
|
|
307
306
|
duration: string | number;
|
|
@@ -309,10 +308,12 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
309
308
|
overlayClass: string;
|
|
310
309
|
overlayStyle: Record<string, any>;
|
|
311
310
|
closeOnClickOverlay: boolean;
|
|
311
|
+
overlay: boolean;
|
|
312
312
|
content: string | VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
313
313
|
[key: string]: any;
|
|
314
314
|
}>;
|
|
315
315
|
position: import("../popup/types").PopupPosition;
|
|
316
|
+
textAlign: TextAlign;
|
|
316
317
|
popClass: string;
|
|
317
318
|
closeable: boolean;
|
|
318
319
|
closeIconPosition: import("../popup/types").PopupCloseIconPosition;
|
|
@@ -320,7 +321,6 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
320
321
|
teleport: string | Element;
|
|
321
322
|
teleportDisable: boolean;
|
|
322
323
|
safeAreaInsetBottom: boolean;
|
|
323
|
-
textAlign: TextAlign;
|
|
324
324
|
cancelText: string;
|
|
325
325
|
okText: string;
|
|
326
326
|
noFooter: boolean;
|
|
@@ -28,9 +28,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
28
28
|
direction: string;
|
|
29
29
|
}>>>, {
|
|
30
30
|
dashed: boolean;
|
|
31
|
+
direction: DividerDirection;
|
|
31
32
|
contentPosition: DividerPosition;
|
|
32
33
|
hairline: boolean;
|
|
33
|
-
direction: DividerDirection;
|
|
34
34
|
}, {}>, Readonly<Record<string, any>> & Record<string, any>>;
|
|
35
35
|
declare const _nut_default: WithInstall<typeof _default>;
|
|
36
36
|
export default _nut_default;
|
|
@@ -90,8 +90,8 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
90
90
|
onSelected?: ((...args: any[]) => any) | undefined;
|
|
91
91
|
}, {
|
|
92
92
|
type: string;
|
|
93
|
-
overlay: boolean;
|
|
94
93
|
visible: boolean;
|
|
94
|
+
overlay: boolean;
|
|
95
95
|
position: Record<string, any>;
|
|
96
96
|
navList: any[];
|
|
97
97
|
activeColor: string;
|
|
@@ -61,7 +61,7 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
61
61
|
imageRatio: import("vue").Ref<number>;
|
|
62
62
|
displayWidth: import("vue").Ref<number>;
|
|
63
63
|
displayHeight: import("vue").Ref<number>;
|
|
64
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
64
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("scale" | "close")[], "scale" | "close", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
65
65
|
image: {
|
|
66
66
|
type: PropType<ImageInterface>;
|
|
67
67
|
default: () => {};
|
|
@@ -119,8 +119,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
119
119
|
}, {
|
|
120
120
|
disabled: boolean;
|
|
121
121
|
type: InputType;
|
|
122
|
-
error: boolean;
|
|
123
122
|
border: boolean;
|
|
123
|
+
error: boolean;
|
|
124
124
|
placeholder: string;
|
|
125
125
|
modelValue: string | number;
|
|
126
126
|
maxLength: string | number;
|
|
@@ -68,9 +68,9 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
68
68
|
onScrollBottom?: ((...args: any[]) => any) | undefined;
|
|
69
69
|
}, {
|
|
70
70
|
height: number;
|
|
71
|
+
margin: number;
|
|
71
72
|
listData: unknown[];
|
|
72
73
|
bufferSize: number;
|
|
73
|
-
margin: number;
|
|
74
74
|
}, {}>>;
|
|
75
75
|
export default _default;
|
|
76
76
|
|