Skip to content

Commit 3fcea1e

Browse files
authored
Merge pull request #1160 from thomasyxy/next
修复日历组件marks参数失效
2 parents 68b54f7 + 8026b89 commit 3fcea1e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export default class AtCalendarList extends React.Component<Props> {
6666
<View className='extra-marks'>
6767
{item.marks.map((mark, key) => (
6868
<Text key={key} className='mark'>
69-
{mark}
69+
{mark.value}
7070
</Text>
7171
))}
7272
</View>

0 commit comments

Comments
 (0)