Skip to content

Commit 3e9f2e0

Browse files
committed
fix(rule): 增加容错处理
1 parent 62351f6 commit 3e9f2e0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/core/ruler/ruler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,10 @@ class CanvasRuler {
157157
* 显示全部辅助线
158158
*/
159159
public showGuideline() {
160-
this.options.canvas.getObjects(fabric.GuideLine.prototype.type).forEach((guideLine) => {
160+
this?.options?.canvas?.getObjects(fabric.GuideLine.prototype.type).forEach((guideLine) => {
161161
guideLine.set('visible', true);
162162
});
163-
this.options.canvas.renderAll();
163+
this?.options?.canvas?.renderAll();
164164
}
165165

166166
/**

src/components/importTmpl.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @Author: 秦少卫
33
* @Date: 2022-09-03 19:16:55
44
* @LastEditors: 秦少卫
5-
* @LastEditTime: 2024-08-16 17:47:21
5+
* @LastEditTime: 2025-03-18 19:01:39
66
* @Description: 导入模板
77
-->
88

@@ -98,7 +98,7 @@ const {
9898
fields: ['name'],
9999
});
100100

101-
typeValue.value = 4;
101+
typeValue.value = 20;
102102

103103
// 替换提示
104104
const beforeClearTip = (info) => {

0 commit comments

Comments
 (0)