amis button效应速度特别慢,从点buttion到请求下发成功:4分钟

odopli94  于 4个月前  发布在  其他
关注(0)|答案(4)|浏览(63)
描述问题:

button效应速度特别慢,从点buttion到请求下发成功:4分钟

  1. 你是如何使用 amis 的?
    sdk 3.5.2存在问题,升级到最新的3.6.1同样有问题
n1bvdmb6

n1bvdmb61#

[ERROR] Connection lost before response written @ ('127.0.0.1', 26182) <Request: GET /index.html>

nsc4cvqm

nsc4cvqm2#

看起来是click调用的动作响应比较慢,和 Button 没什么关系,可以详细描述一下 Button 点击后触发了哪些动作

zqdjd7g9

zqdjd7g93#

button点击后,会有弹窗确认url下发信息,弹窗确认后才正式下发请求
示例数据如下:
{
"type": "button",
"label": "启环境",
"onEvent": {
"click": {
"actions": [
{
"dialog": {
"type": "dialog",
"title": "testbed部署",
"body": [
{
"type": "tpl",
"tpl": "

请选择业务线
",
"inline": false,
"id": "u:3204c684013c"
},
{
"type": "form",
"title": "表单",
"body": [
{
"label": "用户",
"type": "input-text",
"name": "username",
"id": "u:fb7c004c3ad2",
"static": false,
"readOnly": true
},
{
"label": "测试机ip",
"type": "input-text",
"name": "testbed_ip",
"id": "u:e1b020f7ce88",
"static": false,
"readOnly": true
},
{
"label": "环境路径",
"type": "input-text",
"name": "testbed_path",
"id": "u:02e5ec643bf3",
"static": false,
"readOnly": true,
"value": "/data/workbed"
},
{
"type": "select",
"label": "业务线",
"name": "business",
"options": [
{
"label": "test",
"value": "test"
}
],
"id": "u:39f3504abff1",
"size": "md",
"multiple": false,
"value": "dsp",
"showInvalidMatch": false,
"required": true
},
{
"type": "fieldset",
"id": "u:cf7e50d7d793",
"title": "代码分支",
"collapsable": true,
"body": [
{
"type": "input-text",
"label": "自动化",
"name": "AUTOBRANCH",
"id": "u:4607cbef7807",
"placeholder": "master"
}
],
"collapsed": false,
"subFormMode": "inline"
},
{
"type": "select",
"label": "分配用例集",
"name": "testcases",
"options": [
{
"label": "全部用例",
"value": "A"
}
],
"id": "u:b4cfffc5622f",
"static": false,
"disabled": true,
"description": "功能暂未启用"
},
{
"type": "select",
"label": "环境保留天数",
"name": "cleantime",
"value": "1",
"options": [
{
"label": "1天",
"value": "1"
},
{
"label": "2天",
"value": "2"
},
{
"label": "3天",
"value": "3"
},
{
"label": "4天",
"value": "4"
},
{
"label": "5天",
"value": "5"
}
],
"id": "u:b4cfffc5622h",
"static": false,
"disabled": false,
"description": "环境将保留天数"
}
],
"id": "u:02656f817477"
}
],
"showCloseButton": true,
"showErrorMsg": true,
"showLoading": true,
"id": "u:00d1ffc4b09b",
"closeOnEsc": false,
"dataMapSwitch": false,
"onEvent": {
"confirm": {
"weight": 0,
"actions": [
{
"actionType": "custom",
"script": "doAction({actionType: 'ajax', args: {api: '/xxtest/api/testbed_deploy?username=${username}&runtype=env&testbed_ip=${testbed_ip}&testbed_path=${testbed_path}&business=${business}&AUTOBRANCH=${AUTOBRANCH}&cleantime=${cleantime}'}});\n //event.stopPropagation();"
},
{
"script": "umami.track(props => ({...props,name: '启环境',data: {name:'${username}'}}));",
"actionType": "custom"
}
],
"debounce": {
"wait": 60000
}
}
}
},
"actionType": "dialog"
}
]
}
},
"id": "u:8c1d10ace89f",
"confirmText": "使用说明",
"level": "info"
},

4szc88ey

4szc88ey4#

多个用户同时操作的情况下,存在请求无法下发的情况

相关问题