baidu/amis

6.3版本国际化切换问题

Closed this issue · 2 comments

实现场景:

6.3版本中切换中英文

存在的问题:

使用
amisScoped.updateProps({
locale: 'zh-CN', // 切换到中文环境
});
但提示找不到updateProps方法

当前方案:

请粘贴你当前方案的完整 amis schema 代码...

不能复现

(function () {
        let amis = amisRequire('amis/embed');
        // 通过替换下面这个配置来生成不同页面
        let amisJSON = {
          type: 'page',
          title: '表单页面',
          body: {
            type: 'form',
            mode: 'horizontal',
            api: '/saveForm',
            body: [
              {
                label: 'Name',
                type: 'input-text',
                name: 'name'
              },
              {
                label: 'Email',
                type: 'input-email',
                name: 'email'
              }
            ]
          }
        };
        let amisScoped = amis.embed('#root', amisJSON);
        window.amisScoped = amisScoped;
      })();
image image

如果你用的不是 sdk 版本,直接通过 props 下发即可,有问题再开