Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grid表格需要在浮动列扩展行功能 #298

Closed
pengyp opened this issue Aug 14, 2019 · 6 comments
Closed

grid表格需要在浮动列扩展行功能 #298

pengyp opened this issue Aug 14, 2019 · 6 comments

Comments

@pengyp
Copy link

pengyp commented Aug 14, 2019

expandIconColumnIndex , expandIcon的索引,当expandIconAsCell为false时,将插入哪个列。
grid表格浮动列没有data-line-index属性,在浮动列上就不能用expandedRowRender扩展行

项目

营销云-友服务

@pengyp
Copy link
Author

pengyp commented Aug 14, 2019

image

@pengyp
Copy link
Author

pengyp commented Aug 14, 2019

image

@pengyp
Copy link
Author

pengyp commented Aug 14, 2019

<Grid
ref={el => (this.grid = el)}
data={supplementOrderItems}
rowKey={(r, i) => (r.id ? r.id : r.key)}
columns={this.detailColumn}
paginationObj={{
verticalPosition: "none"
}}
columnFilterAble={rowEditStatus}
showHeaderMenu={rowEditStatus}
dragborder={rowEditStatus}
draggable={rowEditStatus}
syncHover={rowEditStatus}
multiSelect={!rowEditStatus}
getSelectedDataFunc={this.getSelectedDataFunc}
expandedRowRender={this.expandedRowRender}
expandIconColumnIndex={14}
bodyDisplayInRow={true}
expandedIcon={查看补件进度}
collapsedIcon={查看补件进度}
onRowClick={this.onRowClick}
emptyText={() => (
<Icon
style={{
fontSize: "60px"
}}
type="uf-nodata"
/>
)}
loading={{
show: false
}}
/>

@pengyp
Copy link
Author

pengyp commented Aug 14, 2019

detailColumn = [
{
title: "补件编码",
dataIndex: "supplementCode",
key: "supplementCode",
width: 200
},
{
title: "补件名称",
dataIndex: "supplementName",
key: "supplementName",
width: 120
},
{
title: "商品编码",
dataIndex: "goodsCode",
key: "goodsCode",
width: 120
},
{
title: "商品名称",
dataIndex: "goodsName",
key: "goodsName",
width: 120
},
{
title: "数量",
dataIndex: "supplementNum",
key: "supplementNum",
width: 120
},
{
title: "单位",
dataIndex: "supplementUnitName",
key: "supplementUnitName",
width: 120
},
{
title: "建议价",
dataIndex: "advicePrice",
key: "advicePrice",
width: 120,
textAlign: "right",
render: (text, record, index) => {
return {toDecimal2(record.advicePrice)};
}
},
{
title: "销售价",
dataIndex: "salePrice",
key: "salePrice",
textAlign: "right",
width: 120,
render: (text, record, index) => {
return {toDecimal2(record.salePrice)};
}
},
{
title: "补件金额",
dataIndex: "amount",
key: "amount",
width: 120,
textAlign: "right",
render: (text, record, index) => {
return {toDecimal2(record.amount)};
}
},
{
title: "补件描述",
dataIndex: "supplementDesc",
key: "supplementDesc",
width: 120
},
{
title: "顾客",
dataIndex: "buyer",
key: "buyer",
width: 120
},
{
title: "顾客联系电话",
dataIndex: "buyerPhone",
key: "buyerPhone",
width: 120
},
{
title: "已发货数量",
dataIndex: "totalDeliveryNum",
key: "totalDeliveryNum",
width: 120,
render: (text, record, index) => {
return {record.totalDeliveryNum || 0};
}
},
{
title: "已出库数量",
dataIndex: "totalOutNum",
key: "totalOutNum",
width: 120,
render: (text, record, index) => {
return {record.totalOutNum || 0};
}
},
{
title: "操作",
dataIndex: "operation",
key: "operation",
width: 200,
render(text, record, index) {}
}
];

@pengyp
Copy link
Author

pengyp commented Aug 14, 2019

{
title: "操作",
dataIndex: "operation",
key: "operation",
width: 200,
fixed:"right",
render(text, record, index) {}
}
//fixed:"right",这样浮动列就没办法使用扩展行功能

@yurokn
Copy link
Collaborator

yurokn commented Aug 26, 2019

  • bee-table@2.2.1
    • [ Fixbug ] 解决了右侧固定列无法使用扩展功能的问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants