Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions examples/sites/demos/apis/calendar-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,20 @@ export default {
pcDemo: 'basic-usage',
mfDemo: 'basic-usage'
},
{
name: 'show-tip-time',
type: 'Boolean',
defaultValue: 'true',
desc: {
'zh-CN': '显示日程tips时间',
'en-US': 'Show schedule tips time'
},
meta: {
stable: '3.23.0'
},
mode: ['pc', 'mobile-first'],
mfDemo: ''
},
{
name: 'v-model',
type: 'String',
Expand Down
4 changes: 4 additions & 0 deletions packages/vue/src/calendar-view/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ export const calendarViewProps = {
showBackToday: {
type: Boolean,
default: true
},
showTipTime: {
type: Boolean,
default: true
}
}

Expand Down
5 changes: 3 additions & 2 deletions packages/vue/src/calendar-view/src/mobile-first.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<template #content>
<div class="p-2 max-h-[80vh] overflow-auto">
<div class="px-1.5 mb-1.5 border-l-2 border-color-brand">{{ state.eventTipContent.title }}</div>
<div class="mb-1.5 px-2 text-color-text-placeholder">
<div v-if="showTipTime" class="mb-1.5 px-2 text-color-text-placeholder">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that showTipTime is properly initialized and passed down to this component to avoid potential runtime errors if it is undefined.

{{ state.eventTipContent.startDay }} {{ state.eventTipContent.startTime }} ~
{{ state.eventTipContent.endDay }} {{ state.eventTipContent.endTime }}
</div>
Expand Down Expand Up @@ -370,7 +370,8 @@ export default defineComponent({
'height',
'mark-color',
'multi-select',
'showBackToday'
'showBackToday',
'showTipTime'
],
setup(props, context) {
return setup({
Expand Down
5 changes: 3 additions & 2 deletions packages/vue/src/calendar-view/src/pc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@
<template #content>
<div class="tooltip-main">
<div class="title">{{ state.eventTipContent.title }}</div>
<div class="date">
<div v-if="showTipTime" class="date">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that showTipTime is properly initialized and passed down to this component to avoid potential runtime errors if it is undefined.

{{ state.eventTipContent.startDay }} {{ state.eventTipContent.startTime }} ~
{{ state.eventTipContent.endDay }} {{ state.eventTipContent.endTime }}
</div>
Expand Down Expand Up @@ -284,7 +284,8 @@ export default defineComponent({
'events',
'height',
'markColor',
'multiSelect'
'multiSelect',
'showTipTime'
],
setup(props, context) {
return setup({
Expand Down
Loading