shineout 3.5.3-beta.7 → 3.5.3-beta.9

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
@@ -500,5 +500,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
500
500
  // 此文件由脚本自动生成,请勿直接修改。
501
501
  // This file was generated automatically by a script. Please do not modify it directly.
502
502
  var _default = exports.default = {
503
- version: '3.5.3-beta.7'
503
+ version: '3.5.3-beta.9'
504
504
  };
package/dist/shineout.js CHANGED
@@ -12030,7 +12030,7 @@ var handleStyle = function handleStyle(style) {
12030
12030
  };
12031
12031
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12032
12032
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12033
- /* harmony default export */ var version = ('3.5.3-beta.7');
12033
+ /* harmony default export */ var version = ('3.5.3-beta.9');
12034
12034
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12035
12035
 
12036
12036
 
@@ -42234,7 +42234,13 @@ function util_toDate(day, options) {
42234
42234
  function getDaysOfMonth(dirtyDate, options) {
42235
42235
  var date = util_toDate(dirtyDate, options);
42236
42236
  var temp = dayjs_min_default()(transDateWithZone(date, options));
42237
- var current = dayjs_min_default()(transDateWithZone(date, options)).locale(getDayJsLocate(options)).startOf('month').startOf('week').hour(temp.hour()).minute(temp.minute()).second(temp.second()).millisecond(temp.millisecond());
42237
+ var current = dayjs_min_default()(transDateWithZone(date, options)).locale(getDayJsLocate(options)).startOf('month');
42238
+ if (options.weekStartsOn === 1) {
42239
+ current = current.startOf('isoWeek'); // ISO week starts on Monday
42240
+ } else {
42241
+ current = current.startOf('week'); // Default week starts on Sunday
42242
+ }
42243
+ current = current.hour(temp.hour()).minute(temp.minute()).second(temp.second()).millisecond(temp.millisecond());
42238
42244
  var days = [];
42239
42245
  var index = 0;
42240
42246
  while (index < 42) {
@@ -43450,7 +43456,7 @@ var Day = function Day(props) {
43450
43456
  length: 7
43451
43457
  }).map(function (_, index) {
43452
43458
  // weekStartsOn可能是字符串,需要转换为数字,否则得到星期顺序不正确
43453
- var num = (props.options.weekStartsOn + index) % 7;
43459
+ var num = (Number(props.options.weekStartsOn) + index) % 7;
43454
43460
  return weeks[num];
43455
43461
  });
43456
43462
  var renderWeek = function renderWeek(item) {
@@ -43605,9 +43611,6 @@ var Day = function Day(props) {
43605
43611
  length: len
43606
43612
  }).map(function (_, index) {
43607
43613
  var start = index * 7;
43608
- // console.log('======================')
43609
- // console.log('days, start, days[start + 3]: >>', days, start, days[start + 3])
43610
- // console.log('======================')
43611
43614
  return /*#__PURE__*/(0,jsx_runtime.jsxs)("tr", {
43612
43615
  className: classnames_default()(styles === null || styles === void 0 ? void 0 : styles.pickerRow, props.type === 'week' && (styles === null || styles === void 0 ? void 0 : styles.pickerRowWeek)),
43613
43616
  children: [renderWeek(days[start + 3]), days.slice(start, start + 7).map(function (item, index) {
@@ -44861,7 +44864,8 @@ var DatePicker = function DatePicker(props0) {
44861
44864
  }
44862
44865
  var options = {
44863
44866
  timeZone: props.timeZone,
44864
- weekStartsOn: getLocale(locale, 'startOfWeek')
44867
+ // 需要确保 weekStartsOn number,否则后续的星期顺序计算都会出错
44868
+ weekStartsOn: Number(getLocale(locale, 'startOfWeek'))
44865
44869
  };
44866
44870
  var inputAbleResult = useInputAble({
44867
44871
  value: props.value,
@@ -66968,7 +66972,7 @@ var upload_interface = __webpack_require__(8821);
66968
66972
 
66969
66973
 
66970
66974
  /* harmony default export */ var src_0 = ({
66971
- version: '3.5.3-beta.7'
66975
+ version: '3.5.3-beta.9'
66972
66976
  });
66973
66977
  }();
66974
66978
  /******/ return __webpack_exports__;