@tuya-miniapp/smart-ui 2.3.7 → 2.3.8-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.
@@ -166,7 +166,7 @@ SmartComponent({
166
166
  if (is12HourClock && type === 'time') {
167
167
  return [
168
168
  {
169
- type: '12hours',
169
+ type: '12hoursClock',
170
170
  values: [amText, pmText],
171
171
  order: columnsOrder[0],
172
172
  },
@@ -249,6 +249,12 @@ SmartComponent({
249
249
  // time type
250
250
  if (!isDateType) {
251
251
  let [hour, minute] = value.split(':');
252
+ if (Number(hour) === 0 && data.minHour > 0) {
253
+ hour = 24;
254
+ }
255
+ if (Number(hour) === 24 && data.maxHour < 24) {
256
+ hour = 0;
257
+ }
252
258
  hour = padZero(range(hour, data.minHour, data.maxHour));
253
259
  minute = padZero(range(minute, data.minMinute, data.maxMinute));
254
260
  return `${hour}:${minute}`;
@@ -340,6 +346,7 @@ SmartComponent({
340
346
  }
341
347
  value = this.correctValue(value);
342
348
  this.updateColumnValue(value).then(() => {
349
+ picker.value = value;
343
350
  this.$emit('input', value);
344
351
  this.$emit('change', picker);
345
352
  });
@@ -201,7 +201,7 @@ var defaultFormatter = function (type, value) {
201
201
  if (is12HourClock && type === 'time') {
202
202
  return __spreadArray([
203
203
  {
204
- type: '12hours',
204
+ type: '12hoursClock',
205
205
  values: [amText, pmText],
206
206
  order: columnsOrder[0],
207
207
  }
@@ -283,6 +283,12 @@ var defaultFormatter = function (type, value) {
283
283
  // time type
284
284
  if (!isDateType) {
285
285
  var _a = value.split(':'), hour = _a[0], minute = _a[1];
286
+ if (Number(hour) === 0 && data.minHour > 0) {
287
+ hour = 24;
288
+ }
289
+ if (Number(hour) === 24 && data.maxHour < 24) {
290
+ hour = 0;
291
+ }
286
292
  hour = padZero((0, utils_1.range)(hour, data.minHour, data.maxHour));
287
293
  minute = padZero((0, utils_1.range)(minute, data.minMinute, data.maxMinute));
288
294
  return "".concat(hour, ":").concat(minute);
@@ -376,6 +382,7 @@ var defaultFormatter = function (type, value) {
376
382
  }
377
383
  value = this.correctValue(value);
378
384
  this.updateColumnValue(value).then(function () {
385
+ picker.value = value;
379
386
  _this.$emit('input', value);
380
387
  _this.$emit('change', picker);
381
388
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuya-miniapp/smart-ui",
3
- "version": "2.3.7",
3
+ "version": "2.3.8-beta-1",
4
4
  "author": "MiniApp Team",
5
5
  "license": "MIT",
6
6
  "miniprogram": "lib",