vue-upload-component
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "vue-upload-component", | ||
"description": "Vue.js file upload component, Support for multiple file uploads, progress, html4, ie9", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"author": "LianYue", | ||
"scripts": { | ||
"dev": "webpack-dev-server --inline --hot", | ||
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules" | ||
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules --config webpack.config.build.min.js && cross-env NODE_ENV=production webpack --progress --hide-modules --config webpack.config.build.js && cross-env NODE_ENV=production webpack --progress --hide-modules --config webpack.config.js" | ||
}, | ||
"main": "/src/FileUpload.vue", | ||
"main": "dist/vue-upload-component.js", | ||
"repository": { | ||
@@ -16,10 +18,13 @@ "type": "git", | ||
"keywords": [ | ||
"Vue.js", | ||
"File", | ||
"Upload", | ||
"Uploads", | ||
"Multiple", | ||
"Component" | ||
"vue.js", | ||
"file", | ||
"upload", | ||
"uploads", | ||
"multiple", | ||
"component", | ||
"vue-component", | ||
"vue-upload-component", | ||
"vue-file-upload", | ||
"vue-file-upload-component" | ||
], | ||
"author": "LianYue", | ||
"license": "Apache-2.0", | ||
@@ -31,5 +36,8 @@ "bugs": { | ||
"dependencies": { | ||
"babel-runtime": "^6.0.0" | ||
"vue": "^1.0.24" | ||
}, | ||
"dependencies": { | ||
}, | ||
"devDependencies": { | ||
"babel-runtime": "^6.0.0", | ||
"babel-core": "^6.0.0", | ||
@@ -36,0 +44,0 @@ "babel-loader": "^6.0.0", |
@@ -13,7 +13,32 @@ # vue-upload-component | ||
``` | ||
### CommonJS | ||
```js | ||
var FileUpload = require('vue-upload-component'); | ||
new Vue({ | ||
template: '<file-upload action="/"></file-upload>', | ||
components: { | ||
FileUpload: FileUpload | ||
} | ||
}) | ||
## Demo | ||
``` | ||
### ES6 | ||
```js | ||
import FileUpload from 'vue-upload-component' | ||
new Vue({ | ||
template: '<file-upload action="/"></file-upload>', | ||
components: { | ||
FileUpload | ||
} | ||
}) | ||
``` | ||
## Example | ||
``` html | ||
<!-- Demo file ./index.html --> | ||
<!-- Example file ./index.html --> | ||
<!-- Example file ./src/example.js --> | ||
<div id="app"> | ||
@@ -24,3 +49,3 @@ <file-upload title="Add upload files"></file-upload> | ||
<script type="text/javascript"> | ||
var FileUpload = require('./FileUpload.vue'); | ||
var FileUpload = require('vue-upload-component'); | ||
@@ -27,0 +52,0 @@ new Vue({ |
@@ -1,28 +0,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'); |
@@ -5,8 +5,12 @@ var path = require('path') | ||
module.exports = { | ||
entry: './src/main.js', | ||
output: { | ||
path: path.resolve(__dirname, './dist'), | ||
publicPath: '/dist/', | ||
filename: 'build.js' | ||
}, | ||
entry: { | ||
example: './src/example.js', | ||
}, | ||
output: { | ||
path: './dist', | ||
publicPath: '/dist/', | ||
filename: "[name].js", | ||
}, | ||
resolveLoader: { | ||
@@ -60,9 +64,5 @@ root: path.join(__dirname, 'node_modules'), | ||
}), | ||
new webpack.optimize.UglifyJsPlugin({ | ||
compress: { | ||
warnings: false | ||
} | ||
}), | ||
new webpack.optimize.OccurenceOrderPlugin() | ||
]) | ||
} |
Sorry, the diff of this file is not supported yet
37400
0
12
105
121
17
- Removedbabel-runtime@^6.0.0
- Removedbabel-runtime@6.26.0(transitive)
- Removedcore-js@2.6.12(transitive)
- Removedregenerator-runtime@0.11.1(transitive)