We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
有时候需要拿到已选中选项的一些其他附带的参数,现在根本取不到,只能再自己去用原数据筛选出来,这样太麻烦了吧
The text was updated successfully, but these errors were encountered:
@cao1987 这种场景可以使用对象格式的 value,使用 value-key 绑定上一个 key,这时会返回整个 value 对象
Sorry, something went wrong.
value 有示例代码吗?官网没看到示例代码
回答太抽象了,试了一下,数据结构改成
[ { "label": "111", "value": { "id": 1, "name": "111-1" } } ]
<a-cascader v-model="goodsItem.goods_id" allow-search :options="options" value-key="id" placeholder="请选择商品" @change="handleChangeGoods" />
注意value-key需要设置为id或主键字段,这样handleChangeGoods 收到的是value对象
可以启用 path-mode,就能拿到上下级
flsion
No branches or pull requests
有时候需要拿到已选中选项的一些其他附带的参数,现在根本取不到,只能再自己去用原数据筛选出来,这样太麻烦了吧
The text was updated successfully, but these errors were encountered: