sadais-piui 1.2.7-beta29 → 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
|
|
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
|
-
|
|
235
|
+
handleCollapseItemClick() {
|
|
232
236
|
if (this.disabled || this.animating) return
|
|
233
237
|
// 设置本组件为相反的状态
|
|
234
238
|
this.parent && this.parent.onChange(this)
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
:show-slider-bar="false"
|
|
8
8
|
show-item-split-line
|
|
9
9
|
:stretch="stretch"
|
|
10
|
+
:height="tabHeight"
|
|
10
11
|
active-text-color="inherit"
|
|
11
12
|
>
|
|
12
13
|
<!-- 注意:slot内不能使用父组件data -->
|
|
@@ -14,6 +15,7 @@
|
|
|
14
15
|
slot="item"
|
|
15
16
|
slot-scope="{ item, index }"
|
|
16
17
|
:item="item"
|
|
18
|
+
class="pi-w-100P pi-h-100P"
|
|
17
19
|
@click="handleClickTab(item, index)"
|
|
18
20
|
/>
|
|
19
21
|
</pi-tabs>
|
|
@@ -128,6 +130,22 @@ export default {
|
|
|
128
130
|
return dropdown.activeColor
|
|
129
131
|
}
|
|
130
132
|
},
|
|
133
|
+
// 标签是否均分布局,可选值 `true`
|
|
134
|
+
stretch: {
|
|
135
|
+
type: Boolean,
|
|
136
|
+
// `false`
|
|
137
|
+
default() {
|
|
138
|
+
return dropdown.stretch
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
// 标签的高度,单位rpx
|
|
142
|
+
tabHeight: {
|
|
143
|
+
type: [String, Number],
|
|
144
|
+
// `80`
|
|
145
|
+
default() {
|
|
146
|
+
return dropdown.tabHeight
|
|
147
|
+
}
|
|
148
|
+
},
|
|
131
149
|
// -------------以下属性为子组件pi-dropdown-item继承用--------------
|
|
132
150
|
// 行高 值为数字,则单位默认rpx
|
|
133
151
|
itemHeight: {
|
|
@@ -169,14 +187,6 @@ export default {
|
|
|
169
187
|
return dropdown.selectedCheckbox
|
|
170
188
|
}
|
|
171
189
|
},
|
|
172
|
-
// 标签是否均分布局,可选值 `true`
|
|
173
|
-
stretch: {
|
|
174
|
-
type: Boolean,
|
|
175
|
-
// `false`
|
|
176
|
-
default() {
|
|
177
|
-
return dropdown.stretch
|
|
178
|
-
}
|
|
179
|
-
},
|
|
180
190
|
// 是否需要蒙层顶部对齐组件,可选值 `false`
|
|
181
191
|
maskAlignTop: {
|
|
182
192
|
type: Boolean,
|
|
@@ -359,7 +359,6 @@ export default {
|
|
|
359
359
|
display: inline-flex;
|
|
360
360
|
font-size: 30rpx;
|
|
361
361
|
text-align: center;
|
|
362
|
-
transition: all $pi-animation-duration $pi-animation-timing-function;
|
|
363
362
|
&.active {
|
|
364
363
|
color: $pi-primary-color;
|
|
365
364
|
}
|
|
@@ -397,3 +396,10 @@ export default {
|
|
|
397
396
|
}
|
|
398
397
|
}
|
|
399
398
|
</style>
|
|
399
|
+
|
|
400
|
+
<style lang="scss">
|
|
401
|
+
.pi-tabs scoped-slots-item {
|
|
402
|
+
width: 100%;
|
|
403
|
+
height: 100%;
|
|
404
|
+
}
|
|
405
|
+
</style>
|
package/config/dropdown.js
CHANGED