useToString
useToString
リアクティブに ref を文字列に変換します。
使用法
import { useToString } from '@vueuse/core'
import { shallowRef } from 'vue'
const number = shallowRef(3.14)
const str = useToString(number)
str.value // '3.14'
© 2019–PRESENT Anthony Fu https://github.com/antfu
※このページは Nuxt.js 公式ドキュメントの翻訳ページです。
公式ドキュメントの該当ページはこちら:
#