From 7e9ae69f3873826d6ac49da40cc8ef8c5e2b63eb Mon Sep 17 00:00:00 2001 From: nelsontky Date: Sun, 6 Jun 2021 18:12:50 +0800 Subject: [PATCH] fix: prevent overwrite of content type (#1703) Co-authored-by: Liyas Thomas --- components/smart/AutoComplete.vue | 3 +++ pages/index.vue | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/components/smart/AutoComplete.vue b/components/smart/AutoComplete.vue index 6def418a0..e89976c08 100644 --- a/components/smart/AutoComplete.vue +++ b/components/smart/AutoComplete.vue @@ -107,6 +107,9 @@ export default { text() { this.$emit("input", this.text) }, + value(newValue) { + this.text = newValue + } }, mounted() { diff --git a/pages/index.vue b/pages/index.vue index 907ab9e4c..aab8bbf81 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -818,8 +818,8 @@ export default { }, method() { this.contentType = ["POST", "PUT", "PATCH", "DELETE"].includes(this.method) - ? "application/json" - : "" + ? this.contentType + : "application/json" }, preRequestScript(val, oldVal) { this.uri = this.uri