mirror of
https://github.com/vuejs/babel-plugin-jsx.git
synced 2025-01-25 15:49:09 +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: {
|
props: {
|
||||||
foo: Number,
|
foo: Number,
|
||||||
},
|
},
|
||||||
|
emits: ['update:foo'],
|
||||||
setup(props, { emit }) {
|
setup(props, { emit }) {
|
||||||
const handleClick = () => {
|
const handleClick = () => {
|
||||||
emit('update:foo', 3);
|
emit('update:foo', 3);
|
||||||
@ -39,6 +40,7 @@ test('multiple values binding should work', async () => {
|
|||||||
foo: Number,
|
foo: Number,
|
||||||
bar: Number,
|
bar: Number,
|
||||||
},
|
},
|
||||||
|
emits: ['update:foo', 'update:bar'],
|
||||||
setup(props, { emit }) {
|
setup(props, { emit }) {
|
||||||
const handleClick = () => {
|
const handleClick = () => {
|
||||||
emit('update:foo', 3);
|
emit('update:foo', 3);
|
||||||
@ -91,6 +93,7 @@ test('modifier should work', async () => {
|
|||||||
default: () => ({ double: false }),
|
default: () => ({ double: false }),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
emits: ['update:foo'],
|
||||||
setup(props, { emit }) {
|
setup(props, { emit }) {
|
||||||
const handleClick = () => {
|
const handleClick = () => {
|
||||||
emit('update:foo', 3);
|
emit('update:foo', 3);
|
||||||
|
Loading…
Reference in New Issue
Block a user