lkt-item-crud 1.1.4 → 1.1.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.
package/dist/build.js
CHANGED
|
@@ -83,7 +83,7 @@ const ne = { class: "lkt-item-crud" }, se = {
|
|
|
83
83
|
v.value = !0;
|
|
84
84
|
}
|
|
85
85
|
let g = e.isCreate ? "create" : "update";
|
|
86
|
-
e.isCreate || C.value.turnStoredIntoOriginal(), u.autoReloadId && (e.readData.id = u.autoReloadId, L()), e.isCreate
|
|
86
|
+
e.isCreate || C.value.turnStoredIntoOriginal(), u.autoReloadId && (e.readData.id = u.autoReloadId, L()), e.isCreate ? typeof e.onCreate == "function" && e.onCreate() : typeof e.onUpdate == "function" && e.onUpdate(), d(g, u);
|
|
87
87
|
}, T = () => {
|
|
88
88
|
l.value = !0, n.value = -1;
|
|
89
89
|
}, $ = () => {
|
package/package.json
CHANGED
|
@@ -189,8 +189,11 @@ const onDrop = ($event: PointerEvent, r: HTTPResponse) => {
|
|
|
189
189
|
props.readData['id'] = r.autoReloadId;
|
|
190
190
|
fetchItem();
|
|
191
191
|
}
|
|
192
|
-
if (props.isCreate
|
|
193
|
-
|
|
192
|
+
if (props.isCreate) {
|
|
193
|
+
if (typeof props.onCreate === 'function') props.onCreate();
|
|
194
|
+
} else {
|
|
195
|
+
if (typeof props.onUpdate === 'function') props.onUpdate();
|
|
196
|
+
}
|
|
194
197
|
emit(emits, r)
|
|
195
198
|
},
|
|
196
199
|
onButtonLoading = () => {
|