bug Vue, example files,

1.0 v0.3.2
git 10 years ago
parent 2eb3611b29
commit 3d781309f5

10508
dist/example.js vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

@ -632,7 +632,9 @@ return /******/ (function(modules) { // webpackBootstrap
default: false
},
extensions: {
default: []
default: function _default() {
return [];
}
},
postAction: {
type: String
@ -1044,11 +1046,18 @@ return /******/ (function(modules) { // webpackBootstrap
},
_fileUploadPut: function _fileUploadPut(file) {
var _self = this;
var querys = Vue.util.extend(Vue.util.extend({}, this.request.data), file.request.data);
var querys = {};
for (var key in this.request.data) {
querys[key] = this.request.data[key];
}
for (var _key in file.request.data) {
querys[_key] = file.request.data[_key];
}
var queryArray = [];
for (var key in querys) {
if (querys[key] !== null && typeof querys[key] !== 'undefined') {
queryArray.push(encodeURIComponent(key) + '=' + encodeURIComponent(querys[key]));
for (var _key2 in querys) {
if (querys[_key2] !== null && typeof querys[_key2] !== 'undefined') {
queryArray.push(encodeURIComponent(_key2) + '=' + encodeURIComponent(querys[_key2]));
}
}
var queryString = queryArray.length ? '?' + queryArray.join('&') : '';
@ -1965,7 +1974,7 @@ return /******/ (function(modules) { // webpackBootstrap
// module
exports.push([module.id, "\n.file-uploads {\n overflow: hidden;\n position: relative;\n text-align: center;\n}\n.file-uploads span{\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n -o-user-select: none;\n user-select: none;\n}\n.file-uploads input{\n z-index: 1;\n opacity: 0;\n font-size: 20em;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n position: absolute;\n width: 100%;\n height: 100%;\n}\n.file-uploads.file-uploads-html5 input{\n float: left;\n width: 1px !important;\n height: 1px !important;\n top:-1px !important;\n left:-1px !important;\n right:auto !important;\n bottom:auto !important;\n}\n", ""]);
exports.push([module.id, "\n\n\n\n\n\n\n\n.file-uploads {\n overflow: hidden;\n position: relative;\n text-align: center;\n}\n.file-uploads span{\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n -o-user-select: none;\n user-select: none;\n}\n.file-uploads input{\n z-index: 1;\n opacity: 0;\n font-size: 20em;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n position: absolute;\n width: 100%;\n height: 100%;\n}\n.file-uploads.file-uploads-html5 input{\n float: left;\n width: 1px !important;\n height: 1px !important;\n top:-1px !important;\n left:-1px !important;\n right:auto !important;\n bottom:auto !important;\n}\n", ""]);
// exports

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -3,7 +3,6 @@
<head>
<meta charset="utf-8">
<title>vue-upload-component</title>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/1.0.24/vue.min.js"></script>
<style type="text/css">
#app {
position: relative;
@ -31,7 +30,7 @@
</head>
<body>
<div id="app">
<table style="width: 100%; border: 1px solid #ddd;" v-if="$refs.upload && $refs.upload.files">
<table style="width: 100%; border: 1px solid #ddd;">
<thead>
<tr>
<th>Index</th>
@ -49,7 +48,7 @@
</tr>
</thead>
<tbody>
<tr v-for="file in $refs.upload.files">
<tr v-for="file in files">
<td>{{$index}}</td>
<td>{{file.id}}</td>
<td>{{file.name}}</td>

@ -1,7 +1,7 @@
{
"name": "vue-upload-component",
"description": "Vue.js file upload component, Support for multiple file uploads, progress, html5, html4, support ie9",
"version": "0.3.1",
"version": "0.3.2",
"author": "LianYue",
"scripts": {
"dev": "webpack-dev-server --inline --hot",

@ -61,7 +61,7 @@ export default {
default: false,
},
extensions: {
default: [],
default: () => [],
},
postAction: {
type: String,
@ -491,7 +491,14 @@ export default {
},
_fileUploadPut(file) {
var _self = this;
var querys = Vue.util.extend(Vue.util.extend({}, this.request.data), file.request.data);
var querys = {};
for (let key in this.request.data) {
querys[key] = this.request.data[key];
}
for (let key in file.request.data) {
querys[key] = file.request.data[key];
}
var queryArray = [];
for (let key in querys) {
if (querys[key] !== null && typeof querys[key] !== 'undefined') {

@ -1,7 +1,12 @@
// var FileUpload = require('./FileUpload.vue');
import Vue from 'vue';
// var FileUpload = require('./FileUpload.vue');
import FileUpload from './FileUpload.vue';
Vue.config.debug = true;
Vue.config.silent = false;
Vue.config.async = false;
Vue.config.devtools = true;
Vue.filter('formatSize', function(size) {
if (size > 1024 * 1024 * 1024 * 1024) {
@ -28,9 +33,12 @@ new Vue({
extensions: 'gif,jpg,png',
// extensions: ['gif','jpg','png'],
// extensions: /\.(gif|png|jpg)$/i,
files: [],
drop: true,
},
compiled: function() {
this.files = this.$refs.upload.files;
this.$refs.upload.request = {
headers: {
"X-Csrf-Token": "xxxx",
@ -39,6 +47,9 @@ new Vue({
"_csrf_token": "xxxxxx",
},
};
this.$refs.upload.$watch('files', function() {
});
},
methods: {
remove: function(file) {

@ -3,7 +3,7 @@ var webpack = require('webpack')
module.exports = {
entry: {
example: './src/example.js',
example: ['vue', './src/example.js'],
},
output: {

Loading…
Cancel
Save