fix: TextField rightItem 属性不存在导致插件加载失败
QtQuick.Controls TextField 无 rightItem 属性(DTK 专有), 清除按钮从 TextField 内部移到外部 RowLayout 中
This commit is contained in:
@@ -161,8 +161,10 @@ Window {
|
|||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
text: root.searchText
|
text: root.searchText
|
||||||
onTextChanged: root.searchText = text
|
onTextChanged: root.searchText = text
|
||||||
|
}
|
||||||
|
|
||||||
// 清除按钮:有输入时显示 ×,点击清空搜索
|
// 清除按钮:有输入时显示 ×,点击清空搜索
|
||||||
rightItem: Rectangle {
|
Rectangle {
|
||||||
visible: root.searchText.length > 0
|
visible: root.searchText.length > 0
|
||||||
width: 20; height: 20
|
width: 20; height: 20
|
||||||
radius: 10
|
radius: 10
|
||||||
@@ -181,7 +183,6 @@ Window {
|
|||||||
onClicked: root.searchText = ""
|
onClicked: root.searchText = ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Item { Layout.fillWidth: true }
|
Item { Layout.fillWidth: true }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user