mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-05-23 06:59:15 +08:00
fix(Icon): add info prop deprecation warning (#7347)
* fix(Icon): add info prop deprecation warning * chore: adjust
This commit is contained in:
parent
4b4203daec
commit
4efd8fb92f
@ -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={[
|
||||||
|
Loading…
x
Reference in New Issue
Block a user