From 7cfac4102941eafd6f97743cb2da36c536063af0 Mon Sep 17 00:00:00 2001 From: yanmao <55792257+yanmao-cc@users.noreply.github.com> Date: Wed, 5 Jan 2022 00:46:29 +0800 Subject: [PATCH] Update index.ts --- plugins/table/src/component/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/table/src/component/index.ts b/plugins/table/src/component/index.ts index cf9c7be0..af5d11af 100644 --- a/plugins/table/src/component/index.ts +++ b/plugins/table/src/component/index.ts @@ -319,7 +319,7 @@ class TableComponent if (this.colorTool) return; this.colorTool = new ColorTool(this.editor, this.id, { colors: TableComponent.colors, - defaultColor: this.getValue()?.color, + defaultColor: super.getValue()?.color, onChange: (color: string) => { this.setValue({ color, @@ -356,14 +356,14 @@ class TableComponent title: language['noBorder'], content: '', didMount: (node) => { - const value = this.getValue(); + const value = super.getValue(); if (value?.noBorder === true) { node.addClass('active'); } this.noBorderToolButton = node; }, onClick: (_, node) => { - const value = this.getValue(); + const value = super.getValue(); this.setValue({ noBorder: !value?.noBorder, } as V); @@ -802,7 +802,6 @@ class TableComponent render() { Template.isReadonly = !isEngine(this.editor) || this.editor.readonly; - const value = this.getValue(); // 重新渲染 if ( this.wrapper && @@ -875,6 +874,7 @@ class TableComponent }, 10); return; } + const value = this.getValue(); // 第一次渲染 if (!value) return 'Error value'; if (value.html) {