events.rs 561 B

1234567891011121314151617181920212223242526
  1. use dioxus::prelude::*;
  2. fn main() {
  3. dioxus::desktop::launch(app);
  4. }
  5. fn app(cx: Scope) -> Element {
  6. cx.render(rsx! {
  7. div {
  8. button {
  9. ondblclick: move |_| {
  10. //
  11. println!("double clicked!");
  12. },
  13. "Click me!"
  14. }
  15. input {
  16. onfocusin: move |_| {
  17. //
  18. println!("blurred!");
  19. },
  20. "onblur": "console.log('blurred!')"
  21. }
  22. }
  23. })
  24. }