{{ item.title }} // recommend use functional component // // // // {{ props.menuInfo.title }} // // // // // {{ item.title }} // // // // // // export default { // props: ['menuInfo'], // }; import { Menu } from 'ant-design-vue'; const SubMenu = { template: ` {{ menuInfo.title }} {{ item.title }} `, name: 'SubMenu', // must add isSubMenu: true isSubMenu: true, props: { ...Menu.SubMenu.props, // Cannot overlap with properties within Menu.SubMenu.props menuInfo: { type: Object, default: () => ({}), }, }, }; export default { components: { 'sub-menu': SubMenu, }, data() { return { collapsed: false, list: [ { key: '1', title: 'Option 1', }, { key: '2', title: 'Navigation 2', children: [ { key: '2.1', title: 'Navigation 3', children: [{ key: '2.1.1', title: 'Option 2.1.1' }], }, ], }, ], }; }, methods: { toggleCollapsed() { this.collapsed = !this.collapsed; }, }, }; 渲染出来的标签 怎么添加@click 我在红框里直接添加点击事件报错