Skip to content

Commit d003b17

Browse files
committed
【vue-file-upload】去除style
1 parent 75193a8 commit d003b17

File tree

2 files changed

+32
-31
lines changed

2 files changed

+32
-31
lines changed

demo/app.vue

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,38 @@
1+
<style>
2+
.vue-file-upload{
3+
position: relative;
4+
overflow: hidden;
5+
display: inline-block;
6+
color:#fff;
7+
padding:6px 12px;
8+
background-color:#5cb85c;
9+
border-color: #4cae4c;
10+
margin: 0;
11+
font-size: 14px;
12+
font-weight: 400;
13+
line-height: 1.42857143;
14+
text-align: center;
15+
white-space: nowrap;
16+
vertical-align: middle;
17+
cursor: pointer;
18+
}
19+
.vue-file-upload input[type=file]{
20+
position: absolute;
21+
top: 0;
22+
right: 0;
23+
margin: 0;
24+
opacity: 0;
25+
-ms-filter: alpha(opacity=0);
26+
font-size: 200px;
27+
direction: ltr;
28+
cursor: pointer;
29+
}
30+
</style>
131
<template lang='jade'>
232
div
333
vue-file-upload(url="http://localhost:8000/vue-file-upload/demo/upload.php",
434
ref="vueFileUploader"
35+
class="fileupload-button"
536
v-bind:events = 'cbEvents',
637
v-bind:filters = "filters",
738
v-bind:request-options = "reqopts",

src/vue-file-upload.vue

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,5 @@
1-
<style scoped>
2-
.fileupload-button{
3-
position: relative;
4-
overflow: hidden;
5-
display: inline-block;
6-
color:#fff;
7-
padding:6px 12px;
8-
background-color:#5cb85c;
9-
border-color: #4cae4c;
10-
margin: 0;
11-
font-size: 14px;
12-
font-weight: 400;
13-
line-height: 1.42857143;
14-
text-align: center;
15-
white-space: nowrap;
16-
vertical-align: middle;
17-
cursor: pointer;
18-
}
19-
.fileupload-button input[type=file]{
20-
position: absolute;
21-
top: 0;
22-
right: 0;
23-
margin: 0;
24-
opacity: 0;
25-
-ms-filter: alpha(opacity=0);
26-
font-size: 200px;
27-
direction: ltr;
28-
cursor: pointer;
29-
}
30-
</style>
311
<template>
32-
<span class="fileupload-button">
2+
<span class="vue-file-upload">
333
<i v-if='icon != null' v-bind:class='rendIcon'></i>
344
{{label}}
355
<input ref="fileInput" type="file" name="file">

0 commit comments

Comments
 (0)