mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-21 15:26:15 -04:00
fix(hash-text): added missing toString()
This commit is contained in:
parent
0f3b7445ad
commit
4ca5fce911
1 changed files with 3 additions and 3 deletions
|
@ -17,7 +17,7 @@
|
||||||
<br />
|
<br />
|
||||||
<n-input
|
<n-input
|
||||||
style="text-align: center;"
|
style="text-align: center;"
|
||||||
v-model:value="hashedText"
|
:value="hashedText"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
placeholder="Your string hash"
|
placeholder="Your string hash"
|
||||||
:autosize="{ minRows: 1 }"
|
:autosize="{ minRows: 1 }"
|
||||||
|
@ -61,9 +61,9 @@ const algos = {
|
||||||
RIPEMD160,
|
RIPEMD160,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const clearText = ref('Lorem ipsum')
|
const clearText = ref('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lacus metus blandit dolor lacus natoque ad fusce aliquam velit.')
|
||||||
const hashedText = computed(() => algos[algo.value](clearText.value))
|
|
||||||
const algo = ref<keyof typeof algos>('SHA256')
|
const algo = ref<keyof typeof algos>('SHA256')
|
||||||
|
const hashedText = computed(() => algos[algo.value](clearText.value).toString())
|
||||||
|
|
||||||
const { copy } = useCopy({ source: hashedText, text: 'Token copied to the clipboard' })
|
const { copy } = useCopy({ source: hashedText, text: 'Token copied to the clipboard' })
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue