Persistent layout with Vue 3.2 setup script #873
Answered
by
ajnsn
ibrunotome
asked this question in
Help (Vue)
-
Versions:
Describe the problem:In the docs the persistent layout in vue 3 is easy with <script lang="ts">
import Layout from './Layout'
export default {
layout: Layout,
}
</script> How to set persistent layout in new vue 3.2 setup script that doesn't need the export default section? <script lang="ts" setup>
import Layout from './Layout' // after the import, the Layout is already available to be used in <template>
</script> |
Beta Was this translation helpful? Give feedback.
Answered by
ajnsn
Sep 13, 2021
Replies: 1 comment 1 reply
-
@ibrunotome Vue Docs: <script>
export default {
layout: Layout,
}
</script>
<script setup>
...
</script> |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
ibrunotome
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@ibrunotome Vue Docs:
<script setup>
can be used alongside normal<script>
, this should work?