sadais-piui 1.2.7-beta30 → 1.2.7-beta31

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.
@@ -1,14 +1,10 @@
1
1
  <template>
2
- <view
3
- class="pi-collapse-item"
4
- :class="[customClass]"
5
- :style="[customStyle]"
6
- @click="clickHandler"
7
- >
2
+ <view class="pi-collapse-item" :class="[customClass]" :style="[customStyle]">
8
3
  <!-- 标题 -->
9
4
  <view
10
5
  class="pi-collapse-item__title pi-justify-between pi-align-center"
11
6
  :class="{ disabled: disabled, border: border }"
7
+ @tap="handleCollapseItemClick"
12
8
  >
13
9
  <!-- 左侧 -->
14
10
  <view class="pi-flex-column pi-lh-44">
@@ -32,7 +28,12 @@
32
28
  </view>
33
29
  </view>
34
30
  <!-- 内容 -->
35
- <view ref="animation" class="pi-collapse-item__content" :animation="animationData">
31
+ <view
32
+ ref="animation"
33
+ class="pi-collapse-item__content"
34
+ :animation="animationData"
35
+ @tap="handleContentClick"
36
+ >
36
37
  <view :id="elId" :ref="elId" class="pi-collapse-item__content__text content-class">
37
38
  <slot />
38
39
  </view>
@@ -176,7 +177,7 @@ export default {
176
177
  this.expanded = (value || []).some(item => item == this.name)
177
178
  }
178
179
  // 设置组件的展开或收起状态
179
- this.$nextTick(function () {
180
+ this.$nextTick(function() {
180
181
  this.setContentAnimate()
181
182
  })
182
183
  },
@@ -227,8 +228,11 @@ export default {
227
228
  })
228
229
  // #endif
229
230
  },
231
+ handleContentClick() {
232
+ this.$emit('content-click')
233
+ },
230
234
  // 点击collapsehead头部
231
- clickHandler() {
235
+ handleCollapseItemClick() {
232
236
  if (this.disabled || this.animating) return
233
237
  // 设置本组件为相反的状态
234
238
  this.parent && this.parent.onChange(this)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sadais-piui",
3
- "version": "1.2.7beta30",
3
+ "version": "1.2.7beta31",
4
4
  "description": "piui组件库",
5
5
  "main": "index.js",
6
6
  "scripts": {