gxd-uni-library-editx 1.0.5 → 1.0.6

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gxd-uni-library-editx",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "private": false,
5
5
  "description": "聚福宝基础插件专用库",
6
6
  "main": "index.js",
@@ -17,6 +17,8 @@ function parseTestData(data){
17
17
  return testData;
18
18
  }
19
19
 
20
+
21
+
20
22
  /**
21
23
  * @description 检查并调用父级插件中的方法
22
24
  * @param fnName {String} 父级中的API方法名
@@ -26,6 +28,19 @@ function parseTestData(data){
26
28
  */
27
29
  export function jfbRootExec(fnName, params) {
28
30
 
31
+ //使用mocks数据
32
+ //#ifdef H5
33
+ if (params.vm.$root.mocks !== null
34
+ && params.vm.$root.mocks[fnName]
35
+ && window['jfbConfingView']
36
+ ) {
37
+ console.log(`调用方法名字:${fnName},返回值:`, params.vm.$root.mocks[fnName]);
38
+ return new Promise((resolve) => {
39
+ resolve(params.vm.$root.mocks[fnName]);
40
+ });
41
+ }
42
+ //#endif
43
+
29
44
  //不能为业务插件开发环境
30
45
  if (params.vm.settings && params.vm.settings.isBussDev !== true) {
31
46
  //判断是否有测试数据
@@ -37,6 +52,7 @@ export function jfbRootExec(fnName, params) {
37
52
  }
38
53
  }
39
54
 
55
+
40
56
  if(params.vm.$root[fnName] &&
41
57
  typeof params.vm.$root[fnName] === 'function'
42
58
  ) {