mirror of
https://github.com/youzan/vant.git
synced 2025-10-21 19:24:16 +00:00
fix(Icon): add info prop deprecation warning (#7347)
* fix(Icon): add info prop deprecation warning * chore: adjust
This commit is contained in:
@@ -50,6 +50,12 @@ function Icon(
|
|||||||
const name = correctName(props.name);
|
const name = correctName(props.name);
|
||||||
const imageIcon = isImage(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 (
|
return (
|
||||||
<props.tag
|
<props.tag
|
||||||
class={[
|
class={[
|
||||||
|
Reference in New Issue
Block a user