mirror of https://github.com/ElemeFE/element
Chore: doc updates
parent
aa02b42022
commit
9f2ea7eab0
|
@ -219,6 +219,7 @@
|
||||||
const preferGithub = localStorage.getItem('PREFER_GITHUB');
|
const preferGithub = localStorage.getItem('PREFER_GITHUB');
|
||||||
if (href.indexOf('element-cn') > -1 || preferGithub) return;
|
if (href.indexOf('element-cn') > -1 || preferGithub) return;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
if (this.lang !== 'zh-CN') return;
|
||||||
this.$confirm('建议大陆用户访问部署在国内的站点,是否跳转?', '提示')
|
this.$confirm('建议大陆用户访问部署在国内的站点,是否跳转?', '提示')
|
||||||
.then(() => {
|
.then(() => {
|
||||||
location.href = location.href.replace('element.', 'element-cn.');
|
location.href = location.href.replace('element.', 'element-cn.');
|
||||||
|
@ -232,12 +233,10 @@
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.localize();
|
this.localize();
|
||||||
if (this.lang === 'zh-CN') {
|
|
||||||
this.suggestJump();
|
this.suggestJump();
|
||||||
}
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
const notified = localStorage.getItem('ES_NOTIFIED');
|
const notified = localStorage.getItem('ES_NOTIFIED');
|
||||||
if (!notified) {
|
if (!notified && this.lang !== 'zh-CN') {
|
||||||
const h = this.$createElement;
|
const h = this.$createElement;
|
||||||
const title = this.lang === 'zh-CN'
|
const title = this.lang === 'zh-CN'
|
||||||
? '帮助我们完成西班牙语文档'
|
? '帮助我们完成西班牙语文档'
|
||||||
|
|
|
@ -146,7 +146,7 @@ Popover 的属性与 Tooltip 很类似,它们都是基于`Vue-popper`开发的
|
||||||
width="200"
|
width="200"
|
||||||
trigger="focus"
|
trigger="focus"
|
||||||
content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
|
content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
|
||||||
<span slot="reference" style="margin-left: 10px; font-size: 14px; color: #5a5e66">focus 激活</span>
|
<el-button slot="reference">focus 激活</el-button>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
```
|
```
|
||||||
:::
|
:::
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="top">
|
<div class="top">
|
||||||
<el-tooltip class="item" effect="dark" content="Top Left 提示文字" placement="top-start">
|
<el-tooltip class="item" effect="dark" content="Top Left 提示文字" placement="top-start">
|
||||||
<span>上左</span>
|
<el-button>上左</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip class="item" effect="dark" content="Top Center 提示文字" placement="top">
|
<el-tooltip class="item" effect="dark" content="Top Center 提示文字" placement="top">
|
||||||
<el-button>上边</el-button>
|
<el-button>上边</el-button>
|
||||||
|
|
|
@ -85,18 +85,6 @@
|
||||||
if (typeof this.onClose === 'function') {
|
if (typeof this.onClose === 'function') {
|
||||||
this.onClose(this);
|
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() {
|
clearTimer() {
|
||||||
|
|
Loading…
Reference in New Issue