@tuya-miniapp/smart-ui 1.3.1-beta-12 → 2.0.0-beta-2

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,10 @@ import { SmartComponent } from '../common/component';
2
2
  import { pickerProps } from './shared';
3
3
  SmartComponent({
4
4
  classes: ['active-class', 'toolbar-class', 'column-class'],
5
- props: Object.assign(Object.assign({}, pickerProps), { valueKey: {
5
+ props: Object.assign(Object.assign({}, pickerProps), { activeStyle: {
6
+ type: String,
7
+ value: '',
8
+ }, valueKey: {
6
9
  type: String,
7
10
  value: 'text',
8
11
  }, toolbarPosition: {
@@ -20,6 +20,7 @@
20
20
  custom-class="column-class"
21
21
  value-key="{{ valueKey }}"
22
22
  style="{{ item.style }}"
23
+ active-style="{{ activeStyle }}"
23
24
  options="{{ item.values }}"
24
25
  unit="{{ item.unit || unit }}"
25
26
  default-index="{{ item.defaultIndex || defaultIndex }}"
@@ -9,6 +9,10 @@ SmartComponent({
9
9
  className: String,
10
10
  itemHeight: Number,
11
11
  visibleItemCount: Number,
12
+ activeStyle: {
13
+ type: String,
14
+ value: '',
15
+ },
12
16
  options: {
13
17
  type: Array,
14
18
  value: [],
@@ -17,7 +17,7 @@
17
17
  wx:for-item="option"
18
18
  wx:key="index"
19
19
  data-index="{{ renderStart + index }}"
20
- style="height: {{ itemHeight }}px"
20
+ style="height: {{ itemHeight }}px;{{renderStart + index === currentIndex ? activeStyle : ''}}"
21
21
  class="smart-ellipsis {{ utils.bem('picker-column__item', { disabled: option && option.disabled, selected: renderStart + index === currentIndex }) }} {{ renderStart + index === currentIndex ? 'active-class' : '' }}"
22
22
  bindtap="onClickItem"
23
23
  >{{ computed.optionText(option, valueKey) }}</view>
@@ -1 +1 @@
1
- @import '../common/index.css';:host{box-sizing:border-box;flex-shrink:0;width:100%}.smart-tab__pane{-webkit-overflow-scrolling:touch;background-color:var(--app-B3);box-sizing:border-box;color:var(--app-B3-N1);overflow-y:auto}.smart-tab__pane--active{height:auto}.smart-tab__pane--inactive{height:0;overflow:visible}
1
+ @import '../common/index.css';:host{box-sizing:border-box;flex-shrink:0;width:100%}.smart-tab__pane{-webkit-overflow-scrolling:touch;background-color:var(--tab-panel-background-color,var(--app-B3));box-sizing:border-box;color:var(--tab-panel-text-color,var(--app-B3-N1));overflow-y:auto}.smart-tab__pane--active{height:auto}.smart-tab__pane--inactive{height:0;overflow:visible}
@@ -1 +1 @@
1
- @import '../common/index.wxss';:host{box-sizing:border-box;flex-shrink:0;width:100%}.smart-tab__pane{-webkit-overflow-scrolling:touch;background-color:var(--app-B3);box-sizing:border-box;color:var(--app-B3-N1);overflow-y:auto}.smart-tab__pane--active{height:auto}.smart-tab__pane--inactive{height:0;overflow:visible}
1
+ @import '../common/index.wxss';:host{box-sizing:border-box;flex-shrink:0;width:100%}.smart-tab__pane{-webkit-overflow-scrolling:touch;background-color:var(--tab-panel-background-color,var(--app-B3));box-sizing:border-box;color:var(--tab-panel-text-color,var(--app-B3-N1));overflow-y:auto}.smart-tab__pane--active{height:auto}.smart-tab__pane--inactive{height:0;overflow:visible}
@@ -15,7 +15,10 @@ var component_1 = require("../common/component");
15
15
  var shared_1 = require("./shared");
16
16
  (0, component_1.SmartComponent)({
17
17
  classes: ['active-class', 'toolbar-class', 'column-class'],
18
- props: __assign(__assign({}, shared_1.pickerProps), { valueKey: {
18
+ props: __assign(__assign({}, shared_1.pickerProps), { activeStyle: {
19
+ type: String,
20
+ value: '',
21
+ }, valueKey: {
19
22
  type: String,
20
23
  value: 'text',
21
24
  }, toolbarPosition: {
@@ -20,6 +20,7 @@
20
20
  custom-class="column-class"
21
21
  value-key="{{ valueKey }}"
22
22
  style="{{ item.style }}"
23
+ active-style="{{ activeStyle }}"
23
24
  options="{{ item.values }}"
24
25
  unit="{{ item.unit || unit }}"
25
26
  default-index="{{ item.defaultIndex || defaultIndex }}"
@@ -11,6 +11,10 @@ var DEFAULT_DURATION = 200;
11
11
  className: String,
12
12
  itemHeight: Number,
13
13
  visibleItemCount: Number,
14
+ activeStyle: {
15
+ type: String,
16
+ value: '',
17
+ },
14
18
  options: {
15
19
  type: Array,
16
20
  value: [],
@@ -17,7 +17,7 @@
17
17
  wx:for-item="option"
18
18
  wx:key="index"
19
19
  data-index="{{ renderStart + index }}"
20
- style="height: {{ itemHeight }}px"
20
+ style="height: {{ itemHeight }}px;{{renderStart + index === currentIndex ? activeStyle : ''}}"
21
21
  class="smart-ellipsis {{ utils.bem('picker-column__item', { disabled: option && option.disabled, selected: renderStart + index === currentIndex }) }} {{ renderStart + index === currentIndex ? 'active-class' : '' }}"
22
22
  bindtap="onClickItem"
23
23
  >{{ computed.optionText(option, valueKey) }}</view>
package/lib/tab/index.css CHANGED
@@ -1 +1 @@
1
- @import '../common/index.css';:host{box-sizing:border-box;flex-shrink:0;width:100%}.smart-tab__pane{-webkit-overflow-scrolling:touch;background-color:var(--app-B3);box-sizing:border-box;color:var(--app-B3-N1);overflow-y:auto}.smart-tab__pane--active{height:auto}.smart-tab__pane--inactive{height:0;overflow:visible}
1
+ @import '../common/index.css';:host{box-sizing:border-box;flex-shrink:0;width:100%}.smart-tab__pane{-webkit-overflow-scrolling:touch;background-color:var(--tab-panel-background-color,var(--app-B3));box-sizing:border-box;color:var(--tab-panel-text-color,var(--app-B3-N1));overflow-y:auto}.smart-tab__pane--active{height:auto}.smart-tab__pane--inactive{height:0;overflow:visible}
@@ -1 +1 @@
1
- @import '../common/index.wxss';:host{box-sizing:border-box;flex-shrink:0;width:100%}.smart-tab__pane{-webkit-overflow-scrolling:touch;background-color:var(--app-B3);box-sizing:border-box;color:var(--app-B3-N1);overflow-y:auto}.smart-tab__pane--active{height:auto}.smart-tab__pane--inactive{height:0;overflow:visible}
1
+ @import '../common/index.wxss';:host{box-sizing:border-box;flex-shrink:0;width:100%}.smart-tab__pane{-webkit-overflow-scrolling:touch;background-color:var(--tab-panel-background-color,var(--app-B3));box-sizing:border-box;color:var(--tab-panel-text-color,var(--app-B3-N1));overflow-y:auto}.smart-tab__pane--active{height:auto}.smart-tab__pane--inactive{height:0;overflow:visible}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuya-miniapp/smart-ui",
3
- "version": "1.3.1-beta-12",
3
+ "version": "2.0.0-beta-2",
4
4
  "author": "MiniApp Team",
5
5
  "license": "MIT",
6
6
  "miniprogram": "lib",
@@ -76,7 +76,7 @@
76
76
  ],
77
77
  "dependencies": {
78
78
  "@ray-js/components-ty-slider": "^0.2.48",
79
- "@tuya-miniapp/icons": "1.1.0-beta-4"
79
+ "@tuya-miniapp/icons": "2.0.0"
80
80
  },
81
81
  "maintainers": [
82
82
  {