seeder-st2110-components 1.5.4 → 1.5.6
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/dist/index.esm.js +17 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +17 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -2678,6 +2678,8 @@ const NetworkSettingsModal = _ref2 => {
|
|
|
2678
2678
|
okText: "Apply",
|
|
2679
2679
|
cancelText: "Close",
|
|
2680
2680
|
centered: true,
|
|
2681
|
+
destroyOnHidden: true,
|
|
2682
|
+
forceRender: true,
|
|
2681
2683
|
styles: _objectSpread2({
|
|
2682
2684
|
body: {
|
|
2683
2685
|
padding: "16px 24px 8px 24px"
|
|
@@ -2701,9 +2703,7 @@ const NetworkSettingsModal = _ref2 => {
|
|
|
2701
2703
|
autoComplete: "off"
|
|
2702
2704
|
}, formProps);
|
|
2703
2705
|
return /*#__PURE__*/jsxs(Modal, _objectSpread2(_objectSpread2({}, mergedModalProps), {}, {
|
|
2704
|
-
children: [/*#__PURE__*/jsxs(Form, _objectSpread2(_objectSpread2({
|
|
2705
|
-
form: form
|
|
2706
|
-
}, mergedFormProps), {}, {
|
|
2706
|
+
children: [/*#__PURE__*/jsxs(Form, _objectSpread2(_objectSpread2({}, mergedFormProps), {}, {
|
|
2707
2707
|
children: [sections.includes('LAN') && lanConfigs.length > 0 && /*#__PURE__*/jsxs(Fragment, {
|
|
2708
2708
|
children: [/*#__PURE__*/jsx(NetworkFieldGroup, {
|
|
2709
2709
|
prefix: "LAN",
|
|
@@ -2981,6 +2981,10 @@ const Preset = _ref => {
|
|
|
2981
2981
|
savePreset,
|
|
2982
2982
|
removePreset,
|
|
2983
2983
|
loadPreset,
|
|
2984
|
+
onLoadSuccess,
|
|
2985
|
+
// 加载成功后的回调
|
|
2986
|
+
onLoadError,
|
|
2987
|
+
// 加载失败后的回调
|
|
2984
2988
|
// 字段配置
|
|
2985
2989
|
fields = {
|
|
2986
2990
|
name: {
|
|
@@ -3115,10 +3119,20 @@ const Preset = _ref => {
|
|
|
3115
3119
|
setTimeout(() => {
|
|
3116
3120
|
modalInstance.destroy();
|
|
3117
3121
|
AntdMessage.success(texts.successText);
|
|
3122
|
+
|
|
3123
|
+
// 加载成功的外部回调
|
|
3124
|
+
if (onLoadSuccess) {
|
|
3125
|
+
onLoadSuccess(loadData);
|
|
3126
|
+
}
|
|
3118
3127
|
}, 1000);
|
|
3119
3128
|
} catch (error) {
|
|
3120
3129
|
console.error('Failed to load preset:', error);
|
|
3121
3130
|
modalInstance.destroy();
|
|
3131
|
+
|
|
3132
|
+
// 加载失败的外部回调
|
|
3133
|
+
if (onLoadError) {
|
|
3134
|
+
onLoadError(error, loadData);
|
|
3135
|
+
}
|
|
3122
3136
|
}
|
|
3123
3137
|
}, [loadPreset, texts, AntdMessage]);
|
|
3124
3138
|
const handleSave = useCallback(async () => {
|