-
-
Notifications
You must be signed in to change notification settings - Fork 129
/
Copy pathumd-test.html
101 lines (94 loc) · 3.11 KB
/
umd-test.html
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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="format-detection" content="telephone=no" />
<meta name="msapplication-tap-highlight" content="no" />
<meta
name="viewport"
content="user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1,width=device-width"
/>
<title>UMD test</title>
<link
href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons"
rel="stylesheet"
type="text/css"
/>
<link
href="https://cdn.jsdelivr.net/npm/quasar@^2.0.0/dist/quasar.min.css"
rel="stylesheet"
type="text/css"
/>
<link href="dist/index.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="q-app">
<q-layout view="lHh Lpr fff">
<q-header class="glossy bg-primary">
<q-toolbar>
<q-toolbar-title> QCalendar v{{ version }} </q-toolbar-title>
<q-separator vertical></q-separator>
<q-btn stretch flat label="Prev" @click="calendarPrev"></q-btn>
<q-separator vertical></q-separator>
<q-btn stretch flat label="Next" @click="calendarNext"></q-btn>
<q-separator vertical></q-separator>
<q-space></q-space>
<div>Quasar v{{ $q.version }}</div>
</q-toolbar>
</q-header>
<q-page-container>
<q-page>
<q-calendar ref="calendar" v-model="date"></q-calendar>
<ul class="q-mb-lg">
<li>In /ui, run: "pnpm build"</li>
<li class="text-red">You need to build & refresh page on each change manually.</li>
<li>Use self-closing tags only!</li>
<li>Example: <my-component></my-component></li>
</ul>
</q-page>
</q-page-container>
</q-layout>
</div>
<script src="https://cdn.jsdelivr.net/npm/quasar@^2.0.0/dist/quasar.ie.polyfills.umd.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue@^2.0.0/dist/vue.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/quasar@^2.0.0/dist/quasar.umd.min.js"></script>
<script src="dist/index.umd.js"></script>
<script>
new Vue({
el: '#q-app',
data: function () {
return {
date: '',
version: QCalendar.version,
}
},
beforeMount() {
const now = new Date()
// set initially to today's date
this.date =
now.getFullYear() +
'-' +
this.padNumber(now.getMonth() + 1, 2) +
'-' +
this.padNumber(now.getDay(), 2)
},
methods: {
calendarNext() {
this.$refs.calendar.next()
},
calendarPrev() {
this.$refs.calendar.prev()
},
padNumber(num, length) {
let padded = String(num)
while (padded.length < length) {
padded = '0' + padded
}
return padded
},
},
})
</script>
</body>
</html>