@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.
@@ -10,6 +10,10 @@ SmartComponent({
10
10
  type: null,
11
11
  observer: 'updateChildren',
12
12
  },
13
+ upsideDown: {
14
+ type: Boolean,
15
+ value: false,
16
+ },
13
17
  activeColor: {
14
18
  type: String,
15
19
  observer: 'updateChildren',
@@ -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}
@@ -12,6 +12,10 @@ var utils_1 = require("../common/utils");
12
12
  type: null,
13
13
  observer: 'updateChildren',
14
14
  },
15
+ upsideDown: {
16
+ type: Boolean,
17
+ value: false,
18
+ },
15
19
  activeColor: {
16
20
  type: String,
17
21
  observer: 'updateChildren',
@@ -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}
@@ -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}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuya-miniapp/smart-ui",
3
- "version": "2.5.1-beta-5",
3
+ "version": "2.5.1-beta-6",
4
4
  "author": "MiniApp Team",
5
5
  "license": "MIT",
6
6
  "miniprogram": "lib",