This commit is contained in:
朱子楚\zhuzi 2023-09-08 23:01:31 +08:00
parent c0f15060af
commit f2b67af58a
2 changed files with 4 additions and 2 deletions

View File

@ -67,6 +67,7 @@ Rectangle {
Component{ Component{
id:com_edit id:com_edit
FluTextBox{ FluTextBox{
id:text_box
text: display text: display
readOnly: true === columnSource[column].readOnly readOnly: true === columnSource[column].readOnly
Component.onCompleted: { Component.onCompleted: {
@ -75,7 +76,7 @@ Rectangle {
} }
onCommit: { onCommit: {
if(!readOnly){ if(!readOnly){
display = text display = text_box.text
} }
tableView.closeEditor() tableView.closeEditor()
} }

View File

@ -69,6 +69,7 @@ Rectangle {
Component{ Component{
id:com_edit id:com_edit
FluTextBox{ FluTextBox{
id:text_box
text: display text: display
readOnly: true === columnSource[column].readOnly readOnly: true === columnSource[column].readOnly
Component.onCompleted: { Component.onCompleted: {
@ -77,7 +78,7 @@ Rectangle {
} }
onCommit: { onCommit: {
if(!readOnly){ if(!readOnly){
display = text display = text_box.text
} }
tableView.closeEditor() tableView.closeEditor()
} }