zhou zhou
9 小时以前 fec285d150b377d004e47f0973d298b92fe4c711
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { computed } from 'vue'
import appConfig from '@/config'
function useFastEnter() {
  const fastEnterConfig = computed(() => appConfig.fastEnter)
  const enabledApplications = computed(() => {
    if (!fastEnterConfig.value?.applications) return []
    return fastEnterConfig.value.applications
      .filter((app) => app.enabled !== false)
      .sort((a, b) => (a.order || 0) - (b.order || 0))
  })
  const enabledQuickLinks = computed(() => {
    if (!fastEnterConfig.value?.quickLinks) return []
    return fastEnterConfig.value.quickLinks
      .filter((link) => link.enabled !== false)
      .sort((a, b) => (a.order || 0) - (b.order || 0))
  })
  const minWidth = computed(() => {
    return fastEnterConfig.value?.minWidth || 1200
  })
  return {
    fastEnterConfig,
    enabledApplications,
    enabledQuickLinks,
    minWidth
  }
}
export { useFastEnter }