由于 text 中不能使用 <slot></slot>,所有用的傳值
重點(diǎn) :iconFlog="'\ue6e3'"
重點(diǎn) :iconFlog="'\ue6e3'"
重點(diǎn) :iconFlog="'\ue6e3'"
一定要這么寫 豹芯,不要 iconFlog="\ue6e3"
1菱涤、父組件中 , 重點(diǎn) :iconFlog="'\ue6e3'"
,一定要這么寫
<free-icon-button :iconFlog="'\ue6e3'" @click="search()"></free-icon-button>
import freeIconButton from '@/components/free-ui/free-icon-button.vue'
export default {
components: {
freeIconButton
}
}
2筐付、子組件: free-icon-button.vue
<template>
<view @click="$emit('click')" style="width: 90rpx; height: 90rpx;">
<text class="iconfont font-md"> {{iconFlog}} </text>
</view>
</template>
export default{
props:{
iconFlog:{
type: String,
default: ''
}
}
}