@lambo-design/shared 1.0.0-beta.112 → 1.0.0-beta.114
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/utils/platform.js +10 -6
package/package.json
CHANGED
package/utils/platform.js
CHANGED
|
@@ -700,6 +700,7 @@ export const turnToPage = (vm, name ,url) =>{
|
|
|
700
700
|
}
|
|
701
701
|
}
|
|
702
702
|
|
|
703
|
+
|
|
703
704
|
/**
|
|
704
705
|
* 获取上级节点的方法
|
|
705
706
|
* @param vm
|
|
@@ -707,19 +708,22 @@ export const turnToPage = (vm, name ,url) =>{
|
|
|
707
708
|
* @returns {*}
|
|
708
709
|
*/
|
|
709
710
|
export const getParentMethod = (vm,methodName) => {
|
|
710
|
-
if (vm.$parent
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
711
|
+
if (vm.$parent) {
|
|
712
|
+
if (vm.$parent[methodName]) {
|
|
713
|
+
return vm.$parent[methodName];
|
|
714
|
+
} else {
|
|
715
|
+
return getParentMethod(vm.$parent,methodName)
|
|
716
|
+
}
|
|
714
717
|
}
|
|
718
|
+
return undefined;
|
|
715
719
|
}
|
|
716
720
|
|
|
717
721
|
/**
|
|
718
722
|
* 执行全屏操作
|
|
719
723
|
* @param vm
|
|
720
724
|
*/
|
|
721
|
-
export const
|
|
722
|
-
let action = getParentMethod(vm,
|
|
725
|
+
export const doParentMethod = (vm,methodName) => {
|
|
726
|
+
let action = getParentMethod(vm,methodName)
|
|
723
727
|
if (action) {
|
|
724
728
|
action()
|
|
725
729
|
}
|