📅  最后修改于: 2022-03-11 15:02:35.590000             🧑  作者: Mango
You can try something like this
var json = canvas.toJSON();
alert(JSON.stringify(json));
canvas.loadFromJSON(json, function() {
canvas.renderAll();
});