使用包 `rintrojs` 会破坏 navbarPage 中面板的显示

Using the package `rintrojs` breaks the display of panels in a navbarPage

我正在尝试使用软件包 rintrojs 展示我的闪亮应用程序。当我在 actionButton 或类似的东西上使用它时效果很好,但我想在 tabPanels 的名称上使用它。

我不想在面板中展示一些东西,我想在面板名称上有一个介绍框。但是,执行此操作时,tabPanels 不再显示。我应该怎么做?

这是一个可重现的例子:

library(shiny)
library(rintrojs)

ui <- navbarPage(

  title = "foo",
  introjsUI(),
  tabPanel(
    introBox(title = "Panel 1",
             data.step = 1,
             data.intro = "This is Panel 1"),
    fluidRow(actionButton("button1", "Button 1"))
  ), 

  tabPanel(
    introBox(title = "Panel 2",
             data.step = 2,
             data.intro = "This is Panel 2"),
    fluidRow(actionButton("button2", "Button 2"))
  )

  # If you want to see a "normal" app, comment from "introjsUI()" to here, and uncomment the chunk below 
  # tabPanel(title = "Panel 1",
  #          fluidRow(actionButton("button1", "Button 1"))
  # ),
  # tabPanel(title = "Panel 2",
  #          fluidRow(actionButton("button2", "Button 2"))
  # )
)

server <- shinyServer(function(input, output, session) {

  introjs(session)

})

shinyApp(ui, server)

这是提供的答案here

library(shiny)
library(rintrojs)

ui <- navbarPage(

  title = "foo",
  introjsUI(),
  tabPanel(
    title = introBox("Panel 1",
             data.step = 1,
             data.intro = "This is Panel 1"),
    fluidRow(actionButton("button1", "Button 1"))
  ), 

  tabPanel(
    title = introBox("Panel 2",
             data.step = 2,
             data.intro = "This is Panel 2"),
    fluidRow(actionButton("button2", "Button 2"))
  )

  # If you want to see a "normal" app, comment from "introjsUI()" to here, and uncomment the chunk below 
  # tabPanel(title = "Panel 1",
  #          fluidRow(actionButton("button1", "Button 1"))
  # ),
  # tabPanel(title = "Panel 2",
  #          fluidRow(actionButton("button2", "Button 2"))
  # )
)

server <- shinyServer(function(input, output, session) {

  introjs(session)

})

shinyApp(ui, server)