Commit f8af7173 by hank

fix bug

parent 0aa598ad
...@@ -32,6 +32,12 @@ ...@@ -32,6 +32,12 @@
flex: 1; flex: 1;
} }
&-state {
width: 28px;
height: 28px;
margin-right: 39px;
}
&-move { &-move {
width: 125px; width: 125px;
height: 50px; height: 50px;
...@@ -45,6 +51,12 @@ ...@@ -45,6 +51,12 @@
} }
} }
.all-btn {
padding-left: 36px;
font-size: 36px;
color: rgba(88, 88, 88, 1);
}
&-bottom-bar { &-bottom-bar {
padding: 24px 0; padding: 24px 0;
background: $bgColor; background: $bgColor;
......
...@@ -3,7 +3,7 @@ import { ComponentClass } from 'react' ...@@ -3,7 +3,7 @@ import { ComponentClass } from 'react'
import { showMyToast } from '@/common/utils' import { showMyToast } from '@/common/utils'
import DeviceItem from '@/conpoments/device_item' import DeviceItem from '@/conpoments/device_item'
import Taro, { Component, Config } from '@tarojs/taro' import Taro, { Component, Config } from '@tarojs/taro'
import { View, Text, ScrollView, Button, Checkbox, Label, Input } from '@tarojs/components' import { View, Text, ScrollView, Button, Checkbox, Label, Input, Image } from '@tarojs/components'
import { AtDrawer } from 'taro-ui' import { AtDrawer } from 'taro-ui'
import './index.scss' import './index.scss'
...@@ -343,17 +343,30 @@ class DeviceSelect extends Component { ...@@ -343,17 +343,30 @@ class DeviceSelect extends Component {
{list.map(item => ( {list.map(item => (
<View key={item.equipmentId}> <View key={item.equipmentId}>
<Label className="device-bind-item" onClick={() => this.changeItem(item)}> <Label className="device-bind-item" onClick={() => this.changeItem(item)}>
<Checkbox {/* <Checkbox
value="" value=""
className="device-bind-item-checkbox" className="device-bind-item-checkbox"
checked={checked.has(item.equipmentId)} checked={checked.has(item.equipmentId)}
/> /> */}
<View className="device-bind-item-info"> <View className="device-bind-item-info">
<DeviceItem {...item} /> <DeviceItem {...item} />
</View> </View>
<Image
className="device-bind-item-state"
src={
checked.has(item.equipmentId)
? 'https://visual-clouds.oss-cn-beijing.aliyuncs.com/miniprogram/checkbox-select.png'
: 'https://visual-clouds.oss-cn-beijing.aliyuncs.com/miniprogram/checkbox.png'
}
/>
</Label> </Label>
</View> </View>
))} ))}
<View className="all-btn">
<Text className="all" onClick={this.changeAllCheck}>
全选
</Text>
</View>
</ScrollView> </ScrollView>
) : ( ) : (
<ScrollView className="device-bind-scroll-view"> <ScrollView className="device-bind-scroll-view">
...@@ -378,9 +391,6 @@ class DeviceSelect extends Component { ...@@ -378,9 +391,6 @@ class DeviceSelect extends Component {
)} )}
</View> </View>
<View className="device-bind-bottom-bar"> <View className="device-bind-bottom-bar">
<Text className="all" onClick={this.changeAllCheck}>
全选
</Text>
<Button className="enter" onClick={this.updateBind}> <Button className="enter" onClick={this.updateBind}>
完成 完成
</Button> </Button>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment