一个将文字转为 svg 图片的 vue 插件/A Vue plugin that converts text into SVG images
npm install v-text2svg
// main.js
import text2svg from 'v-text2svg'
Vue.use(text2svg)
// other.vue
<div v-text2svg="{ content: 'Hello World!', options: { fontSize: 100 } }"></div>
Currently, only these options are supported, and the visible height and width of the container will be read internally. If not, it will be searched for at the parent level
fontSize
字体大小fontWeight
文字粗细fontFamily
文字字体color
文字颜色
MIT