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

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

vue中如何控制input的對(duì)應(yīng)內(nèi)容的顯示隱藏

vue中如何控制input的對(duì)應(yīng)內(nèi)容的顯示隱藏

明月笑刀無(wú)情 2019-03-14 14:15:25
在mount時(shí),為什么會(huì)調(diào)用三次arr2的方法,我怎么在input的值改變的時(shí)候才顯示下方input的對(duì)應(yīng)內(nèi)容,現(xiàn)在一直顯示,我無(wú)法在arr2中控制其顯示隱藏@{    ViewBag.Title = "Index";    Layout = "~/Views/Shared/_Layout.cshtml";}<div id="itany">    <ul class="form-ul">        <li class="form-item">            <h4 class="form-title">郵件主題</h4>            <input type="text" v-model="name" class="form-input">            <i class="icon pen"></i>        </li>    </ul>    <p v-for="(v,k) in arr2" :key="k" v-show="flag">        {{v}}    </p></div><!--循環(huán)綁定--><script>    //export default{    //   create(){    //       this.request();    //   },    //   methods:{    //    request(){      //    }    //}    //}    //import axios from './axios'     //Vue.prototype.$http = axios    var vm = new Vue({        el:'#itany',        data:{            flag:false,            arr:['華','alex','mark'],            name:''        },        //鉤子函數(shù),初始化完        created: function(){       },                computed:{            arr2:function () {                var temp=[];                //console.log(this.flag);                                this.arr.forEach(val=> {                    if(val.includes(this.name)){                    this.flag=true;                    temp.push(val);                console.log(this);            }        });        console.log(temp);        return temp;    }    }    })</script>
查看完整描述

5 回答

?
Smart貓小萌

TA貢獻(xiàn)1911條經(jīng)驗(yàn) 獲得超7個(gè)贊

@change事件不就好了么?按你的表達(dá)? 涉及計(jì)算屬性什么事?


查看完整回答
反對(duì) 回復(fù) 2019-03-26
  • 5 回答
  • 0 關(guān)注
  • 4896 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號(hào)

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