Overlay浮层使用

1,682 阅读1分钟
import { Overlay } from 'teaset';
  let overlayView = (
      <Overlay.PullView
        side="bottom"
        modal={false}
        containerStyle={{ backgroundColor: 'transparent' }}
      >
        <View
          style={{
            backgroundColor: 'white',
            width: UI.size.deviceWidth,
            height: UI.size.deviceHeight - UI.scaleSize(150),
            justifyContent: 'center',
            alignItems: 'center',
            borderTopLeftRadius: UI.scaleSize(20),
            borderTopRightRadius: UI.scaleSize(20),
            overflow: 'hidden',
          }}
        >
          <CitySelector
            onCityChanged={this.onCityChanged}
            addressComponent={addressComponent}
            provinceList={provinceList}
            cityList={cityList}
            districtList={districtList}
            close={() => {
              Overlay.hide(this.key);
            }}
          />
        </View>
      </Overlay.PullView>
    );
    this.key = Overlay.show(overlayView);