@luck-design-biz/luckda 0.0.25-17 → 0.0.25-18
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.
|
@@ -5,7 +5,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
|
|
|
5
5
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
6
6
|
var _excluded = ["advance"];
|
|
7
7
|
import React, { useRef, forwardRef, Fragment, useImperativeHandle, useEffect } from 'react';
|
|
8
|
-
import { useMemoizedFn, useCreation
|
|
8
|
+
import { useMemoizedFn, useCreation } from 'ahooks';
|
|
9
9
|
import classNames from 'classnames';
|
|
10
10
|
import { reduce, includes, isNil, cloneDeep, last, startsWith, isString } from 'lodash';
|
|
11
11
|
import { BasicDivider } from 'luck-design';
|
|
@@ -102,11 +102,6 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
102
102
|
return !hidden;
|
|
103
103
|
});
|
|
104
104
|
}, [blocks]);
|
|
105
|
-
useMount(function () {
|
|
106
|
-
ctx.doAction(advance.events.onMount, {
|
|
107
|
-
instance: formRef.current
|
|
108
|
-
});
|
|
109
|
-
});
|
|
110
105
|
useEffect(function () {
|
|
111
106
|
var tid = ctx.$subscriber(ctx.topics.PAGE_PUBLIC_RESOURCE_CHANGED).on(function (_ref5) {
|
|
112
107
|
var resource = _ref5.resource,
|
|
@@ -507,6 +502,11 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
507
502
|
};
|
|
508
503
|
}());
|
|
509
504
|
});
|
|
505
|
+
var afterInit = useMemoizedFn(function () {
|
|
506
|
+
ctx.doAction(advance.events.onMount, {
|
|
507
|
+
instance: formRef.current
|
|
508
|
+
});
|
|
509
|
+
});
|
|
510
510
|
var afterSubmit = useMemoizedFn(function (success, mainKey, res) {
|
|
511
511
|
ctx.doAction(advance.events.onSaveCallback, {
|
|
512
512
|
success: success,
|
|
@@ -562,7 +562,8 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
562
562
|
rest[_key5] = arguments[_key5];
|
|
563
563
|
}
|
|
564
564
|
return (_promiseRef$current = promiseRef.current) === null || _promiseRef$current === void 0 ? void 0 : _promiseRef$current.call.apply(_promiseRef$current, [promiseRef].concat(rest));
|
|
565
|
-
}
|
|
565
|
+
},
|
|
566
|
+
afterInit: afterInit
|
|
566
567
|
}));
|
|
567
568
|
});
|
|
568
569
|
LCForm.defaultProps = omitBadProps(defaultMeta);
|
|
@@ -110,11 +110,6 @@ var LCForm = /*#__PURE__*/(0, _react.forwardRef)(function (_ref3, ref) {
|
|
|
110
110
|
return !hidden;
|
|
111
111
|
});
|
|
112
112
|
}, [blocks]);
|
|
113
|
-
(0, _ahooks.useMount)(function () {
|
|
114
|
-
ctx.doAction(advance.events.onMount, {
|
|
115
|
-
instance: formRef.current
|
|
116
|
-
});
|
|
117
|
-
});
|
|
118
113
|
(0, _react.useEffect)(function () {
|
|
119
114
|
var tid = ctx.$subscriber(ctx.topics.PAGE_PUBLIC_RESOURCE_CHANGED).on(function (_ref5) {
|
|
120
115
|
var resource = _ref5.resource,
|
|
@@ -515,6 +510,11 @@ var LCForm = /*#__PURE__*/(0, _react.forwardRef)(function (_ref3, ref) {
|
|
|
515
510
|
};
|
|
516
511
|
}());
|
|
517
512
|
});
|
|
513
|
+
var afterInit = (0, _ahooks.useMemoizedFn)(function () {
|
|
514
|
+
ctx.doAction(advance.events.onMount, {
|
|
515
|
+
instance: formRef.current
|
|
516
|
+
});
|
|
517
|
+
});
|
|
518
518
|
var afterSubmit = (0, _ahooks.useMemoizedFn)(function (success, mainKey, res) {
|
|
519
519
|
ctx.doAction(advance.events.onSaveCallback, {
|
|
520
520
|
success: success,
|
|
@@ -570,7 +570,8 @@ var LCForm = /*#__PURE__*/(0, _react.forwardRef)(function (_ref3, ref) {
|
|
|
570
570
|
rest[_key5] = arguments[_key5];
|
|
571
571
|
}
|
|
572
572
|
return (_promiseRef$current = promiseRef.current) === null || _promiseRef$current === void 0 ? void 0 : _promiseRef$current.call.apply(_promiseRef$current, [promiseRef].concat(rest));
|
|
573
|
-
}
|
|
573
|
+
},
|
|
574
|
+
afterInit: afterInit
|
|
574
575
|
}));
|
|
575
576
|
});
|
|
576
577
|
LCForm.defaultProps = (0, _helper.omitBadProps)(_formPropsDefault.default);
|
package/package.json
CHANGED