Commit 1a3c24d6 authored by 郭铭瑶's avatar 郭铭瑶 🤘

修改活动列表标签类别

parent cedbde8b
......@@ -231,18 +231,19 @@ const columns = [
if (typeof tagType === 'string') {
tagType = [tagType]
}
const types = tagType.map(
(tag: string) =>
activity?.find((e) => e.name === tag)?.type || 'default',
)
const types = tagType.map((tag: string) => ({
type: activity?.find((e) => e.name === tag)?.type || 'default',
name: tag,
}))
console.log('123', types)
return h(NSpace, () => [
...types.map((type, i) =>
...types.map((item, i) =>
h(
NTag,
{
key: i,
size: 'small',
type: type as
type: item.type as
| 'default'
| 'error'
| 'primary'
......@@ -250,7 +251,7 @@ const columns = [
| 'success'
| 'warning',
},
{ default: () => row['标签类别'] },
{ default: () => item.name },
),
),
])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment