0

我有一个闪亮的应用程序,其中有一个操作按钮,可以连接到 Skype,因此人们可以直接与我聊天。下面是我尝试过的代码,但是当单击操作按钮时没有任何反应。

library(shiny)
library(shinydashboard)

rm(list=ls())

header <- dashboardHeader()
sidebar <- dashboardSidebar(
  sidebarMenu(id = "menuChoice",
          menuItem("Resources", tabName = "ResourcesMenu", icon = icon("leaf"),
                   menuSubItem("Filter Selection", tabName = 
"LayoutSubMenu", icon = icon("angle-double-right")),
                   menuSubItem("Test", tabName = "Test2", icon = icon("globe")),
                   menuSubItem("Test 3", tabName = "Test3", icon = icon("wrench"))
          ),
          menuItem("Trial Run", tabName = "TR", icon = icon("star"))
  )
)

body <- dashboardBody(
  uiOutput("TabSelect"),

#This action button is where I need help
  a(actionButton(inputId = "phone", 
             label = "867-5309", 
             icon = icon("fab fa-skype", lib = "font-awesome")
  ),
  href="skype:LastName, FirstName?chat"
  )
)


ui <- dashboardPage(header, sidebar, body)

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

  output$TabSelect <- renderUI ({
    selectInput(inputId = "LoadTab", "Available Tabs",
            choices = c(input$menuChoice)  
    )
  })
}

shinyApp(ui, server)
4

0 回答 0