Skip to content

linchentlab/vue3-shape

 
 

Repository files navigation

vue3-shape

简单易用的css图形组件, 由纯css3属性(clip-path)绘制, 无依赖。适用于vue3。

安装

pnpm

pnpm install vue3-shape

npm

npm install vue3-shape

yarn

yarn install vue3-shape

使用

全局引用

// main.ts
import { createApp } from 'vue';
import App from './App.vue';
import ShapeComponent from 'vue3-shape';

createApp(App).use(ShapeComponent).mount('#app');

// use in sfc
// xxx/app.vue
<template>
  <div>
     <shape type="circle" :size="20" color="red" />
  </div>
</template>

// abrove will render a circle that it's tadius is 20px and fill witch red color;

直接引用

<script lang="ts" setup>
import { Shape } from 'vue3-shape';

</script>

<template>
  <div>
     <shape type="circle" :size="20" color="red" />
  </div>
</template>

About

useful graph drawn by PURE css

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • SCSS 48.2%
  • JavaScript 18.6%
  • TypeScript 14.4%
  • Vue 12.4%
  • HTML 4.5%
  • Shell 1.9%