UNPKG

mp-colorui

Version:

MP ColorUI 是一款基于 Taro 框架并且联合 Color-UI CSS 库开发的多端 UI 组件库(支持小程序端和H5端)

28 lines (26 loc) 934 B
import Taro from "@tarojs/taro-h5"; import Nerv from "nervjs"; import { View, Text, ScrollView } from "@tarojs/components"; import { classNames } from "../../lib/index"; export default class ClScreenDrawer extends Taro.Component { render() { const props = this.props; const hideModal = () => { props.onHide && props.onHide(); }; return <View className={classNames(props.className)} style={Object.assign({}, props.style)}> <ScrollView scrollY className={`DrawerPage ${props.show ? "show" : ""}`}> {this.props.renderPage} </ScrollView> <View className={`DrawerClose ${props.show ? "show" : ""}`} onClick={hideModal}> <Text className="cuIcon-pullright" /> </View> <ScrollView scrollY className={`DrawerWindow ${props.show ? "show" : ""}`}> {this.props.renderDrawer} </ScrollView> </View>; } } ClScreenDrawer.options = { addGlobalClass: true };