At the moment I pass some parameters into a vue component
<Slider
:images= "['/img/work/slide2.png', '/img/work/slide2.png', '/img/work/slide3.png']"
:html="['<div>hello</div>', '<div>goodbye</div>']"
</Slider>
The slider is either an 'html' slider or one with images.
This works fine although the html I pass in is going to get a lot more complex, maybe 30 lines and this will be harder to read and manage as params.
Can I pass in an external reference and pull that into the component?
<div v-for="content in html">
<div class="work-slide">{{ content }}</div>
</div>
As you can see the loop in the component is a very simple v-for.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…