<!DOCTYPE html> <html> <head> <title></title> <script src="vue.min.js"></script> <script type="text/javascript">var demo = new Vue({ el: '#demo', data: { title: 'todos', todos: [ { done: true, content: 'Learn JavaScript' }, { done: false, content: 'Learn Vue.js' } ] } }) </script> </head> <body> <div id="demo"> <h1>{{title | uppercase}}</h1> <ul> <li v-repeat="todos" v-on="click: done = !done" class="{{done ? 'done' : ''}}"> {{content}} </li> </ul> </div> </body> </html>
引入的vue.min.js路径是对的,但这个就是现实不了我要的功能,大伙帮我看看吧 很是感激
vue 需要依赖别的js库么?
src="vue.min.js"表示怀疑