vue-editify 0.0.25 → 0.0.27

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/lib/editify.es.js CHANGED
@@ -1916,7 +1916,7 @@ const queryHasValue = (obj$1$1, name, value) => {
1916
1916
  }
1917
1917
  return ownValue == value;
1918
1918
  };
1919
- const _AlexElement = class _AlexElement2 {
1919
+ const _AlexElement = class {
1920
1920
  constructor(type, parsedom, marks, styles, textContent) {
1921
1921
  this.key = createUniqueKey();
1922
1922
  this.type = type;
@@ -2005,7 +2005,7 @@ const _AlexElement = class _AlexElement2 {
2005
2005
  * 比较当前元素和另一个元素是否相等
2006
2006
  */
2007
2007
  isEqual(element2) {
2008
- if (!_AlexElement2.isElement(element2)) {
2008
+ if (!_AlexElement.isElement(element2)) {
2009
2009
  return false;
2010
2010
  }
2011
2011
  return this.key == element2.key;
@@ -2107,7 +2107,7 @@ const _AlexElement = class _AlexElement2 {
2107
2107
  if (typeof deep != "boolean") {
2108
2108
  throw new Error("The parameter must be a Boolean");
2109
2109
  }
2110
- let el = new _AlexElement2(this.type, this.parsedom, cloneData(this.marks), cloneData(this.styles), this.textContent);
2110
+ let el = new _AlexElement(this.type, this.parsedom, cloneData(this.marks), cloneData(this.styles), this.textContent);
2111
2111
  el.behavior = this.behavior;
2112
2112
  if (deep && this.hasChildren()) {
2113
2113
  this.children.forEach((child) => {
@@ -2131,7 +2131,7 @@ const _AlexElement = class _AlexElement2 {
2131
2131
  }
2132
2132
  let element2 = this.clone();
2133
2133
  this.type = "block";
2134
- this.parsedom = _AlexElement2.BLOCK_NODE;
2134
+ this.parsedom = _AlexElement.BLOCK_NODE;
2135
2135
  this.marks = null;
2136
2136
  this.styles = null;
2137
2137
  this.textContent = null;
@@ -2231,7 +2231,7 @@ const _AlexElement = class _AlexElement2 {
2231
2231
  __render() {
2232
2232
  let el = null;
2233
2233
  if (this.isText()) {
2234
- el = document.createElement(_AlexElement2.TEXT_NODE);
2234
+ el = document.createElement(_AlexElement.TEXT_NODE);
2235
2235
  const text2 = document.createTextNode(this.textContent);
2236
2236
  el.appendChild(text2);
2237
2237
  } else {
@@ -2262,7 +2262,7 @@ const _AlexElement = class _AlexElement2 {
2262
2262
  * 完全复制元素,包括key也复制
2263
2263
  */
2264
2264
  __fullClone() {
2265
- let el = new _AlexElement2(this.type, this.parsedom, cloneData(this.marks), cloneData(this.styles), this.textContent);
2265
+ let el = new _AlexElement(this.type, this.parsedom, cloneData(this.marks), cloneData(this.styles), this.textContent);
2266
2266
  el.behavior = this.behavior;
2267
2267
  el.key = this.key;
2268
2268
  el.elm = this.elm;
@@ -2283,7 +2283,7 @@ const _AlexElement = class _AlexElement2 {
2283
2283
  * 判断参数是否为AlexElement元素
2284
2284
  */
2285
2285
  static isElement(val) {
2286
- return val instanceof _AlexElement2;
2286
+ return val instanceof _AlexElement;
2287
2287
  }
2288
2288
  /**
2289
2289
  * 扁平化处理元素数组
@@ -2308,13 +2308,13 @@ const _AlexElement = class _AlexElement2 {
2308
2308
  * 创建一个空白文本元素并返回
2309
2309
  */
2310
2310
  static getSpaceElement() {
2311
- return new _AlexElement2("text", null, null, null, "\uFEFF");
2311
+ return new _AlexElement("text", null, null, null, "\uFEFF");
2312
2312
  }
2313
2313
  };
2314
- __publicField(_AlexElement, "BLOCK_NODE", "p");
2315
- __publicField(_AlexElement, "TEXT_NODE", "span");
2316
- __publicField(_AlexElement, "VOID_NODES", ["colgroup", "col"]);
2317
2314
  let AlexElement = _AlexElement;
2315
+ __publicField(AlexElement, "BLOCK_NODE", "p");
2316
+ __publicField(AlexElement, "TEXT_NODE", "span");
2317
+ __publicField(AlexElement, "VOID_NODES", ["colgroup", "col"]);
2318
2318
  class AlexRange {
2319
2319
  constructor(anchor, focus) {
2320
2320
  this.anchor = anchor;
@@ -22929,7 +22929,7 @@ const i18n = (locale) => {
22929
22929
  return translations[locale][key];
22930
22930
  };
22931
22931
  };
22932
- const version = "0.0.25";
22932
+ const version = "0.0.27";
22933
22933
  const install = (app, props) => {
22934
22934
  const locale = (props ? props.locale : "zh_CN") || "zh_CN";
22935
22935
  app.provide("$editTrans", i18n(locale));