Kopyalanmak istenilen veri...
# ✨ useClipboard
useClipboard()
function is used to make the clipboard copy function on your website or application.
# 🍁 Usage
The useClipboard
function is used as the following reactive state:
import { useClipboard } from 'vue-composable-utils'; const { copy } = useClipboard();
Copied!
# 🚀 Features
The useClipboard
function has the copy
feature. The copy
property takes two parameters.
Name | Description |
---|---|
value | The value to copy. |
ref | It is used to access the container class of the data we want to copy. |
# 💐 Example
You can see how it changes reactively using the example below.
template
javascript
<template> <div class="clipboard" ref="clipboardRef"> <div> <p>{{ copyText }}</p> <button class="btn" @click="onCopy">Copy</button> </div> <div> <input type="text" v-model="clipboardModel" /> <button class="btn" @click="onCopyInput">Copy</button> <p>{{ clipboardModel }}</p> </div> </div> </template>
Copied!