<template> <a-select labelInValue :defaultValue="{ key: 'lucy' }" style="width: 120px" @change="handleChange"> <a-select-option value="jack">Jack (100)</a-select-option> <a-select-option value="lucy">Lucy (101)</a-select-option> </a-select> </template> <script> export default { methods: { handleChange(value) { console.log(value); // { key: "lucy", label: "Lucy (101)" } } } } </script>
参考网址:https://vue.ant.design/components/select-cn/#components-select-demo-automatic-tokenization
文章来源: https://blog.csdn.net/ljljlj1993/article/details/92641426