-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
69b325c
commit 60237d9
Showing
13 changed files
with
620 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<script setup lang="tsx"> | ||
import { ref } from 'vue' | ||
let model = ref('model') | ||
const Comp = (props) => { | ||
console.log(props) | ||
return <input value={props.modelValue} onInput={e=>props['onUpdate:modelValue'](e.target.value)} /> | ||
} | ||
const Render = ( | ||
<> | ||
<input v-model={model.value}></input> | ||
<Comp v-model={model.value} /> | ||
{model.value} | ||
</> | ||
) | ||
defineRender(Render) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<script setup lang="tsx"> | ||
import { ref } from 'vue' | ||
let show = ref(false) | ||
const Render = ( | ||
<> | ||
<input v-model={show.value} type="checkbox"/> | ||
<span v-show={show.value}>{show.value}</span> | ||
</> | ||
) | ||
defineRender(Render) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { transformVModel as _transformVModel } from '@vue-vapor/compiler-vapor' | ||
import { resolveDirectiveNode, resolveNode } from '../utils' | ||
import type { DirectiveTransform } from '../transform' | ||
|
||
export const transformVModel: DirectiveTransform = (dir, node, context) => { | ||
return _transformVModel( | ||
resolveDirectiveNode(dir, context), | ||
resolveNode(node, context), | ||
context as any, | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { transformVShow as _transformVShow } from '@vue-vapor/compiler-vapor' | ||
import { resolveDirectiveNode, resolveNode } from '../utils' | ||
import type { DirectiveTransform } from '../transform' | ||
|
||
export const transformVShow: DirectiveTransform = (dir, node, context) => { | ||
return _transformVShow( | ||
resolveDirectiveNode(dir, context), | ||
resolveNode(node, context), | ||
context as any, | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`compiler: v-show transform > simple expression 1`] = ` | ||
"import { vShow as _vShow, withDirectives as _withDirectives, template as _template } from 'vue/vapor'; | ||
const t0 = _template("<div></div>") | ||
export function render(_ctx) { | ||
const n0 = t0() | ||
_withDirectives(n0, [[_vShow, () => "foo"]]) | ||
return n0 | ||
}" | ||
`; |
Oops, something went wrong.