DatePicker: fix range in Chromium 53 - 57

pull/7996/head
Leopoldthecoder 2017-11-01 12:25:01 +08:00 committed by 杨奕
parent 9b6a21073b
commit 4508f2a6c4
5 changed files with 12 additions and 11 deletions

View File

@ -8,9 +8,7 @@ git clone -b gh-pages https://github.com/ElemeFE/element.git && cd element
SUB_FOLDER='1.4'
mkdir $SUB_FOLDER
# rm -rf *.js *.css *.map static
rm -rf $SUB_FOLDER/**
# cp -rf ../../examples/element-ui/** .
cp -rf ../../examples/element-ui/** $SUB_FOLDER/
cd ../..

View File

@ -259,11 +259,7 @@
const xhr = new XMLHttpRequest();
xhr.onreadystatechange = _ => {
if (xhr.readyState === 4 && xhr.status === 200) {
const versions = JSON.parse(xhr.responseText);
this.versions = Object.keys(versions).slice(-2).reduce((prev, next) => {
prev[next] = versions[next];
return prev;
}, {});
this.versions = JSON.parse(xhr.responseText);
}
};
xhr.open('GET', '/versions.json');

View File

@ -42,8 +42,8 @@ Typical configurations for these config files are:
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
},
"dependencies": {
"element-ui": "^1.4.0",
"vue": "^2.3.0"
"element-ui": "legacy",
"vue": "2.5.2"
},
"devDependencies": {
"babel-core": "^6.0.0",

View File

@ -42,8 +42,8 @@
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
},
"dependencies": {
"element-ui": "^1.4.0",
"vue": "^2.3.0"
"element-ui": "legacy",
"vue": "2.5.2"
},
"devDependencies": {
"babel-core": "^6.0.0",

View File

@ -387,6 +387,13 @@
this.onPick && this.onPick(val);
this.maxDate = val.maxDate;
this.minDate = val.minDate;
// workaround for https://github.com/ElemeFE/element/issues/7539, should remove this block when we don't have to care about Chromium 55 - 57
setTimeout(() => {
this.maxDate = val.maxDate;
this.minDate = val.minDate;
}, 10);
if (!close || this.showTime) return;
this.handleConfirm();
},