Browse Source

fix: change method name

mrxiaozhuox 3 năm trước cách đây
mục cha
commit
30bb92f09a
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      packages/desktop/src/desktop_context.rs

+ 3 - 3
packages/desktop/src/desktop_context.rs

@@ -34,7 +34,7 @@ impl DesktopContext {
     /// ```rust
     /// onmousedown: move |_| { desktop.drag_window(); }
     /// ```
-    pub fn drag_window(&self) {
+    pub fn drag(&self) {
         let _ = self.proxy.send_event(UserWindowEvent::DragWindow);
     }
 
@@ -54,12 +54,12 @@ impl DesktopContext {
     }
 
     /// close window
-    pub fn close_window(&self) {
+    pub fn close(&self) {
         let _ = self.proxy.send_event(UserWindowEvent::CloseWindow);
     }
 
     /// set window to focus
-    pub fn set_focus(&self) {
+    pub fn focus(&self) {
         let _ = self.proxy.send_event(UserWindowEvent::FocusWindow);
     }