From 78cb587402f9e3fc9504c0f091609927874aa7d0 Mon Sep 17 00:00:00 2001 From: Waam Date: Wed, 16 Nov 2016 19:32:17 +0100 Subject: [PATCH 0001/3151] typo --- src/locale/lang/fr.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/locale/lang/fr.js b/src/locale/lang/fr.js index b01aab98544..966fbf5f0ec 100644 --- a/src/locale/lang/fr.js +++ b/src/locale/lang/fr.js @@ -73,7 +73,7 @@ export default { continue: 'Continuer' }, table: { - emptyText: 'Aucune donné', + emptyText: 'Aucune donnée', confirmFilter: 'Confirmer', resetFilter: 'Réinitialiser', clearFilter: 'Tous' From 5266e3bc63100518f17a14cbaf55583e354499c2 Mon Sep 17 00:00:00 2001 From: "qingwei.li" Date: Tue, 29 Nov 2016 10:49:28 +0800 Subject: [PATCH 0002/3151] fix build site script --- build/deploy-ci.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/deploy-ci.sh b/build/deploy-ci.sh index f20fe1545ed..fc2bc16c5bb 100644 --- a/build/deploy-ci.sh +++ b/build/deploy-ci.sh @@ -10,9 +10,6 @@ fi # release if [ "$TRAVIS_TAG" ]; then - # build sub folder - SUB_FOLDER=$(echo $TRAVIS_TAG | grep -o -E '\d+\.\d+') - # build lib npm run dist cd temp_web @@ -40,6 +37,9 @@ if [ "$TRAVIS_TAG" ]; then npm run deploy:build cd temp_web git clone -b gh-pages https://$ROT_TOKEN@github.com/ElemeFE/element.git && cd element + # build sub folder + export SUB_FOLDER=$(echo $TRAVIS_TAG | grep -o -E '\d+\.\d+') + mkdir $SUB_FOLDER rm -rf *.js *.css *.map static rm -rf $SUB_FOLDER/** From f7d2b0916c4c3431887d2e2a8b5664ac4297bf2f Mon Sep 17 00:00:00 2001 From: Yuyang Liu Date: Tue, 29 Nov 2016 13:10:26 +0800 Subject: [PATCH 0003/3151] Time-Select: emit input event when clear value fix #1411 --- packages/date-picker/src/picker.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/date-picker/src/picker.vue b/packages/date-picker/src/picker.vue index 120efaa83d8..a6e6fa21693 100644 --- a/packages/date-picker/src/picker.vue +++ b/packages/date-picker/src/picker.vue @@ -333,6 +333,7 @@ export default { this.pickerVisible = !this.pickerVisible; } else { this.internalValue = ''; + this.$emit('input', ''); } }, From 5aa4c5f00a0f201227963c8622043bed5d2feac6 Mon Sep 17 00:00:00 2001 From: kingwl Date: Tue, 29 Nov 2016 09:55:16 +0800 Subject: [PATCH 0004/3151] Notification: add offset --- examples/docs/zh-CN/notification.md | 37 +++++++++++++++++++++++++++++ packages/notification/src/main.js | 3 ++- 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/examples/docs/zh-CN/notification.md b/examples/docs/zh-CN/notification.md index d93330f7ac9..1cab8f1f2f7 100644 --- a/examples/docs/zh-CN/notification.md +++ b/examples/docs/zh-CN/notification.md @@ -45,6 +45,13 @@ message: '这是一条错误的提示消息' }); }, + + open7() { + this.$notify({ + message: '吴尔丹', + origin: 100 + }); + }, onClose() { console.log('Notification 已关闭'); @@ -166,6 +173,35 @@ ``` ::: +### 带有偏移 + +让 Notification 偏移一些位置 + +::: demo Element Notification 组件提供设置偏移量的功能, 通过设置 `origin` 字段,可以使弹出的消息距屏幕上方偏移一段距离, 在同一时刻,所有的 Notification 实例应当只有同一个偏移量。 +```html + + + +``` +::: + ### 全局方法 Element 为 `Vue.prototype` 添加了全局方法 `$notify`。因此在 vue instance 中可以采用本页面中的方式调用 Notification。 @@ -188,6 +224,7 @@ import { Notification } from 'element-ui'; | type | 主题样式,如果不在可选值内将被忽略 | string | success/warning/info/error | — | | duration | 显示时间, 毫秒。设为 0 则不会自动关闭 | number | — | 4500 | | onClose | 关闭时的回调函数 | function | — | — | +| origin | 偏移的距离,在同一时刻,所有的 Notification 实例应当只有同一个偏移量 | number | — | 0 | ### 方法 调用 `Notification` 或 `this.$notify` 会返回当前 Notification 的实例。如果需要手动关闭实例,可以调用它的 `close` 方法。 diff --git a/packages/notification/src/main.js b/packages/notification/src/main.js index 7ee384e85b0..af7a6dddfd4 100644 --- a/packages/notification/src/main.js +++ b/packages/notification/src/main.js @@ -25,7 +25,8 @@ var Notification = function(options) { instance.dom = instance.vm.$el; instance.dom.style.zIndex = PopupManager.nextZIndex(); - let topDist = 0; + const origin = options.origin || 0; + let topDist = origin; for (let i = 0, len = instances.length; i < len; i++) { topDist += instances[i].$el.offsetHeight + 16; } From 2676bbaa5a8095caa9315a690fac123dae641ad1 Mon Sep 17 00:00:00 2001 From: Leopoldthecoder Date: Tue, 29 Nov 2016 18:40:10 +0800 Subject: [PATCH 0005/3151] Notification: improve offset attribute doc --- examples/docs/en-US/notification.md | 38 +++++++++++++++++++++++++++++ examples/docs/zh-CN/notification.md | 22 +++++++++-------- packages/notification/src/main.js | 4 +-- 3 files changed, 52 insertions(+), 12 deletions(-) diff --git a/examples/docs/en-US/notification.md b/examples/docs/en-US/notification.md index 6298d25ca51..efa71f87738 100644 --- a/examples/docs/en-US/notification.md +++ b/examples/docs/en-US/notification.md @@ -46,6 +46,14 @@ }); }, + open7() { + this.$notify.success({ + title: 'Success', + message: 'This is a success message', + offset: 100 + }); + }, + onClose() { console.log('Notification is closed'); } @@ -165,6 +173,35 @@ We provide four types: success, warning, info and error. ``` ::: +### With offset + +Customize Notification's offset from the top edge of the screen + +::: demo Set the `offset` attribute to customize Notification's offset from the top edge of the screen. Note that every Notification instance of the same moment should have the same offset. +```html + + + +``` + ### Global method Element has added a global method `$notify` for Vue.prototype. So in a vue instance you can call `Notification` like what we did in this page. @@ -187,6 +224,7 @@ In this case you should call `Notification(options)`. We have also registered me | type | notification type | string | success/warning/info/error | — | | duration | duration before close. It will not automatically close if set 0 | number | — | 4500 | | onClose | callback function when closed | function | — | — | +| offset | offset from the top edge of the screen. Every Notification instance of the same moment should have the same offset | number | — | 0 | ### Methods `Notification` and `this.$notify` returns the current Message instance. To manually close the instance, you can call `close` on it. diff --git a/examples/docs/zh-CN/notification.md b/examples/docs/zh-CN/notification.md index 1cab8f1f2f7..74a480504bf 100644 --- a/examples/docs/zh-CN/notification.md +++ b/examples/docs/zh-CN/notification.md @@ -47,10 +47,11 @@ }, open7() { - this.$notify({ - message: '吴尔丹', - origin: 100 - }); + this.$notify.success({ + title: '成功', + message: '这是一条成功的提示消息', + offset: 100 + }); }, onClose() { @@ -177,7 +178,7 @@ 让 Notification 偏移一些位置 -::: demo Element Notification 组件提供设置偏移量的功能, 通过设置 `origin` 字段,可以使弹出的消息距屏幕上方偏移一段距离, 在同一时刻,所有的 Notification 实例应当只有同一个偏移量。 +::: demo Notification 提供设置偏移量的功能,通过设置 `offset` 字段,可以使弹出的消息距屏幕顶部偏移一段距离。注意在同一时刻,所有的 Notification 实例应当具有一个相同的偏移量。 ```html