mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
21 lines
374 B
Vue
21 lines
374 B
Vue
<template>
|
|
<i :class="[b(), `van-icon-${name}`]" :style="{ color }" v-on="$listeners">
|
|
<slot />
|
|
<div v-if="isDef(info)" :class="b('info')">{{ info }}</div>
|
|
</i>
|
|
</template>
|
|
|
|
<script>
|
|
import create from '../utils/create-basic';
|
|
|
|
export default create({
|
|
name: 'icon',
|
|
|
|
props: {
|
|
name: String,
|
|
info: [String, Number],
|
|
color: String
|
|
}
|
|
});
|
|
</script>
|