mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-07-01 23:51:48 +08:00
update
This commit is contained in:
@ -63,12 +63,15 @@ FluScrollablePage{
|
||||
onFinish: {
|
||||
btn_download.disabled = false
|
||||
btn_download.text = "下载文件"
|
||||
text_file_size.text = ""
|
||||
}
|
||||
onDownloadProgress:
|
||||
(recv,total)=>{
|
||||
var locale = Qt.locale()
|
||||
var precent = (recv/total * 100).toFixed(0) + "%"
|
||||
console.debug(precent)
|
||||
btn_download.text = "下载中..."+precent
|
||||
text_file_size.text = "%1/%2".arg(locale.formattedDataSize(recv)).arg(locale.formattedDataSize(total))
|
||||
}
|
||||
onError:
|
||||
(status,errorString)=>{
|
||||
@ -101,13 +104,20 @@ FluScrollablePage{
|
||||
http_post.post({k:"jitpack"})
|
||||
}
|
||||
}
|
||||
FluButton{
|
||||
id:btn_download
|
||||
text:disabled ? "下载中..." : "下载文件"
|
||||
onClicked: {
|
||||
file_dialog.open()
|
||||
RowLayout{
|
||||
FluButton{
|
||||
id:btn_download
|
||||
text:disabled ? "下载中..." : "下载文件"
|
||||
onClicked: {
|
||||
file_dialog.open()
|
||||
}
|
||||
}
|
||||
FluText{
|
||||
id:text_file_size
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -125,6 +135,7 @@ FluScrollablePage{
|
||||
id:window_result
|
||||
width: 600
|
||||
height: 400
|
||||
color: FluTheme.dark ? Qt.rgba(0,0,0,1) : Qt.rgba(1,1,1,1)
|
||||
Item{
|
||||
anchors.fill: parent
|
||||
Flickable{
|
||||
|
@ -12,7 +12,7 @@ FluScrollablePage{
|
||||
FluArea{
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 20
|
||||
height: 110
|
||||
height: 130
|
||||
paddings: 10
|
||||
|
||||
ColumnLayout{
|
||||
@ -45,7 +45,7 @@ FluProgressRing{
|
||||
FluArea{
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 20
|
||||
height: 230
|
||||
height: 286
|
||||
paddings: 10
|
||||
|
||||
ColumnLayout{
|
||||
@ -59,21 +59,24 @@ FluProgressRing{
|
||||
}
|
||||
FluProgressBar{
|
||||
indeterminate: false
|
||||
progress: slider.value/100
|
||||
}
|
||||
FluProgressRing{
|
||||
indeterminate: false
|
||||
progress: slider.value/100
|
||||
value:slider.value/100
|
||||
Layout.topMargin: 10
|
||||
}
|
||||
FluProgressBar{
|
||||
indeterminate: false
|
||||
value:slider.value/100
|
||||
progressVisible: true
|
||||
progress: slider.value/100
|
||||
Layout.topMargin: 10
|
||||
}
|
||||
FluProgressRing{
|
||||
indeterminate: false
|
||||
value: slider.value/100
|
||||
Layout.topMargin: 10
|
||||
}
|
||||
FluProgressRing{
|
||||
progressVisible: true
|
||||
progress: slider.value/100
|
||||
indeterminate: false
|
||||
value: slider.value/100
|
||||
}
|
||||
FluSlider{
|
||||
id:slider
|
||||
|
@ -164,7 +164,7 @@ CustomWindow {
|
||||
height: parent.height
|
||||
z:999
|
||||
//Stack模式,每次切换都会将页面压入栈中,随着栈的页面增多,消耗的内存也越多,内存消耗多就会卡顿,这时候就需要按返回将页面pop掉,释放内存。该模式可以配合FluPage中的launchMode属性,设置页面的启动模式
|
||||
// pageMode: FluNavigationViewType.Stack
|
||||
pageMode: FluNavigationViewType.Stack
|
||||
//NoStack模式,每次切换都会销毁之前的页面然后创建一个新的页面,只需消耗少量内存(推荐)
|
||||
// pageMode: FluNavigationViewType.NoStack
|
||||
items: ItemsOriginal
|
||||
|
Reference in New Issue
Block a user