Skip to content

简介

v3-directives 是一套基于Vue3的自定义指令库,旨在提供丰富而强大的指令功能,帮助开发者更轻松地扩展和定制 Vue3 应用程序。

通过 v3-directives,您可以用一种简单、灵活的方式改变元素的行为和样式。帮助您增强用户交互体验,优化页面性能。

基础示例

将要复制的值: 你将复制这个值

typescript
<script setup>
import { ref } from 'vue'

const change = ref('更改的值')
const value = ref('你将复制这个值')
</script>

<template>
  <button v-copy="value">点击我复制</button>
  <input type="text" v-model="change"/>
  <button @click="() => value = change">
    改变将要复制的值
  </button>
</template>

Released under the MIT License.