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

修改活动列表标签类别

parent cedbde8b
...@@ -231,18 +231,19 @@ const columns = [ ...@@ -231,18 +231,19 @@ const columns = [
if (typeof tagType === 'string') { if (typeof tagType === 'string') {
tagType = [tagType] tagType = [tagType]
} }
const types = tagType.map( const types = tagType.map((tag: string) => ({
(tag: string) => type: activity?.find((e) => e.name === tag)?.type || 'default',
activity?.find((e) => e.name === tag)?.type || 'default', name: tag,
) }))
console.log('123', types)
return h(NSpace, () => [ return h(NSpace, () => [
...types.map((type, i) => ...types.map((item, i) =>
h( h(
NTag, NTag,
{ {
key: i, key: i,
size: 'small', size: 'small',
type: type as type: item.type as
| 'default' | 'default'
| 'error' | 'error'
| 'primary' | 'primary'
...@@ -250,7 +251,7 @@ const columns = [ ...@@ -250,7 +251,7 @@ const columns = [
| 'success' | 'success'
| 'warning', | '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