mirror of
https://github.com/vuejs/babel-plugin-jsx.git
synced 2025-01-10 16:29:12 +08:00
fix: declared emitted event in the emits option
This commit is contained in:
parent
cc1d9679dc
commit
1ba60fbc85
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user