库:GitHub - guanwanxiao/simplest-ts-environment at syq/canvasGitHub - fabricjs/fabric.js: Javascript Canvas Library, SVG-to-Canvas (& canvas-to-SVG) ParserGitHub - guanwanxiao/simplest-ts-environment at syq/canvas
官网:Fabric.js Javascript Canvas Library
中文文档:http://funcion_woqu.gitee.io/fabric-doc/api/#circle
问题list:
npm/yarn安装后引入报错控制器删除、旋转图标修改,边框样式修改缩放最大最小倍数限制添加图片跨域报错调用canvas.toDataURl()报错解决方案:
npm/yarn安装后引入报错不管我用npm还是yarn安装,都报各种eslint或者webpack的错误,因为我的项目是服务端渲染,且项目配置都在别的库,不好修改,我用了github上两种导入方式都报错。
const fabric = require("fabric").fabric;
import { fabric } from "fabric";所以我最终用的bootcdn的线上地址来加载