pome-ui 2.0.0-preview48 → 2.0.0-preview49
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/package.json +1 -1
- package/pome-ui.dev.js +21 -4
- package/pome-ui.dev.min.js +11 -11
- package/pome-ui.js +21 -4
- package/pome-ui.min.js +1 -1
package/package.json
CHANGED
package/pome-ui.dev.js
CHANGED
|
@@ -18277,6 +18277,17 @@ function build(options, exports) {
|
|
|
18277
18277
|
return _root;
|
|
18278
18278
|
};
|
|
18279
18279
|
|
|
18280
|
+
function _findRoot(instance) {
|
|
18281
|
+
var globalRoot = exports.root();
|
|
18282
|
+
if (globalRoot) return globalRoot;
|
|
18283
|
+
if (!instance) return null;
|
|
18284
|
+
var current = instance;
|
|
18285
|
+
while (current.parent) {
|
|
18286
|
+
current = current.parent;
|
|
18287
|
+
}
|
|
18288
|
+
return current.proxy || current;
|
|
18289
|
+
}
|
|
18290
|
+
|
|
18280
18291
|
exports._rules = [];
|
|
18281
18292
|
|
|
18282
18293
|
function useRoutes(url) {
|
|
@@ -18329,6 +18340,12 @@ function build(options, exports) {
|
|
|
18329
18340
|
if (extraFn) {
|
|
18330
18341
|
extraFn.call(this, instance, opt);
|
|
18331
18342
|
}
|
|
18343
|
+
if (!instance.$root) {
|
|
18344
|
+
instance.$root = _findRoot(instance);
|
|
18345
|
+
}
|
|
18346
|
+
if (!instance.$parent) {
|
|
18347
|
+
instance.$parent = (instance.parent && instance.parent.proxy) || instance.$root;
|
|
18348
|
+
}
|
|
18332
18349
|
};
|
|
18333
18350
|
}
|
|
18334
18351
|
|
|
@@ -18468,8 +18485,8 @@ function build(options, exports) {
|
|
|
18468
18485
|
})
|
|
18469
18486
|
.then(function (component) {
|
|
18470
18487
|
_hookSetup(component, function (instance, comp) {
|
|
18471
|
-
instance.$parent = parent ||
|
|
18472
|
-
instance.$root =
|
|
18488
|
+
instance.$parent = parent || _findRoot(instance);
|
|
18489
|
+
instance.$root = _findRoot(instance) || parent;
|
|
18473
18490
|
instance.$view = url;
|
|
18474
18491
|
instance.$data = comp.data || function () { return {}; };
|
|
18475
18492
|
instance.$created = comp.created || function () { };
|
|
@@ -18710,8 +18727,8 @@ function build(options, exports) {
|
|
|
18710
18727
|
function Root(options, el, layout) {
|
|
18711
18728
|
options = options || {};
|
|
18712
18729
|
_hookSetup(options, function (instance) {
|
|
18713
|
-
instance.$parent = parent ||
|
|
18714
|
-
instance.$root =
|
|
18730
|
+
instance.$parent = parent || _findRoot(instance);
|
|
18731
|
+
instance.$root = _findRoot(instance) || parent;
|
|
18715
18732
|
instance.$onUpdating = options.onUpdating;
|
|
18716
18733
|
if (layout) {
|
|
18717
18734
|
instance.$layout = layout;
|