Skip to content

get

Category
Export Size
80 B
Last Changed
15 minutes ago

用于访问 ref.value 的简写方式

用法

ts
import { get } from '@vueuse/core'

const a = ref(42)

console.log(get(a)) // 42

类型声明

typescript
/**
 * 访问 `ref.value` 的简写方式
 */
export declare function get<T>(ref: MaybeRef<T>): T
export declare function get<T, K extends keyof T>(
  ref: MaybeRef<T>,
  key: K,
): T[K]

Source

SourceDocs

贡献者

Anthony Fu
丶远方
Anthony Fu

变更日志

No recent changes

Released under the MIT License.