Skip to content

Commit

Permalink
chore: 调整自动填充参照录入逻辑支持默认点选,state 换成 store,优化写入对象时保留原始对象其他字段逻辑 (#10789)
Browse files Browse the repository at this point in the history
  • Loading branch information
2betop committed Aug 16, 2024
1 parent 422f9ab commit 0734c2d
Show file tree
Hide file tree
Showing 7 changed files with 235 additions and 147 deletions.
3 changes: 3 additions & 0 deletions docs/zh-CN/components/form/formitem.md
Original file line number Diff line number Diff line change
Expand Up @@ -1674,6 +1674,8 @@ fillMapping 配置 支持变量取值和表达式;
数据替换并去重:combo:'${UNIQ(ARRAYMAP(items, item => {platform: item.platform, version: item.version}))}'
数据替换:combo: ${items}

`autoFill.defaultSelection` 可以用来配置默认选中

```schema:scope="body"
{
"type": "form",
Expand All @@ -1685,6 +1687,7 @@ fillMapping 配置 支持变量取值和表达式;
"autoFill": {
"showSuggestion": true,
"api": "/api/mock2/form/autoUpdate?items=1",
"defaultSelection": "${combo}",
"multiple": true,
"fillMapping": {
"combo": "${UNIQ(CONCAT(combo, ARRAYMAP(items, item => {platform: item.platform, version: item.version})))}",
Expand Down
Loading

0 comments on commit 0734c2d

Please sign in to comment.