iview weapp的cell slot和列表組合在一起的用法

如果使用iview組件,需要先在GitHub上下載iview-weapp-master這個(gè)文件,將里面的dist這個(gè)文件拷貝到項(xiàng)目里

在vivew weapp這個(gè)網(wǎng)站上參考文檔使用的方法。

這里使用的是列表,把列表里的json代碼拷貝到項(xiàng)目中的json文件中


在wxml中,寫下下面的代碼:

<!-- 列表 -->

? <i-cell-group>

? ? <i-cell title="收貨地址" label="Shipping address" is-link>

? ? ? <i-icon type="coordinates" size="20" color="#80848f" slot="icon" />

? ? </i-cell>

? ? <i-cell title="咖啡錢包" label="Coffee wallet" value="6 張" is-link>

? ? ? <i-icon type="coupons" size="20" color="#80848f" slot="icon" />

? ? </i-cell>

? ? <i-cell title="兌換優(yōu)惠" label="Cash discount" value="1 張" is-link>

? ? ? <i-icon type="brush" size="20" color="#80848f" slot="icon" />

? ? </i-cell>

? ? <i-cell title="發(fā)票管理" label="Invoice management" is-link>

? ? ? <i-icon type="accessory" size="20" color="#80848f" slot="icon" />

? ? </i-cell>

? ? <i-cell title="客戶服務(wù)" label="Customer service" is-link>

? ? ? <i-icon type="service" size="20" color="#80848f" slot="icon" />

? ? </i-cell>

? </i-cell-group>

解釋:<i-cell title="客戶服務(wù)" label="Customer service" is-link></i-cell>這是一組沒有圖標(biāo)的列表,如果要在列表前面加上圖標(biāo)的話,則需要使用slot(細(xì)胞槽)的方式插入,?? <i-icon type="service" size="20" color="#80848f" slot="icon" />


順便附上https://weapp.iviewui.com/components/icon

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容