JavaScript/vue.js/error:修订间差异
来自康健生活
| 第11行: | 第11行: | ||
*: <syntaxhighlight lang="html"> | *: <syntaxhighlight lang="html"> | ||
:collapse-transition="false"</syntaxhighlight> | :collapse-transition="false"</syntaxhighlight> | ||
* TypeError: Cannot read property 'openedMenus' of | * TypeError: Cannot read property 'openedMenus' of undefined,在使用 elementui 时出现错误,按需子组件 vue 页面加载即可 | ||
*: <syntaxhighlight lang="javascript"> | |||
import {Menu, Submenu, MenuItem, MenuItemGroup} from 'element-ui'; | |||
Vue.use(Menu); | |||
Vue.use(Submenu); | |||
Vue.use(MenuItem); | |||
Vue.use(MenuItemGroup);</syntaxhighlight> | |||