mirror of
https://github.com/youzan/vant.git
synced 2025-10-21 11:17:41 +00:00
[Improvement] Icon: add class-prefix (#1688)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<i :class="[b(), `van-icon-${name}`]" :style="style" v-on="$listeners">
|
||||
<i :class="[classPrefix, `${classPrefix}-${name}`]" :style="style" v-on="$listeners">
|
||||
<slot />
|
||||
<div v-if="isDef(info)" :class="b('info')">{{ info }}</div>
|
||||
</i>
|
||||
@@ -15,7 +15,11 @@ export default create({
|
||||
name: String,
|
||||
info: [String, Number],
|
||||
color: String,
|
||||
size: String
|
||||
size: String,
|
||||
classPrefix: {
|
||||
type: String,
|
||||
default: 'van-icon'
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
|
Reference in New Issue
Block a user