shineout 3.9.3-beta.13 → 3.9.3-beta.14

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/cjs/index.js CHANGED
@@ -522,5 +522,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
522
522
  // 此文件由脚本自动生成,请勿直接修改。
523
523
  // This file was generated automatically by a script. Please do not modify it directly.
524
524
  var _default = exports.default = {
525
- version: '3.9.3-beta.13'
525
+ version: '3.9.3-beta.14'
526
526
  };
package/dist/shineout.js CHANGED
@@ -12401,7 +12401,7 @@ var handleStyle = function handleStyle(style) {
12401
12401
  };
12402
12402
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12403
12403
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12404
- /* harmony default export */ var version = ('3.9.3-beta.13');
12404
+ /* harmony default export */ var version = ('3.9.3-beta.14');
12405
12405
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12406
12406
 
12407
12407
 
@@ -47453,15 +47453,24 @@ var useDate = function useDate(props) {
47453
47453
  var getTimeStr = function getTimeStr() {
47454
47454
  var format = props.format,
47455
47455
  type = props.type;
47456
- if (!props.value) return '';
47457
47456
  if (type !== 'datetime' || !format) return '';
47458
- if (/^[X|x]$/.test(format)) {
47457
+ if (/^[X|x]$/.test(util.compatibleFmt(format))) {
47459
47458
  format = 'HH:mm:ss';
47460
47459
  } else {
47461
47460
  var match = format.match(/[H|h].*/);
47462
47461
  // eslint-disable-next-line
47463
47462
  if (match) format = match[0];
47464
47463
  }
47464
+
47465
+ // 当不存在 props.value 时,根据 format 格式返回默认时间字符串
47466
+ if (!props.value) {
47467
+ return format.replace(/[Hh]+/g, '00') // HH/hh -> 00
47468
+ .replace(/m+/g, '00') // mm -> 00
47469
+ .replace(/s+/g, '00') // ss -> 00
47470
+ .replace(/S+/g, '0') // SSS -> 0
47471
+ .replace(/A/g, 'AM') // A -> AM
47472
+ .replace(/a/g, 'am'); // a -> am
47473
+ }
47465
47474
  return util.format(props.value, format, options);
47466
47475
  };
47467
47476
  var isInRange = function isInRange(date) {
@@ -74722,7 +74731,7 @@ var upload_interface = __webpack_require__(8821);
74722
74731
 
74723
74732
 
74724
74733
  /* harmony default export */ var src_0 = ({
74725
- version: '3.9.3-beta.13'
74734
+ version: '3.9.3-beta.14'
74726
74735
  });
74727
74736
  }();
74728
74737
  /******/ return __webpack_exports__;