@hailin-zheng/editor-core 2.2.23 → 2.2.25
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-cjs.js +21 -8
- package/index-cjs.js.map +1 -1
- package/index.js +21 -8
- package/index.js.map +1 -1
- package/med_editor/doc-editor.d.ts +4 -0
- package/med_editor/framework/element-define.d.ts +2 -0
- package/med_editor/framework/impl/document/doc-body-part-impl.d.ts +2 -2
- package/package.json +1 -1
package/index-cjs.js
CHANGED
@@ -1927,6 +1927,10 @@ class ViewOptions {
|
|
1927
1927
|
printMode = 'normal';
|
1928
1928
|
//是否开启候选词输入联想
|
1929
1929
|
enableSuggestions = false;
|
1930
|
+
//病程录上边距
|
1931
|
+
bodyPartMarginTop = 10;
|
1932
|
+
//病程录下边距
|
1933
|
+
bodyPartMarginBottom = 10;
|
1930
1934
|
constructor() {
|
1931
1935
|
}
|
1932
1936
|
}
|
@@ -9665,10 +9669,10 @@ class DocumentBodyPartElement extends BlockContainerElement {
|
|
9665
9669
|
});
|
9666
9670
|
this.props = new BodyPartProps();
|
9667
9671
|
}
|
9668
|
-
createRenderObject() {
|
9672
|
+
createRenderObject(data) {
|
9669
9673
|
const render = new DocumentBodyPartRenderObject(this);
|
9670
|
-
render.margin.top =
|
9671
|
-
render.margin.bottom =
|
9674
|
+
render.margin.top = data.options.bodyPartMarginTop;
|
9675
|
+
render.margin.bottom = data.options.bodyPartMarginBottom;
|
9672
9676
|
return render;
|
9673
9677
|
}
|
9674
9678
|
serialize() {
|
@@ -21711,8 +21715,12 @@ class DocEditor {
|
|
21711
21715
|
// }
|
21712
21716
|
this.flushTask = () => {
|
21713
21717
|
//读取变更记录,可能会同步影响文档内容
|
21714
|
-
this.readDocChangeLog();
|
21718
|
+
const isChanged = this.readDocChangeLog();
|
21715
21719
|
this.refreshDocument();
|
21720
|
+
//触发文档改变
|
21721
|
+
if (isChanged) {
|
21722
|
+
this.triggerDocChange();
|
21723
|
+
}
|
21716
21724
|
this.flushTask = null;
|
21717
21725
|
//回调
|
21718
21726
|
// let cbs = [...this.docCtx.nextViewFns];
|
@@ -23043,7 +23051,7 @@ class DocEditor {
|
|
23043
23051
|
rule.setRuleOptions({ width: this.viewOptions.docPageSettings.width, pagePL, pagePR, docLeft });
|
23044
23052
|
}
|
23045
23053
|
version() {
|
23046
|
-
return "2.2.
|
23054
|
+
return "2.2.25";
|
23047
23055
|
}
|
23048
23056
|
switchPageHeaderEditor() {
|
23049
23057
|
this.docCtx.document.switchPageHeaderEditor(this.selectionState, null);
|
@@ -23123,6 +23131,10 @@ class DocEditor {
|
|
23123
23131
|
])
|
23124
23132
|
]);
|
23125
23133
|
}
|
23134
|
+
/**
|
23135
|
+
* 读取操作日志,并返回是否修改的标志
|
23136
|
+
* @returns
|
23137
|
+
*/
|
23126
23138
|
readDocChangeLog() {
|
23127
23139
|
//获取文档的变更日志
|
23128
23140
|
const ops = generatePatch(this.docCtx.document, false);
|
@@ -23161,9 +23173,10 @@ class DocEditor {
|
|
23161
23173
|
else {
|
23162
23174
|
this.docCtx.suggestions.clear();
|
23163
23175
|
}
|
23164
|
-
|
23165
|
-
|
23166
|
-
|
23176
|
+
return ops.length;
|
23177
|
+
// if (ops.length) {
|
23178
|
+
// this.triggerDocChange();
|
23179
|
+
// }
|
23167
23180
|
}
|
23168
23181
|
/**
|
23169
23182
|
* 处理候选词
|