mirror of
https://github.com/vuejs/babel-plugin-jsx.git
synced 2024-11-10 09:39:14 +08:00
test: snap
This commit is contained in:
parent
17c2894067
commit
b2d0394281
@ -262,6 +262,50 @@ _createVNode(_resolveComponent(\\"C\\"), {
|
|||||||
}, null, 8, [\\"model\\", \\"onUpdate:model\\"]);"
|
}, null, 8, [\\"model\\", \\"onUpdate:model\\"]);"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
exports[`v-model target value support variable: v-model target value support variable 1`] = `
|
||||||
|
"import { createVNode as _createVNode, resolveComponent as _resolveComponent, Fragment as _Fragment } from \\"vue\\";
|
||||||
|
const foo = 'foo';
|
||||||
|
|
||||||
|
_createVNode(_Fragment, null, [_createVNode(_resolveComponent(\\"A\\"), {
|
||||||
|
[foo]: xx,
|
||||||
|
[\\"onUpdate\\" + foo]: $event => xx = $event
|
||||||
|
}, null, 16), _createVNode(_resolveComponent(\\"B\\"), {
|
||||||
|
\\"modelValue\\": xx,
|
||||||
|
\\"modelModifiers\\": {
|
||||||
|
\\"a\\": true
|
||||||
|
},
|
||||||
|
\\"onUpdate:modelValue\\": $event => xx = $event
|
||||||
|
}, null, 8, [\\"modelValue\\", \\"onUpdate:modelValue\\"]), _createVNode(_resolveComponent(\\"C\\"), {
|
||||||
|
[foo]: xx,
|
||||||
|
[foo + \\"Modifiers\\"]: {
|
||||||
|
\\"a\\": true
|
||||||
|
},
|
||||||
|
[\\"onUpdate\\" + foo]: $event => xx = $event
|
||||||
|
}, null, 16)]);"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`v-models target value support variable: v-models target value support variable 1`] = `
|
||||||
|
"import { createVNode as _createVNode, resolveComponent as _resolveComponent, Fragment as _Fragment } from \\"vue\\";
|
||||||
|
const foo = 'foo';
|
||||||
|
|
||||||
|
_createVNode(_Fragment, null, [_createVNode(_resolveComponent(\\"A\\"), {
|
||||||
|
[foo]: xx,
|
||||||
|
[\\"onUpdate\\" + foo]: $event => xx = $event
|
||||||
|
}, null, 16), _createVNode(_resolveComponent(\\"B\\"), {
|
||||||
|
\\"modelValue\\": xx,
|
||||||
|
\\"modelModifiers\\": {
|
||||||
|
\\"a\\": true
|
||||||
|
},
|
||||||
|
\\"onUpdate:modelValue\\": $event => xx = $event
|
||||||
|
}, null, 8, [\\"modelValue\\", \\"onUpdate:modelValue\\"]), _createVNode(_resolveComponent(\\"C\\"), {
|
||||||
|
[foo]: xx,
|
||||||
|
[foo + \\"Modifiers\\"]: {
|
||||||
|
\\"a\\": true
|
||||||
|
},
|
||||||
|
[\\"onUpdate\\" + foo]: $event => xx = $event
|
||||||
|
}, null, 16)]);"
|
||||||
|
`;
|
||||||
|
|
||||||
exports[`v-show: v-show 1`] = `
|
exports[`v-show: v-show 1`] = `
|
||||||
"import { withDirectives as _withDirectives, createVNode as _createVNode, vShow as _vShow, createTextVNode as _createTextVNode } from \\"vue\\";
|
"import { withDirectives as _withDirectives, createVNode as _createVNode, vShow as _vShow, createTextVNode as _createTextVNode } from \\"vue\\";
|
||||||
|
|
||||||
|
@ -170,6 +170,28 @@ const tests: Test[] = [
|
|||||||
<div id="custom">Hello</div>
|
<div id="custom">Hello</div>
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'v-model target value support variable',
|
||||||
|
from: `
|
||||||
|
const foo = 'foo';
|
||||||
|
<>
|
||||||
|
<A v-model={[xx, foo]} />
|
||||||
|
<B v-model={[xx, ['a']]} />
|
||||||
|
<C v-model={[xx, foo, ['a']]} />
|
||||||
|
</>
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'v-models target value support variable',
|
||||||
|
from: `
|
||||||
|
const foo = 'foo';
|
||||||
|
<>
|
||||||
|
<A v-models={[[xx, foo]]} />
|
||||||
|
<B v-models={[[xx, ['a']]]} />
|
||||||
|
<C v-models={[[xx, foo, ['a']]]} />
|
||||||
|
</>
|
||||||
|
`,
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
tests.forEach((
|
tests.forEach((
|
||||||
|
Loading…
Reference in New Issue
Block a user