diff --git a/src/components/ImageCropper/index.vue b/src/components/ImageCropper/index.vue index c30c5b18..c2688e99 100644 --- a/src/components/ImageCropper/index.vue +++ b/src/components/ImageCropper/index.vue @@ -839,16 +839,20 @@ export default { that.$emit('crop-upload-fail', err, field, ki) } }) + }, + closeHandler(e) { + if (this.value && (e.key == 'Escape' || e.keyCode == 27)) { + this.off() + } } }, created() { // 绑定按键esc隐藏此插件事件 - document.addEventListener('keyup', (e) => { - if (this.value && (e.key == 'Escape' || e.keyCode == 27)) { - this.off() - } - }) - } + document.addEventListener('keyup', this.closeHandler) + }, + destroyed() { + document.removeEventListener('keyup', this.closeHandler) + }, } diff --git a/src/components/MDinput/index.vue b/src/components/MDinput/index.vue index 013462fa..c59ea34a 100644 --- a/src/components/MDinput/index.vue +++ b/src/components/MDinput/index.vue @@ -9,7 +9,7 @@ :placeholder="fillPlaceHolder" :readonly="readonly" :disabled="disabled" - :autoComplete="autoComplete" + :autocomplete="autoComplete" :required="required" type="email" class="material-input" @@ -24,7 +24,7 @@ :placeholder="fillPlaceHolder" :readonly="readonly" :disabled="disabled" - :autoComplete="autoComplete" + :autocomplete="autoComplete" :required="required" type="url" class="material-input" @@ -40,7 +40,7 @@ :step="step" :readonly="readonly" :disabled="disabled" - :autoComplete="autoComplete" + :autocomplete="autoComplete" :max="max" :min="min" :minlength="minlength" @@ -59,7 +59,7 @@ :placeholder="fillPlaceHolder" :readonly="readonly" :disabled="disabled" - :autoComplete="autoComplete" + :autocomplete="autoComplete" :max="max" :min="min" :required="required" @@ -76,7 +76,7 @@ :placeholder="fillPlaceHolder" :readonly="readonly" :disabled="disabled" - :autoComplete="autoComplete" + :autocomplete="autoComplete" :required="required" type="tel" class="material-input" @@ -91,7 +91,7 @@ :placeholder="fillPlaceHolder" :readonly="readonly" :disabled="disabled" - :autoComplete="autoComplete" + :autocomplete="autoComplete" :minlength="minlength" :maxlength="maxlength" :required="required" diff --git a/src/utils/request.js b/src/utils/request.js index 71d5ea4b..2fb95ac0 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -6,7 +6,7 @@ import { getToken } from '@/utils/auth' // create an axios instance const service = axios.create({ baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url - withCredentials: true, // send cookies when cross-domain requests + // withCredentials: true, // send cookies when cross-domain requests timeout: 5000 // request timeout }) diff --git a/src/views/example/components/ArticleDetail.vue b/src/views/example/components/ArticleDetail.vue index 692fffa3..3ab0daec 100644 --- a/src/views/example/components/ArticleDetail.vue +++ b/src/views/example/components/ArticleDetail.vue @@ -6,7 +6,7 @@ - Publush + Publish Draft @@ -35,7 +35,7 @@ - diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 7c16db67..e21455ef 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -1,6 +1,6 @@