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.
Handling of Blade Slots in Vue Slots
- Loading branch information
1 parent
8ff75b2
commit 0a9471f
Showing
18 changed files
with
304 additions
and
330 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,5 +1,11 @@ | ||
<script setup></script> | ||
<template> | ||
<article>Hey from custom Vue component. Here is my slot:</article> | ||
<main><slot></slot></main> | ||
<div dusk="custom-vue-component"> | ||
<p>This Custom Vue Component</p> | ||
|
||
<div style="background: #d3d3d3; padding: 15px"> | ||
<p>Vue Component's slot:</p> | ||
<slot></slot> | ||
</div> | ||
</div> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<script setup></script> | ||
|
||
<div dusk="child-a"> | ||
<p>This is Child A, rendering Child B:</p> | ||
|
||
<x-child-b> | ||
<div style="background: #e3e3e3; padding: 15px;"> | ||
<p>Child A's slot:</p> | ||
{{ $slot }} | ||
</div> | ||
</x-child-b> | ||
</div> |
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,15 @@ | ||
<script setup> | ||
import CustomVueComponent from '@/CustomVueComponent.vue'; | ||
</script> | ||
|
||
<div dusk="child-b"> | ||
<p>This is Child B, rendering a Custom Vue Component</p> | ||
|
||
<div style="background: #f3f3f3; padding: 15px;"> | ||
<p>Child B's slot:</p> | ||
|
||
<CustomVueComponent> | ||
{{ $slot }} | ||
</CustomVueComponent> | ||
</div> | ||
</div> |
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
9 changes: 0 additions & 9 deletions
9
app/resources/views/components/component-with-slot-wrapped-in-element.blade.php
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.