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

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

vue點(diǎn)擊刪除時(shí),我怎么確定點(diǎn)的是第幾個(gè)?

vue點(diǎn)擊刪除時(shí),我怎么確定點(diǎn)的是第幾個(gè)?

慕尼黑8549860 2019-03-19 17:19:12
頁(yè)面如圖所示:點(diǎn)擊刪除時(shí)現(xiàn)在的問(wèn)題是:我點(diǎn)擊刪除后,我怎么判斷我刪除的這個(gè)id為多少?HTML代碼:<div id="app" class="container">     <table class="table table-hover">        <tbody>            <tr>                <th>id</th>                <th>名稱(chēng)</th>                <th>操作</th>            </tr>            <tr v-for="item in formData">                <th>{{item.id}}</th>                <th>{{item.name}}</th>                <th><button data-toggle="modal" data-target="#myModal">刪除</button></th>            </tr>        </tbody>    </table>        <!-- 彈出框 -->    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">        <div class="modal-dialog" role="document">            <div class="modal-content">                <div class="modal-header">                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>                    <h4 class="modal-title" id="myModalLabel">提示</h4>                </div>                <div class="modal-body">                    你確定要?jiǎng)h除嗎?                </div>                <div class="modal-footer">                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>                    <button type="button" class="btn btn-primary" @click="clickMe">確定</button>                </div>            </div>        </div>    </div></div>js代碼:new Vue({    el:"#app",    data:{        formData:[            {                id:1,                name:"蘋(píng)果"            },            {                id:2,                name:"西瓜"            },            {                id:3,                name:"葡萄"            },        ]    },    methods:{        clickMe:function(){            alert("你刪除的id為:" + 1); //這里要彈出我點(diǎn)刪除的id為多少        }    }})
查看完整描述

4 回答

  • 4 回答
  • 0 關(guān)注
  • 2628 瀏覽
慕課專(zhuān)欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號(hào)

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