131 lines
3.6 KiB
QML
131 lines
3.6 KiB
QML
|
|
import QtQuick 2.0
|
|||
|
|
import QtQuick.Controls
|
|||
|
|
import QtQuick.Layouts
|
|||
|
|
import "./common"
|
|||
|
|
|
|||
|
|
Base {
|
|||
|
|
aJsText:httpJs
|
|||
|
|
|
|||
|
|
Column
|
|||
|
|
{
|
|||
|
|
anchors.fill: parent
|
|||
|
|
spacing: 2
|
|||
|
|
GroupBox
|
|||
|
|
{
|
|||
|
|
title: "发送"
|
|||
|
|
width: parent.width
|
|||
|
|
Column{
|
|||
|
|
anchors.fill: parent
|
|||
|
|
spacing: 2
|
|||
|
|
RequestComboBox
|
|||
|
|
{
|
|||
|
|
title: "请求方式"
|
|||
|
|
key: "type"
|
|||
|
|
onValueChanged:{
|
|||
|
|
console.info(value)
|
|||
|
|
if(value == "POST")
|
|||
|
|
{
|
|||
|
|
tab2.visible = true
|
|||
|
|
}
|
|||
|
|
else{
|
|||
|
|
tab2.visible = false
|
|||
|
|
if(bar.currentIndex == 2)
|
|||
|
|
{
|
|||
|
|
bar.currentIndex = 0
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
LineInput
|
|||
|
|
{
|
|||
|
|
title: "URL"
|
|||
|
|
key: "url"
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
Item{
|
|||
|
|
width: parent.width
|
|||
|
|
height: 180
|
|||
|
|
TabBar {
|
|||
|
|
id: bar
|
|||
|
|
width: parent.width/2
|
|||
|
|
currentIndex: 0
|
|||
|
|
TabButton {
|
|||
|
|
text: qsTr("Params")
|
|||
|
|
font.pixelSize: 12
|
|||
|
|
font.family: "微软雅黑"
|
|||
|
|
}
|
|||
|
|
TabButton {
|
|||
|
|
text: qsTr("Headers")
|
|||
|
|
font.pixelSize: 12
|
|||
|
|
font.family: "微软雅黑"
|
|||
|
|
}
|
|||
|
|
TabButton {
|
|||
|
|
id: tab2
|
|||
|
|
text: qsTr("Bodys")
|
|||
|
|
font.pixelSize: 12
|
|||
|
|
font.family: "微软雅黑"
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
StackLayout {
|
|||
|
|
id: layout
|
|||
|
|
anchors.top: bar.bottom
|
|||
|
|
anchors.bottom: parent.bottom
|
|||
|
|
anchors.left: parent.left
|
|||
|
|
anchors.right: parent.right
|
|||
|
|
currentIndex: bar.currentIndex
|
|||
|
|
KvRepeater
|
|||
|
|
{
|
|||
|
|
key: "rsp_params"
|
|||
|
|
}
|
|||
|
|
KvRepeater
|
|||
|
|
{
|
|||
|
|
key: "rsp_headers"
|
|||
|
|
}
|
|||
|
|
HttpMutiInput
|
|||
|
|
{
|
|||
|
|
key: "rsp_bodys"
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
GroupBox
|
|||
|
|
{
|
|||
|
|
title: "接收"
|
|||
|
|
width: parent.width
|
|||
|
|
Column{
|
|||
|
|
anchors.fill: parent
|
|||
|
|
spacing: 2
|
|||
|
|
LineInput
|
|||
|
|
{
|
|||
|
|
title: "超时(ms)"
|
|||
|
|
key: "rsp_timeout"
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
Row
|
|||
|
|
{
|
|||
|
|
width: parent.width
|
|||
|
|
spacing: 5
|
|||
|
|
Item
|
|||
|
|
{
|
|||
|
|
width: parent.width - jsBtn.width - 5
|
|||
|
|
height: 30
|
|||
|
|
LineInput
|
|||
|
|
{
|
|||
|
|
title: "备注"
|
|||
|
|
key: "remark"
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
ScriptButton{
|
|||
|
|
id: jsBtn
|
|||
|
|
title: "脚本编辑"
|
|||
|
|
key: "script"
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|