Compare commits
No commits in common. "e92b1dbea6daf20c3ee6af6fa52d5e2325297774" and "991ef8809ac029993590e89eb5f189df7543caa9" have entirely different histories.
e92b1dbea6
...
991ef8809a
|
@ -31,38 +31,39 @@ FluContentPage{
|
||||||
|
|
||||||
FluContentDialog{
|
FluContentDialog{
|
||||||
id:custom_update_dialog
|
id:custom_update_dialog
|
||||||
property var text
|
signal showDialog(string text,var callback)
|
||||||
|
property var _textBox
|
||||||
property var onAccpetListener
|
property var onAccpetListener
|
||||||
title:"修改列名"
|
title:"修改列名"
|
||||||
negativeText:"取消"
|
negativeText:"取消"
|
||||||
contentDelegate: Component{
|
contentDelegate: Component{
|
||||||
Item{
|
Item{
|
||||||
implicitWidth: parent.width
|
width: parent.width
|
||||||
implicitHeight: 60
|
height: 60
|
||||||
FluTextBox{
|
FluTextBox{
|
||||||
id:textbox_text
|
id:textbox_text
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
onTextChanged: {
|
}
|
||||||
custom_update_dialog.text = textbox_text.text
|
Connections{
|
||||||
|
target: custom_update_dialog
|
||||||
|
function onShowDialog(text,callback){
|
||||||
|
custom_update_dialog._textBox = textbox_text
|
||||||
|
custom_update_dialog.onAccpetListener = callback
|
||||||
|
textbox_text.text = text
|
||||||
|
textbox_text.forceActiveFocus()
|
||||||
|
custom_update_dialog.open()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Component.onCompleted: {
|
|
||||||
textbox_text.text = custom_update_dialog.text
|
|
||||||
textbox_text.forceActiveFocus()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
onNegativeClicked:{
|
||||||
|
}
|
||||||
positiveText:"确定"
|
positiveText:"确定"
|
||||||
onPositiveClicked:{
|
onPositiveClicked:{
|
||||||
if(custom_update_dialog.onAccpetListener){
|
if(custom_update_dialog.onAccpetListener && custom_update_dialog._textBox){
|
||||||
custom_update_dialog.onAccpetListener(custom_update_dialog.text)
|
custom_update_dialog.onAccpetListener(custom_update_dialog._textBox.text)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function showDialog(text,listener){
|
|
||||||
custom_update_dialog.text = text
|
|
||||||
custom_update_dialog.onAccpetListener = listener
|
|
||||||
custom_update_dialog.open()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Component{
|
Component{
|
||||||
|
@ -297,17 +298,19 @@ FluContentPage{
|
||||||
dataIndex: 'checkbox',
|
dataIndex: 'checkbox',
|
||||||
width:80,
|
width:80,
|
||||||
minimumWidth:80,
|
minimumWidth:80,
|
||||||
maximumWidth:80
|
maximumWidth:80,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: table_view.customItem(com_column_update_title,{title:'头像'}),
|
title: table_view.customItem(com_column_update_title,{title:'头像'}),
|
||||||
dataIndex: 'avatar',
|
dataIndex: 'avatar',
|
||||||
width:100
|
width:100,
|
||||||
|
minimumWidth:100,
|
||||||
|
maximumWidth:100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '姓名',
|
title: '姓名',
|
||||||
dataIndex: 'name',
|
dataIndex: 'name',
|
||||||
readOnly:true
|
readOnly:true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: table_view.customItem(com_column_sort_age,{sort:0}),
|
title: table_view.customItem(com_column_sort_age,{sort:0}),
|
||||||
|
@ -411,4 +414,5 @@ FluContentPage{
|
||||||
root.dataSource = dataSource
|
root.dataSource = dataSource
|
||||||
table_view.dataSource = root.dataSource
|
table_view.dataSource = root.dataSource
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,38 +31,39 @@ FluContentPage{
|
||||||
|
|
||||||
FluContentDialog{
|
FluContentDialog{
|
||||||
id:custom_update_dialog
|
id:custom_update_dialog
|
||||||
property var text
|
signal showDialog(string text,var callback)
|
||||||
|
property var _textBox
|
||||||
property var onAccpetListener
|
property var onAccpetListener
|
||||||
title:"修改列名"
|
title:"修改列名"
|
||||||
negativeText:"取消"
|
negativeText:"取消"
|
||||||
contentDelegate: Component{
|
contentDelegate: Component{
|
||||||
Item{
|
Item{
|
||||||
implicitWidth: parent.width
|
width: parent.width
|
||||||
implicitHeight: 60
|
height: 60
|
||||||
FluTextBox{
|
FluTextBox{
|
||||||
id:textbox_text
|
id:textbox_text
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
onTextChanged: {
|
}
|
||||||
custom_update_dialog.text = textbox_text.text
|
Connections{
|
||||||
|
target: custom_update_dialog
|
||||||
|
function onShowDialog(text,callback){
|
||||||
|
custom_update_dialog._textBox = textbox_text
|
||||||
|
custom_update_dialog.onAccpetListener = callback
|
||||||
|
textbox_text.text = text
|
||||||
|
textbox_text.forceActiveFocus()
|
||||||
|
custom_update_dialog.open()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Component.onCompleted: {
|
|
||||||
textbox_text.text = custom_update_dialog.text
|
|
||||||
textbox_text.forceActiveFocus()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
onNegativeClicked:{
|
||||||
|
}
|
||||||
positiveText:"确定"
|
positiveText:"确定"
|
||||||
onPositiveClicked:{
|
onPositiveClicked:{
|
||||||
if(custom_update_dialog.onAccpetListener){
|
if(custom_update_dialog.onAccpetListener && custom_update_dialog._textBox){
|
||||||
custom_update_dialog.onAccpetListener(custom_update_dialog.text)
|
custom_update_dialog.onAccpetListener(custom_update_dialog._textBox.text)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function showDialog(text,listener){
|
|
||||||
custom_update_dialog.text = text
|
|
||||||
custom_update_dialog.onAccpetListener = listener
|
|
||||||
custom_update_dialog.open()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Component{
|
Component{
|
||||||
|
@ -297,17 +298,19 @@ FluContentPage{
|
||||||
dataIndex: 'checkbox',
|
dataIndex: 'checkbox',
|
||||||
width:80,
|
width:80,
|
||||||
minimumWidth:80,
|
minimumWidth:80,
|
||||||
maximumWidth:80
|
maximumWidth:80,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: table_view.customItem(com_column_update_title,{title:'头像'}),
|
title: table_view.customItem(com_column_update_title,{title:'头像'}),
|
||||||
dataIndex: 'avatar',
|
dataIndex: 'avatar',
|
||||||
width:100
|
width:100,
|
||||||
|
minimumWidth:100,
|
||||||
|
maximumWidth:100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '姓名',
|
title: '姓名',
|
||||||
dataIndex: 'name',
|
dataIndex: 'name',
|
||||||
readOnly:true
|
readOnly:true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: table_view.customItem(com_column_sort_age,{sort:0}),
|
title: table_view.customItem(com_column_sort_age,{sort:0}),
|
||||||
|
@ -411,4 +414,5 @@ FluContentPage{
|
||||||
root.dataSource = dataSource
|
root.dataSource = dataSource
|
||||||
table_view.dataSource = root.dataSource
|
table_view.dataSource = root.dataSource
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -183,8 +183,8 @@ FluIconButton {
|
||||||
}
|
}
|
||||||
contentDelegate: Component{
|
contentDelegate: Component{
|
||||||
Item{
|
Item{
|
||||||
implicitWidth: parent.width
|
width: parent.width
|
||||||
implicitHeight: 100
|
height: 100
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
forceActiveFocus()
|
forceActiveFocus()
|
||||||
}
|
}
|
||||||
|
|
|
@ -183,8 +183,8 @@ FluIconButton {
|
||||||
}
|
}
|
||||||
contentDelegate: Component{
|
contentDelegate: Component{
|
||||||
Item{
|
Item{
|
||||||
implicitWidth: parent.width
|
width: parent.width
|
||||||
implicitHeight: 100
|
height: 100
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
forceActiveFocus()
|
forceActiveFocus()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue