diff --git a/src/core/view/components/input/index.vue b/src/core/view/components/input/index.vue index 6777ef3dde466adffd8c3c7bda007605db9ed660..bb97d65d53ceffeca2397512b9abad88cf3fb1b8 100644 --- a/src/core/view/components/input/index.vue +++ b/src/core/view/components/input/index.vue @@ -185,9 +185,13 @@ export default { }, methods: { _onKeyup ($event) { + const input = $event.target this.$trigger('confirm', $event, { - value: $event.target.value + value: input.value }) + if (!this.confirmHold) { + input.blur() + } }, _onInput ($event, force) { let outOfMaxlength = false diff --git a/src/core/view/components/textarea/index.vue b/src/core/view/components/textarea/index.vue index e3256167328e4d30b5044d8af2e92903c79ca537..fb182e3da5535def184dbbd6e42d4532030c19d2 100644 --- a/src/core/view/components/textarea/index.vue +++ b/src/core/view/components/textarea/index.vue @@ -187,7 +187,7 @@ export default { _onKeyUpEnter: function ($event) { if (this.isDone) { this._confirm($event) - this.$refs.textarea.blur() + !this.confirmHold && this.$refs.textarea.blur() } }, _onCompositionstart ($event) { diff --git a/src/core/view/mixins/field.js b/src/core/view/mixins/field.js index 41221ba6082bf4aa454b1800aa6fc5e7a57c1ff4..3821269f1b2710a7718c45356a0c444abdc239fd 100644 --- a/src/core/view/mixins/field.js +++ b/src/core/view/mixins/field.js @@ -62,6 +62,10 @@ export default { selectionEnd: { type: [Number, String], default: -1 + }, + confirmHold: { + type: Boolean, + default: false } }, data () { diff --git a/src/platforms/app-plus/service/api/location/get-location.js b/src/platforms/app-plus/service/api/location/get-location.js index 24978b687adc8f51f57072f148d323dbaa9bd284..cb2ac401496df26b9773b79a4d08bd1d97b5fc98 100644 --- a/src/platforms/app-plus/service/api/location/get-location.js +++ b/src/platforms/app-plus/service/api/location/get-location.js @@ -70,7 +70,7 @@ export function getLocation ({ errorCallback(e) }, { geocode: geocode, - enableHighAccuracy: isHighAccuracy || altitude, + enableHighAccuracy: isHighAccuracy || altitude, timeout: highAccuracyExpireTime } )