fix(Icon): add info prop deprecation warning (#7347)

* fix(Icon): add info prop deprecation warning

* chore: adjust
This commit is contained in:
neverland 2020-10-16 20:22:44 +08:00 committed by GitHub
parent 4b4203daec
commit 4efd8fb92f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,6 +50,12 @@ function Icon(
const name = correctName(props.name);
const imageIcon = isImage(name);
if (process.env.NODE_ENV !== 'production' && props.info) {
console.warn(
'[Vant] Icon: "info" prop is deprecated, use "badge" prop instead.'
);
}
return (
<props.tag
class={[