亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

關于es6寫法與原生寫法的區別?

export default { ?data () { ? ?return { ? ? ?// note: changing this line won't causes changes ? ? ?// with hot-reload because the reloaded component ? ? ?// preserves its current state and we are modifying ? ? ?// its initial state. ? ? ?msg: 'Hello vue!!' ? ?} ?} } 這個寫是什么意思??

import Vue from 'vue'

new Vue({

? ?el:'#hello',

? ?data:{

? ? ?msg:'hello vue i love you!'

? ?}

})

他們是相等的嗎

正在回答

3 回答

es6也是原生 只是標準不同

第一個是組件寫法?

new Vue 這個實例化#hello;使#hello 繼承vue的方法?

我的理解是這樣

0 回復 有任何疑惑可以回復我~

export default { ?data () { ? ?return { ? ? ?// note: changing this line won't causes changes ? ? ?// with hot-reload because the reloaded component ? ? ?// preserves its current state and we are modifying ? ? ?// its initial state. ? ? ?msg: 'Hello vue!!' ? ?} ?} } 這個寫法是什么意思??

0 回復 有任何疑惑可以回復我~

es6就是原生

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消
vue.js入門基礎
  • 參與學習       209639    人
  • 解答問題       715    個

本門為vuejs入門教程,詳細的講解加實戰,可以幫你進入vuejs的大門

進入課程

關于es6寫法與原生寫法的區別?

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號