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.
- Loading branch information
1 parent
d210c50
commit 6d15d1e
Showing
11 changed files
with
153 additions
and
3 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
1 change: 0 additions & 1 deletion
1
app/tests/Unit/Console/__snapshots__/BuildComponentsTest__it_builds_the_components__12.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,5 +1,4 @@ | ||
<script setup> | ||
import {} from 'vue' | ||
const props = defineProps({ | ||
spladeBridge: Object, | ||
spladeTemplateId: String, | ||
|
16 changes: 16 additions & 0 deletions
16
app/tests/Unit/Console/__snapshots__/BuildComponentsTest__it_builds_the_components__15.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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<script setup> | ||
import { ref } from 'vue' | ||
const props = defineProps({ spladeBridge: Object, spladeTemplateId: String }) | ||
const childVar = ref("What's that, Hawaiian Noises?") | ||
const spladeRender = { | ||
name: 'SpladeComponentChildRender', | ||
template: spladeTemplates[props.spladeTemplateId], | ||
props: { spladeBridge: Object, spladeTemplateId: String }, | ||
data: () => ({ childVar }), | ||
} | ||
</script> | ||
<template> | ||
<spladeRender :splade-bridge="spladeBridge" :splade-template-id="spladeTemplateId"> | ||
<template v-for="(_, slot) of $slots" #[slot]="scope"><slot :name="slot" v-bind="scope" /></template> | ||
</spladeRender> | ||
</template> |
19 changes: 19 additions & 0 deletions
19
app/tests/Unit/Console/__snapshots__/BuildComponentsTest__it_builds_the_components__16.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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<script setup> | ||
const props = defineProps({ spladeBridge: Object, spladeTemplateId: String }) | ||
const emit = defineEmits(['trigger']) | ||
const trigger = () => { | ||
emit('trigger') | ||
} | ||
const spladeRender = { | ||
name: 'SpladeComponentEmitRender', | ||
template: spladeTemplates[props.spladeTemplateId], | ||
props: { spladeBridge: Object, spladeTemplateId: String }, | ||
data: () => ({ emit, trigger }), | ||
} | ||
</script> | ||
<template> | ||
<spladeRender :splade-bridge="spladeBridge" :splade-template-id="spladeTemplateId"> | ||
<template v-for="(_, slot) of $slots" #[slot]="scope"><slot :name="slot" v-bind="scope" /></template> | ||
</spladeRender> | ||
</template> |
24 changes: 24 additions & 0 deletions
24
app/tests/Unit/Console/__snapshots__/BuildComponentsTest__it_builds_the_components__17.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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<script setup> | ||
import { ref } from 'vue' | ||
const props = defineProps({ | ||
spladeBridge: Object, | ||
spladeTemplateId: String, | ||
title: { type: String, required: false, default: 'Default title' }, | ||
}) | ||
const subtitle = ref('Default subtitle') | ||
const spladeRender = { | ||
name: 'SpladeComponentPropsInTemplateRender', | ||
template: spladeTemplates[props.spladeTemplateId], | ||
props: { | ||
spladeBridge: Object, | ||
spladeTemplateId: String, | ||
title: { type: String, required: false, default: 'Default title' }, | ||
}, | ||
data: () => ({ subtitle }), | ||
} | ||
</script> | ||
<template> | ||
<spladeRender :title="title" :splade-bridge="spladeBridge" :splade-template-id="spladeTemplateId"> | ||
<template v-for="(_, slot) of $slots" #[slot]="scope"><slot :name="slot" v-bind="scope" /></template> | ||
</spladeRender> | ||
</template> |
23 changes: 23 additions & 0 deletions
23
app/tests/Unit/Console/__snapshots__/BuildComponentsTest__it_builds_the_components__18.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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<script setup> | ||
import { ref } from 'vue' | ||
const props = defineProps({ spladeBridge: Object, spladeTemplateId: String }) | ||
const rootCounter = ref(0) | ||
const emit = defineEmits(['incremented']) | ||
function increment() { | ||
rootCounter.value++ | ||
emit('incremented') | ||
} | ||
const spladeRender = { | ||
name: 'SpladeComponentRootRender', | ||
template: spladeTemplates[props.spladeTemplateId], | ||
props: { spladeBridge: Object, spladeTemplateId: String }, | ||
data: () => ({ emit, increment, rootCounter }), | ||
} | ||
</script> | ||
<template> | ||
<spladeRender :splade-bridge="spladeBridge" :splade-template-id="spladeTemplateId"> | ||
<template v-for="(_, slot) of $slots" #[slot]="scope"><slot :name="slot" v-bind="scope" /></template> | ||
</spladeRender> | ||
</template> |
20 changes: 20 additions & 0 deletions
20
app/tests/Unit/Console/__snapshots__/BuildComponentsTest__it_builds_the_components__19.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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<script setup> | ||
import { ref } from 'vue' | ||
const props = defineProps({ spladeTemplateId: String }) | ||
const show = ref(false) | ||
function toggle() { | ||
show.value = !show.value | ||
} | ||
const spladeRender = { | ||
name: 'SpladeEmitRender', | ||
template: spladeTemplates[props.spladeTemplateId], | ||
props: { spladeTemplateId: String }, | ||
data: () => ({ show, toggle }), | ||
} | ||
</script> | ||
<template> | ||
<spladeRender :splade-template-id="spladeTemplateId"> | ||
<template v-for="(_, slot) of $slots" #[slot]="scope"><slot :name="slot" v-bind="scope" /></template> | ||
</spladeRender> | ||
</template> |
20 changes: 20 additions & 0 deletions
20
app/tests/Unit/Console/__snapshots__/BuildComponentsTest__it_builds_the_components__20.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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<script setup> | ||
import { ref } from 'vue' | ||
const props = defineProps({ spladeTemplateId: String }) | ||
const title = ref('Default title') | ||
function updateTitle() { | ||
title.value = 'New title' | ||
} | ||
const spladeRender = { | ||
name: 'SpladePropsInTemplateRender', | ||
template: spladeTemplates[props.spladeTemplateId], | ||
props: { spladeTemplateId: String }, | ||
data: () => ({ title, updateTitle }), | ||
} | ||
</script> | ||
<template> | ||
<spladeRender :splade-template-id="spladeTemplateId"> | ||
<template v-for="(_, slot) of $slots" #[slot]="scope"><slot :name="slot" v-bind="scope" /></template> | ||
</spladeRender> | ||
</template> |
16 changes: 16 additions & 0 deletions
16
app/tests/Unit/Console/__snapshots__/BuildComponentsTest__it_builds_the_components__21.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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<script setup> | ||
import { ref } from 'vue' | ||
const props = defineProps({ spladeTemplateId: String }) | ||
const layoutCounter = ref(0) | ||
const spladeRender = { | ||
name: 'SpladeSlotRender', | ||
template: spladeTemplates[props.spladeTemplateId], | ||
props: { spladeTemplateId: String }, | ||
data: () => ({ layoutCounter }), | ||
} | ||
</script> | ||
<template> | ||
<spladeRender :splade-template-id="spladeTemplateId"> | ||
<template v-for="(_, slot) of $slots" #[slot]="scope"><slot :name="slot" v-bind="scope" /></template> | ||
</spladeRender> | ||
</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