@tuya-miniapp/smart-ui 2.5.1-beta-5 → 2.5.1-beta-6
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/dist/tabbar/index.js +4 -0
- package/dist/tabbar-item/index.css +1 -1
- package/dist/tabbar-item/index.js +4 -0
- package/dist/tabbar-item/index.wxml +5 -2
- package/dist/tabbar-item/index.wxss +1 -1
- package/lib/tabbar/index.js +4 -0
- package/lib/tabbar-item/index.css +1 -1
- package/lib/tabbar-item/index.js +4 -0
- package/lib/tabbar-item/index.wxml +5 -2
- package/lib/tabbar-item/index.wxss +1 -1
- package/package.json +1 -1
package/dist/tabbar/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.css';:host{flex:1}.smart-tabbar-item{align-items:center;color:var(--tabbar-item-text-color,var(--app-B6-N5,rgba(0,0,0,.3)));display:flex;flex-direction:column;font-size:var(--tabbar-item-font-size,12px);height:100%;justify-content:center;line-height:var(--tabbar-item-line-height,1)}.smart-tabbar-item__icon{font-size:var(--tabbar-item-icon-size,22px);margin-bottom:var(--tabbar-item-margin-bottom,4px);position:relative}.smart-tabbar-item__icon__inner{display:block;min-height:1em;min-width:1em}.smart-tabbar-item--active{color:var(--tabbar-item-active-color,var(--app-M1,#3678e3))}.smart-tabbar-item--disabled{opacity:var(--tabbar-item-disabled-opacity,.7)}.smart-tabbar-item__info{margin-top:2px}
|
1
|
+
@import '../common/index.css';:host{flex:1}.smart-tabbar-item{align-items:center;color:var(--tabbar-item-text-color,var(--app-B6-N5,rgba(0,0,0,.3)));display:flex;flex-direction:column;font-size:var(--tabbar-item-font-size,12px);height:100%;justify-content:center;line-height:var(--tabbar-item-line-height,1)}.smart-tabbar-item__icon{font-size:var(--tabbar-item-icon-size,22px);line-height:0;margin-bottom:var(--tabbar-item-margin-bottom,4px);position:relative}.smart-tabbar-item__icon__inner{display:block;min-height:1em;min-width:1em}.smart-tabbar-item__text-up{margin-bottom:var(--tabbar-item-margin-bottom,4px)}.smart-tabbar-item--active{color:var(--tabbar-item-active-color,var(--app-M1,#3678e3))}.smart-tabbar-item--disabled{opacity:var(--tabbar-item-disabled-opacity,.7)}.smart-tabbar-item__info{margin-top:var(--tabbar-item-info-margin-top,2px)}.smart-tabbar-item--reverse .smart-tabbar-item__icon{margin-bottom:0}
|
@@ -25,6 +25,7 @@ SmartComponent({
|
|
25
25
|
active: false,
|
26
26
|
activeColor: '',
|
27
27
|
inactiveColor: '',
|
28
|
+
upsideDown: false,
|
28
29
|
},
|
29
30
|
methods: {
|
30
31
|
onClick() {
|
@@ -65,6 +66,9 @@ SmartComponent({
|
|
65
66
|
if (parentData.inactiveColor !== data.inactiveColor) {
|
66
67
|
patch.inactiveColor = parentData.inactiveColor;
|
67
68
|
}
|
69
|
+
if (parentData.upsideDown !== data.upsideDown) {
|
70
|
+
patch.upsideDown = parentData.upsideDown;
|
71
|
+
}
|
68
72
|
if (Object.keys(patch).length > 0) {
|
69
73
|
this.setData(patch);
|
70
74
|
}
|
@@ -1,10 +1,13 @@
|
|
1
1
|
<wxs src="../wxs/utils.wxs" module="utils" />
|
2
2
|
|
3
3
|
<view
|
4
|
-
class="{{ utils.bem('tabbar-item', { active, disabled }) }} custom-class"
|
4
|
+
class="{{ utils.bem('tabbar-item', { active, disabled, reverse: upsideDown }) }} custom-class"
|
5
5
|
style="color: {{ active ? activeColor : inactiveColor }}"
|
6
6
|
bindtap="onClick"
|
7
7
|
>
|
8
|
+
<view class="smart-tabbar-item__text smart-tabbar-item__text-up" wx:if="{{upsideDown}}">
|
9
|
+
<slot />
|
10
|
+
</view>
|
8
11
|
<view class="smart-tabbar-item__icon">
|
9
12
|
<smart-icon
|
10
13
|
wx:if="{{ icon }}"
|
@@ -23,7 +26,7 @@
|
|
23
26
|
custom-class="smart-tabbar-item__info"
|
24
27
|
/>
|
25
28
|
</view>
|
26
|
-
<view class="smart-tabbar-item__text">
|
29
|
+
<view class="smart-tabbar-item__text" wx:if="{{!upsideDown}}">
|
27
30
|
<slot />
|
28
31
|
</view>
|
29
32
|
</view>
|
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.wxss';:host{flex:1}.smart-tabbar-item{align-items:center;color:var(--tabbar-item-text-color,var(--app-B6-N5,rgba(0,0,0,.3)));display:flex;flex-direction:column;font-size:var(--tabbar-item-font-size,12px);height:100%;justify-content:center;line-height:var(--tabbar-item-line-height,1)}.smart-tabbar-item__icon{font-size:var(--tabbar-item-icon-size,22px);margin-bottom:var(--tabbar-item-margin-bottom,4px);position:relative}.smart-tabbar-item__icon__inner{display:block;min-height:1em;min-width:1em}.smart-tabbar-item--active{color:var(--tabbar-item-active-color,var(--app-M1,#3678e3))}.smart-tabbar-item--disabled{opacity:var(--tabbar-item-disabled-opacity,.7)}.smart-tabbar-item__info{margin-top:2px}
|
1
|
+
@import '../common/index.wxss';:host{flex:1}.smart-tabbar-item{align-items:center;color:var(--tabbar-item-text-color,var(--app-B6-N5,rgba(0,0,0,.3)));display:flex;flex-direction:column;font-size:var(--tabbar-item-font-size,12px);height:100%;justify-content:center;line-height:var(--tabbar-item-line-height,1)}.smart-tabbar-item__icon{font-size:var(--tabbar-item-icon-size,22px);line-height:0;margin-bottom:var(--tabbar-item-margin-bottom,4px);position:relative}.smart-tabbar-item__icon__inner{display:block;min-height:1em;min-width:1em}.smart-tabbar-item__text-up{margin-bottom:var(--tabbar-item-margin-bottom,4px)}.smart-tabbar-item--active{color:var(--tabbar-item-active-color,var(--app-M1,#3678e3))}.smart-tabbar-item--disabled{opacity:var(--tabbar-item-disabled-opacity,.7)}.smart-tabbar-item__info{margin-top:var(--tabbar-item-info-margin-top,2px)}.smart-tabbar-item--reverse .smart-tabbar-item__icon{margin-bottom:0}
|
package/lib/tabbar/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.css';:host{flex:1}.smart-tabbar-item{align-items:center;color:var(--tabbar-item-text-color,var(--app-B6-N5,rgba(0,0,0,.3)));display:flex;flex-direction:column;font-size:var(--tabbar-item-font-size,12px);height:100%;justify-content:center;line-height:var(--tabbar-item-line-height,1)}.smart-tabbar-item__icon{font-size:var(--tabbar-item-icon-size,22px);margin-bottom:var(--tabbar-item-margin-bottom,4px);position:relative}.smart-tabbar-item__icon__inner{display:block;min-height:1em;min-width:1em}.smart-tabbar-item--active{color:var(--tabbar-item-active-color,var(--app-M1,#3678e3))}.smart-tabbar-item--disabled{opacity:var(--tabbar-item-disabled-opacity,.7)}.smart-tabbar-item__info{margin-top:2px}
|
1
|
+
@import '../common/index.css';:host{flex:1}.smart-tabbar-item{align-items:center;color:var(--tabbar-item-text-color,var(--app-B6-N5,rgba(0,0,0,.3)));display:flex;flex-direction:column;font-size:var(--tabbar-item-font-size,12px);height:100%;justify-content:center;line-height:var(--tabbar-item-line-height,1)}.smart-tabbar-item__icon{font-size:var(--tabbar-item-icon-size,22px);line-height:0;margin-bottom:var(--tabbar-item-margin-bottom,4px);position:relative}.smart-tabbar-item__icon__inner{display:block;min-height:1em;min-width:1em}.smart-tabbar-item__text-up{margin-bottom:var(--tabbar-item-margin-bottom,4px)}.smart-tabbar-item--active{color:var(--tabbar-item-active-color,var(--app-M1,#3678e3))}.smart-tabbar-item--disabled{opacity:var(--tabbar-item-disabled-opacity,.7)}.smart-tabbar-item__info{margin-top:var(--tabbar-item-info-margin-top,2px)}.smart-tabbar-item--reverse .smart-tabbar-item__icon{margin-bottom:0}
|
package/lib/tabbar-item/index.js
CHANGED
@@ -27,6 +27,7 @@ var relation_1 = require("../common/relation");
|
|
27
27
|
active: false,
|
28
28
|
activeColor: '',
|
29
29
|
inactiveColor: '',
|
30
|
+
upsideDown: false,
|
30
31
|
},
|
31
32
|
methods: {
|
32
33
|
onClick: function () {
|
@@ -67,6 +68,9 @@ var relation_1 = require("../common/relation");
|
|
67
68
|
if (parentData.inactiveColor !== data.inactiveColor) {
|
68
69
|
patch.inactiveColor = parentData.inactiveColor;
|
69
70
|
}
|
71
|
+
if (parentData.upsideDown !== data.upsideDown) {
|
72
|
+
patch.upsideDown = parentData.upsideDown;
|
73
|
+
}
|
70
74
|
if (Object.keys(patch).length > 0) {
|
71
75
|
this.setData(patch);
|
72
76
|
}
|
@@ -1,10 +1,13 @@
|
|
1
1
|
<wxs src="../wxs/utils.wxs" module="utils" />
|
2
2
|
|
3
3
|
<view
|
4
|
-
class="{{ utils.bem('tabbar-item', { active, disabled }) }} custom-class"
|
4
|
+
class="{{ utils.bem('tabbar-item', { active, disabled, reverse: upsideDown }) }} custom-class"
|
5
5
|
style="color: {{ active ? activeColor : inactiveColor }}"
|
6
6
|
bindtap="onClick"
|
7
7
|
>
|
8
|
+
<view class="smart-tabbar-item__text smart-tabbar-item__text-up" wx:if="{{upsideDown}}">
|
9
|
+
<slot />
|
10
|
+
</view>
|
8
11
|
<view class="smart-tabbar-item__icon">
|
9
12
|
<smart-icon
|
10
13
|
wx:if="{{ icon }}"
|
@@ -23,7 +26,7 @@
|
|
23
26
|
custom-class="smart-tabbar-item__info"
|
24
27
|
/>
|
25
28
|
</view>
|
26
|
-
<view class="smart-tabbar-item__text">
|
29
|
+
<view class="smart-tabbar-item__text" wx:if="{{!upsideDown}}">
|
27
30
|
<slot />
|
28
31
|
</view>
|
29
32
|
</view>
|
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.wxss';:host{flex:1}.smart-tabbar-item{align-items:center;color:var(--tabbar-item-text-color,var(--app-B6-N5,rgba(0,0,0,.3)));display:flex;flex-direction:column;font-size:var(--tabbar-item-font-size,12px);height:100%;justify-content:center;line-height:var(--tabbar-item-line-height,1)}.smart-tabbar-item__icon{font-size:var(--tabbar-item-icon-size,22px);margin-bottom:var(--tabbar-item-margin-bottom,4px);position:relative}.smart-tabbar-item__icon__inner{display:block;min-height:1em;min-width:1em}.smart-tabbar-item--active{color:var(--tabbar-item-active-color,var(--app-M1,#3678e3))}.smart-tabbar-item--disabled{opacity:var(--tabbar-item-disabled-opacity,.7)}.smart-tabbar-item__info{margin-top:2px}
|
1
|
+
@import '../common/index.wxss';:host{flex:1}.smart-tabbar-item{align-items:center;color:var(--tabbar-item-text-color,var(--app-B6-N5,rgba(0,0,0,.3)));display:flex;flex-direction:column;font-size:var(--tabbar-item-font-size,12px);height:100%;justify-content:center;line-height:var(--tabbar-item-line-height,1)}.smart-tabbar-item__icon{font-size:var(--tabbar-item-icon-size,22px);line-height:0;margin-bottom:var(--tabbar-item-margin-bottom,4px);position:relative}.smart-tabbar-item__icon__inner{display:block;min-height:1em;min-width:1em}.smart-tabbar-item__text-up{margin-bottom:var(--tabbar-item-margin-bottom,4px)}.smart-tabbar-item--active{color:var(--tabbar-item-active-color,var(--app-M1,#3678e3))}.smart-tabbar-item--disabled{opacity:var(--tabbar-item-disabled-opacity,.7)}.smart-tabbar-item__info{margin-top:var(--tabbar-item-info-margin-top,2px)}.smart-tabbar-item--reverse .smart-tabbar-item__icon{margin-bottom:0}
|