seeder-st2110-components 1.5.5 → 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 +14 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -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 () => {
|