fix: declared emitted event in the emits option

This commit is contained in:
Amour1688 2020-10-29 14:09:56 +08:00
parent cc1d9679dc
commit 1ba60fbc85

View File

@ -6,6 +6,7 @@ test('single value binding should work', async () => {
props: {
foo: Number,
},
emits: ['update:foo'],
setup(props, { emit }) {
const handleClick = () => {
emit('update:foo', 3);
@ -39,6 +40,7 @@ test('multiple values binding should work', async () => {
foo: Number,
bar: Number,
},
emits: ['update:foo', 'update:bar'],
setup(props, { emit }) {
const handleClick = () => {
emit('update:foo', 3);
@ -91,6 +93,7 @@ test('modifier should work', async () => {
default: () => ({ double: false }),
},
},
emits: ['update:foo'],
setup(props, { emit }) {
const handleClick = () => {
emit('update:foo', 3);