File tree 2 files changed +62
-4
lines changed
Weex学习/weexnew/src/WeexDemo
2 files changed +62
-4
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
-
2
+ <scroller >
3
+ <div class =" wrapper" >
4
+ <div class =" group" >
5
+ <text class =' label' >Time:</text >
6
+ <text class =' title' >{{value}}</text >
7
+ </div >
8
+ <div class =" group" >
9
+ <text class =' button' @click =' pickTime' >Pick Time</text >
10
+ </div >
11
+ </div >
12
+ </scroller >
3
13
</template >
4
14
<script >
5
-
15
+ const picker = weex .requireModule (' picker' )
16
+ export default {
17
+ data : function () {
18
+ return {
19
+ value: ' '
20
+ }
21
+ },
22
+ methods: {
23
+ pickTime : function () {
24
+ picker .pickTime ({
25
+ value: this .value ,
26
+ },event => {
27
+ if (event .result === ' success' ) {
28
+ this .value = event .data ;
29
+ }
30
+ });
31
+ }
32
+ }
33
+ }
6
34
</script >
7
35
<style >
8
-
36
+ .wrapper {
37
+ flex-direction : column ;
38
+ justify-content : center ;
39
+ background-color : #dfdfdf ;
40
+ }
41
+ .group {
42
+ flex-direction : row ;
43
+ justify-content : center ;
44
+ margin-bottom : 40px ;
45
+ align-items : center ;
46
+ }
47
+ .label {
48
+ font-size : 40px ;
49
+ color : #888888 ;
50
+ }
51
+ .title {
52
+ font-size : 80px ;
53
+ color : #41B883 ;
54
+ }
55
+ .button {
56
+ font-size : 36px ;
57
+ width : 280px ;
58
+ color : #41B883 ;
59
+ text-align : center ;
60
+ padding-top : 25px ;
61
+ padding-bottom : 25px ;
62
+ border-width : 2px ;
63
+ border-style : solid ;
64
+ border-color : rgb (162 ,217 ,192 );
65
+ background-color : rgba (162 ,217 ,192 ,0.2 );
66
+ }
9
67
</style >
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div >
3
- <text @touch =" ontouch" >Touch手势</text >
3
+ <text ontouch =" ontouch" >Touch手势</text >
4
4
</div >
5
5
</template >
6
6
<style scoped>
You can’t perform that action at this time.
0 commit comments