Vue組件之創建與使用組件

創建vue組件: 使用Vue.component()方法創建組件 Vue.component()有兩個參數 參數1:TagName(標籤名) 參數2:{ template:組件模型如: <div> <h1>{{title}}</h1> <p>{{content}}</p> <p>發表時間:{{Date()}}</p> </div>, props: 組件屬性如: [ 「title」,//在組件模型h
相關文章
相關標籤/搜索