Last active
June 30, 2022 20:25
-
-
Save cn-2k/e7478c1b83e1e92d0937fc48675228c5 to your computer and use it in GitHub Desktop.
Revisions
-
cn-2k revised this gist
Jun 30, 2022 . 1 changed file with 3 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,22 +1,17 @@ <template> <div> <nav v-if="slots.myNamedSlot" > <slot name="myNamedSlot" /> </nav> </div> </template> <script setup> import { useSlots } from 'vue' const slots = useSlots() </script> <style> -
cn-2k revised this gist
Jun 30, 2022 . 1 changed file with 7 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,14 @@ <template> <div> <nav v-if="content" > <slot name="myNamedSlot" /> </nav> </div> </template> <script setup lang="ts"> import { useSlots, ref } from 'vue' const content = ref(false) -
cn-2k revised this gist
Jun 30, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ </template> <script setup> import { useSlots, ref } from 'vue' const content = ref(false) const slots = useSlots() -
cn-2k revised this gist
Jun 30, 2022 . 1 changed file with 3 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,6 @@ <template> <div v-if="content"> <slot name="myNamedSlot" /> </div> </template> @@ -14,7 +10,7 @@ import { useSlots, ref, computed } from 'vue' const content = ref(false) const slots = useSlots() if (slots.myNamedSlot) { content.value = true } </script> -
cn-2k created this gist
Jun 30, 2022 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ <template> <div> <nav v-if="content" > <slot name="contentEnd" /> </nav> </div> </template> <script setup> import { useSlots, ref, computed } from 'vue' const content = ref(false) const slots = useSlots() if (slots.contentEnd) { content.value = true } </script> <style> </style>