1
1
<template >
2
- <div class =" bodydiv " >
2
+ <div class =" flex-fullheight " >
3
3
<mtHeader color =" #353535" :showIcon =" true" ></mtHeader >
4
- <div class =" upText" >
5
- <scroll-view id =" s_view" scroll-y =" true" :scroll-top =" scrolltop" >
6
- <div v-for =" (item, index) in operList" :key =" index" >
7
- <div v-if =" index>=operList.length-10" >
8
- {{index + 1}}: + {{item}}
4
+ <i-tabs :current =" currentTab" @change =" changeTab" >
5
+ <i-tab key =" tabOracle" :title =" ' ORACLE '" ></i-tab >
6
+ </i-tabs >
7
+
8
+ <div class =" flex-fullheight" v-if =" currentTab == 'tabOracle'" >
9
+ <i-sticky :scrollTop =" oracleScrollTop" >
10
+ <i-sticky-item :fixedTop =" sysinfo.headAreaHeight + 10 + sysinfo.headAreaMarTop + sysinfo.statusBarHeight+'px'" >
11
+ <div slot =" title" >Oracle text:</div >
12
+ <div slot =" content" >
13
+ <div style =" padding : 10px ; line-height : 1.5 " >
14
+ <div >Cave People</div >
15
+ <div >{1}{R}{R}</div >
16
+ <div >Creature — Human</div >
17
+ <div >Whenever Cave People attacks, it gets +1/-2 until end of turn.
18
+ {1}{R}{R}, {T}: Target creature gains mountainwalk until end of turn. (It can't be blocked as long as defending player controls a Mountain.)</div >
19
+ </div >
20
+
21
+ <div style =" padding : 10px ; line-height : 1.5 " >
22
+ <div >Cave People</div >
23
+ <div >{1}{R}{R}</div >
24
+ <div >Creature — Human</div >
25
+ <div >Whenever Cave People attacks, it gets +1/-2 until end of turn.
26
+ {1}{R}{R}, {T}: Target creature gains mountainwalk until end of turn. (It can't be blocked as long as defending player controls a Mountain.)</div >
27
+ </div >
28
+
9
29
</div >
10
- </div >
11
- </scroll-view >
12
- <div id =" s_total" >{{operTotal}}</div >
13
- </div >
14
- <div class =" btnGroup" >
15
- <button data-func =" reset" @click =" doFunc" class =" btnFunc" >{{t.common.reset}}</button >
16
- <button data-func =" undo" @click =" doFunc" class =" btnFunc" >{{t.common.revert}}</button >
17
- <button data-num =" 1" @click =" addNum" class =" btnNum" >+1</button >
18
- <button data-num =" 2" @click =" addNum" class =" btnNum" >+2</button >
19
- <button data-num =" 3" @click =" addNum" class =" btnNum" >+3</button >
20
- <button data-num =" 4" @click =" addNum" class =" btnNum" >+4</button >
30
+ </i-sticky-item >
31
+
32
+ <i-sticky-item :fixedTop =" sysinfo.headAreaHeight + 10 + sysinfo.headAreaMarTop + sysinfo.statusBarHeight+'px'" >
33
+ <div slot =" title" >Card-specific notes:</div >
34
+ <div slot =" content" >
35
+ <div style =" padding : 10px ; line-height : 1.5 " >
36
+ <div >Cave People</div >
37
+ <div >{1}{R}{R}</div >
38
+ <div >Creature — Human</div >
39
+ <div >Whenever Cave People attacks, it gets +1/-2 until end of turn.
40
+ {1}{R}{R}, {T}: Target creature gains mountainwalk until end of turn. (It can't be blocked as long as defending player controls a Mountain.)</div >
41
+ </div >
42
+
43
+ <div style =" padding : 10px ; line-height : 1.5 " >
44
+ <div >Cave People</div >
45
+ <div >{1}{R}{R}</div >
46
+ <div >Creature — Human</div >
47
+ <div >Whenever Cave People attacks, it gets +1/-2 until end of turn.
48
+ {1}{R}{R}, {T}: Target creature gains mountainwalk until end of turn. (It can't be blocked as long as defending player controls a Mountain.)</div >
49
+ </div >
50
+
51
+ <div style =" padding : 10px ; line-height : 1.5 " >
52
+ <div >Cave People</div >
53
+ <div >{1}{R}{R}</div >
54
+ <div >Creature — Human</div >
55
+ <div >Whenever Cave People attacks, it gets +1/-2 until end of turn.
56
+ {1}{R}{R}, {T}: Target creature gains mountainwalk until end of turn. (It can't be blocked as long as defending player controls a Mountain.)</div >
57
+ </div >
58
+
59
+ <div style =" padding : 10px ; line-height : 1.5 " >
60
+ <div >Cave People</div >
61
+ <div >{1}{R}{R}</div >
62
+ <div >Creature — Human</div >
63
+ <div >Whenever Cave People attacks, it gets +1/-2 until end of turn.
64
+ {1}{R}{R}, {T}: Target creature gains mountainwalk until end of turn. (It can't be blocked as long as defending player controls a Mountain.)</div >
65
+ </div >
66
+ </div >
67
+ </i-sticky-item >
68
+
69
+ <i-sticky-item :fixedTop =" sysinfo.headAreaHeight + 10 + sysinfo.headAreaMarTop + sysinfo.statusBarHeight+'px'" >
70
+ <div slot =" title" >Format legality:</div >
71
+ <div slot =" content" ></div >
72
+ </i-sticky-item >
73
+ </i-sticky >
21
74
</div >
22
75
</div >
23
76
</template >
@@ -31,9 +84,8 @@ export default {
31
84
mpType: ' page' ,
32
85
data () {
33
86
return {
34
- operTotal: 0 ,
35
- operList: [],
36
- scrolltop: 0
87
+ currentTab: ' tabOracle' ,
88
+ oracleScrollTop: 0
37
89
}
38
90
},
39
91
computed: {
@@ -47,84 +99,33 @@ export default {
47
99
config: {
48
100
' usingComponents' : {
49
101
' i-drawer' : ' ../../../static/iview/drawer/index' ,
50
- ' i-action-sheet' : ' ../../../static/iview/action-sheet/index'
102
+ ' i-action-sheet' : ' ../../../static/iview/action-sheet/index' ,
103
+ ' i-tabs' : ' ../../../static/iview/tabs/index' ,
104
+ ' i-tab' : ' ../../../static/iview/tab/index' ,
105
+ ' i-modal' : ' ../../../static/iview/modal/index' ,
106
+ ' i-message' : ' ../../../static/iview/message/index' ,
107
+ ' i-sticky' : ' ../../../static/iview/sticky/index' ,
108
+ ' i-sticky-item' : ' ../../../static/iview/sticky-item/index'
51
109
}
52
110
},
53
111
onLoad () {
54
112
mta .Page .init ()
55
113
},
114
+ onPageScroll (event ) {
115
+ console .log (this .oracleScrollTop )
116
+ this .oracleScrollTop = event .scrollTop
117
+ },
56
118
components: {
57
119
mtHeader
58
120
},
59
121
methods: {
60
- addNum (event ) {
61
- var i = parseInt (event .target .dataset .num , 10 )
62
- this .operTotal += i
63
- this .operList .push (i)
64
- if (this .operTotal === 60 ) {
65
- wx .vibrateLong ({})
66
- }
67
- this .scrolltop = this .operList .length * 100
68
- },
69
- doFunc (event ) {
70
- if (event .target .dataset .func === ' reset' ) {
71
- this .operTotal = 0
72
- this .operList = []
73
- } else {
74
- if (this .operList .length > 0 ) {
75
- let i = this .operList .pop ()
76
- this .operTotal -= i
77
- this .scrolltop = this .operList .length * 100
78
- }
79
- }
122
+ changeTab (e ) {
123
+ this .currentTab = e .mp .detail .key
80
124
}
81
125
}
82
126
}
83
127
</script >
84
128
85
129
<style scope>
86
- .bodydiv {
87
- display : flex ;
88
- flex-direction : column ;
89
- height : 100% ;
90
- }
91
- .btnGroup {
92
- display : flex ;
93
- align-self : flex-end ;
94
- flex-wrap : wrap ;
95
- flex-direction : row ;
96
- width :100% ;
97
- }
98
- button {
99
- margin-bottom : 1 rpx;
100
- }
101
- .btnNum {
102
- width : 374 rpx;
103
- height : 200 rpx;
104
- font-size : 42px ;
105
- }
106
- .btnFunc {
107
- width : 374 rpx;
108
- height : 100 rpx;
109
- }
110
- .upText {
111
- width : 750 rpx;
112
- flex-grow : 1 ;
113
- display : flex ;
114
- flex-wrap : nowrap ;
115
- flex-direction : row ;
116
- background-color : #353535 ;
117
- padding-bottom : 20px ;
118
- }
119
- #s_total {
120
- color : #fff ;
121
- font-size : 72px ;
122
- padding-right : 10px ;
123
- }
124
- #s_view {
125
- padding :10px ;
126
- color : #fff ;
127
- font-size : 20px ;
128
- flex :1 ;
129
- }
130
+
130
131
</style >
0 commit comments