第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
  • 模板指的就是掛載點(diǎn)里面的內(nèi)容

    查看全部
  • data:數(shù)據(jù)全部放data里面

    查看全部
  • el:指綁定哪個(gè)元素!

    查看全部
  • my hvr. v
    61
    查看全部
  • nvm r u know fecb
    kebmHbep canceled hh.hh hhh
    查看全部
  • rbr ju$ts
    查看全部
  • aqa3376336 fewwwgg
    阿拉啊啊-- -
    644
    叫我。a嗎3 =-6就@。亞奧就是阿拉
    ==愛上了-/4@按時(shí)睡覺%%*466%na
    aasaaaaasoso.-
    04#
    #_##mqaaw
    查看全部
    0 采集 收起 來源:課程介紹

    2023-06-14

  • )丫?:‘冫濟(jì)141′o 疒?0
    查看全部
  • ? ? <div id="root">

    ? ? ? ? <div>

    ? ? ? ? ? ? <input v-model="inputValue" />

    ? ? ? ? ? ? <button @click="addValue">提交</button>

    ? ? ? ? ? ? <button @click="deleteValue">刪除</button>

    ? ? ? ? </div>

    ? ? ? ? <ul>

    ? ? ? ? ? ? <li v-for="(item,index) of list" :key="index">

    ? ? ? ? ? ? ? ? {{item}}

    ? ? ? ? ? ? </li>

    ? ? ? ? </ul>

    ? ? </div>

    ? ? <script>

    ? ? ? ? new Vue({

    ? ? ? ? ? ? el: "#root",

    ? ? ? ? ? ? data: {

    ? ? ? ? ? ? ? ? inputValue: '',

    ? ? ? ? ? ? ? ? list: []

    ? ? ? ? ? ? },

    ? ? ? ? ? ? methods: {

    ? ? ? ? ? ? ? ? addValue: function() {

    ? ? ? ? ? ? ? ? ? ? this.list.push(this.inputValue)

    ? ? ? ? ? ? ? ? ? ? this.inputValue = ''

    ? ? ? ? ? ? ? ? },

    ? ? ? ? ? ? ? ? deleteValue: function() {

    ? ? ? ? ? ? ? ? ? ? this.list.pop()

    ? ? ? ? ? ? ? ? }

    ? ? ? ? ? ? }

    ? ? ? ? })

    ? ? </script>

    查看全部
  • <!DOCTYPE html>

    <html>

    <head>

    ? ? <meta charset="UTF-8">

    ? ? <title>TodoList</title>

    ? ? <script src="./vue.js"></script>

    </head>

    <body>

    ? ? <div id="root">

    ? ? ? ? <div>

    ? ? ? ? ? ? <input v-model="inputValue" />

    ? ? ? ? ? ? <button @click="handleSubmit">提交</button>

    ? ? ? ? </div>

    ? ? ? ? <ul>

    ? ? ? ? ? ? <todo-item?

    ? ? ? ? ? ? ? ? v-for="(item, index) of list"?

    ? ? ? ? ? ? ? ? :key="index"

    ? ? ? ? ? ? ? ? :content="item"

    ? ? ? ? ? ? ? ? :index="index"

    ? ? ? ? ? ? ? ? @delete="handleDelete"

    ? ? ? ? ? ? >

    ? ? ? ? ? ? </todo-item>

    ? ? ? ? </ul>

    ? ? </div>??

    ? ? <script>

    ? ? ? ? Vue.component('todo-item', {

    ? ? ? ? ? ? props: ['content', 'index'],

    ? ? ? ? ? ? template: '<li @click="handleClick">{{content}}</li>',

    ? ? ? ? ? ? methods: {

    ? ? ? ? ? ? ? ? handleClick: function() {

    ? ? ? ? ? ? ? ? ? ? this.$emit('delete', 'index');

    ? ? ? ? ? ? ? ? }

    ? ? ? ? ? ? }

    ? ? ? ? })

    ? ? ? ? new Vue({

    ? ? ? ? ? ? el:"#root",

    ? ? ? ? ? ? data: {

    ? ? ? ? ? ? ? ? inputValue: '',

    ? ? ? ? ? ? ? ? list: []

    ? ? ? ? ? ? },

    ? ? ? ? ? ? methods: {

    ? ? ? ? ? ? ? ? handleSubmit: function() {

    ? ? ? ? ? ? ? ? ? ? this.list.push(this.inputValue)

    ? ? ? ? ? ? ? ? ? ? this.inputValue = ''

    ? ? ? ? ? ? ? ? },

    ? ? ? ? ? ? ? ? handleDelete: function(index) {

    ? ? ? ? ? ? ? ? ? ? this.list.splice(index, 1);

    ? ? ? ? ? ? ? ? }

    ? ? ? ? ? ? }

    ? ? ? ? })

    ? ? </script>

    </body>

    </html>

    查看全部
  • scoped 表示樣式只針對(duì)該組件,一般不會(huì)去掉,否則全局都會(huì)同名調(diào)用。

    查看全部
  • 父組件定義的模板,模板會(huì)顯示父組件list的數(shù)據(jù)

    創(chuàng)建子組件todo-item,傳遞名為content和index參數(shù)對(duì)應(yīng)item,index的值。

    子組件props聲明傳遞的參數(shù),

    當(dāng)點(diǎn)擊的時(shí)候handleClick,this.$emit會(huì)向外觸發(fā)一個(gè)名為'delete'的事件,事件的值為this.index,

    父組件創(chuàng)建子組件的時(shí)候@delete監(jiān)聽該事件,當(dāng)觸發(fā)delete事件的時(shí)候會(huì)觸發(fā)父組件handleDelete方法。

    查看全部
  • 每一個(gè)Vue.component組件都是一個(gè)Vue的實(shí)例

    如果實(shí)例沒有定義template模板的方法,那么就尋找el掛載點(diǎn)根標(biāo)簽作為它的模板

    Vue實(shí)例就是一個(gè)組件,每個(gè)組件也是一個(gè)Vue。

    每一個(gè)主鍵中都可以綁定@click點(diǎn)擊事件和添加methods方法

    查看全部
  • Vue.component 定義全局組件

    : content='itemxx' ?傳遞值參數(shù)

    props: ['content'], ?聲明接收名字為content 的參數(shù),不然{{content}} 無法接收傳遞的參數(shù)

    查看全部
  • Vue.component() 定義全局組件

    定義局部主鍵

    var TodoXxx = {

    ? template: '<li>xxx</li>'

    }

    需要再Vue的components中聲明注冊(cè),否則無法調(diào)用

    查看全部

舉報(bào)

0/150
提交
取消
課程須知
1、對(duì)Javascript基礎(chǔ)知識(shí)已經(jīng)掌握。 2、對(duì)Es6和webpack有簡單了解。
老師告訴你能學(xué)到什么?
使用Vue2.0版本實(shí)現(xiàn)響應(yīng)式編程 2、理解Vue編程理念與直接操作Dom的差異 3、Vue常用的基礎(chǔ)語法 4、使用Vue編寫TodoList功能 5、什么是Vue的組件和實(shí)例 6、Vue-cli腳手架工具的使用 7、但文件組件,全局樣式與局部樣式

微信掃碼,參與3人拼團(tuán)

微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)

友情提示:

您好,此課程屬于遷移課程,您已購買該課程,無需重復(fù)購買,感謝您對(duì)慕課網(wǎng)的支持!