parent
aed4039bf8
commit
c80c4c3cd8
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,30 @@
|
||||
// var FileUpload = require('./FileUpload.vue');
|
||||
|
||||
import FileUpload from './FileUpload.vue';
|
||||
|
||||
new Vue({
|
||||
el:'#app',
|
||||
components: {
|
||||
FileUpload:FileUpload,
|
||||
},
|
||||
data: {
|
||||
accept: 'image/*',
|
||||
size: 1024 * 1024 * 10,
|
||||
multiple: true,
|
||||
},
|
||||
compiled: function() {
|
||||
this.$refs.upload.request = {
|
||||
headers: {
|
||||
"X-Csrf-Token": "xxxx",
|
||||
},
|
||||
data: {
|
||||
"_csrf_token": "xxxxxx",
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
remove: function(file) {
|
||||
this.$refs.upload.files.$remove(file);
|
||||
},
|
||||
}
|
||||
});
|
||||
@ -1,28 +1 @@
|
||||
var FileUpload = require('./FileUpload.vue');
|
||||
|
||||
new Vue({
|
||||
el:'#app',
|
||||
components: {
|
||||
FileUpload:FileUpload,
|
||||
},
|
||||
data: {
|
||||
accept: 'image/*',
|
||||
size: 1024 * 1024 * 10,
|
||||
multiple: true,
|
||||
},
|
||||
compiled: function() {
|
||||
this.$refs.upload.request = {
|
||||
headers: {
|
||||
"X-Csrf-Token": "xxxx",
|
||||
},
|
||||
data: {
|
||||
"_csrf_token": "xxxxxx",
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
remove: function(file) {
|
||||
this.$refs.upload.files.$remove(file);
|
||||
},
|
||||
}
|
||||
});
|
||||
module.exports = require('./FileUpload.vue');
|
||||
|
||||
@ -0,0 +1,12 @@
|
||||
var webpack = require('webpack');
|
||||
|
||||
module.exports = require('./webpack.config.js');
|
||||
|
||||
|
||||
|
||||
module.exports.entry = {
|
||||
'vue-upload-component': './src/main.js',
|
||||
}
|
||||
|
||||
module.exports.output.library = 'VueUploadComponent';
|
||||
module.exports.output.libraryTarget = 'umd';
|
||||
@ -0,0 +1,11 @@
|
||||
var webpack = require('webpack');
|
||||
|
||||
module.exports = require('./webpack.config.build.js');
|
||||
|
||||
module.exports.output.filename = "[name].min.js";
|
||||
|
||||
module.exports.plugins.push(new webpack.optimize.UglifyJsPlugin({
|
||||
compress: {
|
||||
warnings: false,
|
||||
}
|
||||
}));
|
||||
Loading…
Reference in new issue