Skip to content

Commit cacd770

Browse files
committed
Fixes #127. Error message positioned incorrectly.
1 parent 3084369 commit cacd770

File tree

5 files changed

+23
-15
lines changed

5 files changed

+23
-15
lines changed

dev/bundle.js

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/bundle.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vue2-dropzone.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/App.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77
<dropzone ref="myVueDropzone" id="dropzone" url="https://httpbin.org/post"
88
v-on:vdropzone-success="showSuccess"
99
v-bind:dropzone-options="dropzoneOptions"
10-
v-bind:max-number-of-files="2"
10+
v-bind:max-number-of-files="1"
1111
v-bind:use-custom-dropzone-options="true">
1212
</dropzone>
13+
<button @click="process">Process</button>
1314
</div>
1415
</div>
1516
</template>
@@ -40,6 +41,9 @@
4041
'process': function () {
4142
console.log(this.$refs.myVueDropzone);
4243
// this.$refs.myVueDropzone.setOption('maxFiles', this.$refs.myVueDropzone.dropzone.options.maxFiles + 1)
44+
var file = { size: 123, name: "Icon" };
45+
var url = "https://myvizo.com/img/logo_sm.png";
46+
this.$refs.myVueDropzone.manuallyAddFile(file, url);
4347
console.log(this.$refs.myVueDropzone.dropzone.options.maxFiles);
4448
}
4549
}

src/index.vue

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,12 @@
6868
default: (options) => {
6969
return `
7070
<div class="dz-preview dz-file-preview">
71-
<div class="dz-image" style="width: ${options.thumbnailWidth}px;height: ${options.thumbnailHeight}px">
72-
<img data-dz-thumbnail /></div>
71+
<div class="dz-image" style="width: ${options.thumbnailWidth}px;height: ${options.thumbnailHeight}px">
72+
<img data-dz-thumbnail /></div>
7373
<div class="dz-details">
74-
<div class="dz-size"><span data-dz-size></span></div>
75-
<div class="dz-filename"><span data-dz-name></span></div>
74+
<div class="dz-size"><span data-dz-size></span></div>
75+
<div class="dz-filename"><span data-dz-name></span></div>
7676
</div>
77-
7877
<div class="dz-progress"><span class="dz-upload" data-dz-uploadprogress></span></div>
7978
<div class="dz-error-message"><span data-dz-errormessage></span></div>
8079
<div class="dz-success-mark">${options.doneIcon}</div>
@@ -401,6 +400,11 @@
401400
font-size: 5rem !important;
402401
}
403402
}
403+
404+
.dz-error-message {
405+
top: calc(50% + 25px);
406+
left: calc(50% - 35px);
407+
}
404408
}
405409
}
406410
</style>

0 commit comments

Comments
 (0)