gxd-uni-library-editx 1.0.3 → 1.0.4
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/src/install.js +18 -15
- package/src/utils/xd.base.js +1 -0
- package/src/utils/xd.frame.js +14 -2
- package/src/utils/xdh5log.js +7 -1
package/package.json
CHANGED
package/src/install.js
CHANGED
|
@@ -102,9 +102,10 @@ const install = (Vue, options = {}) => {
|
|
|
102
102
|
Vue.mixin({
|
|
103
103
|
data() {
|
|
104
104
|
return {
|
|
105
|
-
|
|
106
|
-
$
|
|
107
|
-
$
|
|
105
|
+
/**editx去掉逻辑**/
|
|
106
|
+
// $mainColor: '',
|
|
107
|
+
// $btnColor: '',
|
|
108
|
+
// $subBtnColor: '',
|
|
108
109
|
$pxNum: null, //px to rpx (1px * $pxNum)rpx
|
|
109
110
|
$rpxNum: null, //rpx to px (1rpx * $rpxNum)px
|
|
110
111
|
$portrait: null,
|
|
@@ -137,15 +138,16 @@ const install = (Vue, options = {}) => {
|
|
|
137
138
|
this.$isIpadCC = 1;
|
|
138
139
|
// #endif
|
|
139
140
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
141
|
+
/**editx去掉逻辑**/
|
|
142
|
+
// if (this.webSetting) {
|
|
143
|
+
// this.$mainColor = this.webSetting['mainColor'] || options['mainColor'];
|
|
144
|
+
// this.$btnColor = this.webSetting['btnColor'] || options['btnColor'];
|
|
145
|
+
// this.$subBtnColor = this.webSetting['subBtnColor'] || options['subBtnColor'];
|
|
146
|
+
// } else {
|
|
147
|
+
// this.$mainColor = options['mainColor'] ? options['mainColor'] : '';
|
|
148
|
+
// this.$btnColor = options['btnColor'] ? options['btnColor'] : '';
|
|
149
|
+
// this.$subBtnColor = options['subBtnColor'] ? options['subBtnColor'] : '';
|
|
150
|
+
// }
|
|
149
151
|
|
|
150
152
|
//横竖屏
|
|
151
153
|
this.$portrait = 1.4;
|
|
@@ -155,9 +157,10 @@ const install = (Vue, options = {}) => {
|
|
|
155
157
|
watch: {
|
|
156
158
|
webSetting(value) {
|
|
157
159
|
if (value !== null) {
|
|
158
|
-
|
|
159
|
-
if (value['
|
|
160
|
-
if (value['
|
|
160
|
+
/**editx去掉逻辑**/
|
|
161
|
+
// if (value['mainColor']) this.$mainColor = value['mainColor'];
|
|
162
|
+
// if (value['btnColor']) this.$btnColor = value['btnColor'];
|
|
163
|
+
// if (value['subBtnColor']) this.$subBtnColor = value['subBtnColor'];
|
|
161
164
|
this.$webSetting = value;
|
|
162
165
|
}
|
|
163
166
|
}
|
package/src/utils/xd.base.js
CHANGED
package/src/utils/xd.frame.js
CHANGED
|
@@ -75,7 +75,15 @@ class xdFrame {
|
|
|
75
75
|
* @param fnName {String} 方法名字
|
|
76
76
|
*/
|
|
77
77
|
getParentApi(fnName) {
|
|
78
|
-
|
|
78
|
+
if (window.parent['$boardApi']) {
|
|
79
|
+
return this.getParent()['$boardApi'][fnName];
|
|
80
|
+
} else {
|
|
81
|
+
return () => {
|
|
82
|
+
return new Promise((resolve) => {
|
|
83
|
+
resolve([]);
|
|
84
|
+
})
|
|
85
|
+
}
|
|
86
|
+
}
|
|
79
87
|
}
|
|
80
88
|
|
|
81
89
|
/**
|
|
@@ -83,7 +91,11 @@ class xdFrame {
|
|
|
83
91
|
* @param attr {String} 属性名字
|
|
84
92
|
*/
|
|
85
93
|
getParentData(attr) {
|
|
86
|
-
|
|
94
|
+
console.log('getParentData',)
|
|
95
|
+
if (window.parent['$boardData']) {
|
|
96
|
+
return this.getParent()['$boardData'][attr];
|
|
97
|
+
} else return [];
|
|
98
|
+
|
|
87
99
|
}
|
|
88
100
|
}
|
|
89
101
|
|
package/src/utils/xdh5log.js
CHANGED
|
@@ -269,7 +269,7 @@ class Logs {
|
|
|
269
269
|
* @description vue全局报错
|
|
270
270
|
*/
|
|
271
271
|
vueErrorHandler(){
|
|
272
|
-
|
|
272
|
+
let handle = (error, vm)=>{
|
|
273
273
|
let messageStr = this.checkMessage(error);
|
|
274
274
|
if (messageStr !== false) {
|
|
275
275
|
this.push(
|
|
@@ -278,7 +278,13 @@ class Logs {
|
|
|
278
278
|
'global'
|
|
279
279
|
)
|
|
280
280
|
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
Vue.config.errorHandler = handle;
|
|
284
|
+
|
|
281
285
|
|
|
286
|
+
Vue.config.errorCaptured = (error, vm) => {
|
|
287
|
+
console.error(error)
|
|
282
288
|
};
|
|
283
289
|
}
|
|
284
290
|
|