|
@@ -1,35 +1,19 @@
|
1
|
1
|
import Taro, { View } from "@tarojs/components"
|
2
|
|
-export default (props) => {
|
3
|
|
-
|
4
|
|
- const { value, onChange } = props
|
5
|
|
-
|
6
|
2
|
|
|
3
|
+import './style.less'
|
7
|
4
|
|
8
|
|
- const search = (e) => {
|
9
|
|
- console.log(e);
|
10
|
|
-
|
11
|
|
- return new Promise((resolve, reject) => {
|
12
|
|
- console.log(resolve, reject);
|
13
|
|
- resolve([{ text: '搜索结果', e: 1 }, { text: '搜索结果2', e: 2 }])
|
|
5
|
+export default (props) => {
|
14
|
6
|
|
15
|
|
- })
|
16
|
|
- }
|
17
|
|
- const handeInput = (e) => {
|
18
|
|
- const val = e.detail.value
|
19
|
|
- onChange(val)
|
20
|
|
- console.log("🚀 ~ file: shopKeeper.jsx ~ line 57 ~ handeInput ~ value", val)
|
|
7
|
+ const { placeholder, onBlur } = props
|
21
|
8
|
|
22
|
9
|
|
23
|
|
- }
|
24
|
10
|
|
25
|
11
|
|
26
|
12
|
return (
|
27
|
13
|
<View className='search'>
|
28
|
14
|
<mp-searchbar
|
29
|
|
- placeholder='搜索订单(输入客户手机号码)'
|
30
|
|
- search={search}
|
31
|
|
- onInput={(e) => handeInput(e)}
|
32
|
|
- value={value}
|
|
15
|
+ placeholder={placeholder}
|
|
16
|
+ onBlur={onBlur}
|
33
|
17
|
>
|
34
|
18
|
</mp-searchbar>
|
35
|
19
|
</View>
|