12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- import Taro, { canIUse, Component } from '@tarojs/taro'
- import { View, Picker, ScrollView } from '@tarojs/components'
- import { Loading } from '@components'
- import { connect } from '@tarojs/redux'
- import * as actions from '@actions/increase'
- import { getWindowHeight } from '@utils/style'
- import './increase.scss'
- const RECOMMEND_SIZE = 20
- // @connect(state => state.home, { ...actions })
- class Increase extends Component {
- config = {
- navigationBarTitleText: '生成报告'
- }
- state = {
- selector: [{ key: "项目验收申请单", value: 1 },
- { key: "立项报告模板", value: 2 },
- { key: "高新认定模板", value: 3 },
- { key: "空白模板", value: 0 },],
- loaded: false,
- loading: false,
- lastItemId: 0,
- hasMore: true
- }
- componentDidMount() {
- // NOTE 暂时去掉不适配的内容
- // Taro.showToast({
- // title: '注意,由于严选小程序首页界面、接口大幅变动,暂时去掉不相符的部分,后续再跟进改动',
- // icon: 'none',
- // duration: 6000
- // })
- }
- onChange = e => {
- console.log(e.detail.value, "e===", e)
- this.setState({
- selectorChecked: this.state.selector[e.detail.value]
- })
- }
- render() {
- // if (!this.state.loaded) {
- // return <Loading />
- // }
- const { } = this.props
- return (
- <View className='home'>
- <ScrollView
- scrollY
- className='home__wrap'
- onScrollToLower={this.loadRecommend}
- style={{ height: getWindowHeight() }}
- >
- <View className='increase'>
- <View className='increase__item'>
- <Picker
- mode='selector'
- rangeKey="key"
- range={this.state.selector}
- onChange={this.onChange}>
- <View className='increase__item-buttom'>
- + 新建报告
- </View>
- </Picker>
- </View>
- </View>
- </ScrollView>
- </View>
- )
- }
- }
- export default Increase
|