前言:

        众所周知dataV算是我们大屏经常使用的炫酷插件了,他有vue2版本,vue3版本,react版本的使用,我们这里说下他的vue3版本

实现效果:

官方地址:

https://datav-vue3.netlify.app/Guide/Guide.htmlhttps://datav-vue3.netlify.app/Guide/Guide.html

安装插件

npm i @kjgl77/datav-vue3

全局引入:

// src/main.ts
import { createApp } from 'vue'
import App from './App.vue'
import DataVVue3 from '@kjgl77/datav-vue3'
createApp(App).use(DataVVue3).mount('#app')

按需引入:

<script setup lang="ts">
import { BorderBox1, Decoration2 } from '@kjgl77/datav-vue3'
</script>

<template>
  <border-box-1 style="width:400px;height:200px;">
    <decoration-2 :reverse="true" style="width:380px;height:5px;" />
  </border-box-1>
</template>

Logo

Agent 垂直技术社区,欢迎活跃、内容共建。

更多推荐