Vue的实例

Every Vue application starts with a single Vue component instance as the application root. Any other Vue component created in the same application needs to be nested inside this root component.

每个 Vue 应用都以一个 Vue 组件实例作为应用的根开始。在同一个应用中创建的任何其他 Vue 组件都需要嵌套在这个根组件内部。

In Vue 2, Vue exposes a Vue class (or JavaScript function) for you to create a Vue component instance based on a set of configuration options, using the following syntax:

在 Vue 2 中,Vue 暴露了一个 Vue 类(或 JavaScript 函数),你可以基于一组配置选项使用以下语法创建一个 Vue 组件实例:

const App = {
   
    
    
  //component's options
}
const app = 

猜你喜欢

转载自blog.csdn.net/qq_37703224/article/details/146518682