@vunk/plus 1.1.4 → 1.2.2
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/components/SendOutlined.mjs +1337 -0
- package/components/avatar/index.d.ts +4 -0
- package/components/avatar/index.mjs +49 -0
- package/components/avatar/src/ctx.d.ts +18 -0
- package/components/avatar/src/index.vue.d.ts +180 -0
- package/components/avatar/src/types.d.ts +1 -0
- package/components/monaco-environment/index.mjs +10 -10
- package/components/recorder-button/index.css +72 -0
- package/components/recorder-button/index.d.ts +4 -0
- package/components/recorder-button/index.mjs +319 -0
- package/components/recorder-button/src/ctx.d.ts +19 -0
- package/components/recorder-button/src/index.vue.d.ts +309 -0
- package/components/recorder-button/src/speech-to-text.d.ts +1 -0
- package/components/recorder-button/src/types.d.ts +6 -0
- package/components/sender/index.css +33 -0
- package/components/sender/index.d.ts +4 -0
- package/components/sender/index.mjs +301 -0
- package/components/sender/src/SenderHeader.vue.d.ts +270 -0
- package/components/sender/src/ctx.d.ts +38 -0
- package/components/sender/src/index.vue.d.ts +732 -0
- package/components/sender/src/types.d.ts +1 -0
- package/components/speech-button/index.css +10 -0
- package/components/speech-button/index.d.ts +4 -0
- package/components/speech-button/index.mjs +164 -0
- package/components/speech-button/src/LoadingIcon.vue.d.ts +2 -0
- package/components/speech-button/src/RecordingIcon.vue.d.ts +2 -0
- package/components/speech-button/src/ctx.d.ts +10 -0
- package/components/speech-button/src/index.vue.d.ts +22 -0
- package/components/speech-button/src/types.d.ts +1 -0
- package/components/table-columns/src/ctx.d.ts +4 -4
- package/components/table-columns/src/el-ctx.d.ts +5 -5
- package/components/table-columns/src/index.vue.d.ts +21 -21
- package/components/tables-v1/index.mjs +6 -7
- package/components/tables-v1/src/ctx.d.ts +27 -27
- package/components/tables-v1/src/el-ctx.d.ts +12 -12
- package/components/tables-v1/src/index.vue.d.ts +103 -103
- package/components/tables-v1/src/types.d.ts +2 -2
- package/components/tables-v1-checkbox/src/ctx.d.ts +26 -25
- package/components/tables-v1-checkbox/src/index.vue.d.ts +182 -170
- package/components/vditor/src/index.vue.d.ts +5 -5
- package/composables/recorder/index.d.ts +15 -0
- package/composables/recorder/index.mjs +14479 -0
- package/index.css +118 -0
- package/package.json +30 -1
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
import { ElButton, ElMessage } from 'element-plus';
|
|
2
|
+
import Recorder from 'recorder-core';
|
|
3
|
+
import { defineComponent, ref, shallowRef, onUnmounted, resolveComponent, openBlock, createElementBlock, createCommentVNode, createElementVNode, toDisplayString, normalizeClass, createVNode, mergeProps, withCtx } from 'vue';
|
|
4
|
+
import 'recorder-core/src/engine/mp3';
|
|
5
|
+
import 'recorder-core/src/engine/wav';
|
|
6
|
+
import 'recorder-core/src/engine/mp3-engine';
|
|
7
|
+
import 'recorder-core/src/extensions/waveview';
|
|
8
|
+
import 'recorder-core/src/app-support/app';
|
|
9
|
+
import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
|
|
10
|
+
|
|
11
|
+
const props = {
|
|
12
|
+
speenchToTextUrl: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: "http://localhost:3000/speech-to-text"
|
|
15
|
+
},
|
|
16
|
+
/**
|
|
17
|
+
* 自定义转为文本区域事件
|
|
18
|
+
*/
|
|
19
|
+
onTextZone: {
|
|
20
|
+
type: Function,
|
|
21
|
+
default: void 0
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
const emits = {
|
|
25
|
+
submitText: (text) => typeof text === "string",
|
|
26
|
+
submit: (_) => true
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
async function speechToText(url, blob) {
|
|
30
|
+
const formData = new FormData();
|
|
31
|
+
formData.append("file", blob, "audio.wav");
|
|
32
|
+
const response = await fetch(url, {
|
|
33
|
+
method: "POST",
|
|
34
|
+
body: formData
|
|
35
|
+
});
|
|
36
|
+
if (!response.ok) {
|
|
37
|
+
throw new Error("Speech to text failed");
|
|
38
|
+
}
|
|
39
|
+
const result = await response.json();
|
|
40
|
+
return result.text;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const LONG_PRESS_DURATION = 100;
|
|
44
|
+
var _sfc_main = defineComponent({
|
|
45
|
+
name: "VkRecorderButton",
|
|
46
|
+
components: {
|
|
47
|
+
ElButton
|
|
48
|
+
},
|
|
49
|
+
props,
|
|
50
|
+
emits,
|
|
51
|
+
setup(props2, { emit }) {
|
|
52
|
+
const supported = ref(false);
|
|
53
|
+
const recording = ref(false);
|
|
54
|
+
const recordingNode = ref();
|
|
55
|
+
const wave = shallowRef();
|
|
56
|
+
const blobUrl = ref("");
|
|
57
|
+
let pressTimer = null;
|
|
58
|
+
const rec = new Recorder({
|
|
59
|
+
// mp3格式,指定采样率hz、比特率kbps
|
|
60
|
+
type: "wav",
|
|
61
|
+
sampleRate: 16e3,
|
|
62
|
+
bitRate: 16,
|
|
63
|
+
onProcess
|
|
64
|
+
});
|
|
65
|
+
const recOpen = () => {
|
|
66
|
+
return new Promise((resolve, reject) => {
|
|
67
|
+
rec.open(() => {
|
|
68
|
+
supported.value = true;
|
|
69
|
+
if (Recorder.WaveView) {
|
|
70
|
+
wave.value = Recorder.WaveView({
|
|
71
|
+
elem: recordingNode.value
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
resolve(true);
|
|
75
|
+
}, (msg, isUserNotAllow) => {
|
|
76
|
+
ElMessage.error(`${isUserNotAllow ? "\u7528\u6237\u672A\u6388\u6743, " : ""}\u65E0\u6CD5\u5F55\u97F3:${msg}`);
|
|
77
|
+
reject(new Error(msg));
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
const startRecording = async () => {
|
|
82
|
+
await recOpen();
|
|
83
|
+
if (!supported.value)
|
|
84
|
+
return;
|
|
85
|
+
rec.start();
|
|
86
|
+
recording.value = true;
|
|
87
|
+
};
|
|
88
|
+
const isDragging = ref(false);
|
|
89
|
+
const dragPosition = ref({ x: 0, y: 0 });
|
|
90
|
+
const cancelZone = ref(false);
|
|
91
|
+
const isTextZone = ref(false);
|
|
92
|
+
let isMouseDown = false;
|
|
93
|
+
const stopRecording = () => {
|
|
94
|
+
const theTextZone = isTextZone.value;
|
|
95
|
+
rec.stop(async (blob) => {
|
|
96
|
+
blobUrl.value = (window.URL || webkitURL).createObjectURL(blob);
|
|
97
|
+
rec.close();
|
|
98
|
+
recording.value = false;
|
|
99
|
+
emit("submit", {
|
|
100
|
+
blob,
|
|
101
|
+
url: blobUrl.value
|
|
102
|
+
});
|
|
103
|
+
if (theTextZone) {
|
|
104
|
+
if (props2.onTextZone) {
|
|
105
|
+
props2.onTextZone({
|
|
106
|
+
blob,
|
|
107
|
+
url: blobUrl.value
|
|
108
|
+
});
|
|
109
|
+
} else {
|
|
110
|
+
speechToText(props2.speenchToTextUrl, blob).then((text) => {
|
|
111
|
+
emit("submitText", text);
|
|
112
|
+
}).catch((err) => {
|
|
113
|
+
console.error("\u8BED\u97F3\u8BC6\u522B\u9519\u8BEF:", err);
|
|
114
|
+
ElMessage.error("\u8F6C\u6362\u6587\u5B57\u5931\u8D25");
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
const addDocumentListeners = () => {
|
|
121
|
+
document.addEventListener("mousemove", onmousemove);
|
|
122
|
+
document.addEventListener("mouseup", onmouseup);
|
|
123
|
+
};
|
|
124
|
+
const removeDocumentListeners = () => {
|
|
125
|
+
document.removeEventListener("mousemove", onmousemove);
|
|
126
|
+
document.removeEventListener("mouseup", onmouseup);
|
|
127
|
+
};
|
|
128
|
+
const onmousedown = (e) => {
|
|
129
|
+
e.preventDefault();
|
|
130
|
+
isMouseDown = true;
|
|
131
|
+
const touch = "touches" in e ? e.touches[0] : e;
|
|
132
|
+
dragPosition.value = { x: touch.clientX, y: touch.clientY };
|
|
133
|
+
if (e instanceof MouseEvent) {
|
|
134
|
+
addDocumentListeners();
|
|
135
|
+
}
|
|
136
|
+
pressTimer = setTimeout(() => {
|
|
137
|
+
if (isMouseDown) {
|
|
138
|
+
isDragging.value = true;
|
|
139
|
+
startRecording();
|
|
140
|
+
}
|
|
141
|
+
}, LONG_PRESS_DURATION);
|
|
142
|
+
};
|
|
143
|
+
function onmousemove(e) {
|
|
144
|
+
e.preventDefault();
|
|
145
|
+
if (!isDragging.value)
|
|
146
|
+
return;
|
|
147
|
+
const touch = "touches" in e ? e.touches[0] : e;
|
|
148
|
+
dragPosition.value = { x: touch.clientX, y: touch.clientY };
|
|
149
|
+
const cancelBtn = document.querySelector(".cancel-btn");
|
|
150
|
+
const textBtn = document.querySelector(".text-btn");
|
|
151
|
+
if (cancelBtn && textBtn) {
|
|
152
|
+
const cancelRect = cancelBtn.getBoundingClientRect();
|
|
153
|
+
const textRect = textBtn.getBoundingClientRect();
|
|
154
|
+
cancelZone.value = touch.clientX >= cancelRect.left && touch.clientX <= cancelRect.right && touch.clientY >= cancelRect.top && touch.clientY <= cancelRect.bottom;
|
|
155
|
+
isTextZone.value = touch.clientX >= textRect.left && touch.clientX <= textRect.right && touch.clientY >= textRect.top && touch.clientY <= textRect.bottom;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
function onmouseup(e) {
|
|
159
|
+
isMouseDown = false;
|
|
160
|
+
clearTimeout(pressTimer);
|
|
161
|
+
if (isDragging.value) {
|
|
162
|
+
if (cancelZone.value) {
|
|
163
|
+
rec.close();
|
|
164
|
+
} else {
|
|
165
|
+
stopRecording();
|
|
166
|
+
}
|
|
167
|
+
isDragging.value = false;
|
|
168
|
+
cancelZone.value = false;
|
|
169
|
+
isTextZone.value = false;
|
|
170
|
+
}
|
|
171
|
+
if (e instanceof MouseEvent) {
|
|
172
|
+
removeDocumentListeners();
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
function onProcess(buffers, powerLevel, bufferDuration, bufferSampleRate) {
|
|
176
|
+
wave.value?.input(
|
|
177
|
+
buffers[buffers.length - 1],
|
|
178
|
+
powerLevel,
|
|
179
|
+
bufferSampleRate
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
onUnmounted(() => {
|
|
183
|
+
removeDocumentListeners();
|
|
184
|
+
});
|
|
185
|
+
return {
|
|
186
|
+
onmousedown,
|
|
187
|
+
onmousemove,
|
|
188
|
+
onmouseup,
|
|
189
|
+
recording,
|
|
190
|
+
recordingNode,
|
|
191
|
+
blobUrl,
|
|
192
|
+
isDragging,
|
|
193
|
+
cancelZone,
|
|
194
|
+
isTextZone
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
const _hoisted_1 = { class: "sk-recorder-container" };
|
|
200
|
+
const _hoisted_2 = {
|
|
201
|
+
key: 0,
|
|
202
|
+
class: "recording-mask"
|
|
203
|
+
};
|
|
204
|
+
const _hoisted_3 = { class: "recording-tip" };
|
|
205
|
+
const _hoisted_4 = {
|
|
206
|
+
ref: "recordingNode",
|
|
207
|
+
class: "wave-container"
|
|
208
|
+
};
|
|
209
|
+
const _hoisted_5 = { class: "tip-text" };
|
|
210
|
+
const _hoisted_6 = { class: "action-buttons" };
|
|
211
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
212
|
+
const _component_ElButton = resolveComponent("ElButton");
|
|
213
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
214
|
+
createCommentVNode(" \u906E\u7F69\u5C42 "),
|
|
215
|
+
_ctx.isDragging ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
216
|
+
createCommentVNode(" \u5F55\u97F3\u63D0\u793A\u533A\u57DF\u79FB\u5230\u4E0A\u9762 "),
|
|
217
|
+
createElementVNode("div", _hoisted_3, [
|
|
218
|
+
createElementVNode(
|
|
219
|
+
"div",
|
|
220
|
+
_hoisted_4,
|
|
221
|
+
null,
|
|
222
|
+
512
|
|
223
|
+
/* NEED_PATCH */
|
|
224
|
+
),
|
|
225
|
+
createElementVNode(
|
|
226
|
+
"div",
|
|
227
|
+
_hoisted_5,
|
|
228
|
+
toDisplayString(_ctx.cancelZone ? "\u677E\u5F00\u624B\u6307\uFF0C\u53D6\u6D88\u53D1\u9001" : "\u677E\u5F00\u53D1\u9001\uFF0C\u4E0A\u6ED1\u53D6\u6D88"),
|
|
229
|
+
1
|
|
230
|
+
/* TEXT */
|
|
231
|
+
)
|
|
232
|
+
]),
|
|
233
|
+
createCommentVNode(" \u64CD\u4F5C\u6309\u94AE\u79FB\u5230\u5E95\u90E8 "),
|
|
234
|
+
createElementVNode("div", _hoisted_6, [
|
|
235
|
+
createElementVNode(
|
|
236
|
+
"div",
|
|
237
|
+
{
|
|
238
|
+
class: normalizeClass(["cancel-btn", { active: _ctx.cancelZone }])
|
|
239
|
+
},
|
|
240
|
+
_cache[0] || (_cache[0] = [
|
|
241
|
+
createElementVNode(
|
|
242
|
+
"div",
|
|
243
|
+
{ class: "btn-icon" },
|
|
244
|
+
" \xD7 ",
|
|
245
|
+
-1
|
|
246
|
+
/* HOISTED */
|
|
247
|
+
),
|
|
248
|
+
createElementVNode(
|
|
249
|
+
"div",
|
|
250
|
+
{ class: "btn-text" },
|
|
251
|
+
" \u53D6\u6D88\u53D1\u9001 ",
|
|
252
|
+
-1
|
|
253
|
+
/* HOISTED */
|
|
254
|
+
)
|
|
255
|
+
]),
|
|
256
|
+
2
|
|
257
|
+
/* CLASS */
|
|
258
|
+
),
|
|
259
|
+
createElementVNode(
|
|
260
|
+
"div",
|
|
261
|
+
{
|
|
262
|
+
class: normalizeClass(["text-btn", { active: _ctx.isTextZone }])
|
|
263
|
+
},
|
|
264
|
+
_cache[1] || (_cache[1] = [
|
|
265
|
+
createElementVNode(
|
|
266
|
+
"div",
|
|
267
|
+
{ class: "btn-icon" },
|
|
268
|
+
" \u6587 ",
|
|
269
|
+
-1
|
|
270
|
+
/* HOISTED */
|
|
271
|
+
),
|
|
272
|
+
createElementVNode(
|
|
273
|
+
"div",
|
|
274
|
+
{ class: "btn-text" },
|
|
275
|
+
" \u8F6C\u4E3A\u6587\u5B57 ",
|
|
276
|
+
-1
|
|
277
|
+
/* HOISTED */
|
|
278
|
+
)
|
|
279
|
+
]),
|
|
280
|
+
2
|
|
281
|
+
/* CLASS */
|
|
282
|
+
)
|
|
283
|
+
])
|
|
284
|
+
])) : createCommentVNode("v-if", true),
|
|
285
|
+
createCommentVNode(" \u5F55\u97F3\u6309\u94AE "),
|
|
286
|
+
createVNode(_component_ElButton, mergeProps(_ctx.$attrs, {
|
|
287
|
+
class: ["sk-recorder-button", {
|
|
288
|
+
"is-recording": _ctx.recording
|
|
289
|
+
}],
|
|
290
|
+
onTouchstart: _ctx.onmousedown,
|
|
291
|
+
onTouchmove: _ctx.onmousemove,
|
|
292
|
+
onTouchend: _ctx.onmouseup,
|
|
293
|
+
onMousedown: _ctx.onmousedown
|
|
294
|
+
}), {
|
|
295
|
+
default: withCtx(() => _cache[2] || (_cache[2] = [
|
|
296
|
+
createElementVNode(
|
|
297
|
+
"span",
|
|
298
|
+
{ class: "sk-recorder-button-text" },
|
|
299
|
+
"\u6309\u4F4F \u8BF4\u8BDD",
|
|
300
|
+
-1
|
|
301
|
+
/* HOISTED */
|
|
302
|
+
)
|
|
303
|
+
])),
|
|
304
|
+
_: 1
|
|
305
|
+
/* STABLE */
|
|
306
|
+
}, 16, ["class", "onTouchstart", "onTouchmove", "onTouchend", "onMousedown"])
|
|
307
|
+
]);
|
|
308
|
+
}
|
|
309
|
+
var VkRecorderButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/vunk-plus/vunk-plus/packages/components/recorder-button/src/index.vue"]]);
|
|
310
|
+
|
|
311
|
+
var types = /*#__PURE__*/Object.freeze({
|
|
312
|
+
__proto__: null
|
|
313
|
+
});
|
|
314
|
+
|
|
315
|
+
VkRecorderButton.install = (app) => {
|
|
316
|
+
app.component(VkRecorderButton.name || "VkRecorderButton", VkRecorderButton);
|
|
317
|
+
};
|
|
318
|
+
|
|
319
|
+
export { VkRecorderButton, types as __VkRecorderButton, VkRecorderButton as default };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
import type { OnTextZone, SubmitRawEvent } from './types';
|
|
3
|
+
export declare const props: {
|
|
4
|
+
speenchToTextUrl: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* 自定义转为文本区域事件
|
|
10
|
+
*/
|
|
11
|
+
onTextZone: {
|
|
12
|
+
type: PropType<OnTextZone>;
|
|
13
|
+
default: any;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export declare const emits: {
|
|
17
|
+
submitText: (text: string) => boolean;
|
|
18
|
+
submit: (_: SubmitRawEvent) => boolean;
|
|
19
|
+
};
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
import 'recorder-core/src/engine/mp3';
|
|
3
|
+
import 'recorder-core/src/engine/wav';
|
|
4
|
+
import 'recorder-core/src/engine/mp3-engine';
|
|
5
|
+
import 'recorder-core/src/extensions/waveview';
|
|
6
|
+
import 'recorder-core/src/app-support/app';
|
|
7
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
8
|
+
speenchToTextUrl: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
onTextZone: {
|
|
13
|
+
type: import("vue").PropType<import("./types").OnTextZone>;
|
|
14
|
+
default: any;
|
|
15
|
+
};
|
|
16
|
+
}>, {
|
|
17
|
+
onmousedown: (e: MouseEvent | TouchEvent) => void;
|
|
18
|
+
onmousemove: (e: MouseEvent | TouchEvent) => void;
|
|
19
|
+
onmouseup: (e: MouseEvent | TouchEvent) => void;
|
|
20
|
+
recording: Ref<boolean, boolean>;
|
|
21
|
+
recordingNode: Ref<HTMLSpanElement, HTMLSpanElement>;
|
|
22
|
+
blobUrl: Ref<string, string>;
|
|
23
|
+
isDragging: Ref<boolean, boolean>;
|
|
24
|
+
cancelZone: Ref<boolean, boolean>;
|
|
25
|
+
isTextZone: Ref<boolean, boolean>;
|
|
26
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
27
|
+
submitText: (text: string) => boolean;
|
|
28
|
+
submit: (_: import("./types").SubmitRawEvent) => boolean;
|
|
29
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
30
|
+
speenchToTextUrl: {
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
34
|
+
onTextZone: {
|
|
35
|
+
type: import("vue").PropType<import("./types").OnTextZone>;
|
|
36
|
+
default: any;
|
|
37
|
+
};
|
|
38
|
+
}>> & Readonly<{
|
|
39
|
+
onSubmit?: (_: import("./types").SubmitRawEvent) => any;
|
|
40
|
+
onSubmitText?: (text: string) => any;
|
|
41
|
+
}>, {
|
|
42
|
+
speenchToTextUrl: string;
|
|
43
|
+
onTextZone: import("./types").OnTextZone;
|
|
44
|
+
}, {}, {
|
|
45
|
+
ElButton: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
46
|
+
readonly size: {
|
|
47
|
+
readonly type: import("vue").PropType<import("element-plus").ButtonType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
48
|
+
readonly required: false;
|
|
49
|
+
readonly validator: (val: unknown) => boolean;
|
|
50
|
+
__epPropKey: true;
|
|
51
|
+
};
|
|
52
|
+
readonly disabled: BooleanConstructor;
|
|
53
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "text" | "success" | "warning" | "info" | "primary" | "danger", unknown, "", boolean>;
|
|
54
|
+
readonly icon: {
|
|
55
|
+
readonly type: import("vue").PropType<unknown>;
|
|
56
|
+
readonly required: false;
|
|
57
|
+
readonly validator: (val: unknown) => boolean;
|
|
58
|
+
__epPropKey: true;
|
|
59
|
+
};
|
|
60
|
+
readonly nativeType: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "button" | "reset" | "submit", unknown, "button", boolean>;
|
|
61
|
+
readonly loading: BooleanConstructor;
|
|
62
|
+
readonly loadingIcon: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>))[], unknown, unknown, () => any, boolean>;
|
|
63
|
+
readonly plain: BooleanConstructor;
|
|
64
|
+
readonly text: BooleanConstructor;
|
|
65
|
+
readonly link: BooleanConstructor;
|
|
66
|
+
readonly bg: BooleanConstructor;
|
|
67
|
+
readonly autofocus: BooleanConstructor;
|
|
68
|
+
readonly round: BooleanConstructor;
|
|
69
|
+
readonly circle: BooleanConstructor;
|
|
70
|
+
readonly color: StringConstructor;
|
|
71
|
+
readonly dark: BooleanConstructor;
|
|
72
|
+
readonly autoInsertSpace: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
73
|
+
readonly tag: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>))[], unknown, unknown, "button", boolean>;
|
|
74
|
+
}, {
|
|
75
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
76
|
+
readonly size: {
|
|
77
|
+
readonly type: import("vue").PropType<import("element-plus").ButtonType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
78
|
+
readonly required: false;
|
|
79
|
+
readonly validator: (val: unknown) => boolean;
|
|
80
|
+
__epPropKey: true;
|
|
81
|
+
};
|
|
82
|
+
readonly disabled: BooleanConstructor;
|
|
83
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "text" | "success" | "warning" | "info" | "primary" | "danger", unknown, "", boolean>;
|
|
84
|
+
readonly icon: {
|
|
85
|
+
readonly type: import("vue").PropType<unknown>;
|
|
86
|
+
readonly required: false;
|
|
87
|
+
readonly validator: (val: unknown) => boolean;
|
|
88
|
+
__epPropKey: true;
|
|
89
|
+
};
|
|
90
|
+
readonly nativeType: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "button" | "reset" | "submit", unknown, "button", boolean>;
|
|
91
|
+
readonly loading: BooleanConstructor;
|
|
92
|
+
readonly loadingIcon: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>))[], unknown, unknown, () => any, boolean>;
|
|
93
|
+
readonly plain: BooleanConstructor;
|
|
94
|
+
readonly text: BooleanConstructor;
|
|
95
|
+
readonly link: BooleanConstructor;
|
|
96
|
+
readonly bg: BooleanConstructor;
|
|
97
|
+
readonly autofocus: BooleanConstructor;
|
|
98
|
+
readonly round: BooleanConstructor;
|
|
99
|
+
readonly circle: BooleanConstructor;
|
|
100
|
+
readonly color: StringConstructor;
|
|
101
|
+
readonly dark: BooleanConstructor;
|
|
102
|
+
readonly autoInsertSpace: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
103
|
+
readonly tag: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>))[], unknown, unknown, "button", boolean>;
|
|
104
|
+
}>> & {
|
|
105
|
+
onClick?: (evt: MouseEvent) => any;
|
|
106
|
+
}>>;
|
|
107
|
+
emit: (event: "click", evt: MouseEvent) => void;
|
|
108
|
+
buttonStyle: import("vue").ComputedRef<Record<string, string>>;
|
|
109
|
+
ns: {
|
|
110
|
+
namespace: import("vue").ComputedRef<string>;
|
|
111
|
+
b: (blockSuffix?: string) => string;
|
|
112
|
+
e: (element?: string) => string;
|
|
113
|
+
m: (modifier?: string) => string;
|
|
114
|
+
be: (blockSuffix?: string, element?: string) => string;
|
|
115
|
+
em: (element?: string, modifier?: string) => string;
|
|
116
|
+
bm: (blockSuffix?: string, modifier?: string) => string;
|
|
117
|
+
bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
|
|
118
|
+
is: {
|
|
119
|
+
(name: string, state: boolean): string;
|
|
120
|
+
(name: string): string;
|
|
121
|
+
};
|
|
122
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
123
|
+
cssVarName: (name: string) => string;
|
|
124
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
125
|
+
cssVarBlockName: (name: string) => string;
|
|
126
|
+
};
|
|
127
|
+
_ref: Ref<HTMLButtonElement, HTMLButtonElement>;
|
|
128
|
+
_size: import("vue").ComputedRef<"" | "default" | "small" | "large">;
|
|
129
|
+
_type: import("vue").ComputedRef<"" | "default" | "text" | "success" | "warning" | "info" | "primary" | "danger">;
|
|
130
|
+
_disabled: import("vue").ComputedRef<boolean>;
|
|
131
|
+
_props: import("vue").ComputedRef<{
|
|
132
|
+
ariaDisabled: boolean;
|
|
133
|
+
disabled: boolean;
|
|
134
|
+
autofocus: boolean;
|
|
135
|
+
type: import("element-plus").ButtonType<StringConstructor, "button" | "reset" | "submit", unknown>;
|
|
136
|
+
} | {
|
|
137
|
+
ariaDisabled?: undefined;
|
|
138
|
+
disabled?: undefined;
|
|
139
|
+
autofocus?: undefined;
|
|
140
|
+
type?: undefined;
|
|
141
|
+
}>;
|
|
142
|
+
shouldAddSpace: import("vue").ComputedRef<boolean>;
|
|
143
|
+
handleClick: (evt: MouseEvent) => void;
|
|
144
|
+
buttonKls: import("vue").ComputedRef<string[]>;
|
|
145
|
+
ElIcon: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
146
|
+
readonly size: {
|
|
147
|
+
readonly type: import("vue").PropType<import("element-plus").ButtonType<(new (...args: any[]) => string | number) | (() => string | number) | ((new (...args: any[]) => string | number) | (() => string | number))[], unknown, unknown>>;
|
|
148
|
+
readonly required: false;
|
|
149
|
+
readonly validator: (val: unknown) => boolean;
|
|
150
|
+
__epPropKey: true;
|
|
151
|
+
};
|
|
152
|
+
readonly color: {
|
|
153
|
+
readonly type: import("vue").PropType<string>;
|
|
154
|
+
readonly required: false;
|
|
155
|
+
readonly validator: (val: unknown) => boolean;
|
|
156
|
+
__epPropKey: true;
|
|
157
|
+
};
|
|
158
|
+
}, {
|
|
159
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
160
|
+
readonly size: {
|
|
161
|
+
readonly type: import("vue").PropType<import("element-plus").ButtonType<(new (...args: any[]) => string | number) | (() => string | number) | ((new (...args: any[]) => string | number) | (() => string | number))[], unknown, unknown>>;
|
|
162
|
+
readonly required: false;
|
|
163
|
+
readonly validator: (val: unknown) => boolean;
|
|
164
|
+
__epPropKey: true;
|
|
165
|
+
};
|
|
166
|
+
readonly color: {
|
|
167
|
+
readonly type: import("vue").PropType<string>;
|
|
168
|
+
readonly required: false;
|
|
169
|
+
readonly validator: (val: unknown) => boolean;
|
|
170
|
+
__epPropKey: true;
|
|
171
|
+
};
|
|
172
|
+
}>> & {
|
|
173
|
+
[x: `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any);
|
|
174
|
+
}>>;
|
|
175
|
+
ns: {
|
|
176
|
+
namespace: import("vue").ComputedRef<string>;
|
|
177
|
+
b: (blockSuffix?: string) => string;
|
|
178
|
+
e: (element?: string) => string;
|
|
179
|
+
m: (modifier?: string) => string;
|
|
180
|
+
be: (blockSuffix?: string, element?: string) => string;
|
|
181
|
+
em: (element?: string, modifier?: string) => string;
|
|
182
|
+
bm: (blockSuffix?: string, modifier?: string) => string;
|
|
183
|
+
bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
|
|
184
|
+
is: {
|
|
185
|
+
(name: string, state: boolean): string;
|
|
186
|
+
(name: string): string;
|
|
187
|
+
};
|
|
188
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
189
|
+
cssVarName: (name: string) => string;
|
|
190
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
191
|
+
cssVarBlockName: (name: string) => string;
|
|
192
|
+
};
|
|
193
|
+
style: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
194
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
195
|
+
readonly size: {
|
|
196
|
+
readonly type: import("vue").PropType<import("element-plus").ButtonType<(new (...args: any[]) => string | number) | (() => string | number) | ((new (...args: any[]) => string | number) | (() => string | number))[], unknown, unknown>>;
|
|
197
|
+
readonly required: false;
|
|
198
|
+
readonly validator: (val: unknown) => boolean;
|
|
199
|
+
__epPropKey: true;
|
|
200
|
+
};
|
|
201
|
+
readonly color: {
|
|
202
|
+
readonly type: import("vue").PropType<string>;
|
|
203
|
+
readonly required: false;
|
|
204
|
+
readonly validator: (val: unknown) => boolean;
|
|
205
|
+
__epPropKey: true;
|
|
206
|
+
};
|
|
207
|
+
}>>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & Record<string, any>;
|
|
208
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
209
|
+
click: (evt: MouseEvent) => boolean;
|
|
210
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
211
|
+
readonly size: {
|
|
212
|
+
readonly type: import("vue").PropType<import("element-plus").ButtonType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
213
|
+
readonly required: false;
|
|
214
|
+
readonly validator: (val: unknown) => boolean;
|
|
215
|
+
__epPropKey: true;
|
|
216
|
+
};
|
|
217
|
+
readonly disabled: BooleanConstructor;
|
|
218
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "text" | "success" | "warning" | "info" | "primary" | "danger", unknown, "", boolean>;
|
|
219
|
+
readonly icon: {
|
|
220
|
+
readonly type: import("vue").PropType<unknown>;
|
|
221
|
+
readonly required: false;
|
|
222
|
+
readonly validator: (val: unknown) => boolean;
|
|
223
|
+
__epPropKey: true;
|
|
224
|
+
};
|
|
225
|
+
readonly nativeType: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "button" | "reset" | "submit", unknown, "button", boolean>;
|
|
226
|
+
readonly loading: BooleanConstructor;
|
|
227
|
+
readonly loadingIcon: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>))[], unknown, unknown, () => any, boolean>;
|
|
228
|
+
readonly plain: BooleanConstructor;
|
|
229
|
+
readonly text: BooleanConstructor;
|
|
230
|
+
readonly link: BooleanConstructor;
|
|
231
|
+
readonly bg: BooleanConstructor;
|
|
232
|
+
readonly autofocus: BooleanConstructor;
|
|
233
|
+
readonly round: BooleanConstructor;
|
|
234
|
+
readonly circle: BooleanConstructor;
|
|
235
|
+
readonly color: StringConstructor;
|
|
236
|
+
readonly dark: BooleanConstructor;
|
|
237
|
+
readonly autoInsertSpace: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
238
|
+
readonly tag: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>))[], unknown, unknown, "button", boolean>;
|
|
239
|
+
}>> & {
|
|
240
|
+
onClick?: (evt: MouseEvent) => any;
|
|
241
|
+
}, {
|
|
242
|
+
readonly type: import("element-plus").ButtonType<StringConstructor, "" | "default" | "text" | "success" | "warning" | "info" | "primary" | "danger", unknown>;
|
|
243
|
+
readonly link: boolean;
|
|
244
|
+
readonly dark: boolean;
|
|
245
|
+
readonly disabled: boolean;
|
|
246
|
+
readonly text: boolean;
|
|
247
|
+
readonly autofocus: boolean;
|
|
248
|
+
readonly round: boolean;
|
|
249
|
+
readonly circle: boolean;
|
|
250
|
+
readonly tag: unknown;
|
|
251
|
+
readonly loading: boolean;
|
|
252
|
+
readonly nativeType: import("element-plus").ButtonType<StringConstructor, "button" | "reset" | "submit", unknown>;
|
|
253
|
+
readonly loadingIcon: unknown;
|
|
254
|
+
readonly autoInsertSpace: import("element-plus").ButtonType<BooleanConstructor, unknown, unknown>;
|
|
255
|
+
readonly plain: boolean;
|
|
256
|
+
readonly bg: boolean;
|
|
257
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & {
|
|
258
|
+
ButtonGroup: import("vue").DefineComponent<{
|
|
259
|
+
readonly size: {
|
|
260
|
+
readonly type: import("vue").PropType<import("element-plus").ButtonType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
261
|
+
readonly required: false;
|
|
262
|
+
readonly validator: (val: unknown) => boolean;
|
|
263
|
+
__epPropKey: true;
|
|
264
|
+
};
|
|
265
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "text" | "success" | "warning" | "info" | "primary" | "danger", unknown, "", boolean>;
|
|
266
|
+
}, {
|
|
267
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
268
|
+
readonly size: {
|
|
269
|
+
readonly type: import("vue").PropType<import("element-plus").ButtonType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
270
|
+
readonly required: false;
|
|
271
|
+
readonly validator: (val: unknown) => boolean;
|
|
272
|
+
__epPropKey: true;
|
|
273
|
+
};
|
|
274
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "text" | "success" | "warning" | "info" | "primary" | "danger", unknown, "", boolean>;
|
|
275
|
+
}>> & {
|
|
276
|
+
[x: `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any);
|
|
277
|
+
}>>;
|
|
278
|
+
ns: {
|
|
279
|
+
namespace: import("vue").ComputedRef<string>;
|
|
280
|
+
b: (blockSuffix?: string) => string;
|
|
281
|
+
e: (element?: string) => string;
|
|
282
|
+
m: (modifier?: string) => string;
|
|
283
|
+
be: (blockSuffix?: string, element?: string) => string;
|
|
284
|
+
em: (element?: string, modifier?: string) => string;
|
|
285
|
+
bm: (blockSuffix?: string, modifier?: string) => string;
|
|
286
|
+
bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
|
|
287
|
+
is: {
|
|
288
|
+
(name: string, state: boolean): string;
|
|
289
|
+
(name: string): string;
|
|
290
|
+
};
|
|
291
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
292
|
+
cssVarName: (name: string) => string;
|
|
293
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
294
|
+
cssVarBlockName: (name: string) => string;
|
|
295
|
+
};
|
|
296
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
297
|
+
readonly size: {
|
|
298
|
+
readonly type: import("vue").PropType<import("element-plus").ButtonType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
299
|
+
readonly required: false;
|
|
300
|
+
readonly validator: (val: unknown) => boolean;
|
|
301
|
+
__epPropKey: true;
|
|
302
|
+
};
|
|
303
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "text" | "success" | "warning" | "info" | "primary" | "danger", unknown, "", boolean>;
|
|
304
|
+
}>>, {
|
|
305
|
+
readonly type: import("element-plus").ButtonType<StringConstructor, "" | "default" | "text" | "success" | "warning" | "info" | "primary" | "danger", unknown>;
|
|
306
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
307
|
+
};
|
|
308
|
+
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
309
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function speechToText(url: string, blob: Blob): Promise<string>;
|