-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathindex.html
187 lines (187 loc) · 3.81 KB
/
index.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
176
177
178
179
180
181
182
183
184
185
186
187
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<meta
content="width=device-width, initial-scale=1"
name="viewport"
/>
<title>VuetifyImageInput</title>
<link
href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900"
rel="stylesheet"
/>
<link
href="https://unpkg.com/@mdi/font@5/css/materialdesignicons.min.css"
rel="stylesheet"
/>
<link
href="https://unpkg.com/vuetify@2/dist/vuetify.css"
rel="stylesheet"
/>
<style>
[v-cloak] {
display: none;
}
</style>
<script src="https://unpkg.com/vue@2"></script>
<script src="https://unpkg.com/vuetify@2/dist/vuetify.js"></script>
<script src="./index.js"></script>
<script
defer
src="./demo/script.js"
></script>
</head>
<body>
<v-app
id="App"
v-cloak
>
<v-navigation-drawer
v-model="ui.drawer"
app
clipped
>
<div class="pa-2">
<v-checkbox
v-model="clearable"
class="ma-0 pa-0"
hide-details
label="clearable"
></v-checkbox>
</div>
<div class="pa-2">
<v-text-field
v-model="imageWidth"
:max="1024"
:min="32"
filled
hide-details
label="image width"
type="number"
></v-text-field>
</div>
<div class="pa-2">
<v-text-field
v-model="imageHeight"
:max="1024"
:min="32"
filled
hide-details
label="image height"
type="number"
></v-text-field>
</div>
<div class="pa-2">
<v-radio-group
v-model="imageMinScaling"
class="ma-0 pa-0"
hide-details
label="min scaling"
>
<v-radio
label="cover"
value="cover"
></v-radio>
<v-radio
label="contain"
value="contain"
></v-radio>
</v-radio-group>
</div>
<div class="pa-2">
<v-checkbox
v-model="hideActions"
class="ma-0 pa-0"
hide-details
label="hide actions"
></v-checkbox>
</div>
<div class="pa-2">
<v-checkbox
v-model="disabled"
class="ma-0 pa-0"
hide-details
label="disabled"
></v-checkbox>
</div>
<div class="pa-2">
<v-checkbox
v-model="readonly"
class="ma-0 pa-0"
hide-details
label="readonly"
></v-checkbox>
</div>
<div class="pa-2">
<v-checkbox
v-model="fullWidth"
class="ma-0 pa-0"
hide-details
label="full width"
></v-checkbox>
</div>
<div class="pa-2">
<v-checkbox
v-model="fullHeight"
class="ma-0 pa-0"
hide-details
label="full height"
></v-checkbox>
</div>
</v-navigation-drawer>
<v-app-bar
app
clipped-left
color="primary"
dark
>
<v-app-bar-nav-icon @click="ui.drawer = !ui.drawer"></v-app-bar-nav-icon>
<v-toolbar-title>VuetifyImageInput</v-toolbar-title>
<v-spacer></v-spacer>
<v-btn
icon
@click="dark = !dark"
>
<v-icon>mdi-invert-colors</v-icon>
</v-btn>
<v-btn
href="https://github.com/SeregPie/VuetifyImageInput"
icon
target="_blank"
>
<v-icon>mdi-github</v-icon>
</v-btn>
</v-app-bar>
<v-main>
<v-container
fill-height
justify-center
>
<v-image-input
v-model="image"
:clearable="clearable"
:debounce="250"
:disabled="disabled"
:full-height="fullHeight"
:full-width="fullWidth"
:hide-actions="hideActions"
:image-height="Number(imageHeight)"
:image-min-scaling="imageMinScaling"
:image-width="Number(imageWidth)"
:readonly="readonly"
@file-info="onFileInfo"
></v-image-input>
</v-container>
</v-main>
<v-snackbar
v-model="ui.snackbar.fileInfo"
:timeout="5000"
>
<pre
v-if="fileInfo"
>{{ JSON.stringify(fileInfo, null, ' ') }}</pre>
</v-snackbar>
</v-app>
</body>
</html>