/* CustomComp.js */
export default CustomComp extends Component {
static options = {
addGlobalClass: true
}
render () {
return <View className="red-text">這段文本的顏色由組件外的 class 決定</View>
}
}
/* 組件外的樣式定義 */
.red-text {
color: red;
}
上面只能覆蓋 taro-ui的樣式
打開iview下的 任意一個組件

組件內都留着擴展
大部分默認的是 i-class進行傳入
有的組件會有多的結構,還會有別的擴展
<i-cell i-class='test' title="常見問題" is-link></i-cell>
這樣 test就能加到組件里面了
