gxd-uni-library-editx 1.0.166 → 1.0.168

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.166",
3
+ "version": "1.0.168",
4
4
  "private": false,
5
5
  "description": "聚福宝基础插件专用库",
6
6
  "main": "index.js",
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <view v-if="status" :style="[wrapStyle]">
2
+ <view v-if="status" :style="[cusBoxComp]">
3
3
  <button
4
4
  v-if="openType === 'getPhoneNumber' || openType === 'getUserInfo' || openType === 'chooseAvatar'"
5
5
  :disabled="disabled"
@@ -173,7 +173,11 @@
173
173
  type: Object|Array,
174
174
  default() {
175
175
  return {}
176
- }
176
+ }
177
+ },
178
+ isAuto:{
179
+ type: Boolean,
180
+ default: true
177
181
  }
178
182
  },
179
183
  data(){
@@ -276,7 +280,15 @@
276
280
  }
277
281
  }
278
282
  return {}
279
- }
283
+ },
284
+ cusBoxComp(){
285
+ let item = this.wrapStyle;
286
+ if(this.isAuto) {
287
+ if(this.$xdUniHelper.checkVarType(item) === 'object') item = {...item, margin: '0 auto'}
288
+ if(this.$xdUniHelper.checkVarType(item) === 'array') item = [{margin: '0 auto'}].concat(item);
289
+ }
290
+ return item;
291
+ },
280
292
  },
281
293
  async created(){
282
294
  let pageStyle = this.systemStyle || {};
@@ -15,7 +15,7 @@
15
15
  color="#fff"
16
16
  ></xd-font-icon>
17
17
  </view>
18
- <view class="checked" v-if="checked" :style="[cutTextComp]">
18
+ <view class="checked" v-if="checked">
19
19
  <xd-font-icon
20
20
  :size="iconSize"
21
21
  icon="iconduigou-xian"