mirror of
https://github.com/vuejs/babel-plugin-jsx.git
synced 2024-11-10 09:39:14 +08:00
test: snap for KeepAlive
This commit is contained in:
parent
f1c9629b88
commit
4c69e3ce71
@ -97,6 +97,20 @@ _withDirectives(_createVNode(\\"input\\", {
|
||||
}, null, 8, [\\"onUpdate:modelValue\\"]), [[_vModelText, test]]);"
|
||||
`;
|
||||
|
||||
exports[`named import specifier \`Keep Alive\`: named import specifier \`Keep Alive\` 1`] = `
|
||||
"import { createVNode as _createVNode, createTextVNode as _createTextVNode } from \\"vue\\";
|
||||
import { KeepAlive } from 'vue';
|
||||
|
||||
_createVNode(KeepAlive, null, [_createTextVNode(\\"123\\")]);"
|
||||
`;
|
||||
|
||||
exports[`namespace specifier \`Keep Alive\`: namespace specifier \`Keep Alive\` 1`] = `
|
||||
"import { createVNode as _createVNode, createTextVNode as _createTextVNode } from \\"vue\\";
|
||||
import * as Vue from 'vue';
|
||||
|
||||
_createVNode(Vue.KeepAlive, null, [_createTextVNode(\\"123\\")]);"
|
||||
`;
|
||||
|
||||
exports[`override props multiple: multiple 1`] = `
|
||||
"import { createVNode as _createVNode, resolveComponent as _resolveComponent } from \\"vue\\";
|
||||
|
||||
|
@ -147,6 +147,22 @@ const tests: Test[] = [
|
||||
name: 'use "model" as the prop name',
|
||||
from: '<C v-model={[foo, "model"]} />',
|
||||
},
|
||||
{
|
||||
name: 'named import specifier `Keep Alive`',
|
||||
from: `
|
||||
import { KeepAlive } from 'vue';
|
||||
|
||||
<KeepAlive>123</KeepAlive>
|
||||
`,
|
||||
},
|
||||
{
|
||||
name: 'namespace specifier `Keep Alive`',
|
||||
from: `
|
||||
import * as Vue from 'vue';
|
||||
|
||||
<Vue.KeepAlive>123</Vue.KeepAlive>
|
||||
`,
|
||||
},
|
||||
];
|
||||
|
||||
tests.forEach((
|
||||
|
Loading…
Reference in New Issue
Block a user