mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 20:03:01 +08:00
docs: add macos custom menu EditMenu tips (#1423)
* docs: add macos custom menu EditMenu tips On macos platform, if custom the menu, we should append EditMenu to enable Cmd+C,Cmd+V,Cmd+Z... shortcut
This commit is contained in:
parent
316a24f6da
commit
e7f9e2f267
@ -18,6 +18,10 @@ An example of how to create a menu:
|
||||
FileMenu.AddText("Quit", keys.CmdOrCtrl("q"), func(_ *menu.CallbackData) {
|
||||
runtime.Quit()
|
||||
})
|
||||
|
||||
if runtime.GOOS == "darwin" {
|
||||
AppMenu.Append(menu.EditMenu()) // on macos platform, we should append EditMenu to enable Cmd+C,Cmd+V,Cmd+Z... shortcut
|
||||
}
|
||||
|
||||
err := wails.Run(&options.App{
|
||||
Title: "Menus Demo",
|
||||
|
Loading…
Reference in New Issue
Block a user