Skip to content

Help with vue-list-view? Please #6

@ghost

Description

Hello, please could help me.
I'm trying to create a list using vue-list-view.
But it is very difficult to do I followed the examples with an unexpected result.
My list is generated empty without its contents.

Please could give me an example of the use of vue-list-view, a small example that you can download and put to work quickly to learn how to use it properly?

The Demo despite being incredible can not see your code.

This is my code.

Js

var ListView = require('./vue-list-view/lib/list-view');

var myListView = ListView.default({
    template: '<div>{{ item.foo }}{{ item.bar }}</div>'
})

Vue.component('my-list-view', myListView)

new Vue({
    el: '#list',
    data: {
        myArr: [{foo:'a',bar:'b'},{foo:'c',bar:'d'},{foo:'a',bar:'b'},{foo:'c',bar:'d'},{foo:'a',bar:'b'},{foo:'c',bar:'d'},{foo:'a',bar:'b'},{foo:'c',bar:'d'},{foo:'a',bar:'b'},{foo:'c',bar:'d'},{foo:'a',bar:'b'},{foo:'c',bar:'d'},{foo:'a',bar:'b'},{foo:'c',bar:'d'},{foo:'a',bar:'b'},{foo:'c',bar:'d'},{foo:'a',bar:'b'},{foo:'c',bar:'d'},{foo:'a',bar:'b'},{foo:'c',bar:'d'}]
    }
})

HTML

<!doctype html>
<html class="no-js" lang="">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="x-ua-compatible" content="ie=edge">
        <title></title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="apple-touch-icon" href="http://github.com/apple-touch-icon.png">
        <!-- Place favicon.ico in the root directory -->
        <link rel="stylesheet" href="http://github.com/css/normalize.css">
        <link rel="stylesheet" href="http://github.com/css/main.css">
        <script src="http://github.com/js/vendor/modernizr-2.8.3.min.js"></script>
    </head>
    <body>
        <!--[if lt IE 8]> <p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p> <![endif]-->

        <h4>Star</h4>
        <div id="list">
            <my-list-view :items="myArr"></my-list-view>
        </div>
        <h4>End</h4>

        <script>window.jQuery || document.write('<script src="http://github.com/js/vendor/jquery-1.12.0.min.js"><\/script>')</script>
        <script src="http://github.com/js/vue.min.js"></script>
        <script src="http://github.com/js/app.js"></script>

    </body>
</html>

But the generated list is empty.

Image example

Thank you very much

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions