Compare commits

...

7 Commits

Author SHA1 Message Date
Leopoldthecoder
a6067defa7 [release] 1.4.9 2017-11-01 12:33:00 +08:00
Leopoldthecoder
c4ed89f32d [build] 1.4.9 2017-11-01 12:32:59 +08:00
Leopoldthecoder
a755fd98a3 Changelog: update for 1.4.9 2017-11-01 12:28:44 +08:00
Leopoldthecoder
4508f2a6c4 DatePicker: fix range in Chromium 53 - 57 2017-11-01 12:28:44 +08:00
Leopoldthecoder
9b6a21073b add CDN tips 2017-10-30 05:38:54 -05:00
Leopoldthecoder
b53dcd1766 lock CDN resource version for 1.x docs 2017-10-27 05:45:19 -05:00
Leopoldthecoder
2a745aa8bf Form: fix validateDisabled 2017-10-25 23:49:13 -05:00
19 changed files with 78 additions and 64 deletions

View File

@@ -1,5 +1,12 @@
## Changelog
### 1.4.9
*2017-11-01*
- Fixed Form validating not triggered correctly in some conditions, #7744
- Fixed range selection of DatePicker not working in Chromium 53-57 browsers, #7927
### 1.4.8
*2017-10-24*

View File

@@ -1,5 +1,11 @@
## 更新日志
### 1.4.9
*2017-11-01*
- 修复某些情况下 Form 验证没有正确触发的问题,#7744
- 修复 DatePicker 的范围选择在内核为 Chromium 53-57 的浏览器中无法使用的问题,#7927
### 1.4.8
*2017-10-24*

View File

@@ -44,9 +44,7 @@ if [ "$TRAVIS_TAG" ]; then
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/
git add -A .
git commit -m "$TRAVIS_COMMIT_MSG"

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

@@ -1,5 +1,5 @@
#!/usr/bin/env sh
git checkout dev
git checkout 1.x
if test -n "$(git status --porcelain)"; then
echo 'Unclean working tree. Commit or stash changes first.' >&2;

View File

@@ -1,6 +1,3 @@
git checkout master
git merge dev
#!/usr/bin/env sh
set -e
echo "Enter release version: "
@@ -19,11 +16,7 @@ then
echo "Releasing theme-default $VERSION ..."
cd packages/theme-default
npm version $VERSION --message "[release] $VERSION"
if [[ $VERSION =~ "beta" ]]
then
npm publish --tag beta
else
npm publish
npm publish
fi
cd ../..
@@ -33,16 +26,8 @@ then
npm version $VERSION --message "[release] $VERSION"
# publish
git push eleme master
git push eleme 1.x
git push eleme refs/tags/v$VERSION
git checkout dev
git rebase master
git push eleme dev
if [[ $VERSION =~ "beta" ]]
then
npm publish --tag beta
else
npm publish
fi
npm publish --tag legacy
fi

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

@@ -145,8 +145,8 @@ ElementLocale.i18n((key, value) => i18n.t(key, value))
```html
<script src="//unpkg.com/vue"></script>
<script src="//unpkg.com/element-ui"></script>
<script src="//unpkg.com/element-ui/lib/umd/locale/en.js"></script>
<script src="//unpkg.com/element-ui@1.4"></script>
<script src="//unpkg.com/element-ui@1.4/lib/umd/locale/en.js"></script>
<script>
ELEMENT.locale(ELEMENT.lang.en)
@@ -158,9 +158,9 @@ Compatible with `vue-i18n`
```html
<script src="//unpkg.com/vue"></script>
<script src="//unpkg.com/vue-i18n/dist/vue-i18n.js"></script>
<script src="//unpkg.com/element-ui"></script>
<script src="//unpkg.com/element-ui/lib/umd/locale/zh-CN.js"></script>
<script src="//unpkg.com/element-ui/lib/umd/locale/en.js"></script>
<script src="//unpkg.com/element-ui@1.4"></script>
<script src="//unpkg.com/element-ui@1.4/lib/umd/locale/zh-CN.js"></script>
<script src="//unpkg.com/element-ui@1.4/lib/umd/locale/en.js"></script>
<script>
Vue.locale('en', ELEMENT.lang.en)

View File

