This commit is contained in:
朱子楚\zhuzi
2023-04-08 20:08:26 +08:00
parent 12fa3487bb
commit b349c22434
5 changed files with 66 additions and 6 deletions

View File

@ -90,6 +90,57 @@ FluScrollablePage{
}
}
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: 10
code:'FluTableView{
id:table_view
Layout.fillWidth: true
Layout.topMargin: 20
width:parent.width
pageCurrent:1
pageCount:10
itemCount: 1000
onRequestPage:
(page,count)=> {
loadData(page,count)
}
Component.onCompleted: {
const columns = [
{
title: "姓名",
dataIndex: "name",
width:100
},
{
title: "年龄",
dataIndex: "age",
width:100
},
{
title: "住址",
dataIndex: "address",
width:200
},
{
title: "别名",
dataIndex: "nickname",
width:100
}
];
table_view.columns = columns
const dataSource = [
{
name: "孙悟空”,
age: 500,
address:"钟灵毓秀的花果山,如神仙仙境的水帘洞",
nickname:"齐天大圣"
}
];
table_view.dataSource = columns
}
}'
}
function loadData(page,count){
const dataSource = []

View File

@ -113,7 +113,9 @@ FluExpander{
"FluTooltip",
"FluTreeView",
"FluWindow",
"FluWindowResize"
"FluWindowResize",
"FluToggleButton",
"FluTableView"
];
code = code.replace(/\n/g, "<br>");
code = code.replace(/ /g, "&nbsp;");