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

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

vue使用過(guò)程中遇到的小難題,希望大家?guī)椭幌?/h1>

1.使用update更改內(nèi)容時(shí),輸入字段的過(guò)程中點(diǎn)回車(chē),刪除,空格等鍵都會(huì)導(dǎo)致自動(dòng)退出編輯模式,有什么好辦法可以解決這個(gè)問(wèn)題嗎?2.還有就是使用delete刪除的時(shí)候,如果下一行有內(nèi)容展開(kāi),會(huì)自動(dòng)收起,這又得如何解決?具體代碼如下:<!DOCTYPE html><html><head>    <meta charset="UTF-8">    <title>樹(shù)形視圖擴(kuò)展</title>    <style>        body {            font-family: Menlo, Consolas, monospace;            color: #444;        }        .item {            cursor: pointer;        }        .bold {            font-weight: bold;        }        ul {            padding-left: 1em;            line-height: 1.5em;            list-style-type: dot;        }    </style>    <script src="https://cdn.bootcss.com/vue/2.4.2/vue.min.js"></script></head><body><script type="text/x-template" id="item-template">    <li>        <div :class="{bold: isFolder}" @click="toggle" @dblclick="changeType">            <span v-if="up">{{ model.name }}</span>            <input v-else type="text" v-model="model.name" @click.stop>            <span v-if="isFolder">[{{ open ? '-' : '+' }}]</span>            <span class="bold" @click.stop="$emit('del', index)">[del]</span>            <span class="bold" @click.stop="upd">[update]</span>        </div>        <ul v-if="isFolder" v-show="open">            <item class="item" v-for="(item, index) in model.children" :key="index + item.name" :index="index" :model="item" @del="model.children.splice($event, 1)"></item>            <li class="add" @click="addChild">+</li>        </ul>    </li></script><p>樹(shù)形結(jié)構(gòu)</p><ul id="demo">    <item class="item" v-for="(model, index) in treeData" :key="index + model.name" :index="index" :model="model" @del="treeData.splice($event, 1)"></item></ul><script>    var data = [        {name: 'han'},        {name: 'wang'},        {            name: 'liu',            children: [                {name: 'zhang'},                {name: 'lu'}            ]        }    ];    Vue.component('item', {        template: '#item-template',        props: {            model: Object,            index: Number        },
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 803 瀏覽
慕課專(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)