Last active
September 4, 2018 03:23
-
-
Save 1c7/7267d5789eb9883c7883fc0dfe7b78fd to your computer and use it in GitHub Desktop.
Vue, v-for, display special element in certain position
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is written in Pug syntax. not HTML. but same thing. Pug would compile to HTML | |
template(v-for='(l, index) in list') | |
topic-card(:topic='t', :key='t.id') | |
template(v-if='index == 2') | |
// [IMPORTANT: display your specifial element here] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The point here is
use
v-for
+template
syntax in Vue.js