UNPKG

winbox-ui-next

Version:

We Design Vue 2.0: A Vue.js 3 UI Library

12 lines (11 loc) 371 B
import { toRefs, computed } from "vue"; function usePanelSpan(props) { const { mode } = toRefs(props); const span = computed(() => ({ date: 1, week: 1, year: 10 * 12, quarter: 12, month: 12 })[mode.value]); const superSpan = computed(() => ["year"].includes(mode.value) ? 10 * 12 : 12); return { span, superSpan }; } export { usePanelSpan as default };