@sheinx/base 3.5.6-beta.3 → 3.5.6-beta.5

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.
@@ -1 +1 @@
1
- {"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["date-picker.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAmB1E,QAAA,MAAM,UAAU,oFAmUf,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["date-picker.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAmB1E,QAAA,MAAM,UAAU,oFA8Uf,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -146,11 +146,23 @@ var DatePicker = function DatePicker(props0) {
146
146
  }
147
147
  } else {
148
148
  func.finishEdit();
149
+
150
+ // 如果是通过 props.open 控制的,那么需要在关闭时,将组件再次进入编辑状态
151
+ if (props.open === true) {
152
+ func.startEdit();
153
+ }
149
154
  }
150
155
  setIsCloseFromConfirm(false);
151
156
  }
152
157
  (_props$onCollapse = props.onCollapse) === null || _props$onCollapse === void 0 || _props$onCollapse.call(props, isOpen);
153
158
  });
159
+
160
+ // 如果一开始就打开了板子,那么需要初始化让组件进入编辑状态
161
+ (0, _react.useEffect)(function () {
162
+ if (props.open) {
163
+ func.startEdit();
164
+ }
165
+ }, []);
154
166
  var _usePopup = (0, _hooks.usePopup)({
155
167
  open: props.open,
156
168
  onCollapse: onCollapse,
@@ -1 +1 @@
1
- {"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["date-picker.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAmB1E,QAAA,MAAM,UAAU,oFAmUf,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["date-picker.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAmB1E,QAAA,MAAM,UAAU,oFA8Uf,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -139,11 +139,23 @@ var DatePicker = function DatePicker(props0) {
139
139
  }
140
140
  } else {
141
141
  func.finishEdit();
142
+
143
+ // 如果是通过 props.open 控制的,那么需要在关闭时,将组件再次进入编辑状态
144
+ if (props.open === true) {
145
+ func.startEdit();
146
+ }
142
147
  }
143
148
  setIsCloseFromConfirm(false);
144
149
  }
145
150
  (_props$onCollapse = props.onCollapse) === null || _props$onCollapse === void 0 || _props$onCollapse.call(props, isOpen);
146
151
  });
152
+
153
+ // 如果一开始就打开了板子,那么需要初始化让组件进入编辑状态
154
+ useEffect(function () {
155
+ if (props.open) {
156
+ func.startEdit();
157
+ }
158
+ }, []);
147
159
  var _usePopup = usePopup({
148
160
  open: props.open,
149
161
  onCollapse: onCollapse,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheinx/base",
3
- "version": "3.5.6-beta.3",
3
+ "version": "3.5.6-beta.5",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -10,7 +10,7 @@
10
10
  "module": "./esm/index.js",
11
11
  "typings": "./cjs/index.d.ts",
12
12
  "dependencies": {
13
- "@sheinx/hooks": "3.5.6-beta.3",
13
+ "@sheinx/hooks": "3.5.6-beta.5",
14
14
  "immer": "^10.0.0",
15
15
  "classnames": "^2.0.0",
16
16
  "@shined/reactive": "^0.1.3-alpha.0"