屬性列表
名稱 |
數(shù)據(jù)類型 |
作用描述 |
默認值 |
data |
array |
要加載的數(shù)據(jù)。 |
[ ] |
itemCls |
string |
數(shù)據(jù)項樣式類。 |
null |
itemStyle |
Object |
數(shù)據(jù)項內(nèi)聯(lián)樣式。 |
null |
hoverCls |
string |
當鼠標懸停在數(shù)據(jù)項樣式類上時。 |
datagrid-row-over |
selectedCls |
string |
選擇數(shù)據(jù)項時的樣式類。 |
datagrid-row-selected |
方法列表
名稱 |
參數(shù) |
返回值 |
作用描述 |
navRow |
step |
void |
瀏覽行。 |
scrollToSelectedRow |
none |
void |
滾動到選中的行。 |
作用域
名稱 |
參數(shù) |
作用描述 |
default |
row,rowIndex |
行作用域。 |
注意:
- 繼承: ListBase 。
使用方法
<DataList style="width:550px;height:250px"
:data="data"
selectionMode="single"
@selectionChange="selection=$event">
<template slot-scope="scope">
<div class="product f-row">
<img :src="getImage(scope.row)">
<div class="detail">
<p>{{scope.row.itemid}} - {{scope.row.name}}</p>
<p>{{scope.row.attr}}</p>
<p>List Price: {{scope.row.listprice}}</p>
</div>
</div>
</template>
</DataList>
更多建議: