sadais-piui 1.2.6-beta3 → 1.2.6-beta4

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.
@@ -2,13 +2,7 @@
2
2
  <view
3
3
  class="pi-form-item"
4
4
  :style="[customStyle, itemStyle]"
5
- :class="[
6
- { disabled: getDisabled },
7
- { border: getBorder },
8
- { 'pi-align-center': !getWrap },
9
- getFormItemClass,
10
- customClass
11
- ]"
5
+ :class="[...getFormItemClass, customClass]"
12
6
  @tap="handleItemClick"
13
7
  >
14
8
  <!-- 表单标题 -->
@@ -91,12 +85,6 @@ const alignFlexMap = {
91
85
  right: 'flex-end'
92
86
  }
93
87
 
94
- const verticalAlignFlexMap = {
95
- top: 'flex-start',
96
- center: 'center',
97
- bottom: 'flex-end'
98
- }
99
-
100
88
  export default {
101
89
  name: 'PiFormItem',
102
90
  mixins: [extendPiFrom, Emitter], // 注入inheritProps
@@ -364,15 +352,15 @@ export default {
364
352
  }
365
353
  },
366
354
  getFormItemClass() {
367
- const classList = {}
355
+ const classList = []
368
356
  if (this.getDisabled) {
369
- classList.disabled = true
357
+ classList.push('disabled')
370
358
  }
371
359
  if (this.getBorder) {
372
- classList.border = true
360
+ classList.push('border')
373
361
  }
374
362
  if (!this.getWrap && this.getItemVerticalAlign) {
375
- classList[verticalAlignFlexMap[this.itemVerticalAlign]] = true
363
+ classList.push(`pi-align-${this.getItemVerticalAlign}`)
376
364
  }
377
365
  return classList
378
366
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sadais-piui",
3
- "version": "1.2.6beta3",
3
+ "version": "1.2.6beta4",
4
4
  "description": "piui组件库",
5
5
  "main": "index.js",
6
6
  "scripts": {