shineout 3.5.3-beta.9 → 3.5.3-fix.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.
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.9'
503
+ version: '3.5.3-fix.1'
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.9');
12033
+ /* harmony default export */ var version = ('3.5.3-fix.1');
12034
12034
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12035
12035
 
12036
12036
 
@@ -33391,19 +33391,18 @@ function useInputAble(props) {
33391
33391
  var render = useRender(syncValue);
33392
33392
  var shouldUseState = delay || !control;
33393
33393
  var value = shouldUseState ? stateValue : valuePo;
33394
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
33395
- if (context.timer) {
33396
- clearTimeout(context.timer);
33397
- context.timer = null;
33398
- }
33394
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
33399
33395
  if (delay && control && props.value !== stateValue) {
33400
33396
  changeStateValue(props.value);
33397
+ } else if (context.timer) {
33398
+ clearTimeout(context.timer);
33399
+ context.timer = null;
33401
33400
  }
33402
33401
  }, [props.value, delay, control]);
33403
33402
  var forceDelayChange = use_persist_fn(function () {
33404
- if (context.timer && context.delayChange) {
33403
+ if (context.delayChange) context.delayChange();
33404
+ if (context.timer) {
33405
33405
  clearTimeout(context.timer);
33406
- context.delayChange();
33407
33406
  context.timer = null;
33408
33407
  context.delayChange = null;
33409
33408
  }
@@ -42234,13 +42233,7 @@ function util_toDate(day, options) {
42234
42233
  function getDaysOfMonth(dirtyDate, options) {
42235
42234
  var date = util_toDate(dirtyDate, options);
42236
42235
  var temp = dayjs_min_default()(transDateWithZone(date, options));
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());
42236
+ 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());
42244
42237
  var days = [];
42245
42238
  var index = 0;
42246
42239
  while (index < 42) {
@@ -42789,6 +42782,10 @@ var useDate = function useDate(props) {
42789
42782
  context.cachedMonth = date;
42790
42783
  return context.cachedDays;
42791
42784
  };
42785
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
42786
+ // 当weekStartsOn从0变为1时,需要清空context.cachedDays, 否则会显示不正确的星期顺序
42787
+ context.cachedDays = [];
42788
+ }, [options.weekStartsOn]);
42792
42789
  var handleNextYear = use_persist_fn(function () {
42793
42790
  var date = util.addYears(current, 1, options);
42794
42791
  setCurrent(date);
@@ -66972,7 +66969,7 @@ var upload_interface = __webpack_require__(8821);
66972
66969
 
66973
66970
 
66974
66971
  /* harmony default export */ var src_0 = ({
66975
- version: '3.5.3-beta.9'
66972
+ version: '3.5.3-fix.1'
66976
66973
  });
66977
66974
  }();
66978
66975
  /******/ return __webpack_exports__;