# 展开子菜单 你可以设定 `default-expanded-names` 让菜单工作在非受控状态下或者使用 `expanded-names` 和 `@expanded-names-change` 以受控的方式控制菜单。 ```html ``` ```js import bookIcon from 'naive-ui/lib/icons/book-outline' import personIcon from 'naive-ui/lib/icons/person-outline' import wineIcon from 'naive-ui/lib/icons/wine-outline' export default { components: { bookIcon, personIcon, wineIcon }, data () { return { defaultExpandedNames: ['dance-dance-dance', 'food'], activeName: null } }, methods: { handleSelect (value) { this.$NMessage.info('Select: ' + JSON.stringify(value)) }, handleExpandedNamesChange (value) { this.$NMessage.info('ExpandedNamesChange: ' + JSON.stringify(value)) } } } ```