addOn 里面的label内容, 一旦有数据后,不会再随着数据变化而变化
- Dominant language
- TypeScript
- Stars
- 18.9k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
2.3.1 版本
填写老师名称 异步获取老师id,将老师id 填充到addOn 的label里面。
首次 填写老师名称 ,addOn 的label 填充有效。但是再次更改老师名称,用接口返回的数据更改老师id后, addOn 里面的label内容 还是上一次的数据, 貌似 addOn里面的label一旦有数据后,不会再随着数据变化而变化
{
"type": "hidden",
"id": "bean.teacherId",
"name": "bean.teacherId"
},
{
"type": "input-text",
"id": "teacherName",
"name": "teacherName",
"visibleOn": "true",
"size": "md",
"placeholder": "昵称、用户名",
"label": "${bean.teacherId}",
"labelWidth": 200,
"required": true,
"addOn": {
"label": "${bean.teacherId}",
"type": "text"
},
"validationErrors": {
"isRequired": "老师名称是必填项,不能为空"
},
"onEvent": {
"blur": {
"actions": [
{
"weight": 1000,
"actionType": "ajax",
"args": {
"api": {
"url": "/admin/openclass/blur.do?content=${teacherName}&type=get_teacher",
"method": "get"
},
"messages": {
"success": "",
"failed": "没查询到相关信息,请确认您填写的无误"
}
}
},
{
"weight": 100,
"componentId": "bean.teacherId",
"args": {
"value": "${event.data.teacherId}"
},
"actionType": "setValue"
}
]
}
}
}
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the issue with the provided 2.3.1 schema: change teacherName, trigger the blur AJAX action, and observe the addOn label bound to bean.teacherId. Trace the addOn label expression and setValue update path; done means the label changes to the newly returned teacherId after each lookup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100