Closed simdax closed 5 years ago
Doesn't it work? I mean OK:
<hsc-menu-style-white>
<hsc-menu-bar style="border-radius: 0 0 4pt 0;">
<hsc-menu-bar-item label="File">
</hsc-menu-bar>
</hsc-menu-style-white>
NG:
<hsc-menu-style-white>
<hsc-menu-bar-item label="File">
</hsc-menu-style-white>
No, it still does not work, I was using the main example
<template>
<hsc-menu-style-white>
<hsc-menu-bar style="border-radius: 0 0 4pt 0;">
<hsc-menu-bar-item label="File">
<hsc-menu-item label="New" @click="window.alert('New')" />
<hsc-menu-item label="Open" @click="window.alert('Open')" />
<hsc-menu-separator/>
<hsc-menu-item label="Save" @click="window.alert('Save')" :disabled="true" />
<hsc-menu-item label="Export to">
<hsc-menu-item label="PDF" />
<hsc-menu-item label="HTML" />
</hsc-menu-item>
</hsc-menu-bar-item>
<hsc-menu-bar-item label="Edit">
<hsc-menu-item label="Undo" keybind="meta+z" @click="window.alert('Undo')" />
<hsc-menu-separator/>
<hsc-menu-item label="Cut" keybind="meta+x" @click="window.alert('Cut')" />
<hsc-menu-item label="Copy" keybind="meta+c" @click="window.alert('Copy')" />
<hsc-menu-item label="Paste" keybind="meta+v" @click="window.alert('Paste')" :disabled="true" />
</hsc-menu-bar-item>
</hsc-menu-bar>
</hsc-menu-style-white>
</template>
I see. The same problem occurred on my vue-electron environment too. I'll fix them.
I was looking into the issue, but have found no solution for now. It seems that these problems are caused by differences between browser and electron-environment.
Any updates on this issue. I love your package and want to use it with electron
any news on this?
I'm sorry that I have no idea about this.
@michitaro I don't no why,but add @hscmap/vue-menu to whitelist in webpack.renderer.config.js ,can workaroud this error.
let whiteListedModules = ['vue','element-ui','@hscmap/vue-menu']
Works like a charm
@gaodeng Thank you very much for the suggestion! I've confirmed that your suggestion solves the problem. I've updated the README to refer your suggestion.
Hello
I'm using the window component, found it great, and trying using this one. I'm trying to compile the simple example of the main page, with hsc-menu-bar/item Unfortunatly, i got errors, like unfound components. I'm working with an electron-vue template, and installing the plugin as usual import * as VueMenu from '@hscmap/vue-menu' and Vue.use(VueMenu) I have to use them all ?