Skip to content

useToString

反应式性地将引用转换为字符串。

¥Reactively convert a ref to string.

用法

¥Usage

ts
import { useToString } from '@vueuse/core'
import { shallowRef } from 'vue'

const number = shallowRef(3.14)
const str = useToString(number)

str.value // '3.14'