使用全局样式,这样会比较方便,样式较多的情况下。
自定义组件
import { View} from "@tarojs/components";
import Taro from "@tarojs/taro";
import Component = Taro.Component;
interface IProps {}
interface IState {}
export default class SexDetailItem extends Component<IProps, IState> {
static options = {
addGlobalClass: true
}
render() {
return <View>
<View className='remaining-seat at-row at-row__align--center'>
<View className='reamining-title at-col at-col-3' >余</View>
<View className='at-col at-col-3'>{2}</View>
</View>
</View>;
}
}
main.tsx
<View><SexDetailItem /></View>
网友评论