mazey-element-ui 2.15.19 → 2.15.20
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/cascader-panel.js +25 -32
- package/lib/element-ui.common.js +58 -78
- package/lib/index.js +1 -1
- package/lib/tree.js +33 -46
- package/package.json +1 -1
package/lib/tree.js
CHANGED
|
@@ -147,10 +147,7 @@ var findNearestComponent = function findNearestComponent(element, componentName)
|
|
|
147
147
|
;// external "mazey-element-ui/lib/utils/util"
|
|
148
148
|
const utils_util_namespaceObject = require("mazey-element-ui/lib/utils/util");
|
|
149
149
|
;// ./packages/tree/src/model/node.js
|
|
150
|
-
function
|
|
151
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
152
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
153
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
150
|
+
function _defineAccessor(e, r, n, t) { var c = { configurable: !0, enumerable: !0 }; return c[e] = t, Object.defineProperty(r, n, c); }
|
|
154
151
|
;
|
|
155
152
|
|
|
156
153
|
|
|
@@ -295,6 +292,37 @@ var Node = /*#__PURE__*/function () {
|
|
|
295
292
|
});
|
|
296
293
|
}
|
|
297
294
|
};
|
|
295
|
+
_defineAccessor("get", _proto, "label", function () {
|
|
296
|
+
return getPropertyFromData(this, 'label');
|
|
297
|
+
});
|
|
298
|
+
_defineAccessor("get", _proto, "key", function () {
|
|
299
|
+
var nodeKey = this.store.key;
|
|
300
|
+
if (this.data) return this.data[nodeKey];
|
|
301
|
+
return null;
|
|
302
|
+
});
|
|
303
|
+
_defineAccessor("get", _proto, "disabled", function () {
|
|
304
|
+
return getPropertyFromData(this, 'disabled');
|
|
305
|
+
});
|
|
306
|
+
_defineAccessor("get", _proto, "nextSibling", function () {
|
|
307
|
+
var parent = this.parent;
|
|
308
|
+
if (parent) {
|
|
309
|
+
var index = parent.childNodes.indexOf(this);
|
|
310
|
+
if (index > -1) {
|
|
311
|
+
return parent.childNodes[index + 1];
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
return null;
|
|
315
|
+
});
|
|
316
|
+
_defineAccessor("get", _proto, "previousSibling", function () {
|
|
317
|
+
var parent = this.parent;
|
|
318
|
+
if (parent) {
|
|
319
|
+
var index = parent.childNodes.indexOf(this);
|
|
320
|
+
if (index > -1) {
|
|
321
|
+
return index > 0 ? parent.childNodes[index - 1] : null;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
return null;
|
|
325
|
+
});
|
|
298
326
|
_proto.contains = function contains(target, deep) {
|
|
299
327
|
if (deep === void 0) {
|
|
300
328
|
deep = true;
|
|
@@ -578,48 +606,7 @@ var Node = /*#__PURE__*/function () {
|
|
|
578
606
|
}
|
|
579
607
|
}
|
|
580
608
|
};
|
|
581
|
-
return
|
|
582
|
-
key: "label",
|
|
583
|
-
get: function get() {
|
|
584
|
-
return getPropertyFromData(this, 'label');
|
|
585
|
-
}
|
|
586
|
-
}, {
|
|
587
|
-
key: "key",
|
|
588
|
-
get: function get() {
|
|
589
|
-
var nodeKey = this.store.key;
|
|
590
|
-
if (this.data) return this.data[nodeKey];
|
|
591
|
-
return null;
|
|
592
|
-
}
|
|
593
|
-
}, {
|
|
594
|
-
key: "disabled",
|
|
595
|
-
get: function get() {
|
|
596
|
-
return getPropertyFromData(this, 'disabled');
|
|
597
|
-
}
|
|
598
|
-
}, {
|
|
599
|
-
key: "nextSibling",
|
|
600
|
-
get: function get() {
|
|
601
|
-
var parent = this.parent;
|
|
602
|
-
if (parent) {
|
|
603
|
-
var index = parent.childNodes.indexOf(this);
|
|
604
|
-
if (index > -1) {
|
|
605
|
-
return parent.childNodes[index + 1];
|
|
606
|
-
}
|
|
607
|
-
}
|
|
608
|
-
return null;
|
|
609
|
-
}
|
|
610
|
-
}, {
|
|
611
|
-
key: "previousSibling",
|
|
612
|
-
get: function get() {
|
|
613
|
-
var parent = this.parent;
|
|
614
|
-
if (parent) {
|
|
615
|
-
var index = parent.childNodes.indexOf(this);
|
|
616
|
-
if (index > -1) {
|
|
617
|
-
return index > 0 ? parent.childNodes[index - 1] : null;
|
|
618
|
-
}
|
|
619
|
-
}
|
|
620
|
-
return null;
|
|
621
|
-
}
|
|
622
|
-
}]);
|
|
609
|
+
return Node;
|
|
623
610
|
}();
|
|
624
611
|
|
|
625
612
|
;// ./packages/tree/src/model/tree-store.js
|