<template>
    <div :class="layoutType === 'new' ? 'content1-layout' : 'content-layout'">
        <a-config-provider :locale="locale" :input="input">
            <router-view
                class="animated trans"
                :class="[
                    padding0 ? 'padding0' : '',
                    layoutType === 'new'
                        ? 'router-view1-layout'
                        : 'router-view-layout',
                ]"
            />
        </a-config-provider>
    </div>
</template>

<script lang="ts">
import { defineComponent, toRefs, reactive, ref, watchEffect } from 'vue'
import zhCN from 'ant-design-vue/es/locale/zh_CN'
import dayjs from 'dayjs'
import 'dayjs/locale/zh-cn'
dayjs.locale('zh-cn')
import { useStore } from 'vuex'
export default defineComponent({
    setup(): any {
        const store = useStore()
        const _this = reactive({
            input: {
                autocomplete: 'off',
            },
        })
        const padding0 = ref(false)

        watchEffect(() => {
            padding0.value = store.state.padding0
        })

        return {
            padding0,
            ...toRefs(_this),
            ...toRefs(store.state),
            locale: zhCN,
        }
    },
})
</script>
