@tuya-miniapp/smart-ui 2.3.0-beta-3 → 2.3.0-beta-4
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/picker/index.js
CHANGED
@@ -150,7 +150,7 @@ SmartComponent({
|
|
150
150
|
this.setData({
|
151
151
|
animating: true,
|
152
152
|
});
|
153
|
-
this.$emit('
|
153
|
+
this.$emit('animation-start');
|
154
154
|
},
|
155
155
|
animationEnd() {
|
156
156
|
if (!this.data.animating)
|
@@ -158,7 +158,7 @@ SmartComponent({
|
|
158
158
|
this.setData({
|
159
159
|
animating: false,
|
160
160
|
});
|
161
|
-
this.$emit('
|
161
|
+
this.$emit('animation-end');
|
162
162
|
},
|
163
163
|
},
|
164
164
|
});
|
package/dist/picker/index.wxml
CHANGED
@@ -30,8 +30,8 @@
|
|
30
30
|
visible-item-count="{{ visibleItemCount }}"
|
31
31
|
active-class="active-class"
|
32
32
|
bind:change="onChange"
|
33
|
-
bind:
|
34
|
-
bind:
|
33
|
+
bind:animation-start="animationStart"
|
34
|
+
bind:animation-end="animationEnd"
|
35
35
|
/>
|
36
36
|
|
37
37
|
<view
|
@@ -82,7 +82,7 @@ SmartComponent({
|
|
82
82
|
});
|
83
83
|
}
|
84
84
|
if (!this.data.playing) {
|
85
|
-
this.$emit('
|
85
|
+
this.$emit('animation-start');
|
86
86
|
}
|
87
87
|
this.setData({
|
88
88
|
startY: event.touches[0].clientY,
|
@@ -184,7 +184,7 @@ SmartComponent({
|
|
184
184
|
this.setData({
|
185
185
|
playing: false,
|
186
186
|
});
|
187
|
-
this.$emit('
|
187
|
+
this.$emit('animation-end');
|
188
188
|
});
|
189
189
|
},
|
190
190
|
checkIsDown(curr) {
|
@@ -285,7 +285,7 @@ SmartComponent({
|
|
285
285
|
index = this.adjustIndex(index) || 0;
|
286
286
|
const offset = -index * data.itemHeight;
|
287
287
|
if (!data.playing) {
|
288
|
-
this.$emit('
|
288
|
+
this.$emit('animation-start');
|
289
289
|
this.setData({
|
290
290
|
playing: true,
|
291
291
|
});
|
@@ -305,14 +305,14 @@ SmartComponent({
|
|
305
305
|
this.setData({
|
306
306
|
playing: false,
|
307
307
|
});
|
308
|
-
this.$emit('
|
308
|
+
this.$emit('animation-end');
|
309
309
|
return;
|
310
310
|
}
|
311
311
|
this.$emit('change', index);
|
312
312
|
this.setData({
|
313
313
|
playing: false,
|
314
314
|
});
|
315
|
-
this.$emit('
|
315
|
+
this.$emit('animation-end');
|
316
316
|
});
|
317
317
|
}
|
318
318
|
return this.set({
|
@@ -327,20 +327,20 @@ SmartComponent({
|
|
327
327
|
this.setData({
|
328
328
|
playing: false,
|
329
329
|
});
|
330
|
-
this.$emit('
|
330
|
+
this.$emit('animation-end');
|
331
331
|
return;
|
332
332
|
}
|
333
333
|
this.$emit('change', index);
|
334
334
|
this.setData({
|
335
335
|
playing: false,
|
336
336
|
});
|
337
|
-
this.$emit('
|
337
|
+
this.$emit('animation-end');
|
338
338
|
});
|
339
339
|
}
|
340
340
|
this.setData({
|
341
341
|
playing: false,
|
342
342
|
});
|
343
|
-
this.$emit('
|
343
|
+
this.$emit('animation-end');
|
344
344
|
return this.set({ offset });
|
345
345
|
},
|
346
346
|
setValue(value) {
|
package/lib/picker/index.js
CHANGED
@@ -173,7 +173,7 @@ var shared_1 = require("./shared");
|
|
173
173
|
this.setData({
|
174
174
|
animating: true,
|
175
175
|
});
|
176
|
-
this.$emit('
|
176
|
+
this.$emit('animation-start');
|
177
177
|
},
|
178
178
|
animationEnd: function () {
|
179
179
|
if (!this.data.animating)
|
@@ -181,7 +181,7 @@ var shared_1 = require("./shared");
|
|
181
181
|
this.setData({
|
182
182
|
animating: false,
|
183
183
|
});
|
184
|
-
this.$emit('
|
184
|
+
this.$emit('animation-end');
|
185
185
|
},
|
186
186
|
},
|
187
187
|
});
|
package/lib/picker/index.wxml
CHANGED
@@ -30,8 +30,8 @@
|
|
30
30
|
visible-item-count="{{ visibleItemCount }}"
|
31
31
|
active-class="active-class"
|
32
32
|
bind:change="onChange"
|
33
|
-
bind:
|
34
|
-
bind:
|
33
|
+
bind:animation-start="animationStart"
|
34
|
+
bind:animation-end="animationEnd"
|
35
35
|
/>
|
36
36
|
|
37
37
|
<view
|
@@ -120,7 +120,7 @@ var DEFAULT_DURATION = 400;
|
|
120
120
|
});
|
121
121
|
}
|
122
122
|
if (!this.data.playing) {
|
123
|
-
this.$emit('
|
123
|
+
this.$emit('animation-start');
|
124
124
|
}
|
125
125
|
this.setData({
|
126
126
|
startY: event.touches[0].clientY,
|
@@ -218,7 +218,7 @@ var DEFAULT_DURATION = 400;
|
|
218
218
|
this.setData({
|
219
219
|
playing: false,
|
220
220
|
});
|
221
|
-
this.$emit('
|
221
|
+
this.$emit('animation-end');
|
222
222
|
return [2 /*return*/];
|
223
223
|
}
|
224
224
|
});
|
@@ -326,7 +326,7 @@ var DEFAULT_DURATION = 400;
|
|
326
326
|
index = this.adjustIndex(index) || 0;
|
327
327
|
var offset = -index * data.itemHeight;
|
328
328
|
if (!data.playing) {
|
329
|
-
this.$emit('
|
329
|
+
this.$emit('animation-start');
|
330
330
|
this.setData({
|
331
331
|
playing: true,
|
332
332
|
});
|
@@ -346,14 +346,14 @@ var DEFAULT_DURATION = 400;
|
|
346
346
|
_this.setData({
|
347
347
|
playing: false,
|
348
348
|
});
|
349
|
-
_this.$emit('
|
349
|
+
_this.$emit('animation-end');
|
350
350
|
return;
|
351
351
|
}
|
352
352
|
_this.$emit('change', index);
|
353
353
|
_this.setData({
|
354
354
|
playing: false,
|
355
355
|
});
|
356
|
-
_this.$emit('
|
356
|
+
_this.$emit('animation-end');
|
357
357
|
});
|
358
358
|
}
|
359
359
|
return this.set({
|
@@ -368,20 +368,20 @@ var DEFAULT_DURATION = 400;
|
|
368
368
|
_this.setData({
|
369
369
|
playing: false,
|
370
370
|
});
|
371
|
-
_this.$emit('
|
371
|
+
_this.$emit('animation-end');
|
372
372
|
return;
|
373
373
|
}
|
374
374
|
_this.$emit('change', index);
|
375
375
|
_this.setData({
|
376
376
|
playing: false,
|
377
377
|
});
|
378
|
-
_this.$emit('
|
378
|
+
_this.$emit('animation-end');
|
379
379
|
});
|
380
380
|
}
|
381
381
|
this.setData({
|
382
382
|
playing: false,
|
383
383
|
});
|
384
|
-
this.$emit('
|
384
|
+
this.$emit('animation-end');
|
385
385
|
return this.set({ offset: offset });
|
386
386
|
},
|
387
387
|
setValue: function (value) {
|