amis drawer组件中如果嵌套了select组件,在移动端会出现无法确认的情况

vhmi4jdf  于 4个月前  发布在  其他
关注(0)|答案(2)|浏览(103)

移动端情况下,在对select进行选择完毕后,抽屉会自动关闭,无法确认。
使用的代码
{
"type": "page",
"remark": null,
"toolbar": [
{
"type": "button",
"actionType": "drawer",
"drawer": {
"title": "新增用户",
"closeOnOutside": true,
"size": "lg",
"body": {
"type": "form",
"name": "user_create_form",
"api": {
"url": "/user/create",
"method": "post"
},
"rules": [
{
"rule": "password==confirm_password",
"message": "密码和确认密码不一致",
"name": [
"password",
"confirm_password"
]
}
],
"body": [
{
"type": "input-text",
"name": "account",
"label": "登录账号",
"required": true
},
{
"type": "input-password",
"name": "password",
"label": "密码",
"required": true
},
{
"type": "input-password",
"name": "confirm_password",
"label": "确认密码",
"required": true
},
{
"type": "input-text",
"name": "nickName",
"label": "用户名",
"required": true
},
{
"type": "select",
"name": "userRoleId",
"label": "用户角色",
"multiple": true,
"source": {
"method": "post",
"url": "/role/rolePartInfoList"
},
"required": true
},
{
"type": "tree-select",
"name": "departmentId",
"label": "所属部门",
"required": true,
"onlyLeaf": true,
"source": "/department/generate"
}
]
}
},
"label": "新增",
"primary": true
}
],
"body": [
{
"autoGenerateFilter": true,
"type": "crud",
"name": "user_crud",
"api": {
"method": "post",
"url": "/user/userList"
},
"loadDataOnce": true,
"columns": [
{
"name": "account",
"label": "账户",
"sortable": true,
"searchable": {
"type": "input-text",
"name": "account",
"label": "账号"
}
},
{
"name": "nickName",
"label": "用户名",
"sortable": true,
"searchable": {
"type": "input-text",
"name": "nickName",
"label": "用户名"
}
},
{
"name": "userRole",
"label": "用户角色",
"sortable": true,
"type": "select",
"static": true
},
{
"name": "status",
"label": "状态"
},
{
"name": "department",
"label": "所属部门",
"type": "select",
"static": true
},
{
"type": "operation",
"label": "操作",
"width": "",
"buttons": [
{
"type": "button-group",
"buttons": [
{
"type": "button",
"label": "修改",
"level": "info",
"actionType": "drawer",
"drawer": {
"title": "修改用户",
"closeOnOutside": true,
"size": "md",
"body": {
"type": "form",
"name": "user_edit_form",
"api": {
"url": "/user/edit",
"method": "post"
},
"body": [
{
"type": "input-text",
"name": "nickName",
"label": "用户名",
"required": true
},
{
"type": "select",
"name": "userRole",
"label": "用户角色",
"multiple": true,
"source": {
"method": "post",
"url": "/role/rolePartInfoList"
},
"required": true
},
{
"type": "tree-select",
"name": "department",
"label": "所属部门",
"onlyLeaf": true,
"required": true,
"source": {
"method": "post",
"url": "/department/generate"
}
}
]
}
}
},
{
"type": "button",
"label": "停用",
"level": "danger",
"actionType": "ajax",
"confirmText": "您确认要停用账户${account}?",
"api": "/user/disable?account=${account}",
"disabledOn": "${status!=0}"
},
{
"type": "button",
"label": "启用",
"level": "success",
"actionType": "ajax",
"confirmText": "您确认要启用账户${account}?",
"api": "/user/enable?account=${account}",
"disabledOn": "${status!=-1}"
}
]
}
],
"placeholder": "-",
"fixed": "right"
}
],
"affixHeader": true,
"columnsTogglable": "auto",
"placeholder": "暂无数据",
"tableClassName": "table-db table-striped",
"headerClassName": "crud-table-header",
"footerClassName": "crud-table-footer",
"toolbarClassName": "crud-table-toolbar",
"combineNum": 0,
"bodyClassName": "panel-default"
}
]
}
-.Google.Chrome.2023-07-07.11-25-41.mp4

a7qyws3x

a7qyws3x1#

👍 Thanks for this!
🏷 I have applied any labels matching special text in your issue.

Please review the labels and make any necessary changes.

dhxwm5r4

dhxwm5r42#

closeOnOutside 改成false

相关问题