<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>letitride</author_name>
  <author_url>https://blog.hatena.ne.jp/letitride/</author_url>
  <blog_title>追憶行</blog_title>
  <blog_url>https://www.letitride.jp/</blog_url>
  <categories>
    <anon>テック</anon>
    <anon>テック-Vue.js</anon>
  </categories>
  <description>勉強したことメモ。 子コンポーネントにHTML要素やinnerTextを渡したい場合、slotを利用できる。 例えば、 &lt;header-component&gt; &lt;h1 slot=&quot;header&quot;&gt;ここから&lt;div&gt;div要素も含めて&lt;/div&gt;ここまで。&lt;/h1&gt; &lt;/header-component&gt; のように定義すると、子コンポーネントから&lt;slot name=&quot;header&quot;&gt;&lt;/slot&gt;とすることで、要素を差し替えることができる。 Vue.component('header-component',{ template: '&lt;div&gt;&lt;slot name=&quot;header&quot;&gt;&lt;/slot&gt;…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.letitride.jp%2Fentry%2F2020%2F04%2F16%2F095606&quot; title=&quot;Vue 子コンポーネントにHTML要素を渡す - 追憶行&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-04-16 09:56:06</published>
  <title>Vue 子コンポーネントにHTML要素を渡す</title>
  <type>rich</type>
  <url>https://www.letitride.jp/entry/2020/04/16/095606</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