@@ -3,22 +3,30 @@
### npm
Installing with npm is recommended and it works seamlessly with [webpack](https://webpack.js.org/).
:::tip
Note that this doc is for 1.x, so you need the `legacy` tag when installing.
:::
```shell
npm i element-ui -S
npm i element-ui@legacy -S
```
### CDN
Get the latest version from [unpkg.com/element-ui](https://unpkg.com/element-ui/) , and import JavaScript and CSS file in your page.
Get the latest version from [unpkg.com/element-ui](https://unpkg.com/element-ui@1.4/) , and import JavaScript and CSS file in your page.
```html
<!-- import CSS -->
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-default/index.css">
<link rel="stylesheet" href="https://unpkg.com/element-ui@1.4/lib/theme-default/index.css">
<!-- import JavaScript -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script src="https://unpkg.com/element-ui@1.4/lib/index.js"></script>
```
:::tip
We recommend our users to lock Element's version when using CDN. For example, if you're using Element 1.4.8, you can lock CSS and JavaScript files like this: `https://unpkg.com/element-ui@1.4.8/lib/theme-default/index.css`, `https://unpkg.com/element-ui@1.4.8/lib/index.js`.
:::
### Hello world
If you are using CDN, a hello-world page is easy with Element. [Online Demo](http://codepen.io/QingWei-Li/pen/vXwJrY)
If you are using CDN, a hello-world page is easy with Element. [Online Demo](https://jsfiddle.net/hzfpyvg6/18/)
```html
<!DOCTYPE html>
@@ -26,7 +34,7 @@ If you are using CDN, a hello-world page is easy with Element. [Online Demo](htt
<head>
<meta charset="UTF-8">
<!-- import CSS -->
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-default/index.css">
<link rel="stylesheet" href="https://unpkg.com/element-ui@1.4/lib/theme-default/index.css">
</head>
<body>
<div id="app">
@@ -37,9 +45,9 @@ If you are using CDN, a hello-world page is easy with Element. [Online Demo](htt
</div>
</body>
<!-- import Vue before Element -->
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<script src="https://unpkg.com/vue@2.5/dist/vue.js"></script>
<!-- import JavaScript -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script src="https://unpkg.com/element-ui@1.4/lib/index.js"></script>
<script>
new Vue({
el: '#app',

View File

@@ -4,7 +4,7 @@ This part walks you through the process of using Element in a webpack project.
### Use Starter Kit
We provide a general [project template](https://github.com/ElementUI/element-starter) for you. For those who are familiar with [cooking](https://github.com/ElementUI/element-cooking-starter) or [Laravel](https://github.com/ElementUI/element-in-laravel-starter), we also provide corresponding templates, and you can download and use them as well.
We provide a general [project template](https://github.com/ElementUI/element-starter/tree/1.x) for you. For those who are familiar with [cooking](https://github.com/ElementUI/element-cooking-starter) or [Laravel](https://github.com/ElementUI/element-in-laravel-starter/tree/1.x), we also provide corresponding templates, and you can download and use them as well.
If you prefer not to use them, please read the following.
@@ -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.0.0",
"vue": "^2.1.6"
"element-ui": "legacy",
"vue": "2.5.2"
},
"devDependencies": {
"babel-core": "^6.0.0",

View File

@@ -157,8 +157,8 @@ ElementLocale.i18n((key, value) => i18n.t(key, value))
```html
<script src="//unpkg.com/vue"></script>
<script src="//unpkg.com/element-ui"></script>
<script src="//unpkg.com/element-ui/lib/umd/locale/en.js"></script>
<script src="//unpkg.com/element-ui@1.4"></script>
<script src="//unpkg.com/element-ui@1.4/lib/umd/locale/en.js"></script>
<script>
ELEMENT.locale(ELEMENT.lang.en)
@@ -170,9 +170,9 @@ ElementLocale.i18n((key, value) => i18n.t(key, value))
```html
<script src="//unpkg.com/vue"></script>
<script src="//unpkg.com/vue-i18n/dist/vue-i18n.js"></script>
<script src="//unpkg.com/element-ui"></script>
<script src="//unpkg.com/element-ui/lib/umd/locale/zh-CN.js"></script>
<script src="//unpkg.com/element-ui/lib/umd/locale/en.js"></script>
<script src="//unpkg.com/element-ui@1.4"></script>
<script src="//unpkg.com/element-ui@1.4/lib/umd/locale/zh-CN.js"></script>
<script src="//unpkg.com/element-ui@1.4/lib/umd/locale/en.js"></script>
<script>
Vue.locale('en', ELEMENT.lang.en)

View File

@@ -3,22 +3,30 @@
### npm 安装
推荐使用 npm 的方式安装,它能更好地和 [webpack](https://webpack.js.org/) 打包工具配合使用。
:::tip
注意:这里是 1.x 的文档,因此使用 npm 安装时需要添加 `legacy` 标签。
:::
```shell
npm i element-ui -S
npm i element-ui@legacy -S
```
### CDN
目前可以通过 [unpkg.com/element-ui](https://unpkg.com/element-ui/) 获取到最新版本的资源,在页面上引入 js 和 css 文件即可开始使用。
目前可以通过 [unpkg.com/element-ui](https://unpkg.com/element-ui@1.4/) 获取到最新版本的资源,在页面上引入 js 和 css 文件即可开始使用。
```html
<!-- 引入样式 -->
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-default/index.css">
<link rel="stylesheet" href="https://unpkg.com/element-ui@1.4/lib/theme-default/index.css">
<!-- 引入组件库 -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script src="https://unpkg.com/element-ui@1.4/lib/index.js"></script>
```
:::tip
我们建议使用 CDN 引入 Element 的用户在链接地址上锁定版本,以免将来 Element 升级时受到非兼容性更新的影响。例如,如需锁定版本为 1.4.8,则 CSS 和 JavaScript 文件的地址分别是 `https://unpkg.com/element-ui@1.4.8/lib/theme-default/index.css``https://unpkg.com/element-ui@1.4.8/lib/index.js`
:::
### Hello world
通过 CDN 的方式我们可以很容易地使用 Element 写出一个 Hello world 页面。[在线演示](http://codepen.io/QingWei-Li/pen/vXwJrY)
通过 CDN 的方式我们可以很容易地使用 Element 写出一个 Hello world 页面。[在线演示](https://jsfiddle.net/hzfpyvg6/18/)
```html
<!DOCTYPE html>
@@ -26,7 +34,7 @@ npm i element-ui -S
<head>
<meta charset="UTF-8">
<!-- 引入样式 -->
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-default/index.css">
<link rel="stylesheet" href="https://unpkg.com/element-ui@1.4/lib/theme-default/index.css">
</head>
<body>
<div id="app">
@@ -37,9 +45,9 @@ npm i element-ui -S
</div>
</body>
<!-- 先引入 Vue -->
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<script src="https://unpkg.com/vue@2.5/dist/vue.js"></script>
<!-- 引入组件库 -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script src="https://unpkg.com/element-ui@1.4/lib/index.js"></script>
<script>
new Vue({
el: '#app',

View File

@@ -4,7 +4,7 @@
### 使用 Starter Kit
我们提供了通用的[项目模板](https://github.com/ElementUI/element-starter),你可以直接使用。对于熟悉 [cooking](https://github.com/ElementUI/element-cooking-starter) 或 [Laravel](https://github.com/ElementUI/element-in-laravel-starter) 的用户,我们也准备了相应的模板,同样可以直接下载使用。
我们提供了通用的[项目模板](https://github.com/ElementUI/element-starter/tree/1.x),你可以直接使用。对于熟悉 [cooking](https://github.com/ElementUI/element-cooking-starter) 或 [Laravel](https://github.com/ElementUI/element-in-laravel-starter/tree/1.x) 的用户,我们也准备了相应的模板,同样可以直接下载使用。
如果不希望使用我们提供的模板,请继续阅读。
@@ -42,8 +42,8 @@
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
},
"dependencies": {
"element-ui": "^1.0.0",
"vue": "^2.1.6"
"element-ui": "legacy",
"vue": "2.5.2"
},
"devDependencies": {
"babel-core": "^6.0.0",

View File

@@ -1 +1 @@
{"1.0.9":"1.0","1.1.6":"1.1","1.2.9":"1.2","1.3.7":"1.3","1.4.8":"1.4"}
{"1.0.9":"1.0","1.1.6":"1.1","1.2.9":"1.2","1.3.7":"1.3","1.4.9":"1.4"}

View File

@@ -1,6 +1,6 @@
{
"name": "element-ui",
"version": "1.4.8",
"version": "1.4.9",
"description": "A Component Library for Vue.js.",
"main": "lib/element-ui.common.js",
"files": [

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();
},

View File

@@ -147,6 +147,7 @@
},
methods: {
validate(trigger, callback = noop) {
this.validateDisabled = false;
var rules = this.getFilteredRule(trigger);
if ((!rules || rules.length === 0) && !this._props.hasOwnProperty('required')) {
callback();

View File

@@ -1,6 +1,6 @@
{
"name": "element-theme-default",
"version": "1.4.8",
"version": "1.4.9",
"description": "Element component default theme.",
"main": "lib/index.css",
"style": "lib/index.css",

View File

@@ -158,7 +158,7 @@ if (typeof window !== 'undefined' && window.Vue) {
};
module.exports = {
version: '1.4.8',
version: '1.4.9',
locale: locale.use,
i18n: locale.i18n,
install,