UiPath Documentation
activities
latest
false
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

工作流活动

上次更新日期 2026年5月13日

单击按钮切换选项卡

When you configure multiple tabs, you can add a Button component, that switches to the next tab. This tutorial demonstrates how to create a Button component that switches to the next tab.

教程

要创建自定义按钮组件,请执行以下操作:

  1. Drag and drop a Button component into your form.
  2. In the Display tab of the Button component, set the Action property to Click.
  3. Check Use for Local Update.
  4. Configure the Button component to switch to the second tab in the Update Data Logic section.
  5. 配置选项卡控件以显示第二个选项卡。在此示例中,我们希望在单击按钮时显示Q2选项卡。设置第二个选项卡时,请将其引用为Tab(1) ,因为我们正在处理基于 0 的索引。对于此示例,复制并粘贴下面的脚本,以配置选项卡控件。[您需要指定用户必须粘贴脚本的位置]
    var tabs = form.getComponent('tabs');
    tabs.setTab(1);
    var tabs = form.getComponent('tabs');
    tabs.setTab(1);
    
  6. Use the additional script below that enables the Do Block to run when switching to the second tab. This step is optional, created to demonstrate the number of times the Button component is clicked.
    instance.emit('executeDoBlock', instance.component);
    instance.emit('executeDoBlock', instance.component);
    
  7. 保存组件和表单。

示例工作流

要查看完整的工作流或供日后参考,请下载XAML 示例

  • 教程
  • 示例工作流

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新