Commit 4508f2a6 authored by Leopoldthecoder's avatar Leopoldthecoder Committed by 杨奕

DatePicker: fix range in Chromium 53 - 57

parent 9b6a2107
...@@ -8,9 +8,7 @@ git clone -b gh-pages https://github.com/ElemeFE/element.git && cd element ...@@ -8,9 +8,7 @@ git clone -b gh-pages https://github.com/ElemeFE/element.git && cd element
SUB_FOLDER='1.4' SUB_FOLDER='1.4'
mkdir $SUB_FOLDER mkdir $SUB_FOLDER
# rm -rf *.js *.css *.map static
rm -rf $SUB_FOLDER/** rm -rf $SUB_FOLDER/**
# cp -rf ../../examples/element-ui/** .
cp -rf ../../examples/element-ui/** $SUB_FOLDER/ cp -rf ../../examples/element-ui/** $SUB_FOLDER/
cd ../.. cd ../..
......
...@@ -259,11 +259,7 @@ ...@@ -259,11 +259,7 @@
const xhr = new XMLHttpRequest(); const xhr = new XMLHttpRequest();
xhr.onreadystatechange = _ => { xhr.onreadystatechange = _ => {
if (xhr.readyState === 4 && xhr.status === 200) { if (xhr.readyState === 4 && xhr.status === 200) {
const versions = JSON.parse(xhr.responseText); this.versions = JSON.parse(xhr.responseText);
this.versions = Object.keys(versions).slice(-2).reduce((prev, next) => {
prev[next] = versions[next];
return prev;
}, {});
} }
}; };
xhr.open('GET', '/versions.json'); xhr.open('GET', '/versions.json');
......
...@@ -42,8 +42,8 @@ Typical configurations for these config files are: ...@@ -42,8 +42,8 @@ Typical configurations for these config files are:
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules" "build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
}, },
"dependencies": { "dependencies": {
"element-ui": "^1.4.0", "element-ui": "legacy",
"vue": "^2.3.0" "vue": "2.5.2"
}, },
"devDependencies": { "devDependencies": {
"babel-core": "^6.0.0", "babel-core": "^6.0.0",
......
...@@ -42,8 +42,8 @@ ...@@ -42,8 +42,8 @@
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules" "build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
}, },
"dependencies": { "dependencies": {
"element-ui": "^1.4.0", "element-ui": "legacy",
"vue": "^2.3.0" "vue": "2.5.2"
}, },
"devDependencies": { "devDependencies": {
"babel-core": "^6.0.0", "babel-core": "^6.0.0",
......
...@@ -387,6 +387,13 @@ ...@@ -387,6 +387,13 @@
this.onPick && this.onPick(val); this.onPick && this.onPick(val);
this.maxDate = val.maxDate; this.maxDate = val.maxDate;
this.minDate = val.minDate; 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; if (!close || this.showTime) return;
this.handleConfirm(); this.handleConfirm();
}, },
......
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