Skip to content

useEyeDropper

反应式 滴管 API

¥Reactive EyeDropper API

示例

Not Supported by Your Browser

用法

¥Usage

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

const { isSupported, open, sRGBHex } = useEyeDropper()

组件用法

¥Component Usage

vue
<template>
  <UseEyeDropper v-slot="{ isSupported, sRGBHex, open }">
    <button :disabled="!isSupported" @click="open">
      sRGBHex: {{ sRGBHex }}
    </button>
  </UseEyeDropper>
</template>