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:
刀刀
2022-05-25 08:49:04 +02:00
committed by GitHub
parent 316a24f6da
commit e7f9e2f267
+4
View File
@@ -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",