File tree Expand file tree Collapse file tree 1 file changed +32
-2
lines changed Expand file tree Collapse file tree 1 file changed +32
-2
lines changed Original file line number Diff line number Diff line change @@ -18,9 +18,39 @@ export const configApp = {
1818 {
1919 name : 'Usage' ,
2020 language : 'tsx' ,
21- content : `import VoiceCaptureVue from 'voicecapture-vue'
21+ content : `<script setup>
22+ import { ref } from 'vue';
23+ import VoiceCaptureVue from 'voicecapture-vue';
2224
23- <VoiceCaptureVue />` ,
25+ const isVoiceCaptureExample = ref(false);
26+ const voiceTextTranscript = ref('');
27+
28+ function openVoiceCapture() {
29+ isVoiceCaptureExample.value = true;
30+ }
31+
32+ function statusVoiceCapture(value) {
33+ isVoiceCaptureExample.value = value;
34+ }
35+
36+ function returnVoiceTranscript(transcript) {
37+ voiceTextTranscript.value = transcript;
38+ }
39+ </script>
40+
41+ <template>
42+ <VoiceCaptureVue
43+ :status="isVoiceCaptureExample"
44+ @voiceTranscript="returnVoiceTranscript"
45+ @onStatus="s tatusVoiceCapture"
46+ />
47+ <textarea
48+ v-if="voiceTextTranscript"
49+ v-model="voiceTextTranscript"
50+ placeholder="Text Voice Transcript"
51+ >
52+ </textarea>
53+ </template>` ,
2454 } ,
2555 ] ,
2656}
You can’t perform that action at this time.
0 commit comments