@hailin-zheng/editor-core 2.2.24 → 2.2.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js
CHANGED
@@ -1898,6 +1898,10 @@ class ViewOptions {
|
|
1898
1898
|
printMode = 'normal';
|
1899
1899
|
//是否开启候选词输入联想
|
1900
1900
|
enableSuggestions = false;
|
1901
|
+
//病程录上边距
|
1902
|
+
bodyPartMarginTop = 10;
|
1903
|
+
//病程录下边距
|
1904
|
+
bodyPartMarginBottom = 10;
|
1901
1905
|
constructor() {
|
1902
1906
|
}
|
1903
1907
|
}
|
@@ -9636,10 +9640,10 @@ class DocumentBodyPartElement extends BlockContainerElement {
|
|
9636
9640
|
});
|
9637
9641
|
this.props = new BodyPartProps();
|
9638
9642
|
}
|
9639
|
-
createRenderObject() {
|
9643
|
+
createRenderObject(data) {
|
9640
9644
|
const render = new DocumentBodyPartRenderObject(this);
|
9641
|
-
render.margin.top =
|
9642
|
-
render.margin.bottom =
|
9645
|
+
render.margin.top = data.options.bodyPartMarginTop;
|
9646
|
+
render.margin.bottom = data.options.bodyPartMarginBottom;
|
9643
9647
|
return render;
|
9644
9648
|
}
|
9645
9649
|
serialize() {
|
@@ -21680,12 +21684,13 @@ class DocEditor {
|
|
21680
21684
|
// if (this.docCtx.refreshType) {
|
21681
21685
|
// this.triggerDocChange();
|
21682
21686
|
// }
|
21687
|
+
const trackChangeState = this.trackChangeState;
|
21683
21688
|
this.flushTask = () => {
|
21684
21689
|
//读取变更记录,可能会同步影响文档内容
|
21685
21690
|
const isChanged = this.readDocChangeLog();
|
21686
21691
|
this.refreshDocument();
|
21687
21692
|
//触发文档改变
|
21688
|
-
if (isChanged) {
|
21693
|
+
if (isChanged && trackChangeState) {
|
21689
21694
|
this.triggerDocChange();
|
21690
21695
|
}
|
21691
21696
|
this.flushTask = null;
|
@@ -23018,7 +23023,7 @@ class DocEditor {
|
|
23018
23023
|
rule.setRuleOptions({ width: this.viewOptions.docPageSettings.width, pagePL, pagePR, docLeft });
|
23019
23024
|
}
|
23020
23025
|
version() {
|
23021
|
-
return "2.2.
|
23026
|
+
return "2.2.26";
|
23022
23027
|
}
|
23023
23028
|
switchPageHeaderEditor() {
|
23024
23029
|
this.docCtx.document.switchPageHeaderEditor(this.selectionState, null);
|