标签:head avalon tle pre lang rip method 使用 cli
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>avalon使用例子 v-for的例子</title> </head> <body> <script src="//cdn.bootcss.com/avalon.js/2.0s/avalon.min.js"></script> <!-- html --> <div ms-controller="page"> <ul> <li ms-for="(i,v) in @data.arrList"> <input type="text" ms-duplex="v.name">{{v.name}} <button ms-click="@methods.get(v.name)">按钮</button> </li> </ul> </div> <!-- js --> <script> var vm = avalon.define({ $id:‘page‘, data:{ arrList:[ {name:"ajia",sex:"boy"}, {name:"ajia1",sex:"boy1"}, {name:"ajia2",sex:"boy2"} ] }, methods:{ get:function(index){ console.log(index); } } }) </script> </body> </html>
标签:head avalon tle pre lang rip method 使用 cli
原文地址:http://www.cnblogs.com/zhujiasheng/p/6711425.html