Skip to content

请问data-table怎么给行加上badge #6655

Closed Answered by ForJ-W
ForJ-W asked this question in Q&A
Discussion options

You must be logged in to vote

已找到解决方案,使用jsx:
npm install @vitejs/plugin-vue-jsx --save-dev

[
  {
    title: '通知时间',
    key: 'ct',
    width: 162,
  },
  {
    title: '通知内容',
    key: 'content',
    ellipsis: true,
    render(row: any) {
      return (
        <span>
          {row.content}
          <NBadge dot offset={[4, -8]}></NBadge>
        </span>
      )
    },
  },
]

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ForJ-W
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant