|
@@ -1,5 +1,5 @@
|
|
|
-import Taro, { Component } from '@tarojs/taro'
|
|
|
-import { View, Text, Image, ScrollView } from '@tarojs/components'
|
|
|
+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'
|
|
@@ -15,6 +15,10 @@ class Increase extends Component {
|
|
|
}
|
|
|
|
|
|
state = {
|
|
|
+ selector: [{ key: "项目验收申请单", value: 1 },
|
|
|
+ { key: "立项报告模板", value: 2 },
|
|
|
+ { key: "高新认定模板", value: 3 },
|
|
|
+ { key: "空白模板", value: 0 },],
|
|
|
loaded: false,
|
|
|
loading: false,
|
|
|
lastItemId: 0,
|
|
@@ -32,6 +36,13 @@ class Increase extends Component {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ 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 />
|
|
@@ -46,8 +57,18 @@ class Increase extends Component {
|
|
|
onScrollToLower={this.loadRecommend}
|
|
|
style={{ height: getWindowHeight() }}
|
|
|
>
|
|
|
- <View onClick={this.handlePrevent}>
|
|
|
- 新建报告
|
|
|
+ <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>
|