[Improvement] Icon add 'info' prop (#447)

This commit is contained in:
neverland
2017-12-18 11:37:41 +08:00
committed by GitHub
parent 4c18aca42f
commit a8666591c9
8 changed files with 49 additions and 21 deletions

View File

@@ -1,6 +1,7 @@
<template>
<i class="van-icon" :class="`van-icon-${name}`" v-on="$listeners">
<slot></slot>
<div v-if="info" class="van-icon__info">{{ info }}</div>
</i>
</template>
@@ -11,7 +12,8 @@ export default {
install,
name: 'van-icon',
props: {
name: String
name: String,
info: String
}
};
</script>