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