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