OrderHeader.js
1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import { ORDER_LIST } from "~/constants/mine.js";
Component({
properties: {
padding_bottom: {
type: Number,
value: 0,
},
// tab: {
// type: Array,
// value: [],
// },
tabIndex: {
type: Number,
value: 0,
},
keyword: {
type: String,
value: "",
},
},
data: {
tab: Object.freeze(ORDER_LIST.map((item) => item.text)),
},
methods: {
navbarReady(e) {
wx.p.wxApi.getViewInfo(".tab", (res) => {
console.log("🚀 ~ navbarReady ~ res:", e)
this.setData({
padding_bottom: e.detail.height,
margin_top: e.detail.height + res.height,
});
});
},
back() {
this.triggerEvent("back");
},
changeTab(e) {
this.triggerEvent("changeTab", e.detail);
},
search(e) {
this.triggerEvent("search", e.detail);
},
clear() {
this.triggerEvent("clear");
},
input(e) {
this.triggerEvent("input", e.detail);
},
blur(e) {
this.triggerEvent("blur", e.detail);
},
},
});