logo
  • 教程列表
  • SO官方文檔
  • 使用 Hyperloop 將 React.js 與 Rails 整合
    • 在 Rails 應用程式中新增一個簡單的反應元件(用 ruby 編寫)
    • 回撥
    • 宣告元件引數(道具)
    • HTML 標籤
    • 事件處理程式
    • 狀態
  1. StackOverflow 文件
  2. Ruby on Rails 教程
  3. 使用 Hyperloop 將 React.js 與 Rails 整合
  4. 事件處理程式

事件處理程式

Created: November-22, 2018

# Event handlers are attached using the 'on' method
class ClickMe < Hyperloop::Component
  render do
    DIV do
      SPAN { "Hello There" }
      A { "Click Me" }.on(:click) { alert('you did it!' }
    end
  end
end
  • 狀態
  • HTML 標籤

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明