File tree Expand file tree Collapse file tree 5 files changed +31
-6
lines changed
mobile-first/app/calendar-view
packages/vue/src/calendar-view/src Expand file tree Collapse file tree 5 files changed +31
-6
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,20 @@ export default {
171171 mode : [ 'pc' , 'mobile-first' ] ,
172172 pcDemo : 'basic-usage' ,
173173 mfDemo : 'basic-usage'
174+ } ,
175+ {
176+ name : 'show-back-today' ,
177+ type : 'boolean' ,
178+ defaultValue : 'true' ,
179+ desc : {
180+ 'zh-CN' : '是否展示左上侧按钮显示,默认展示' ,
181+ 'en-US' : 'Should the upper left button be displayed, Default Display'
182+ } ,
183+ meta : {
184+ stable : '3.22.0'
185+ } ,
186+ mode : [ 'mobile-first' ] ,
187+ mfDemo : 'calendar-mode'
174188 }
175189 ] ,
176190 events : [
Original file line number Diff line number Diff line change 11<template >
2- <tiny-calendar-view :events =" eventslist" :year =" 2023" :month =" 6" :modes =" ['month', 'timeline', 'schedule']" >
2+ <tiny-calendar-view
3+ :show-back-today =" false"
4+ :events =" eventslist"
5+ :year =" 2023"
6+ :month =" 6"
7+ :modes =" ['month', 'timeline', 'schedule']"
8+ >
39 </tiny-calendar-view >
410</template >
511
Original file line number Diff line number Diff line change @@ -22,9 +22,9 @@ export default {
2222 } ,
2323 desc : {
2424 'zh-CN' :
25- '<p>通过 <code>mode</code> 属性指定以年的形式显示,将展示当年的每个月份。可选值有 <code>month</code> / <code>timeline</code> / <code>schedule</code>。</p>\n' ,
25+ '<p>通过 <code>mode</code> 属性指定以年的形式显示,将展示当年的每个月份。可选值有 <code>month</code> / <code>timeline</code> / <code>schedule</code>。通过<code>show-back-today</code> 属性控制左侧按钮显示。 </p>\n' ,
2626 'en-US' :
27- '<p>The <code>mode</code> attribute specifies that each month of the current year is displayed. The options are <code>month</code> / <code>timeline</code> / <code>schedule</code>. </p>\n'
27+ '<p>The <code>mode</code> attribute specifies that each month of the current year is displayed. The options are <code>month</code> / <code>timeline</code> / <code>schedule</code>. Control the display of the left button through the<code>show back today</code>attribute. </p>\n'
2828 } ,
2929 codeFiles : [ 'calendar-mode.vue' ]
3030 } ,
Original file line number Diff line number Diff line change @@ -76,6 +76,10 @@ export const calendarViewProps = {
7676 multiSelect : {
7777 type : Boolean ,
7878 default : false
79+ } ,
80+ showBackToday : {
81+ type : Boolean ,
82+ default : true
7983 }
8084}
8185
Original file line number Diff line number Diff line change 2020 </template >
2121 </tiny-tooltip >
2222 <div data-tag =" tiny-calendar-view-today" class =" flex justify-around items-center mb-3" >
23- <tiny-button @click =" toToday" >{{ t('ui.calendarView.backToday') }}</tiny-button >
23+ <tiny-button v-if = " showBackToday " @click =" toToday" >{{ t('ui.calendarView.backToday') }}</tiny-button >
2424 <tiny-date-picker
2525 v-model =" state.currentDate"
26- class =" ml-5 shrink-0"
26+ : class =" [showBackToday ? ' ml-5' : '', ' shrink-0'] "
2727 shape =" filter"
2828 type =" month"
2929 :clearable =" false"
@@ -376,7 +376,8 @@ export default defineComponent({
376376 ' events' ,
377377 ' height' ,
378378 ' mark-color' ,
379- ' multi-select'
379+ ' multi-select' ,
380+ ' showBackToday'
380381 ],
381382 setup(props , context ) {
382383 return setup ({
You can’t perform that action at this time.
0 commit comments