gxd-uni-library-editx 1.0.2 → 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
CHANGED
|
@@ -274,7 +274,7 @@
|
|
|
274
274
|
observer: null,
|
|
275
275
|
|
|
276
276
|
//底部是否插槽模式
|
|
277
|
-
isFooterSolt:
|
|
277
|
+
isFooterSolt: true,
|
|
278
278
|
|
|
279
279
|
}
|
|
280
280
|
},
|
|
@@ -326,6 +326,8 @@
|
|
|
326
326
|
this.uiErrorLogs = this.errorLogs;
|
|
327
327
|
this.uiLogs = this.logs;
|
|
328
328
|
this.isLogs = this.$settings.isLogs;
|
|
329
|
+
|
|
330
|
+
this.isFooterSolt = this.$settings['isFooterUseSlot'] || true;
|
|
329
331
|
|
|
330
332
|
//判断是否是打包环境
|
|
331
333
|
if (process.env.VUE_APP_CUSTOM_ENV) {
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
import {
|
|
54
54
|
getParentsStyle,
|
|
55
55
|
} from '@/utils/xd.base';
|
|
56
|
+
import {mapState} from 'vuex';
|
|
56
57
|
|
|
57
58
|
export default {
|
|
58
59
|
name: "XdUnit",
|
|
@@ -118,6 +119,9 @@
|
|
|
118
119
|
}
|
|
119
120
|
|
|
120
121
|
},
|
|
122
|
+
computed: {
|
|
123
|
+
...mapState(['webUnitIcon'])
|
|
124
|
+
},
|
|
121
125
|
data() {
|
|
122
126
|
return {
|
|
123
127
|
uiColor: '#c00', //金额显示颜色
|
|
@@ -160,8 +164,8 @@
|
|
|
160
164
|
|
|
161
165
|
//项目配置中获取
|
|
162
166
|
let projectIcon;
|
|
163
|
-
if (
|
|
164
|
-
|
|
167
|
+
if (this.webUnitIcon) {
|
|
168
|
+
projectIcon = this.webUnitIcon;
|
|
165
169
|
}
|
|
166
170
|
|
|
167
171
|
|
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
|
|