This commit is contained in:
Viet An
2026-07-03 09:24:05 +07:00
parent f519573c19
commit 4404c4654b
22 changed files with 59 additions and 39 deletions

View File

@@ -45,7 +45,7 @@ export default {
},
methods: {
async save() {
let rs = await this.$patchapi("file", this.record);
let rs = await this.$patchapi("file", { data: this.record });
},
},
};

View File

@@ -41,7 +41,7 @@ export default {
computed: {
pagedata: {
get() {
return this.$store.state[this.pagename1];
return this.$store[this.pagename1];
},
set(val) {
this.$store.commit("updateStore", { name: this.pagename1, data: val });

View File

@@ -33,10 +33,12 @@ function editImage(image) {
async function saveEditImage() {
try {
await $patchapi("file", {
id: editingImage.value.file,
name: editingImageName.value,
caption: editingImageCaption.value?.trim() || null,
hashtag: editingImageHashtag.value?.trim() || null,
data: {
id: editingImage.value.file,
name: editingImageName.value,
caption: editingImageCaption.value?.trim() || null,
hashtag: editingImageHashtag.value?.trim() || null,
},
});
props.loadImages();