vue-poster
当前环境下,大家都非常需要分享到朋友圈这个功能,但是实现起来各有心酸(坑比较多),所以才有了如下的 canvas 绘图工具
具有如下特性:
- 简单易用 —— 一个 json 搞定绘制图片
- 功能全 —— 满足 90% 的使用场景
- 支持圆形图片绘制(eg: 微信头像圆形)[round: true]
- 绘制文本(换行、超出内容省略号、中划线、下划线、文本加粗)
- 绘制图片
- 绘制矩形
- 保存图片
- 多图绘制 (支持回调)
- 导出图片格式 jpg/png ...
- 代码量小
# installnpm install --save vue-posterimport vuePoster from 'vue-poster'Vue.use(vuePoster)# 使用this.$vuePoster(json, callback)
For a detailed explanation on how things work, check out the guide and docs for vue-loader.