mp:菜单的清空处理

pull/2/head
YunaiV 2023-01-15 21:28:04 +08:00
parent b5815a62fc
commit 0e75a67f28
1 changed files with 20 additions and 8 deletions

View File

@ -254,6 +254,7 @@ export default {
},
/** 搜索按钮操作 */
handleQuery() {
this.resetForm();
//
if (this.accountId) {
this.setAccountId(this.accountId)
@ -262,7 +263,7 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm('queryForm')
this.resetForm();
//
if (this.accounts.length > 0) {
this.setAccountId(this.accounts[0].id)
@ -302,6 +303,23 @@ export default {
});
return menuList;
},
//
resetForm() {
//
this.isActive = -1;
this.isSubMenuActive = -1;
this.isSubMenuFlag = -1;
//
this.showRightFlag = false;
this.nameMaxLength = 0;
this.showConfigureContent = 0;
this.hackResetWxReplySelect = true;
this.hackResetWxReplySelect = false;
this.tempObj = {};
this.tempSelfObj = {};
this.dialogNewsVisible = false;
},
// ======================== ========================
//
@ -397,7 +415,6 @@ export default {
this.isSubMenuActive = -1;
}).catch(() => {});
},
// TODO
// ======================== ========================
handleSave() {
@ -423,7 +440,7 @@ export default {
this.loading = true
return deleteMenu(this.accountId);
}).then(() => {
this.getList();
this.handleQuery();
this.$modal.msgSuccess("清空成功");
}).catch(() => {}).finally(() => {
this.loading = false
@ -494,11 +511,6 @@ export default {
url: article.url,
})
})
// this.tempObj.mediaName = item.name
// this.tempObj.url = item.url
// item.mediaType = this.tempObj.mediaType
// item.content.articles = item.content.articles.slice(0,1)
// this.tempObj.content = item.content
},
deleteMaterial() {
this.$delete(this.tempObj,'articleId')