mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-07-05 01:25:25 +08:00
feat: FluBadge支持设置max和position
This commit is contained in:
@ -26,7 +26,8 @@ FluScrollablePage{
|
||||
width: parent.width
|
||||
text: qsTr("It usually appears in the upper right corner of the notification icon or avatar to display the number of messages that need to be processed")
|
||||
}
|
||||
Row{
|
||||
Flow{
|
||||
width: parent.width
|
||||
spacing: 20
|
||||
Rectangle{
|
||||
width: 40
|
||||
@ -34,7 +35,7 @@ FluScrollablePage{
|
||||
radius: 8
|
||||
color: Qt.rgba(191/255,191/255,191/255,1)
|
||||
FluBadge{
|
||||
topRight: true
|
||||
position: "topRight"
|
||||
showZero: true
|
||||
count:0
|
||||
}
|
||||
@ -46,7 +47,7 @@ FluScrollablePage{
|
||||
radius: 8
|
||||
color: Qt.rgba(191/255,191/255,191/255,1)
|
||||
FluBadge{
|
||||
topRight: true
|
||||
position: "topRight"
|
||||
showZero: true
|
||||
count:5
|
||||
}
|
||||
@ -57,7 +58,7 @@ FluScrollablePage{
|
||||
radius: 8
|
||||
color: Qt.rgba(191/255,191/255,191/255,1)
|
||||
FluBadge{
|
||||
topRight: true
|
||||
position: "topRight"
|
||||
showZero: true
|
||||
count:50
|
||||
}
|
||||
@ -68,9 +69,10 @@ FluScrollablePage{
|
||||
radius: 8
|
||||
color: Qt.rgba(191/255,191/255,191/255,1)
|
||||
FluBadge{
|
||||
topRight: true
|
||||
position: "topRight"
|
||||
showZero: true
|
||||
count:100
|
||||
count:1000
|
||||
max: 999
|
||||
}
|
||||
}
|
||||
Rectangle{
|
||||
@ -79,7 +81,7 @@ FluScrollablePage{
|
||||
radius: 8
|
||||
color: Qt.rgba(191/255,191/255,191/255,1)
|
||||
FluBadge{
|
||||
topRight: true
|
||||
position: "topRight"
|
||||
showZero: true
|
||||
isDot:true
|
||||
}
|
||||
@ -90,7 +92,7 @@ FluScrollablePage{
|
||||
radius: 8
|
||||
color: Qt.rgba(191/255,191/255,191/255,1)
|
||||
FluBadge{
|
||||
topRight: true
|
||||
position: "topRight"
|
||||
showZero: true
|
||||
count:99
|
||||
color: Qt.rgba(250/255,173/255,20/255,1)
|
||||
@ -102,12 +104,71 @@ FluScrollablePage{
|
||||
radius: 8
|
||||
color: Qt.rgba(191/255,191/255,191/255,1)
|
||||
FluBadge{
|
||||
topRight: true
|
||||
position: "topRight"
|
||||
showZero: true
|
||||
count:99
|
||||
color: Qt.rgba(82/255,196/255,26/255,1)
|
||||
}
|
||||
}
|
||||
Rectangle{
|
||||
width: 40
|
||||
height: 40
|
||||
radius: 8
|
||||
color: Qt.rgba(191/255,191/255,191/255,1)
|
||||
FluBadge{
|
||||
position: "topRight"
|
||||
showZero: true
|
||||
count:100
|
||||
color: Qt.rgba(84/255,169/255,1,1)
|
||||
}
|
||||
}
|
||||
Rectangle{
|
||||
width: 40
|
||||
height: 40
|
||||
radius: 8
|
||||
color: Qt.rgba(191/255,191/255,191/255,1)
|
||||
FluBadge{
|
||||
position: "bottomLeft"
|
||||
showZero: true
|
||||
count:100
|
||||
color: Qt.rgba(84/255,169/255,1,1)
|
||||
}
|
||||
}
|
||||
Rectangle{
|
||||
width: 40
|
||||
height: 40
|
||||
radius: 8
|
||||
color: Qt.rgba(191/255,191/255,191/255,1)
|
||||
FluBadge{
|
||||
position: "topLeft"
|
||||
showZero: true
|
||||
count:100
|
||||
color: Qt.rgba(84/255,169/255,1,1)
|
||||
}
|
||||
}
|
||||
Rectangle{
|
||||
width: 40
|
||||
height: 40
|
||||
radius: 8
|
||||
color: Qt.rgba(191/255,191/255,191/255,1)
|
||||
FluBadge{
|
||||
position: "bottomRight"
|
||||
showZero: true
|
||||
count:100
|
||||
color: Qt.rgba(84/255,169/255,1,1)
|
||||
}
|
||||
}
|
||||
Rectangle{
|
||||
width: 40
|
||||
height: 40
|
||||
radius: 8
|
||||
color: Qt.rgba(191/255,191/255,191/255,1)
|
||||
FluBadge{
|
||||
position: "topRight"
|
||||
count: "NEW"
|
||||
color: Qt.rgba(84/255,169/255,1,1)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -120,7 +181,9 @@ FluScrollablePage{
|
||||
radius: 8
|
||||
color: Qt.rgba(191/255,191/255,191/255,1)
|
||||
FluBadge{
|
||||
position: "topRight"
|
||||
count: 100
|
||||
max: 99
|
||||
isDot: false
|
||||
color: Qt.rgba(82/255,196/255,26/255,1)
|
||||
}
|
||||
|
Reference in New Issue
Block a user