mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-05-05 05:47:10 -04:00
feat(new-tool): String to NATO alphabet
This commit is contained in:
parent
9634f5d9a8
commit
0ddf18f4b5
5 changed files with 90 additions and 0 deletions
30
src/tools/text-to-nato-alphabet/text-to-nato-alphabet.vue
Normal file
30
src/tools/text-to-nato-alphabet/text-to-nato-alphabet.vue
Normal file
|
@ -0,0 +1,30 @@
|
|||
<template>
|
||||
<div>
|
||||
<n-form-item label="Your text to convert to NATO phonetic alphabet">
|
||||
<n-input v-model:value="input" placeholder="Put your text here..." clearable />
|
||||
</n-form-item>
|
||||
|
||||
<n-space v-if="natoText" vertical>
|
||||
<n-text>Your text in NATO phonetic alphabet</n-text>
|
||||
<n-card>
|
||||
{{ natoText }}
|
||||
</n-card>
|
||||
|
||||
<n-space justify="center">
|
||||
<n-button secondary autofocus @click="copy"> Copy NATO string </n-button>
|
||||
</n-space>
|
||||
</n-space>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useCopy } from '@/composable/copy';
|
||||
import { computed, ref } from 'vue';
|
||||
import { textToNatoAlphabet } from './text-to-nato-alphabet.service';
|
||||
|
||||
const input = ref('');
|
||||
const natoText = computed(() => textToNatoAlphabet({ text: input.value }));
|
||||
const { copy } = useCopy({ source: natoText, text: 'NATO alphabet string copied.' });
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped></style>
|
Loading…
Add table
Add a link
Reference in a new issue