事出有因
之前面試被問(wèn)到的native和self相關(guān)問(wèn)題,self我覺(jué)得自己應(yīng)該能回答出來(lái),可能被之前一小時(shí)的問(wèn)題整懵逼了。尷尬~~
自己研究了一下,不足之處望補(bǔ)充,相互進(jìn)步
native
修飾符native,有什么用
惡補(bǔ)一下
結(jié)合代碼說(shuō)得明白
<body> <div id="app"> <div class="box" > <Son @click='handler1'></Son> </div> </div> </body> <script> const Son = Vue.component('Son', { template: '<button @mouseover=handler2 class="box1">son</button>', methods: { handler2 (e) { } } }) new Vue({ el: "#app", components: { Son }, data() { return { a: 123 } }, methods: { handler1 (e) { console.log('父級(jí)') } } }) </script>
名稱欄目:Vue事件修飾符native、self示例詳解-創(chuàng)新互聯(lián)
地址分享:http://jinyejixie.com/article48/ddsihp.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供建站公司、微信公眾號(hào)、品牌網(wǎng)站制作、網(wǎng)站設(shè)計(jì)公司、電子商務(wù)、網(wǎng)站導(dǎo)航
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容