mirror of
https://github.com/chansee97/nova-admin.git
synced 2025-09-18 03:39:58 +08:00
44 lines
1015 B
Vue
44 lines
1015 B
Vue
<script setup lang="ts">
|
|
import { useAppStore } from '@/store'
|
|
import { naiveI18nOptions } from '@/utils'
|
|
import { darkTheme } from 'naive-ui'
|
|
|
|
const appStore = useAppStore()
|
|
|
|
const naiveLocale = computed(() => {
|
|
return naiveI18nOptions[appStore.lang] ? naiveI18nOptions[appStore.lang] : naiveI18nOptions.enUS
|
|
})
|
|
|
|
const propOverrides = {
|
|
ProSearchForm: {
|
|
labelPlacement: 'left',
|
|
cols: 4,
|
|
},
|
|
ProModalForm: {
|
|
labelWidth: 100,
|
|
labelPlacement: 'left',
|
|
preset: 'card',
|
|
},
|
|
ProDataTable: {
|
|
paginateSinglePage: false,
|
|
},
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<pro-config-provider
|
|
:prop-overrides="propOverrides"
|
|
abstract
|
|
inline-theme-disabled
|
|
:theme="appStore.colorMode === 'dark' ? darkTheme : null"
|
|
:locale="naiveLocale.locale"
|
|
:date-locale="naiveLocale.dateLocale"
|
|
:theme-overrides="appStore.theme"
|
|
>
|
|
<naive-provider>
|
|
<router-view />
|
|
<Watermark :show-watermark="appStore.showWatermark" />
|
|
</naive-provider>
|
|
</pro-config-provider>
|
|
</template>
|