标题Ant Design of Vue 组件库中Modal“确认“按钮和“取消“按钮成英文状态

标题Ant Design of Vue 组件库中Modal"确认"按钮和"取消"按钮成英文状态

因为是国际化的原因,造成确定按钮和取消按钮变成英文,需要设置 okText 与 cancelText 以自定义按钮文字。

<div>
      <a-modal v-model="visible" title="功能模块配置" @ok="handleOk" ok-text="确认" cancel-text="取消">
        <p>Some contents...</p>
        <p>Some contents...</p>
        <p>Some contents...</p>
        <p>Some contents...</p>
      </a-modal>
    </div>

我找了很多原因,但是,通过我百度发现,都是清一色设置本地解析为zh-CN,在vue中我设置了,但是不起作用,我又把index.html中的语言设置成lang="zh-CN"还是不起作用,我有又看了API结合之前百度到的关键字眼国际化又找到Modal中的国际化,果然,惊喜就在眼前,美滋滋。。。。。。。。雄起,奥利给!!!!!!

设置之前:

在这里插入图片描述

设置之后:

在这里插入图片描述