🌐 AI搜索 & 代理 主页
Skip to content

Commit ff24bf2

Browse files
committed
Update calendar.js
1 parent b2889bc commit ff24bf2

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

src/components/calendar/calendar.js

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -796,29 +796,28 @@ export const BCalendar = Vue.extend({
796796
)
797797

798798
// Content for the date navigation buttons
799-
// TODO: add slots for the nav button content
800799
const navScope = { isRTL }
800+
const navProps = { shiftV: 0.5 }
801+
const navPrevProps = { ...navProps, flipH: isRTL }
802+
const navNextProps = { ...navProps, flipH: !isRTL }
801803
const $prevDecadeIcon =
802804
this.normalizeSlot('nav-prev-decade', navScope) ||
803-
h(BIconChevronBarLeft, { props: { shiftV: 0.5, flipH: isRTL } })
805+
h(BIconChevronBarLeft, { props: navPrevProps })
804806
const $prevYearIcon =
805807
this.normalizeSlot('nav-prev-year', navScope) ||
806-
h(BIconChevronDoubleLeft, { props: { shiftV: 0.5, flipH: isRTL } })
808+
h(BIconChevronDoubleLeft, { props: navPrevProps })
807809
const $prevMonthIcon =
808-
this.normalizeSlot('nav-prev-month', navScope) ||
809-
h(BIconChevronLeft, { props: { shiftV: 0.5, flipH: isRTL } })
810+
this.normalizeSlot('nav-prev-month', navScope) || h(BIconChevronLeft, { props: navPrevProps })
810811
const $thisMonthIcon =
811-
this.normalizeSlot('nav-this-month', navScope) ||
812-
h(BIconCircleFill, { props: { shiftV: 0.5 } })
812+
this.normalizeSlot('nav-this-month', navScope) || h(BIconCircleFill, { props: navProps })
813813
const $nextMonthIcon =
814-
this.normalizeSlot('nav-next-month', navScope) ||
815-
h(BIconChevronLeft, { props: { shiftV: 0.5, flipH: !isRTL } })
814+
this.normalizeSlot('nav-next-month', navScope) || h(BIconChevronLeft, { props: navNextProps })
816815
const $nextYearIcon =
817816
this.normalizeSlot('nav-next-year', navScope) ||
818-
h(BIconChevronDoubleLeft, { props: { shiftV: 0.5, flipH: !isRTL } })
817+
h(BIconChevronDoubleLeft, { props: navNextProps })
819818
const $nextDecadeIcon =
820819
this.normalizeSlot('nav-next-decade', navScope) ||
821-
h(BIconChevronBarLeft, { props: { shiftV: 0.5, flipH: !isRTL } })
820+
h(BIconChevronBarLeft, { props: navNextProps })
822821

823822
// Utility to create the date navigation buttons
824823
const makeNavBtn = (content, label, handler, btnDisabled, shortcut) => {

0 commit comments

Comments
 (0)