导出印花等所有信息
This commit is contained in:
@@ -72,7 +72,9 @@ const exportImage = async () => {
|
||||
if (canvasEditor.value) {
|
||||
const base64 = await canvasEditor.value.exportImage({
|
||||
isContainFixed: false, // 是否导出底图
|
||||
isContainFixedOther: false, // 是否导出其他固定图层
|
||||
isContainBg: false, // 是否导出背景
|
||||
isEnhanceImg: false, // 是否导出增强图片
|
||||
});
|
||||
|
||||
// 模拟下载图片
|
||||
@@ -99,6 +101,16 @@ const exportColorLayer = async () => {
|
||||
}
|
||||
};
|
||||
|
||||
// 导出所有信息
|
||||
const exportAllInfo = async () => {
|
||||
if (canvasEditor.value) {
|
||||
const allInfo = await canvasEditor.value.exportAllInfo();
|
||||
console.log("==========导出所有信息:", allInfo);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
const changeCanvas = (command) => {
|
||||
console.log(command);
|
||||
};
|
||||
@@ -194,12 +206,19 @@ const frontBackChange =(value)=>{
|
||||
// 自定义工具配置相关
|
||||
const customToolsList = ref([
|
||||
{
|
||||
id: "exportPNG",
|
||||
id: "exportColorLayer",
|
||||
title: "导出颜色图层",
|
||||
action: exportColorLayer,
|
||||
label: "导颜",
|
||||
class: "export-btn",
|
||||
},
|
||||
{
|
||||
id: "exportAllInfo",
|
||||
title: "导出所有信息",
|
||||
action: exportAllInfo,
|
||||
label: "导All",
|
||||
class: "export-btn",
|
||||
},
|
||||
{
|
||||
id: "exportPNG",
|
||||
title: "导出PNG", //导出画布图片
|
||||
|
||||
Reference in New Issue
Block a user