在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問(wèn)答/HTML/ 請(qǐng)教iview中render函數(shù)中slot的寫(xiě)法

請(qǐng)教iview中render函數(shù)中slot的寫(xiě)法

版本:"version": "1.1.4",
問(wèn)題描述:在表格的表頭中,想加入Tooltip組件,如果Tooltip組件不使用slot插槽是正常顯示的,但當(dāng)要展示的內(nèi)容過(guò)多的時(shí)候,根據(jù)文檔使用slot就會(huì)產(chǎn)生問(wèn)題,請(qǐng)問(wèn)有什么方法可以解決嗎,十分感謝。
代碼部分:
1,如果要展示內(nèi)容一行能展示開(kāi)這么寫(xiě)就沒(méi)有問(wèn)題

{ title: '注冊(cè)充值人數(shù)', key: 'RechageCount', align: 'center', renderHeader: (h, params) =>{ 
    return h('Tooltip', { 
        props: { 
            content: '當(dāng)天/周/月注冊(cè)當(dāng)天/周/月充值的人數(shù)', placement: 'top' 
        } 
    }, '注冊(cè)充值人數(shù)') } 
}

2,當(dāng)要展示的內(nèi)容過(guò)長(zhǎng)時(shí),這么寫(xiě),有bug,懸浮提示層沒(méi)有任何內(nèi)容,而表頭會(huì)把這兩個(gè)標(biāo)簽的內(nèi)容全部展示出來(lái),是因?yàn)閟lot不能作為屬性寫(xiě)在props里面嗎?求正確寫(xiě)法

{ title: '注冊(cè)充值人數(shù)', key: 'RechageCount', align: 'center', renderHeader: (h, params) ={
    return h('Tooltip', { 
        props: { placement: 'top' } 
    }, [ 
    h('span', '整體成交折標(biāo)'), 
    h('div', { 
        props: { slot: 'content' }, 
        style: { widthSpace: 'normal' } 
    }, '整體成交金額中,每筆投資金額*對(duì)應(yīng)投資期限的折標(biāo)系數(shù)后的加總') ])
    }
}
回答
編輯回答
尤禮
props: {},
slot: ''

放到同級(jí)

2018年6月19日 19:41