Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var vm = new Vue({
- el: '#app',
- data: {
- colors: [
- {name: "red", colorCode: ["#ff0000", "#aa0000", "#770000"] },
- {name: "green", colorCode: ["#00ff00", "#00aa00", "#007700"] },
- {name: "blue", colorCode: ["#0000ff", "#0000aa", "#000077"] }
- ]
- },
- partials: {
- tpl_color: '<li>{{$parent.name}} : {{color}} ({{$index + 1}})</li>'
- },
- template: '<template v-repeat="colors">' +
- '<p>{{name}}</p>' +
- '<ul v-repeat="color: colorCode">' +
- '{{> tpl_color}}' +
- '</ul>' +
- '</template>'
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement