<el-submenu
v-for="(item, index) in menuList"
:key="index"
:index="console.log(item.name) || item.name"
>
main.js
Vue.prototype.console = console
参考:
https://stackoverflow.com/questions/51080447/how-can-i-use-console-log-or-console-error-in-a-vue-template
标签:index,console,log,bind,item,vue2,name From: https://www.cnblogs.com/hhdom/p/17617001.html