@tuya-miniapp/smart-ui 2.13.0 → 2.13.1-beta-1

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.
@@ -77,7 +77,7 @@ function wrapperStyle(data) {
77
77
  }, {});
78
78
 
79
79
  var styleObj = {
80
- 'text-indent': data.unit ? '-8rpx' : '0',
80
+ 'text-indent': data.unit ? '-4px' : '0',
81
81
  transition: !data.changeAnimation ? 'none' : 'transform ' + data.animationTime + 'ms cubic-bezier(0.2, 0.9, 0.25, 1)',
82
82
  'line-height': addUnit(data.itemHeight),
83
83
  transform: 'rotateX(' + rotate + 'deg)'
@@ -43,6 +43,10 @@ SmartComponent({
43
43
  type: String,
44
44
  value: '',
45
45
  },
46
+ overlayStyle: {
47
+ type: String,
48
+ value: '',
49
+ },
46
50
  trigger: {
47
51
  type: String,
48
52
  // tap | longpress
@@ -3,11 +3,11 @@
3
3
  <smart-overlay
4
4
  show="{{ currentShow }}"
5
5
  z-index="{{ zIndex }}"
6
+ custom-style="{{ overlayStyle }}"
6
7
  bind:click="onClose"
7
8
  duration="{{ 1 }}"
8
9
  close-on-click-overlay
9
10
  bind:close="onClose"
10
- z-index="{{zIndex}}"
11
11
  >
12
12
 
13
13
  </smart-overlay>
@@ -184,7 +184,7 @@ SmartComponent({
184
184
  const diff = type === 'minus' ? -this.data.step : +this.data.step;
185
185
  const value = this.format(add(+this.data.currentValue, diff), true);
186
186
  this.emitChange(value);
187
- this.$emit(type);
187
+ this.$emit(type, value);
188
188
  tyApi.vibrateShort({ type: 'light' });
189
189
  },
190
190
  longPressStep() {
@@ -77,7 +77,7 @@ function wrapperStyle(data) {
77
77
  }, {});
78
78
 
79
79
  var styleObj = {
80
- 'text-indent': data.unit ? '-8rpx' : '0',
80
+ 'text-indent': data.unit ? '-4px' : '0',
81
81
  transition: !data.changeAnimation ? 'none' : 'transform ' + data.animationTime + 'ms cubic-bezier(0.2, 0.9, 0.25, 1)',
82
82
  'line-height': addUnit(data.itemHeight),
83
83
  transform: 'rotateX(' + rotate + 'deg)'
@@ -56,6 +56,10 @@ function createSvgIcon(svg) {
56
56
  type: String,
57
57
  value: '',
58
58
  },
59
+ overlayStyle: {
60
+ type: String,
61
+ value: '',
62
+ },
59
63
  trigger: {
60
64
  type: String,
61
65
  // tap | longpress
@@ -3,11 +3,11 @@
3
3
  <smart-overlay
4
4
  show="{{ currentShow }}"
5
5
  z-index="{{ zIndex }}"
6
+ custom-style="{{ overlayStyle }}"
6
7
  bind:click="onClose"
7
8
  duration="{{ 1 }}"
8
9
  close-on-click-overlay
9
10
  bind:close="onClose"
10
- z-index="{{zIndex}}"
11
11
  >
12
12
 
13
13
  </smart-overlay>
@@ -201,7 +201,7 @@ function equal(value1, value2) {
201
201
  var diff = type === 'minus' ? -this.data.step : +this.data.step;
202
202
  var value = this.format(add(+this.data.currentValue, diff), true);
203
203
  this.emitChange(value);
204
- this.$emit(type);
204
+ this.$emit(type, value);
205
205
  ty_1.default.vibrateShort({ type: 'light' });
206
206
  },
207
207
  longPressStep: function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuya-miniapp/smart-ui",
3
- "version": "2.13.0",
3
+ "version": "2.13.1-beta-1",
4
4
  "author": "MiniApp Team",
5
5
  "license": "MIT",
6
6
  "miniprogram": "lib",