建立一個Vue的實例

var vm = new Vue({
  // options
})

A Vue application consists of a root Vue instance created with new Vue, optionally organized into a tree of nested, reusable components. For example, a todo app’s component tree might look like this:

Root Instance
└─ TodoList
   ├─ TodoItem
   │  ├─ DeleteTodoButton
   │  └─ EditTodoButton
   └─ TodoListFooter
      ├─ ClearTodosButton
      └─ TodoListStatistics

上述是在官方文檔中可以看見的描述

以一個TodoList來說 可拆分為TodoItem以及TodoListFooter兩個組件,而這兩個組件又噁以分為更加細部的組件

刪除代辦事項的按鈕(DeleteTodoButton)以及修改代辦事項的按鈕(EditTodoButton)等

results matching ""

    No results matching ""