sadais-piui 1.2.7-beta20 → 1.2.7-beta21
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,28 +1,27 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
2
|
+
<!-- 注意:slot内不能使用父组件data -->
|
|
3
|
+
<view
|
|
4
|
+
class="dropdown-tab-item pi-justify-center pi-align-center"
|
|
5
|
+
:style="[getTabItemStyle]"
|
|
6
|
+
:class="[{ opened: item.opened }]"
|
|
7
|
+
@tap.stop="handleClick"
|
|
8
|
+
>
|
|
9
|
+
<pi-icon
|
|
10
|
+
v-if="item.showIcon"
|
|
11
|
+
:name="item.iconOption.name"
|
|
12
|
+
:dot="item.iconOption.dot"
|
|
13
|
+
:badge="item.iconOption.badge"
|
|
14
|
+
:color="item.iconOption.color"
|
|
15
|
+
:size="item.iconOption.size"
|
|
16
|
+
:class-prefix="item.iconOption.classPrefix"
|
|
17
|
+
:custom-style="item.iconOption.customStyle"
|
|
18
|
+
:custom-class="`pi-mg-right-8 ${item.iconOption.customClass}`"
|
|
19
|
+
/>
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
</view>
|
|
21
|
+
<text class="pi-pd-right-12 pi-fz-28">
|
|
22
|
+
{{ item.text }}
|
|
23
|
+
</text>
|
|
24
|
+
<pi-icon :class="{ rotate: item.opened }" name="arrow-down_fill" size="26" color="#999" />
|
|
26
25
|
</view>
|
|
27
26
|
</template>
|
|
28
27
|
|
|
@@ -39,6 +38,15 @@ export default {
|
|
|
39
38
|
}
|
|
40
39
|
}
|
|
41
40
|
},
|
|
41
|
+
computed: {
|
|
42
|
+
getTabItemStyle() {
|
|
43
|
+
const styles = {}
|
|
44
|
+
if (this.item.opened && this.item.activeColor) {
|
|
45
|
+
styles.color = this.item.activeColor
|
|
46
|
+
}
|
|
47
|
+
return styles
|
|
48
|
+
}
|
|
49
|
+
},
|
|
42
50
|
methods: {
|
|
43
51
|
handleClick() {
|
|
44
52
|
this.$emit('click', this.item)
|
|
@@ -49,6 +57,8 @@ export default {
|
|
|
49
57
|
|
|
50
58
|
<style lang="scss" scoped>
|
|
51
59
|
.dropdown-tab-item {
|
|
60
|
+
width: 100%;
|
|
61
|
+
height: 100%;
|
|
52
62
|
&.opened {
|
|
53
63
|
color: $pi-primary-color;
|
|
54
64
|
}
|