Skip to content

LocaleProvider 国际化引入名称和文档不一样,且包裹路由后, DatePicker并未汉化 #3056

@lostimever

Description

@lostimever
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

2.0.0-beta.10

Environment

Vue3.0 typescript

Reproduction link

Edit on CodeSandbox

Steps to reproduce

在App.vue 中使用 包裹路由,DatePicker并未汉化

What is expected?

被包裹的组件汉化

What is actually happening?

被包裹的组件并未被汉化,
且提示Could not find a declaration file for module 'ant-design-vue/es/date-picker/locale/zh_CN'. 'E:/svn/***/app/node_modules/ant-design-vue/es/date-picker/locale/zh_CN.js' implicitly has an 'any' type.

<template>
  <a-config-provider :locale="locale">
    <router-view />
  </a-config-provider>
</template>
<script lang="ts">
  import { Vue } from 'vue-class-component'
  import zhCN from 'ant-design-vue/es/date-picker/locale/zh_CN'
  export default class App extends Vue {
    locale = zhCN
  }
</script>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions