贡献点

贡献点

作者:


表单

子表视图

form.tableView.participants.display,其中participants是子表的字段名,参考 apps/link/src/extensions/business/bizform/project/calendar/participant-item-view/index.tsx

export default {
  activate(ctx: IFormActiveContext) {
    ctx.tableView.enhance('form.calendarEntry.participantsView', (parent) => {
      return ctx.tableView.createFilterView({
        source: parent,
        filter: (item) => {
            return item.participantType?.id !== 'User'
        }
      });
    })
  }
}

h5列表

列表的卡片自定义渲染

参考 apps/link-h5/src/extension/query-list/pur-req/manifest.json

{
  "name": "purReqQueryList",
  "version": "1.0.0",
  "publisher": "platform",
  "dependencies": {
    "lifecycles": "*",
    "views": "*"
  },
  "activationEvents": [
    "postConstruct"
  ],
  "contributes": {
    "views": [
      {
        "cp": "internalViews.list.card",
        "name": "purReqQueryList.defaultListCard"
      },
      {
        "cp": "internalViews.list.card.item",
        "name": "purReqQueryList.defaultListCardItem"
      }
    ]
  }
}