Skip to content

级联选择器没有异步加载数据lodata没有反应 并且点击框会报vue.js:634 [Vue warn]: Failed to resolve directive: value #2294

@hardWork55

Description

@hardWork55
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

1.6.0

Environment

mac Google Chrome 已是最新版本 版本 83.0.4103.61(正式版本)

Reproduction link

https://github.com/vueComponent/ant-design-vue/blob/master/components/cascader/index.jsx

Steps to reproduce

<a-cascader
placeholder="请选择地址"
:field-names="{ label: 'Ct', value: 'Dm', children: 'children' }"
:options="provienceList"
change-on-select
:load-data="addressChange"
@change="change"
/>
//级联选择器 地址改变
async addressChange(value, selectionOptions) {
console.log(value, selectionOptions)
let targetOption = selectionOptions[selectionOptions.length - 1]
console.log(targetOption)
targetOption.loading = true
let tableName = targetOption.Jlbs === 1 ? 'sys_zd_cityblock' : 'sys_zd_city'
let url = '/Sys/SysCommon/GetAreaList'
let data = { code: targetOption.Dm, tableName }
let result = await service.post(url, data)
let status = result.code
if (status === 1) {
targetOption.loading = false
let address = result.data
targetOption.children = address
this.provienceList = [...this.provienceList]
console.log(this.provienceList)
}
},

What is expected?

解决bug

What is actually happening?

1.loadData没有反应
2.点击框报错 [Vue warn]: Failed to resolve directive: value

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions