Skip to content

Commit

Permalink
fix(eslint): 语法修正
Browse files Browse the repository at this point in the history
  • Loading branch information
nihaojob committed Feb 6, 2024
1 parent c16a7f4 commit f728313
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/core/ServersPlugin.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
* @Author: 秦少卫
* @Date: 2023-06-20 12:52:09
* @LastEditors: June
* @LastEditTime: 2023-11-07 21:57:19
* @LastEditors: 秦少卫
* @LastEditTime: 2024-02-06 18:46:28
* @Description: 内部插件
*/
import { v4 as uuid } from 'uuid';
Expand All @@ -22,9 +22,9 @@ function downFile(fileStr: string, fileType: string) {
anchorEl.remove();
}

function transformText(objects) {
function transformText(objects: any) {
if (!objects) return;
objects.forEach((item) => {
objects.forEach((item: any) => {
if (item.objects) {
transformText(item.objects);
} else {
Expand Down Expand Up @@ -66,7 +66,7 @@ class ServersPlugin {
});
}

insertSvgFile(jsonFile) {
insertSvgFile(jsonFile: string) {
// 加载前钩子
this.editor.hooksEntity.hookImportBefore.callAsync(jsonFile, () => {
this.canvas.loadFromJSON(jsonFile, () => {
Expand Down Expand Up @@ -157,7 +157,7 @@ class ServersPlugin {

_getSaveSvgOption() {
const workspace = this.canvas.getObjects().find((item) => item.id === 'workspace');
const { left, top, width, height } = workspace;
const { left, top, width, height } = workspace as fabric.Object;
return {
width,
height,
Expand Down

0 comments on commit f728313

Please sign in to comment.