Commit 8ab62801 authored by linhuandong's avatar linhuandong

增加上传时间

parent 2db229c5
{"1.4.13":"1.4","2.0.11":"2.0","2.1.0":"2.1","2.2.2":"2.2","2.3.9":"2.3","2.4.11":"2.4","2.5.4":"2.5","2.6.3":"2.6","2.7.2":"2.7","2.8.2":"2.8","2.9.2":"2.9","2.10.1":"2.10","2.11.1":"2.11","2.12.0":"2.12","2.13.2":"2.13","2.14.1":"2.14","2.15.7681":"2.15"}
\ No newline at end of file
{"1.4.13":"1.4","2.0.11":"2.0","2.1.0":"2.1","2.2.2":"2.2","2.3.9":"2.3","2.4.11":"2.4","2.5.4":"2.5","2.6.3":"2.6","2.7.2":"2.7","2.8.2":"2.8","2.9.2":"2.9","2.10.1":"2.10","2.11.1":"2.11","2.12.0":"2.12","2.13.2":"2.13","2.14.1":"2.14","2.15.7682":"2.15"}
\ No newline at end of file
{
"name": "element-ui",
"version": "2.15.7681",
"version": "2.15.7682",
"description": "A Component Library for Vue.js.",
"main": "lib/element-ui.common.js",
"files": [
......
......@@ -54,7 +54,16 @@ export default function upload(option) {
}
formData.append('filename', option.filename);
formData.append('fileindex', option.fileindex);
const formatDate = (date) => {
const year = date.getFullYear();
const month = ('0' + (date.getMonth() + 1)).slice(-2);
const day = ('0' + date.getDate()).slice(-2);
const hours = ('0' + date.getHours()).slice(-2);
const minutes = ('0' + date.getMinutes()).slice(-2);
const seconds = ('0' + date.getSeconds()).slice(-2);
return `${year}/${month}/${day} ${hours}:${minutes}:${seconds}`;
};
formData.append('uploadTime', formatDate(new Date()));
formData.append(option.name, option.file, option.file.name);
xhr.onerror = function error(e) {
......
......@@ -210,7 +210,7 @@ if (typeof window !== 'undefined' && window.Vue) {
}
export default {
version: '2.15.7681',
version: '2.15.7682',
locale: locale.use,
i18n: locale.i18n,
install,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment