From 9f2ea7eab04ca2448bb8b145c6e4bb1189da9691 Mon Sep 17 00:00:00 2001 From: Leopoldthecoder Date: Thu, 9 Nov 2017 15:12:55 +0800 Subject: [PATCH] Chore: doc updates --- examples/app.vue | 7 +++---- examples/docs/zh-CN/popover.md | 2 +- examples/docs/zh-CN/tooltip.md | 2 +- packages/message/src/main.vue | 12 ------------ 4 files changed, 5 insertions(+), 18 deletions(-) diff --git a/examples/app.vue b/examples/app.vue index fa72ee15..251988d3 100644 --- a/examples/app.vue +++ b/examples/app.vue @@ -219,6 +219,7 @@ const preferGithub = localStorage.getItem('PREFER_GITHUB'); if (href.indexOf('element-cn') > -1 || preferGithub) return; setTimeout(() => { + if (this.lang !== 'zh-CN') return; this.$confirm('建议大陆用户访问部署在国内的站点,是否跳转?', '提示') .then(() => { location.href = location.href.replace('element.', 'element-cn.'); @@ -232,12 +233,10 @@ mounted() { this.localize(); - if (this.lang === 'zh-CN') { - this.suggestJump(); - } + this.suggestJump(); setTimeout(() => { const notified = localStorage.getItem('ES_NOTIFIED'); - if (!notified) { + if (!notified && this.lang !== 'zh-CN') { const h = this.$createElement; const title = this.lang === 'zh-CN' ? '帮助我们完成西班牙语文档' diff --git a/examples/docs/zh-CN/popover.md b/examples/docs/zh-CN/popover.md index b3c52c3f..44987488 100644 --- a/examples/docs/zh-CN/popover.md +++ b/examples/docs/zh-CN/popover.md @@ -146,7 +146,7 @@ Popover 的属性与 Tooltip 很类似,它们都是基于`Vue-popper`开发的 width="200" trigger="focus" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。"> - focus 激活 + focus 激活 ``` ::: diff --git a/examples/docs/zh-CN/tooltip.md b/examples/docs/zh-CN/tooltip.md index 83aeeba5..07eb8d03 100644 --- a/examples/docs/zh-CN/tooltip.md +++ b/examples/docs/zh-CN/tooltip.md @@ -63,7 +63,7 @@
- 上左 + 上左 上边 diff --git a/packages/message/src/main.vue b/packages/message/src/main.vue index c6f9956d..ed58c2c6 100644 --- a/packages/message/src/main.vue +++ b/packages/message/src/main.vue @@ -85,18 +85,6 @@ if (typeof this.onClose === 'function') { this.onClose(this); } -// if (!this.originFocus || !this.originFocus.getBoundingClientRect) return; -// -// // restore keyboard focus -// const { top, left, bottom, right } = this.originFocus.getBoundingClientRect(); -// const viewportHeight = window.innerHeight || document.documentElement.clientHeight; -// const viewportWidth = window.innerWidth || document.documentElement.clientWidth; -// if (top >= 0 && -// left >= 0 && -// bottom <= viewportHeight && -// right <= viewportWidth) { -// this.originFocus.focus(); -// } }, clearTimer() {