Skip to content

Commit bec9bbd

Browse files
authored
feat:日历视图详细时间支持配置隐藏 (#3274)
1 parent fc1ab1f commit bec9bbd

File tree

4 files changed

+24
-4
lines changed

4 files changed

+24
-4
lines changed

examples/sites/demos/apis/calendar-view.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,20 @@ export default {
149149
pcDemo: 'basic-usage',
150150
mfDemo: 'basic-usage'
151151
},
152+
{
153+
name: 'show-tip-time',
154+
type: 'Boolean',
155+
defaultValue: 'true',
156+
desc: {
157+
'zh-CN': '显示日程tips时间',
158+
'en-US': 'Show schedule tips time'
159+
},
160+
meta: {
161+
stable: '3.23.0'
162+
},
163+
mode: ['pc', 'mobile-first'],
164+
mfDemo: ''
165+
},
152166
{
153167
name: 'v-model',
154168
type: 'String',

packages/vue/src/calendar-view/src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ export const calendarViewProps = {
8080
showBackToday: {
8181
type: Boolean,
8282
default: true
83+
},
84+
showTipTime: {
85+
type: Boolean,
86+
default: true
8387
}
8488
}
8589

packages/vue/src/calendar-view/src/mobile-first.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<template #content>
55
<div class="p-2 max-h-[80vh] overflow-auto">
66
<div class="px-1.5 mb-1.5 border-l-2 border-color-brand">{{ state.eventTipContent.title }}</div>
7-
<div class="mb-1.5 px-2 text-color-text-placeholder">
7+
<div v-if="showTipTime" class="mb-1.5 px-2 text-color-text-placeholder">
88
{{ state.eventTipContent.startDay }} {{ state.eventTipContent.startTime }} ~
99
{{ state.eventTipContent.endDay }} {{ state.eventTipContent.endTime }}
1010
</div>
@@ -370,7 +370,8 @@ export default defineComponent({
370370
'height',
371371
'mark-color',
372372
'multi-select',
373-
'showBackToday'
373+
'showBackToday',
374+
'showTipTime'
374375
],
375376
setup(props, context) {
376377
return setup({

packages/vue/src/calendar-view/src/pc.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@
216216
<template #content>
217217
<div class="tooltip-main">
218218
<div class="title">{{ state.eventTipContent.title }}</div>
219-
<div class="date">
219+
<div v-if="showTipTime" class="date">
220220
{{ state.eventTipContent.startDay }} {{ state.eventTipContent.startTime }} ~
221221
{{ state.eventTipContent.endDay }} {{ state.eventTipContent.endTime }}
222222
</div>
@@ -284,7 +284,8 @@ export default defineComponent({
284284
'events',
285285
'height',
286286
'markColor',
287-
'multiSelect'
287+
'multiSelect',
288+
'showTipTime'
288289
],
289290
setup(props, context) {
290291
return setup({

0 commit comments

Comments
 (0)