mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-23 03:10:10 +08:00
fix bug #403
This commit is contained in:
parent
a6001ea142
commit
0222a2111d
@ -16,7 +16,6 @@ FluScrollablePage{
|
|||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
FluButton{
|
FluButton{
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
Layout.topMargin: 20
|
|
||||||
text:"Show Double Button Dialog"
|
text:"Show Double Button Dialog"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
double_btn_dialog.open()
|
double_btn_dialog.open()
|
||||||
@ -65,7 +64,6 @@ FluScrollablePage{
|
|||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
FluButton{
|
FluButton{
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
Layout.topMargin: 20
|
|
||||||
text:"Show Triple Button Dialog"
|
text:"Show Triple Button Dialog"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
triple_btn_dialog.open()
|
triple_btn_dialog.open()
|
||||||
@ -118,17 +116,25 @@ FluScrollablePage{
|
|||||||
|
|
||||||
FluArea{
|
FluArea{
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
height: 68
|
height: 100
|
||||||
paddings: 10
|
paddings: 10
|
||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
FluButton{
|
FluButton{
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.top: parent.top
|
||||||
Layout.topMargin: 20
|
anchors.topMargin: 5
|
||||||
text:"Custom Content Dialog"
|
text:"Custom Content Dialog"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
custom_btn_dialog.open()
|
custom_btn_dialog.open()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
FluButton{
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: 48
|
||||||
|
text:"Custom Content Dialog2"
|
||||||
|
onClicked: {
|
||||||
|
custom_btn_dialog2.open()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
CodeExpander{
|
CodeExpander{
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
@ -164,8 +170,8 @@ FluScrollablePage{
|
|||||||
negativeText:"取消加载"
|
negativeText:"取消加载"
|
||||||
contentDelegate: Component{
|
contentDelegate: Component{
|
||||||
Item{
|
Item{
|
||||||
width: parent.width
|
implicitWidth: parent.width
|
||||||
height: 80
|
implicitHeight: 80
|
||||||
FluProgressRing{
|
FluProgressRing{
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
}
|
}
|
||||||
@ -179,4 +185,47 @@ FluScrollablePage{
|
|||||||
showSuccess("点击确定按钮")
|
showSuccess("点击确定按钮")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FluContentDialog{
|
||||||
|
id:custom_btn_dialog2
|
||||||
|
title:"折线图"
|
||||||
|
contentDelegate: Component{
|
||||||
|
Item{
|
||||||
|
implicitWidth: parent.width
|
||||||
|
implicitHeight: 300
|
||||||
|
FluChart{
|
||||||
|
anchors.fill: parent
|
||||||
|
chartType: 'line'
|
||||||
|
chartData: { return {
|
||||||
|
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
|
||||||
|
datasets: [{
|
||||||
|
label: 'My First Dataset',
|
||||||
|
data: [65, 59, 80, 81, 56, 55, 40],
|
||||||
|
fill: false,
|
||||||
|
borderColor: 'rgb(75, 192, 192)',
|
||||||
|
tension: 0.1
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
chartOptions: { return {
|
||||||
|
maintainAspectRatio: false,
|
||||||
|
title: {
|
||||||
|
display: true,
|
||||||
|
text: 'Chart.js Line Chart - Stacked'
|
||||||
|
},
|
||||||
|
tooltips: {
|
||||||
|
mode: 'index',
|
||||||
|
intersect: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
buttonFlags: FluContentDialogType.PositiveButton
|
||||||
|
positiveText:"确定"
|
||||||
|
onPositiveClicked:{
|
||||||
|
showSuccess("点击确定按钮")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,6 @@ FluScrollablePage{
|
|||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
FluButton{
|
FluButton{
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
Layout.topMargin: 20
|
|
||||||
text:"Show Double Button Dialog"
|
text:"Show Double Button Dialog"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
double_btn_dialog.open()
|
double_btn_dialog.open()
|
||||||
@ -65,7 +64,6 @@ FluScrollablePage{
|
|||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
FluButton{
|
FluButton{
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
Layout.topMargin: 20
|
|
||||||
text:"Show Triple Button Dialog"
|
text:"Show Triple Button Dialog"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
triple_btn_dialog.open()
|
triple_btn_dialog.open()
|
||||||
@ -118,17 +116,25 @@ FluScrollablePage{
|
|||||||
|
|
||||||
FluArea{
|
FluArea{
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
height: 68
|
height: 100
|
||||||
paddings: 10
|
paddings: 10
|
||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
FluButton{
|
FluButton{
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.top: parent.top
|
||||||
Layout.topMargin: 20
|
anchors.topMargin: 5
|
||||||
text:"Custom Content Dialog"
|
text:"Custom Content Dialog"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
custom_btn_dialog.open()
|
custom_btn_dialog.open()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
FluButton{
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: 48
|
||||||
|
text:"Custom Content Dialog2"
|
||||||
|
onClicked: {
|
||||||
|
custom_btn_dialog2.open()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
CodeExpander{
|
CodeExpander{
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
@ -164,8 +170,8 @@ FluScrollablePage{
|
|||||||
negativeText:"取消加载"
|
negativeText:"取消加载"
|
||||||
contentDelegate: Component{
|
contentDelegate: Component{
|
||||||
Item{
|
Item{
|
||||||
width: parent.width
|
implicitWidth: parent.width
|
||||||
height: 80
|
implicitHeight: 80
|
||||||
FluProgressRing{
|
FluProgressRing{
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
}
|
}
|
||||||
@ -179,4 +185,47 @@ FluScrollablePage{
|
|||||||
showSuccess("点击确定按钮")
|
showSuccess("点击确定按钮")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FluContentDialog{
|
||||||
|
id:custom_btn_dialog2
|
||||||
|
title:"折线图"
|
||||||
|
contentDelegate: Component{
|
||||||
|
Item{
|
||||||
|
implicitWidth: parent.width
|
||||||
|
implicitHeight: 300
|
||||||
|
FluChart{
|
||||||
|
anchors.fill: parent
|
||||||
|
chartType: 'line'
|
||||||
|
chartData: { return {
|
||||||
|
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
|
||||||
|
datasets: [{
|
||||||
|
label: 'My First Dataset',
|
||||||
|
data: [65, 59, 80, 81, 56, 55, 40],
|
||||||
|
fill: false,
|
||||||
|
borderColor: 'rgb(75, 192, 192)',
|
||||||
|
tension: 0.1
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
chartOptions: { return {
|
||||||
|
maintainAspectRatio: false,
|
||||||
|
title: {
|
||||||
|
display: true,
|
||||||
|
text: 'Chart.js Line Chart - Stacked'
|
||||||
|
},
|
||||||
|
tooltips: {
|
||||||
|
mode: 'index',
|
||||||
|
intersect: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
buttonFlags: FluContentDialogType.PositiveButton
|
||||||
|
positiveText:"确定"
|
||||||
|
onPositiveClicked:{
|
||||||
|
showSuccess("点击确定按钮")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,9 +8,9 @@ FluPopup {
|
|||||||
id: control
|
id: control
|
||||||
property string title: ""
|
property string title: ""
|
||||||
property string message: ""
|
property string message: ""
|
||||||
property string neutralText: "Neutral"
|
property string neutralText: "Close"
|
||||||
property string negativeText: "Negative"
|
property string negativeText: "Cancel"
|
||||||
property string positiveText: "Positive"
|
property string positiveText: "OK"
|
||||||
property int messageTextFormart: Text.AutoText
|
property int messageTextFormart: Text.AutoText
|
||||||
property int delayTime: 100
|
property int delayTime: 100
|
||||||
property int buttonFlags: FluContentDialogType.NegativeButton | FluContentDialogType.PositiveButton
|
property int buttonFlags: FluContentDialogType.NegativeButton | FluContentDialogType.PositiveButton
|
||||||
@ -75,9 +75,15 @@ FluPopup {
|
|||||||
Layout.preferredHeight: status===Loader.Ready ? item.height : 0
|
Layout.preferredHeight: status===Loader.Ready ? item.height : 0
|
||||||
}
|
}
|
||||||
FluLoader{
|
FluLoader{
|
||||||
sourceComponent: control.contentDelegate
|
sourceComponent:control.visible ? control.contentDelegate : undefined
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: status===Loader.Ready ? item.height : 0
|
onStatusChanged: {
|
||||||
|
if(status===Loader.Ready){
|
||||||
|
Layout.preferredHeight = item.implicitHeight
|
||||||
|
}else{
|
||||||
|
Layout.preferredHeight = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Rectangle{
|
Rectangle{
|
||||||
id:layout_actions
|
id:layout_actions
|
||||||
|
@ -8,9 +8,9 @@ FluPopup {
|
|||||||
id: control
|
id: control
|
||||||
property string title: ""
|
property string title: ""
|
||||||
property string message: ""
|
property string message: ""
|
||||||
property string neutralText: "Neutral"
|
property string neutralText: "Close"
|
||||||
property string negativeText: "Negative"
|
property string negativeText: "Cancel"
|
||||||
property string positiveText: "Positive"
|
property string positiveText: "OK"
|
||||||
property int messageTextFormart: Text.AutoText
|
property int messageTextFormart: Text.AutoText
|
||||||
property int delayTime: 100
|
property int delayTime: 100
|
||||||
property int buttonFlags: FluContentDialogType.NegativeButton | FluContentDialogType.PositiveButton
|
property int buttonFlags: FluContentDialogType.NegativeButton | FluContentDialogType.PositiveButton
|
||||||
@ -75,9 +75,15 @@ FluPopup {
|
|||||||
Layout.preferredHeight: status===Loader.Ready ? item.height : 0
|
Layout.preferredHeight: status===Loader.Ready ? item.height : 0
|
||||||
}
|
}
|
||||||
FluLoader{
|
FluLoader{
|
||||||
sourceComponent: control.contentDelegate
|
sourceComponent:control.visible ? control.contentDelegate : undefined
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: status===Loader.Ready ? item.height : 0
|
onStatusChanged: {
|
||||||
|
if(status===Loader.Ready){
|
||||||
|
Layout.preferredHeight = item.implicitHeight
|
||||||
|
}else{
|
||||||
|
Layout.preferredHeight = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Rectangle{
|
Rectangle{
|
||||||
id:layout_actions
|
id:layout_actions
|
||||||
|
Loading…
Reference in New Issue
Block a user