<h3 dir="auto">Version</h3>
<p dir="auto">2.6.6</p>
<h3 dir="auto">Reproduction link</h3>
<p dir="auto"><a href="https://codepen.io/karmiy/pen/pMWVOX" rel="nofollow">https://codepen.io/karmiy/pen/pMWVOX</a></p>
<h3 dir="auto">Steps to reproduce</h3>
<p dir="auto">例如：<br>
父组件app，它有data如text，在template的随便一个地方&lt;input type='text' v-model='text'&gt;{{text}}</p>
<p dir="auto">子组件test是:<br>
Vue.component('logger', {<br>
created() {<br>
console.log('created');<br>
},<br>
render(createElement) {<br>
console.log(9);<br>
return createElement('h1', '1');<br>
}<br>
});</p>
<p dir="auto">这时我们在app这个组件里，使用这个组件，在项目中会在控制台看到打印了9，没什么问题。</p>
<p dir="auto">当尝试去改变input的值来驱动text这个data改变时，控制台也没有任何输出，没有重新去渲染render，很好。</p>
<p dir="auto">但是接下来一个改变问题就来了：</p>
<p dir="auto">将改成333</p>
<p dir="auto">再尝试去改变input的值来驱动text这个data，奇怪的事情发生了，控制台随着text改变，也一直输出9，意味着不断在重新渲染！！(可是text改变和它毫不相关，即不是它的插槽内容，也不是它的props)</p>
<p dir="auto">没有传任何props，slot位置也只是个普通字符串333，没有改变，却因为毫不相关的text导致一直重新渲染<br>
这在高频率text变化时，造成了很严重的性能问题。</p>
<p dir="auto">这是在我用Vue开发Markdown编辑器，文本不断变化时发现的问题，组件里与文本无关的如普通按钮这种中间有slot内容的不断在重复渲染，在编辑器快速触发改变文本时任何带有slot内容的组件都在不断重新渲染导致页面性能问题非常严重</p>
<p dir="auto">一直找不到合适的解决方案，因为在用antd的组件库，改组件是用jsx形式去写vue组件库的，学习了代码后发现有的组件render部分有的逻辑比较复杂，这样高频率的触发render对性能影响太大。。。。求指教，非常感谢！</p>
<h3 dir="auto">What is expected?</h3>
<p dir="auto">如何使333不随毫不相关的data去重复render</p>
<h3 dir="auto">What is actually happening?</h3>
<p dir="auto">毫不相关的data改变，使得拥有slot插槽内容的组件不断重复渲染</p>
<h3 dir="auto">What problem does this feature solve?</h3>
<p dir="auto">The original v-slot implementation was not available in <code class="notranslate">this.$slots</code>, but that was added in 2.6.4. Scoped slots reduce unnecessary re-renders with nested slots, so this change would hopefully provide a performance improvement for component libraries.</p>
<h3 dir="auto">What does the proposed API look like?</h3>
<p dir="auto"><code class="notranslate">&lt;foo&gt;default slot&lt;/foo&gt;</code></p>
<p dir="auto">should output</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="_c('foo',{scopedSlots:_u([{key:&quot;default&quot;,fn:function(){return [_v(&quot;default slot&quot;)]},proxy:true}])})"><pre class="notranslate"><span class="pl-en">_c</span><span class="pl-kos">(</span><span class="pl-s">'foo'</span><span class="pl-kos">,</span><span class="pl-kos">{</span><span class="pl-c1">scopedSlots</span>:<span class="pl-en">_u</span><span class="pl-kos">(</span><span class="pl-kos">[</span><span class="pl-kos">{</span><span class="pl-c1">key</span>:<span class="pl-s">"default"</span><span class="pl-kos">,</span><span class="pl-en">fn</span>:<span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">{</span><span class="pl-k">return</span> <span class="pl-kos">[</span><span class="pl-en">_v</span><span class="pl-kos">(</span><span class="pl-s">"default slot"</span><span class="pl-kos">)</span><span class="pl-kos">]</span><span class="pl-kos">}</span><span class="pl-kos">,</span><span class="pl-c1">proxy</span>:<span class="pl-c1">true</span><span class="pl-kos">}</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">Equivalent to <code class="notranslate">&lt;foo v-slot&gt;default slot&lt;/foo&gt;</code></p>
<hr>
<p dir="auto">Note <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="414810527" data-permission-text="Title is private" data-url="https://github.com/vuejs/vue/issues/9580" data-hovercard-type="issue" data-hovercard-url="/vuejs/vue/issues/9580/hovercard" href="https://github.com/vuejs/vue/issues/9580">#9580</a> could be a problem if lots of people rely on that behaviour.</p>