From d1f920942ef2b55bb6942334582d5d387bb4f4bd Mon Sep 17 00:00:00 2001 From: cexbrayat Date: Thu, 9 Feb 2023 15:12:52 +0100 Subject: [PATCH] docs: add emits to v-model documentation As reported by https://github.com/vuejs/test-utils/discussions/1969, the `emits` field of a component needs to be defined to properly typecheck. --- docs/guide/advanced/v-model.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/guide/advanced/v-model.md b/docs/guide/advanced/v-model.md index 50dfcbc06..604e11980 100644 --- a/docs/guide/advanced/v-model.md +++ b/docs/guide/advanced/v-model.md @@ -16,6 +16,7 @@ const Editor = { label: String, modelValue: String }, + emits: ['update:modelValue'], template: `
@@ -30,7 +31,7 @@ const App { components: { Editor }, - template: `` + template: ``, data(){ return { text: 'test' @@ -69,7 +70,8 @@ const MoneyEditor = {
`, - props: ['currency', 'modelValue'] + props: ['currency', 'modelValue'], + emits: ['update:currency', 'update:modelValue'] } ```