mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix(Icon): should compatible with medel-o
This commit is contained in:
parent
657c1b3106
commit
7b905a6de8
@ -199,7 +199,8 @@ export default {
|
||||
|
||||
span {
|
||||
display: block;
|
||||
margin: -4px 0 16px;
|
||||
height: 36px;
|
||||
margin: -4px 0 4px;
|
||||
padding: 0 5px;
|
||||
color: @gray-7;
|
||||
font-size: 12px;
|
||||
|
@ -27,8 +27,13 @@ function isImage(name?: string): boolean {
|
||||
}
|
||||
|
||||
// compatible with legacy usage, should be removed in next major version
|
||||
const LEGACY_MAP: Record<string, string> = {
|
||||
medel: 'medal',
|
||||
'medel-o': 'medal-o'
|
||||
};
|
||||
|
||||
function correctName(name?: string) {
|
||||
return name === 'medel' ? 'medal' : name;
|
||||
return (name && LEGACY_MAP[name]) || name;
|
||||
}
|
||||
|
||||
function Icon(
|
||||
|
Loading…
x
Reference in New Issue
Block a user