This commit is contained in:
Viet An
2026-06-05 20:12:34 +07:00
parent 3254c64f7d
commit 541f99f82a
13 changed files with 47 additions and 83 deletions

View File

@@ -223,7 +223,7 @@ const {
$resetNull,
$findapi,
$insertapi,
$updateapi,
$patchapi,
$remove,
$deleteapi,
$empty,
@@ -315,7 +315,7 @@ async function update() {
data.link = arr1.length === 0 ? null : arr1;
let api = $findapi("useraction");
record = data.id
? await $updateapi("useraction", { data, values: api.params.values })
? await $patchapi("useraction", { data, values: api.params.values })
: await $insertapi("useraction", { data, values: api.params.values });
getValue();
}

View File

@@ -21,7 +21,7 @@
</template>
<script setup>
const emit = defineEmits(["close"]);
const { $store, $getdata, $updateapi, $updatepage } = useNuxtApp();
const { $store, $getdata, $patchapi, $updatepage } = useNuxtApp();
const props = defineProps({
row: Object,
pagename: String,
@@ -31,7 +31,7 @@ let record = await $getdata("application", {
first: true,
});
async function save() {
await $updateapi("application", record);
await $patchapi("application", record);
record = await $getdata("application", {
filter: { id: props.row.id },
first: true,

View File

@@ -119,7 +119,7 @@ export default {
data = this.$copy(this.current);
data.detail = this.detail;
}
let rs = data.id ? await this.$updateapi(this.api, data) : await this.$insertapi(this.api, { data });
let rs = data.id ? await this.$patchapi(this.api, data) : await this.$insertapi(this.api, { data });
if (!rs) return;
this.detail = undefined;
if (this.current) {