getSev_f.html
3.7 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
<title></title>
<script src="../../assets/js/fontsize.js"></script>
<!--<link rel="stylesheet" href="../../assets/css/weui.min.css">-->
<link rel="stylesheet" href="../../assets/icon/iconfont.css">
<style>
html {
font-family: sans-serif;
}
html, body, header, section, footer, div, ul, ol, li, img, a, span, em, del, legend, center, strong, var, fieldset, form, label, dl, dt, dd, cite, input, hr, time, mark, code, figcaption, figure, textarea, h1, h2, h3, h4, h5, h6, p {
margin: 0;
border: 0;
padding: 0;
font-style: normal;
/*touch-action: none;*/
touch-action: manipulation
}
html, body {
-webkit-touch-callout: none;
-webkit-text-size-adjust: none;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-webkit-user-select: none;
background: none;
height: 100%;
}
.meal {
display: flex;
flex-direction: column;
justify-content: flex-end;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 100;
background: none;
}
</style>
</head>
<body>
<div id="app" v-cloak>
<div class="meal" @click="close">
<div id="sever" >1</div>
</div>
</div>
</body>
</html>
<script type="text/javascript" src="../../assets/js/api.js"></script>
<script type="text/javascript" src="../../assets/js/public.js"></script>
<script type="text/javascript" src="../../assets/js/fastclick.js"></script>
<script>
new FastClick(document.body);
</script>
<script type="text/javascript" src="../../assets/js/vue.min.js"></script>
<script type="text/javascript" src="../../assets/js/datePicker.js"></script>
<script>
document.getElementById("sever").click();
var app = new Vue({
el: '#app',
data: {
pickerValue_sev: '',
endDate_sev: new Date(),
startDate_sev: new Date('2019-01-22')
},
created: function () {
apiready = function () {
api.addEventListener({
name: 'choose_sev'
}, function(ret, err) {
if(ret){
app.choose_sev()
}
});
}
},
methods: {
close: function () {
// api.closeWin({
// name: 'choose_meal_w'
// });
api.closeWin();
},
choose_sev: function () {
var calendar = new datePicker();
calendar.init({
'trigger': '#sever', /*按钮选择器,用于触发弹出插件*/
'type': 'datetime', /*模式:date日期;datetime日期时间;time时间;ym年月;*/
'minDate': '1900-1-1', /*最小日期*/
'maxDate': formatDate(new Date()), /*最大日期*/
'onSubmit': function () {/*确认时触发事件*/
console.log(calendar.value);
},
'onClose': function () {/*取消时触发事件*/
}
});
},
}
})
</script>