-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
175 lines (170 loc) · 4.28 KB
/
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.6.15/browser-polyfill.min.js"></script>
<script src="./node_modules/vue/dist/vue.js"></script>
<script src="./dist/vue-colrow.js"></script>
<link rel="stylesheet" href="dist/vue-colrow.css" />
</head>
<body>
<div id="app">
<row style="background: teal;">
<v-col :width="1/5" v-for="n in total">
<div class="box red"></div>
</v-col>
</row><button @click="total++">add</button><button @click="total--">reduce</button>
<hr />
<row>
<v-col :width="1/24" v-for="n in 24">
<div class="box red"></div>
</v-col>
<v-col :width="0.5">
<row>
<v-col :width="0.5">
<div class="box red"></div>
</v-col>
<v-col :width="0.5">
<div class="box red"></div>
</v-col>
</row>
</v-col>
<v-col :width="0.5">
<div class="box red"></div>
</v-col>
<v-col :width="0.5">
<div class="box yellow"></div>
</v-col>
<v-col :width="0.2" xs-grow>
<div class="box red">Grow xs</div>
</v-col>
<break-row xs="xs"></break-row>
<v-col :width="0.2" xs-grow>
<div class="box red">Grow xs</div>
</v-col>
<break-row></break-row>
<v-col grow="grow">
<div class="box red"></div>
</v-col>
<v-col :width="0.2">
<div class="box red"></div>
</v-col>
<break-row></break-row>
<v-col grow="grow">
<div class="box red"></div>
</v-col>
<break-row></break-row>
<v-col>
<h2>2</h2>
</v-col>
<v-col :width="0.2">
<div class="box red"></div>
</v-col>
<v-col :width="0.2">
<div class="box red"></div>
<hr />
<div class="box red"></div>
</v-col>
<v-col :xs="0.5">
<div class="box red"></div>
</v-col>
<v-col :width="0.5">
<div class="box red"></div>
</v-col>
<v-col :width="0.5">
<div class="box red"></div>
</v-col>
<v-col :width="0.5">
<div class="box yellow"></div>
</v-col>
<v-col :width="0.5">
<hr />
</v-col>
<v-col width="100px">
<hr />
</v-col>
<v-col :width="1">
<div class="box red"></div>
</v-col>
<v-col>
<div class="box yellow"></div>
</v-col>
<v-col grow="grow">
<div class="box red"></div>
</v-col>
<break-row></break-row>
<v-col grow="grow">
<div class="box red"></div>
</v-col>
<v-col>
<hr />
</v-col>
<v-col class="xxx" v-for="i in 10" :key="i" width="300" grow="grow">
<div class="box red"></div>
</v-col>
<v-col :width="0.6">
<div>
<row>
<v-col :width="0.5">
<row>
<v-col :width="0.5">
<div class="box yellow"></div>
</v-col>
<v-col :width="0.5">
<div class="box yellow"></div>
</v-col>
</row>
</v-col>
<v-col :width="0.5">
<div class="box yellow"></div>
</v-col>
</row>
</div>
</v-col>
<v-col :width="0.5">
<div class="box red"></div>
</v-col>
<v-col :width="50">
<div class="box red"></div>
</v-col>
<v-col grow="grow">
<div class="box red"></div>
</v-col>
<break-row></break-row>
<v-col :width="50">
<div class="box red"></div>
</v-col>
<v-col :width="200">
<div class="box red"></div>
</v-col>
<v-col :width="2" grow="grow">
<div class="box red"></div>
</v-col>
</row>
</div>
<script>
Vue.component('row', vueColrow.Row)
Vue.component('v-col', vueColrow.Col)
Vue.component('break-row', vueColrow.BreakRow)
new Vue({
el: '#app',
data: {
total: 21,
}
})
</script>
<style>
.box {
min-height: 100px;
}
.red {
background: red;
}
.yellow {
background: yellow;
}
</style>
</body>
</html>