Skip to content

useToString

类别
导出大小
118 B
最近修改
2 days ago

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

🌐 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'