-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
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
AutoComplete The console will report an error when using the option that directly passes #dataSource to the AutoComplete component. It is not recommended to use the datasource. How can I customize the options with options? #4012
Comments
就是prop改名了吧 |
ant-design-vue/components/auto-complete/index.tsx Lines 17 to 23 in 3a93f19
由于上面的定义,下面这里的代码判断
所以这里是需要改进的。 |
@zzxxiinn 你是不是看错了,定义的是 |
@John60676 感谢回复指出,上面是我引用的不对。不过我在 error stack 中看到报错是 // webpack:///./node_modules/ant-design-vue/es/auto-complete/index.js?28da
setup: function setup(props, _ref) {
var slots = _ref.slots;
warning(!('dataSource' in props || 'dataSource' in slots), 'AutoComplete', '`dataSource` is deprecated, please use `options` instead.');
return {
configProvider: inject('configProvider', defaultConfigProvider),
popupRef: null,
select: null
};
}, 用的 antd 版本是 |
@zzxxiinn 这个 issue 在 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Version
2.1.3
Environment
2.1.2
Reproduction link
#3210
Steps to reproduce
AutoComplete 自动完成组件在使用 #dataSource 自定义Option时控制台会报错(不推荐使用datasource,建议用options),请问如何用options自定义选项
What is expected?
希望能自定义选项并且控制台不报错
What is actually happening?
AutoComplete 自动完成级件在使用直接传递 #dataSource 的Option时控制台会报错不推荐使用datasource,请问如何用options自定义选项
The text was updated successfully, but these errors were encountered: