gxd-uni-library-editx 1.0.147 → 1.0.148-beta2

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.147",
3
+ "version": "1.0.148-beta2",
4
4
  "private": false,
5
5
  "description": "聚福宝基础插件专用库",
6
6
  "main": "index.js",
@@ -2,12 +2,15 @@
2
2
  <view
3
3
  class="xd-unit"
4
4
  :style="{height: fontSize *1.5 + 'rpx'}"
5
- :class="{'xd-unit__show': !(uiIcon && isShowIcon)}"
5
+ :class="{'xd-unit__show': !(uiIcon && showIcon)}"
6
6
  v-if="show"
7
7
  >
8
- <view class="xd-unit__price" :style="[priceStyleComp]">{{uiPrice}}</view>
8
+ <view class="xd-unit__price" :style="[priceStyleComp]">
9
+ <view v-if="!this.showIcon">¥</view>
10
+ {{uiPrice}}
11
+ </view>
9
12
  <view v-if="range" :style="[rangeStyleComp]">{{range}}</view>
10
- <view class="xd-unit__image" v-if="uiIcon && isShowIcon && (unit === null)">
13
+ <view class="xd-unit__image" v-if="uiIcon && showIcon && (unit === null)">
11
14
  <xd-image :is-gray="isGray" :src="uiIcon" :size="iconSize || iocnSize"></xd-image>
12
15
  </view>
13
16
  <template v-else>
@@ -19,7 +22,9 @@
19
22
  fontSize: unitFontSize > 0 ? (unitFontSize + 'rpx') :(fontSize - 8) + 'rpx',
20
23
  color: isGray?'#999':uiColor
21
24
  }"
22
- v-if="unit">{{unit}}</view>
25
+ v-if="unit">
26
+ {{unit}}
27
+ </view>
23
28
  <view v-else>
24
29
  <xd-coins :size="iconSize || iocnSize"></xd-coins>
25
30
  </view>
@@ -70,8 +75,8 @@
70
75
  },
71
76
 
72
77
  isShowIcon: {
73
- type: Boolean,
74
- default: true,
78
+ type: Boolean|String,
79
+ default: '',
75
80
  },
76
81
  price: {
77
82
  type: String | Number,
@@ -122,7 +127,7 @@
122
127
 
123
128
  },
124
129
  computed: {
125
- ...mapState(['webUnitIcon','brandInfo']),
130
+ ...mapState(['webUnitIcon','brandInfo','siteInfo']),
126
131
 
127
132
  rangeStyleComp(){
128
133
  let size = this.fontSize*(1/2) < 20?20:this.fontSize*(1/2);
@@ -150,7 +155,8 @@
150
155
  uiIcon: null, //金额显示icon
151
156
  uiPrice: null, //金额
152
157
  show: false,
153
- fixedNum: null
158
+ fixedNum: null,
159
+ showIcon: true
154
160
  }
155
161
  },
156
162
  watch:{
@@ -164,7 +170,6 @@
164
170
  async created() {
165
171
 
166
172
 
167
-
168
173
  //配置中获取
169
174
  let optionsIcon = null;
170
175
  if (this.webSetting['unitIcon']) {
@@ -205,6 +210,16 @@
205
210
  if(this.unit === null) {
206
211
  this.uiIcon = projectIcon || brandIncon || optionsIcon;
207
212
  }
213
+
214
+ if(this.siteInfo.mapping.coin_type&&this.siteInfo.mapping.coin_type==='rmb'){
215
+ this.showIcon = false;
216
+ } else {
217
+ this.showIcon = true;
218
+ }
219
+
220
+ if(typeof this.isShowIcon === 'boolean'){
221
+ this.showIcon = this.isShowIcon;
222
+ }
208
223
 
209
224
  //设置显示数字
210
225
  this.initPrice();
@@ -254,6 +269,11 @@
254
269
  &__price {
255
270
  margin-right: unit(12, rpx);
256
271
  font-weight: normal;
272
+ display: flex;
273
+ align-items: baseline;
274
+ & > view:first-child {
275
+ font-size: 24rpx;
276
+ }
257
277
  }
258
278
 
259
279
  &__image {