如果使用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