This repository has been archived by the owner on Feb 27, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from protonemedia/experimental-props-passthrough
Improved props passthrough
- Loading branch information
Showing
20 changed files
with
258 additions
and
107 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
<x-layout> | ||
<x-props-in-template /> | ||
<script setup> | ||
const title = ref('Default title') | ||
function updateTitle() { | ||
title.value = 'New title' | ||
} | ||
</script> | ||
|
||
<x-props-in-template v-bind:title="title" /> | ||
|
||
<button @click="updateTitle">Update title</button> | ||
</x-layout> |
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
7 changes: 3 additions & 4 deletions
7
app/tests/Unit/Console/__snapshots__/BuildComponentsTest__it_builds_the_components__10.vue
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 |
---|---|---|
@@ -1,16 +1,15 @@ | ||
<script setup> | ||
import { h, ref } from 'vue' | ||
const props = defineProps({ spladeTemplateId: String }) | ||
const message = ref('Hello Included view!') | ||
const spladeRender = h({ | ||
name: 'SpladeIncludedViewRender', | ||
template: spladeTemplates[props.spladeTemplateId], | ||
data: () => { | ||
return { ...props, message } | ||
return { message } | ||
}, | ||
props: { spladeTemplateId: String }, | ||
}) | ||
</script> | ||
<template><spladeRender /></template> | ||
<template><spladeRender :splade-template-id="spladeTemplateId" /></template> |
7 changes: 3 additions & 4 deletions
7
app/tests/Unit/Console/__snapshots__/BuildComponentsTest__it_builds_the_components__11.vue
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 |
---|---|---|
@@ -1,16 +1,15 @@ | ||
<script setup> | ||
import { h, ref } from 'vue' | ||
const props = defineProps({ spladeTemplateId: String }) | ||
const message = ref('Hello World!') | ||
const spladeRender = h({ | ||
name: 'SpladeRegularViewRender', | ||
template: spladeTemplates[props.spladeTemplateId], | ||
data: () => { | ||
return { ...props, message } | ||
return { message } | ||
}, | ||
props: { spladeTemplateId: String }, | ||
}) | ||
</script> | ||
<template><spladeRender /></template> | ||
<template><spladeRender :splade-template-id="spladeTemplateId" /></template> |
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
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
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
Oops, something went wrong.