import Card from '../../components/Card/Index'; import rvp from '../../utils/resposive/rvIndex'; @Component export default struct DomesticService { build() { Column() { Card() { //默认插槽 Text("DomesticService") } }.width('100%').margin({ top: rvp(43) }) } }
import ScrollContainer from '../components/ScrollContainer/Index' import { PADDING } from '../constants/size' import Bg from '../views/Service/Bg' import DomesticService from '../views/Service/DomesticService' import NavBar from '../views/Service/NavBar' import Vip from '../views/Service/Vip' @Component export default struct Service { @Builder navBuilder() { NavBar() } @Builder contentBuild() { Stack() { Bg() Column() { Vip() DomesticService() }.width('100%').padding({ left: PADDING, right: PADDING }) }.width('100%').alignContent(Alignment.TopStart).backgroundColor($r('app.color.bg_gray_second')) } build() { ScrollContainer({ navBuilder: this.navBuilder, contentBuilder: () => { this.contentBuild() } }) } }
import { BORDER_RADIUS } from '../../constants/size' import rvp from '../../utils/resposive/rvIndex' @Component export default struct Index { @Builder customBuilder() { } @BuilderParam contentBuilderParam: () => void = this.customBuilder build() { Column() { this.contentBuilderParam() } .width('100%') .padding(rvp(8)) .borderRadius(rvp(BORDER_RADIUS)).backgroundColor($r('app.color.white')) } }