baidu / baidu/amis

CRUD 支持 list、table、card 以外组件的渲染

Open
#3,148 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
18.9k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

是否关联于某个问题吗:

我想自定义 CRUD body 中的展示。默认的 list, table, card 都不满足显示要求。

预期的解决方案:

保留查询,分页,可以完全自定义 body 部分。

任何附加信息:

其实经过实验,CRUD 是支持其它组件的,只要 mode改成组件名称就可以了。实验过 wrapper、pagination-wrapper,只要将 body 写成自定义的就可以了。

但是问题在于,body 中拿到的是 CRUD 整个返回结果,然后在这里面无法使用【each】,一旦使用将报错:

Error: 找不到对应的渲染器

Path: service/body/crud/body/pagination-wrapper/body/5/each/item/0/0/

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the CRUD custom-body case described in service/body/crud/body/pagination-wrapper/body, especially the use of each. Verify that query and pagination remain available while a custom component renders the body, and that iteration no longer produces the missing-renderer error. Done means components beyond list, table, and card can render custom CRUD bodies successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.