gxd-uni-library-editx 1.0.133 → 1.0.134

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.133",
3
+ "version": "1.0.134",
4
4
  "private": false,
5
5
  "description": "聚福宝基础插件专用库",
6
6
  "main": "index.js",
@@ -11,8 +11,10 @@
11
11
  </view>
12
12
  <view class="item-right">
13
13
  <view class="item_info">
14
- <view class="_title">
14
+ <view class="_title" :class="{card_name: cardInfo['is_gift'] === 'Y'}">
15
+ <view :style="{backgroundColor: mainColor}" v-if="cardInfo['is_gift'] === 'Y'" class="is-gift">赠</view>
15
16
  <xd-font-icon
17
+ v-else
16
18
  icon="iconkaquan"
17
19
  size="38"
18
20
  :style="{marginRight: '18rpx'}"
@@ -183,6 +185,27 @@ export default {
183
185
  justify-content: space-between;
184
186
  flex: 1;
185
187
 
188
+ & .card_name {
189
+ display: flex;
190
+ justify-content: flex-start;
191
+ align-items: flex-start;
192
+
193
+ & .is-gift {
194
+ margin-top: 2rpx;
195
+ font-size: 18rpx;
196
+ padding: 2rpx 10rpx;
197
+ border-radius: 8rpx;
198
+ line-height:26rpx;
199
+ height: 26rpx;
200
+ color: #fff;
201
+ margin-right: 18rpx;
202
+ }
203
+
204
+ & .card_name_text {
205
+ //line-height: 36rpx;
206
+ }
207
+ }
208
+
186
209
  ._title{
187
210
  display: flex;
188
211
  font-size: unit(28, rpx);
@@ -35,6 +35,11 @@
35
35
  default: false
36
36
  },
37
37
  },
38
+ watch: {
39
+ html(){
40
+ this.initHtml();
41
+ }
42
+ },
38
43
  data(){
39
44
  return {
40
45
  vhtml : null,
@@ -53,6 +58,11 @@
53
58
 
54
59
  }
55
60
  else{
61
+ this.initHtml();
62
+ }
63
+ },
64
+ methods:{
65
+ initHtml(){
56
66
  //不检查元素安全性
57
67
  if(this.notPurify) {
58
68
  this.vhtml = this.html;
@@ -83,9 +93,7 @@
83
93
  // #ifndef H5
84
94
  this.vhtml = this.getMpHtml(this.html);
85
95
  // #endif
86
- }
87
- },
88
- methods:{
96
+ },
89
97
  getMpHtml(html){
90
98
  html = html.replace(/<img[^>]*>/gi, function(match, capture) {
91
99
  match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '');
@@ -12,7 +12,7 @@
12
12
  transform: isPreview ? 'translate(-50%, 0)': 'translate(-50%, -50%)'
13
13
  }"
14
14
  >
15
- <view class="xd-dailog__body-title" v-if="title">
15
+ <view class="xd-dailog__body-title" v-if="showTitleComp">
16
16
  <slot name="title">
17
17
  {{title}}
18
18
  </slot>
@@ -74,6 +74,10 @@
74
74
  type: Number | String,
75
75
  default: '680rpx',
76
76
  },
77
+ showTitle:{
78
+ type: Boolean,
79
+ default: true,
80
+ },
77
81
  title:{
78
82
  type: String,
79
83
  default: '操作',
@@ -150,6 +154,20 @@
150
154
  }
151
155
  },
152
156
 
157
+ computed:{
158
+ showTitleComp(){
159
+ let temp = true;
160
+ // #ifdef MP-WEIXIN
161
+ if(this.showTitle === false) temp = false;
162
+ // #endif
163
+ // #ifdef H5
164
+ if(this.showTitle === false) temp = false;
165
+ if(this.title === '' || this.title === null || this.title === undefined) temp = false;
166
+ // #endif
167
+ return temp;
168
+ }
169
+ },
170
+
153
171
  watch:{
154
172
  show(value){
155
173
  this.uiShow = value;