amis icon indicating copy to clipboard operation
amis copied to clipboard

v2.8以上版本 Tabs 选项卡 组件 配置索引值 默认显示某个选项卡无效

Open ArrNNG opened this issue 3 years ago • 3 comments

描述问题:

Tabs 选项卡 组件 通过配置索引值的方式来默认显示某个选项卡无效,激活的都是第一个选项卡

截图或视频:

image

如何复现(请务必完整填写下面内容):

  1. 你是如何使用 amis 的? sdk

  2. amis 版本是什么?请先在最新 beta 版本测试问题是否存在 v2.8.0

  3. 粘贴有问题的完整 amis schema 代码:

 {

                "type": "page",
                "body": { 
                    "type": "tabs",
                    "activeKey": 3,
                    "tabs": [
                        {
                            "title": "Tab 1", 
                            "tab": "Content 1"
                        },
                        {
                            "title": "Tab 2", 
                            "tab": "Content 2"
                        },
                        {
                            "title": "Tab 3", 
                            "tab": "Content 2"
                        },
                        {
                            "title": "Tab 4", 
                            "tab": "Content 2"
                        }
                    ]
                }


            };
  1. 操作步骤 输入 amis schema 代码,网页中默认激活的不是所设置的选项卡

ArrNNG avatar Mar 02 '23 07:03 ArrNNG

v2.7.2 中无此问题

ArrNNG avatar Mar 02 '23 08:03 ArrNNG

2.9.0 中仍存在此问题

ArrNNG avatar Apr 03 '23 06:04 ArrNNG

使用 defaultKey 配置初始值可以默认

ArrNNG avatar May 09 '23 08:05 ArrNNG