@hailin-zheng/editor-core 2.2.12 → 2.2.14

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
@@ -1708,6 +1708,8 @@ class ViewOptions {
1708
1708
  dataDecoratorNormalColor = '#0050b3';
1709
1709
  dataDecoratorMouseEnterColor = '#0050b3';
1710
1710
  dataDecoratorFocusedColor = '#0050b3';
1711
+ //数据元修饰符宽度
1712
+ dataDecoratorWidth = 1;
1711
1713
  //是否显示数据元修饰符
1712
1714
  showDataEleDecorator = true;
1713
1715
  //数据元没有输入值时背景颜色
@@ -2912,10 +2914,10 @@ class DataDecorateElement extends LeafElement {
2912
2914
  this.disableClick = !isPrefix;
2913
2915
  this.isDecorate = true;
2914
2916
  }
2915
- createRenderObject() {
2917
+ createRenderObject(data) {
2916
2918
  const render = new DataDecorateRenderObject(this);
2917
2919
  //render.rect.width = this.dProps.size / 2;
2918
- render.rect.width = 1;
2920
+ render.rect.width = data.options.dataDecoratorWidth;
2919
2921
  render.rect.height = Math.ceil(14 * TEXT_HEIGHT_FACTOR);
2920
2922
  return render;
2921
2923
  }
@@ -20925,7 +20927,7 @@ class DocEditor {
20925
20927
  this.editInput.readOnly = true;
20926
20928
  this.editInput.style.width = "0";
20927
20929
  //this.editInput.style.display = 'none';
20928
- !reset && this.editInput.focus();
20930
+ !reset && this.editInput.focus({ preventScroll: true });
20929
20931
  }
20930
20932
  /**
20931
20933
  * 设置光标位置
@@ -22053,7 +22055,7 @@ class DocEditor {
22053
22055
  rule.setRuleOptions({ width: this.viewOptions.docPageSettings.width, pagePL, pagePR, docLeft });
22054
22056
  }
22055
22057
  version() {
22056
- return "2.2.12";
22058
+ return "2.2.14";
22057
22059
  }
22058
22060
  switchPageHeaderEditor() {
22059
22061
  this.docCtx.document.switchPageHeaderEditor(this.selectionState, null);