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