修复二次编辑时,无法提交的问题

This commit is contained in:
aixianling
2024-07-23 10:46:19 +08:00
parent be9aa08cd9
commit eac706bfcb

View File

@@ -41,7 +41,7 @@ export default {
},
handleAdd(row = {}) {
const {appIconUrl: url, fileId} = row
this.form = this.$copy({...row, appIconUrl: url ? [{url, fileId}] : []})
this.form = this.$copy({...row, appIconUrl: url ? [{url, id: fileId}] : []})
this.dialog = true
// this.$router.push({hash: "#add", query: {id}})
},
@@ -73,7 +73,7 @@ export default {
},
submit() {
this.$refs.form.validate().then(() => {
const {appIconUrl} = this.form, {url, id:fileId} = appIconUrl.at(0) || {}
const {appIconUrl} = this.form, {url, id: fileId} = appIconUrl.at(0) || {}
this.instance.post("/app/appaiconfiginfo/addOrUpdate", {...this.form, appIconUrl: url, fileId}).then(res => {
if (res?.code == '0') {
this.$message.success("提交成功!")