@tuya-miniapp/smart-ui 2.6.4-beta-1 → 2.6.4-beta-2

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.
@@ -58,7 +58,11 @@ SmartComponent({
58
58
  });
59
59
  },
60
60
  close() {
61
+ if (this.data.position !== 'close') {
62
+ this.$emit('tabClose', this.data.position);
63
+ }
61
64
  this.swipeMove(0);
65
+ this.setData({ position: 'close' });
62
66
  },
63
67
  swipeMove(offset = 0) {
64
68
  this.offset = range(offset, -this.data.rightWidth, this.data.leftWidth);
@@ -83,11 +87,7 @@ SmartComponent({
83
87
  this.open('left');
84
88
  }
85
89
  else {
86
- if (this.data.position !== 'close') {
87
- this.$emit('tabClose', this.data.position);
88
- }
89
- this.swipeMove(0);
90
- this.setData({ position: 'close' });
90
+ this.close();
91
91
  }
92
92
  this.setData({ catchMove: false });
93
93
  },
@@ -133,11 +133,7 @@ SmartComponent({
133
133
  });
134
134
  }
135
135
  else {
136
- if (this.data.position !== 'close') {
137
- this.$emit('tabClose', this.data.position);
138
- }
139
- this.swipeMove(0);
140
- this.setData({ position: 'close' });
136
+ this.close();
141
137
  }
142
138
  },
143
139
  },
@@ -63,7 +63,11 @@ var ARRAY = [];
63
63
  });
64
64
  },
65
65
  close: function () {
66
+ if (this.data.position !== 'close') {
67
+ this.$emit('tabClose', this.data.position);
68
+ }
66
69
  this.swipeMove(0);
70
+ this.setData({ position: 'close' });
67
71
  },
68
72
  swipeMove: function (offset) {
69
73
  if (offset === void 0) { offset = 0; }
@@ -84,11 +88,7 @@ var ARRAY = [];
84
88
  this.open('left');
85
89
  }
86
90
  else {
87
- if (this.data.position !== 'close') {
88
- this.$emit('tabClose', this.data.position);
89
- }
90
- this.swipeMove(0);
91
- this.setData({ position: 'close' });
91
+ this.close();
92
92
  }
93
93
  this.setData({ catchMove: false });
94
94
  },
@@ -135,11 +135,7 @@ var ARRAY = [];
135
135
  });
136
136
  }
137
137
  else {
138
- if (this.data.position !== 'close') {
139
- this.$emit('tabClose', this.data.position);
140
- }
141
- this.swipeMove(0);
142
- this.setData({ position: 'close' });
138
+ this.close();
143
139
  }
144
140
  },
145
141
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuya-miniapp/smart-ui",
3
- "version": "2.6.4-beta-1",
3
+ "version": "2.6.4-beta-2",
4
4
  "author": "MiniApp Team",
5
5
  "license": "MIT",
6
6
  "miniprogram": "lib",