Ask questionsCan not clear slot content with [email protected]
2.5.3
https://jsfiddle.net/yibuyisheng/s5xoxmv1/6/
Create a Base Component with a slot, and pass in the slot with template tag with empty content.
The empty template slot should clear the content of Base Component's corresponding slot.
Did not clear the content.
However, the [email protected] do the right thing: https://jsfiddle.net/yibuyisheng/s5xoxmv1/7/
<!-- generated by vue-issues. DO NOT REMOVE -->
Answer
questions
alexshink
So far, the best I've come up with is to use an empty separate component with a template:
<i v-if="false"></i>, which allows you to bypass the rendering of unnecessary empty tags.
Related questions