Skip to content

Commit f331889

Browse files
committed
feat: 修复日期标记无法显示
1 parent c601ebf commit f331889

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

packages/taro-ui/src/components/calendar/common/helper.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ function getFullItem(
1212
selectedDate: Calendar.SelectedDate,
1313
isShowStatus?: boolean
1414
): any {
15+
if (options.marks.find(x => x.value === item.value)) {
16+
(item.marks as Array<Calendar.Mark>) = [{
17+
value: item.value as string
18+
}]
19+
}
1520
if (!isShowStatus) return item
1621

1722
const bindedPlugins = plugins.map(fn =>

packages/taro-ui/src/components/calendar/ui/date-list/index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,7 @@ export default class AtCalendarList extends React.Component<Props> {
6565
{item.marks && item.marks.length > 0 ? (
6666
<View className='extra-marks'>
6767
{item.marks.map((mark, key) => (
68-
<Text key={key} className='mark'>
69-
{mark}
70-
</Text>
68+
<Text key={key} className='mark' />
7169
))}
7270
</View>
7371
) : null}

0 commit comments

Comments
 (0)