<input type="text" class="form-control" v-model="schedule.cronExpression" placeholder="如:0 0 12 * * ?"/>
如何把值付给这个model并且在输入框显示出来呢

解决方案 »

  1.   

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Vue 测试实例 </title>
    <script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
    </head>
    <body>
    <div id="app">
      <input type="text" class="form-control" v-model="schedule.cronExpression" placeholder="如:0 0 12 * * ?"/>
    </div><script>
    new Vue({
      el: '#app',
      data: {
        schedule:{cronExpression:'0 0 12 * * ?ABC'}
      }
    })
    </script>
    </body>
    </html>