vue-editify 0.0.36 → 0.0.37

Sign up to get free protection for your applications and to get access to all the features.
package/lib/editify.es.js CHANGED
@@ -2485,9 +2485,11 @@ class AlexHistory {
2485
2485
  const focusElement = AlexElement.flatElements(newStack).find((ele) => {
2486
2486
  return ele.key == range.focus.element.key;
2487
2487
  });
2488
- const anchor = new AlexPoint(anchorElement, range.anchor.offset);
2489
- const focus = new AlexPoint(focusElement, range.focus.offset);
2490
- return new AlexRange(anchor, focus);
2488
+ if (anchorElement && focusElement) {
2489
+ const anchor = new AlexPoint(anchorElement, range.anchor.offset);
2490
+ const focus = new AlexPoint(focusElement, range.focus.offset);
2491
+ return new AlexRange(anchor, focus);
2492
+ }
2491
2493
  }
2492
2494
  return null;
2493
2495
  }
@@ -4822,7 +4824,7 @@ class AlexEditor {
4822
4824
  /**
4823
4825
  * 查询虚拟光标包含的文本元素是否具有某个样式
4824
4826
  */
4825
- queryTextStyle(name, value, useCache) {
4827
+ queryTextStyle(name, value, useCache = false) {
4826
4828
  if (!name) {
4827
4829
  throw new Error("The first argument cannot be null");
4828
4830
  }
@@ -4889,7 +4891,7 @@ class AlexEditor {
4889
4891
  this.insertElement(el);
4890
4892
  } else {
4891
4893
  const el = AlexElement.getSpaceElement();
4892
- el.marks = UcloneData(marks);
4894
+ el.marks = cloneData(marks);
4893
4895
  this.insertElement(el);
4894
4896
  }
4895
4897
  } else {
@@ -4952,7 +4954,7 @@ class AlexEditor {
4952
4954
  /**
4953
4955
  * 查询选区内的文本元素是否具有某个标记
4954
4956
  */
4955
- queryTextMark(name, value, useCache) {
4957
+ queryTextMark(name, value, useCache = false) {
4956
4958
  if (!name) {
4957
4959
  throw new Error("The first argument cannot be null");
4958
4960
  }
@@ -22993,7 +22995,7 @@ const i18n = (locale) => {
22993
22995
  return translations[locale][key];
22994
22996
  };
22995
22997
  };
22996
- const version = "0.0.36";
22998
+ const version = "0.0.37";
22997
22999
  const install = (app, props) => {
22998
23000
  const locale = (props ? props.locale : "zh_CN") || "zh_CN";
22999
23001
  app.provide("$editTrans", i18n(locale));