美文网首页
2018-09-11

2018-09-11

作者: 只留一人爱_1d04 | 来源:发表于2018-09-11 20:26 被阅读0次
    <!DOCTYPE html>

    </html lang=""en">

    <head>

        <meta charset="UTF-8">

        <title>Document</title>

    </head>

    <body>

        <div class="ids">

            <ul>

                <li v-for="value in arr">{{value}}</li>

                <li v-for="val in obj"></li>

                <li v-for="(ins,sda) in  arr"></li>

                <li v-for="value in ars">{{value.num}}{{value.name}}{{value.price}}</li>

            </ul>

            <table border="1">

                <thead>

                    <tr>

                        <th>编号</th>

                        <th>名字</th>

                        <th>单价</th>

                    </tr>

                </thead>

                <tbody>

                    <tr v-for="val in ars">

                        <td>{{val.unm}}</td>

                        <td>{{val.name}}</td>

                        <td>{{val.price}}</td>

                    </tr>

                </tbody>

            </table>

        </div>

        <script src="js/vue.js"></script>

         <script>

             new Vue({

                el:".ids",

                data:{

                    arr:[1,2,23,24],

                    obj:{

                        name:"名字",

                        age:18

                    }

                    ars:[

                        {num:1,name:apple,price:3}

                        {num:2,name:banner,price:2}

                        {num:3,name:orange,price:5}

                    }

                }

        })

         </script>

    </body>

    </html>

相关文章

网友评论

      本文标题:2018-09-11

      本文链接:https://www.haomeiwen.com/subject/wckpgftx.html