Commit 8a299bf9 by hank

searchBar

parent 2d99e938
@import '@styles/var.scss'; @import '@styles/var.scss';
@import '~taro-ui/dist/style/components/search-bar.scss';
@import '~taro-ui/dist/style/components/button.scss';
@import '~taro-ui/dist/style/components/icon.scss';
.device-bind { .device-bind {
width: 100%; width: 100%;
......
...@@ -6,6 +6,8 @@ import DeviceItem from '@/conpoments/device_item' ...@@ -6,6 +6,8 @@ import DeviceItem from '@/conpoments/device_item'
import { getFilmList } from '@/actions/asyncCounter' import { getFilmList } from '@/actions/asyncCounter'
import Taro, { Component, Config } from '@tarojs/taro' import Taro, { Component, Config } from '@tarojs/taro'
import { View, Text, ScrollView, Button, Checkbox, Label } from '@tarojs/components' import { View, Text, ScrollView, Button, Checkbox, Label } from '@tarojs/components'
import { AtSearchBar } from 'taro-ui'
import './index.scss' import './index.scss'
type PageStateProps = { type PageStateProps = {
...@@ -118,6 +120,8 @@ class DeviceSelect extends Component { ...@@ -118,6 +120,8 @@ class DeviceSelect extends Component {
} }
} }
searchChange() {}
shouldComponentUpdate(nextProps: IProps, nextState: PageState) { shouldComponentUpdate(nextProps: IProps, nextState: PageState) {
const { checked } = this.state const { checked } = this.state
const { checked: _checked } = nextState const { checked: _checked } = nextState
...@@ -132,6 +136,7 @@ class DeviceSelect extends Component { ...@@ -132,6 +136,7 @@ class DeviceSelect extends Component {
const { size } = checked const { size } = checked
return ( return (
<View className="device-bind"> <View className="device-bind">
<AtSearchBar value={''} onChange={searchChange} />
<View className="device-bind-scroll"> <View className="device-bind-scroll">
<ScrollView className="device-bind-scroll-view"> <ScrollView className="device-bind-scroll-view">
{list.map(item => ( {list.map(item => (
......
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