main
朱子楚\zhuzi 2023-06-03 08:27:32 +08:00
parent 5f2f127623
commit 1073efe423
4 changed files with 21 additions and 19 deletions

View File

@ -20,10 +20,12 @@ endif()
file(TO_CMAKE_PATH "/" PATH_SEPARATOR)
#
add_definitions(-DVERSION=1,3,1,0)
add_definitions(-DVERSION=1,3,2,0)
find_package(Qt6 REQUIRED COMPONENTS Quick REQUIRED)
qt_standard_project_setup()
#Cpp
file(GLOB_RECURSE CPP_FILES *.cpp *.h)
foreach(filepath ${CPP_FILES})

View File

@ -13,7 +13,7 @@ endif()
set(QML_PLUGIN_DIRECTORY ${CMAKE_PREFIX_PATH}/qml/FluentUI)
#
add_definitions(-DVERSION=1,3,1,0)
add_definitions(-DVERSION=1,3,2,0)
find_package(Qt6 REQUIRED COMPONENTS Core Quick Qml ShaderTools)

View File

@ -896,7 +896,7 @@ Item {
function getItems(){
return nav_list.model
}
function push(url){
function push(url,argument={}){
if (nav_swipe.depth>0)
{
let page = nav_swipe.find(function(item) {
@ -922,7 +922,7 @@ Item {
}
}
}
nav_swipe.push(url,{url:url})
nav_swipe.push(url,Object.assign(argument,{url:url}))
}
function getCurrentIndex(){
return nav_list.currentIndex

View File

@ -17,27 +17,27 @@ Item {
implicitHeight: layout_table.height
QtObject{
id:d
property int coumnsWidth: parent.width
property int columnsWidth: parent.width
}
MouseArea{
anchors.fill: parent
preventStealing: true
}
ListModel{
id:model_coumns
id:model_columns
}
ListModel{
id:model_data_source
}
onColumnsChanged: {
model_coumns.clear()
model_coumns.append(columns)
model_columns.clear()
model_columns.append(columns)
var w = 0
for(var i=0;i<model_coumns.count;i++){
var item = model_coumns.get(i)
for(var i=0;i<model_columns.count;i++){
var item = model_columns.get(i)
w=w+item.width
}
d.coumnsWidth = w
d.columnsWidth = w
}
onDataSourceChanged: {
model_data_source.clear()
@ -63,23 +63,23 @@ Item {
ListView{
id:layout_table
height: contentHeight
width: Math.max(layout_flickable.width,d.coumnsWidth)
width: Math.max(layout_flickable.width,d.columnsWidth)
clip:true
interactive: false
header: FluRectangle{
id:layout_coumns
id:layout_columns
height: control.itemHeight
width: parent.width
color:FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(247/255,247/255,247/255,1)
radius: [5,5,0,0]
Row{
id:list_coumns
id:list_columns
spacing: 0
anchors.fill: parent
Repeater{
model: model_coumns
model: model_columns
delegate: Item{
height: list_coumns.height
height: list_columns.height
width: model.width
FluText{
text:model.title
@ -96,7 +96,7 @@ Item {
height: 40
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
visible: index !== model_coumns.count-1
visible: index !== model_columns.count-1
}
}
}
@ -226,8 +226,8 @@ Item {
if(!obj)
return
var data = []
for(var i=0;i<model_coumns.count;i++){
var item = model_coumns.get(i)
for(var i=0;i<model_columns.count;i++){
var item = model_columns.get(i)
data.push({itemData:obj[item.dataIndex],width:item.width})
}
return data;