changes
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user