dolphin-weex-ui 2.4.22 → 2.4.23

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": "dolphin-weex-ui",
3
- "version": "2.4.22",
3
+ "version": "2.4.23",
4
4
  "description": "inteligense cross platform frame",
5
5
  "main": "index.js",
6
6
  "directories": {
@@ -1,7 +1,12 @@
1
1
  <template>
2
2
  <div class="wrapper" v-if="show" :style="wrapStyle">
3
3
  <div class="dof-result" :style="{ top: setPaddingTop, backgroundColor: bgColor_ }">
4
- <image class="result-image" :aria-hidden="true" :src="resultType.pic" :style="imgStyle"></image>
4
+ <image
5
+ :class="[isNewVersion ? 'result-image-new' : 'result-image']"
6
+ :aria-hidden="true"
7
+ :src="resultType.pic"
8
+ :style="imgStyle"
9
+ ></image>
5
10
  <slot name="text">
6
11
  <div class="result-content" v-if="resultType.content">
7
12
  <text class="content-text">{{ resultType.content }}</text>
@@ -48,6 +53,11 @@
48
53
  height: 320px;
49
54
  }
50
55
 
56
+ .result-image-new {
57
+ width: 460x;
58
+ height: 384px;
59
+ }
60
+
51
61
  .result-content {
52
62
  margin-top: 0px;
53
63
  align-items: center;
@@ -91,19 +101,23 @@ import DofButton from '../dof-button'
91
101
  import imgs from './imgs'
92
102
  import ColmoMixin from '../../mixins/colmo'
93
103
  import DiabloMixin from '../../mixins/diablo'
104
+ import Utils from '../utils/index.js'
105
+
106
+ const defaultPicBaseUrl = imageName => `meiju://common/emptyImage?imageName=${imageName}`
107
+ const isNewVersion = Utils.compareVersionNew('11.4.15')
94
108
  const Types = {
95
109
  noNetwork: {
96
- pic: imgs['noNetwork'],
110
+ pic: isNewVersion ? defaultPicBaseUrl('img_empty_02_disconnection') : imgs['noNetwork'],
97
111
  content: '网络异常,请检查您的网络设置'
98
112
  // button: '刷新'
99
113
  },
100
114
  noUpdate: {
101
- pic: imgs['noUpdate'],
115
+ pic: isNewVersion ? defaultPicBaseUrl('img_empty_03_update') : imgs['noUpdate'],
102
116
  content: '当前版本较低',
103
117
  desc: '请更新到最新版APP'
104
118
  },
105
119
  noPage: {
106
- pic: imgs['noPage'],
120
+ pic: isNewVersion ? defaultPicBaseUrl('img_empty_04_content') : imgs['noPage'],
107
121
  content: '找不到页面'
108
122
  },
109
123
  colmo: {
@@ -143,6 +157,9 @@ export default {
143
157
  }
144
158
  },
145
159
  computed: {
160
+ isNewVersion() {
161
+ return Utils.compareVersionNew('11.4.15')
162
+ },
146
163
  type_() {
147
164
  if (this.type) return this.type
148
165
  return this._isColmo ? 'colmo' : 'noPage'
@@ -277,6 +277,21 @@ const Utils = {
277
277
  }
278
278
  return false
279
279
  },
280
+ toNum(a) {
281
+ a = a.toString()
282
+ var c = a.split('.')
283
+ var r = ['0000', '000', '00', '0', '']
284
+ for (var i = 0; i < c.length; i++) {
285
+ var len = c[i].length
286
+ c[i] = r[len] + c[i]
287
+ }
288
+ var res = c.join('')
289
+ return res
290
+ },
291
+ compareVersionNew(a) {
292
+ // 判断当前版本是否大于等于比较的版本
293
+ return this.toNum(weex.config.env.appVersion) >= this.toNum(a)
294
+ },
280
295
  /**
281
296
  * 分割数组
282
297
  * @param arr 被分割数组