LoginSignup
0
0

More than 3 years have passed since last update.

[Nuxt]slotの中でcomponentを呼び出す[vuetify]

Last updated at Posted at 2021-05-03

結論:divで囲む

一応Vuetifyを使っていますが別に普通のslotでもいいと思います。

sample.vue
<template>

      //コンポーネントは表示されない
      <v-radio value="ce" class="mb-2">
        <template v-slot:label>
          <MyComponent /> //←コンポーネントを使いたい
        </template>
      </v-radio>

      //コンポーネントが表示された
      <v-radio value="ce" class="mb-2">
        <template v-slot:label>
          <div><MyComponent /></div>  //←<div>などで囲む
        </template>
      </v-radio>

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0