Skip to content

Commit c8adef2

Browse files
committed
fix: v-model on QLayoutDrawer bug quasarframework#2094
1 parent 97baf2a commit c8adef2

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

dev/components/new-layout/new-layout.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@
6363
<q-btn @click="$router.push('/layout-quick/c')">Go to C</q-btn>
6464

6565
<br><br>fffdfs
66+
{{ right }}
67+
<q-input v-model="inp" />
6668

6769
<q-btn @click="$router.replace('/layout-quick/a')">Replace Go to A</q-btn>
6870
<q-btn @click="$router.replace('/layout-quick/b')">Replace Go to B</q-btn>
@@ -391,7 +393,8 @@ export default {
391393
{ label: 'Behave Desktop', value: 'desktop' }
392394
],
393395
394-
showConfig: true
396+
showConfig: true,
397+
inp: ''
395398
}
396399
},
397400
computed: {

src/components/input/QInput.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,9 @@ export default {
281281
__set (e, forceUpdate) {
282282
let val = e && e.target ? e.target.value : e
283283
284+
// avoid "v-model on QLayoutDrawer bug"s #2094
285+
e.stopPropagation()
286+
284287
if (this.isNumber) {
285288
this.isNegZero = (1 / val) === -Infinity
286289
const forcedValue = this.isNegZero ? -0 : val

0 commit comments

Comments
 (0)