Skip to content

Commit

Permalink
Merge ea9c908 into 04b5f0d
Browse files Browse the repository at this point in the history
  • Loading branch information
tanglinhai authored Sep 14, 2020
2 parents 04b5f0d + ea9c908 commit 9561d8a
Show file tree
Hide file tree
Showing 22 changed files with 4,243 additions and 4,054 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@

### 2.13.0

*2019-12-29*

#### Bug fixes

- Select
- Repair when deleting the selected tag by backspace key, the remove tag event is not triggered bug (#18548 by @tanglinhai)

*2019-11-26*

#### New features
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.es.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@

### 2.13.0

*2019-12-29*

#### Bug fixes

- Select
- Repair when deleting the selected tag by backspace key, the remove tag event is not triggered bug (#18548 by @tanglinhai)

*2019-11-26*

#### Nuevas características
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.fr-FR.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@

### 2.13.0

*2019-12-29*

#### Bug fixes

- Select
- Repair when deleting the selected tag by backspace key, the remove tag event is not triggered bug (#18548 by @tanglinhai)

*2019-11-26*

#### New features
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@

### 2.13.0

*2019-12-29*

#### Bug fixes

- Select
- 修复通过退格键删除已经选中 tag 的时候,remove-tag事件没有触发 的 bug (#18548 by @tanglinhai)

*2019-11-26*

#### 新特性
Expand Down
170 changes: 85 additions & 85 deletions examples/app.vue
Original file line number Diff line number Diff line change
@@ -1,85 +1,85 @@
<template>
<div id="app" :class="{ 'is-component': isComponent }">
<main-header v-if="lang !== 'play'"></main-header>
<div class="main-cnt">
<router-view></router-view>
</div>
<main-footer v-if="lang !== 'play' && !isComponent"></main-footer>
</div>
</template>

<script>
import { use } from 'main/locale';
import zhLocale from 'main/locale/lang/zh-CN';
import enLocale from 'main/locale/lang/en';
import esLocale from 'main/locale/lang/es';
import frLocale from 'main/locale/lang/fr';
const lang = location.hash.replace('#', '').split('/')[1] || 'zh-CN';
const localize = lang => {
switch (lang) {
case 'zh-CN':
use(zhLocale);
break;
case 'es':
use(esLocale);
break;
case 'fr-FR':
use(frLocale);
break;
default:
use(enLocale);
}
};
localize(lang);
export default {
name: 'app',
computed: {
lang() {
return this.$route.path.split('/')[1] || 'zh-CN';
},
isComponent() {
return /^component-/.test(this.$route.name || '');
}
},
watch: {
lang(val) {
if (val === 'zh-CN') {
this.suggestJump();
}
localize(val);
}
},
methods: {
suggestJump() {
if (process.env.NODE_ENV !== 'production') return;
const href = location.href;
const preferGithub = localStorage.getItem('PREFER_GITHUB');
const cnHref = href.indexOf('eleme.cn') > -1 || href.indexOf('element-cn') > -1 || href.indexOf('element.faas') > -1;
if (cnHref || preferGithub) return;
setTimeout(() => {
if (this.lang !== 'zh-CN') return;
this.$confirm('建议大陆用户访问部署在国内的站点,是否跳转?', '提示')
.then(() => {
location.replace('https://element.eleme.cn');
})
.catch(() => {
localStorage.setItem('PREFER_GITHUB', 'true');
});
}, 1000);
}
},
mounted() {
localize(this.lang);
if (this.lang === 'zh-CN') {
this.suggestJump();
}
}
};
</script>
<template>
<div id="app" :class="{ 'is-component': isComponent }">
<main-header v-if="lang !== 'play'"></main-header>
<div class="main-cnt">
<router-view></router-view>
</div>
<main-footer v-if="lang !== 'play' && !isComponent"></main-footer>
</div>
</template>

<script>
import { use } from 'main/locale';
import zhLocale from 'main/locale/lang/zh-CN';
import enLocale from 'main/locale/lang/en';
import esLocale from 'main/locale/lang/es';
import frLocale from 'main/locale/lang/fr';
const lang = location.hash.replace('#', '').split('/')[1] || 'zh-CN';
const localize = lang => {
switch (lang) {
case 'zh-CN':
use(zhLocale);
break;
case 'es':
use(esLocale);
break;
case 'fr-FR':
use(frLocale);
break;
default:
use(enLocale);
}
};
localize(lang);
export default {
name: 'app',
computed: {
lang() {
return this.$route.path.split('/')[1] || 'zh-CN';
},
isComponent() {
return /^component-/.test(this.$route.name || '');
}
},
watch: {
lang(val) {
if (val === 'zh-CN') {
this.suggestJump();
}
localize(val);
}
},
methods: {
suggestJump() {
if (process.env.NODE_ENV !== 'production') return;
const href = location.href;
const preferGithub = localStorage.getItem('PREFER_GITHUB');
const cnHref = href.indexOf('eleme.cn') > -1 || href.indexOf('element-cn') > -1 || href.indexOf('element.faas') > -1;
if (cnHref || preferGithub) return;
setTimeout(() => {
if (this.lang !== 'zh-CN') return;
this.$confirm('建议大陆用户访问部署在国内的站点,是否跳转?', '提示')
.then(() => {
location.replace('https://element.eleme.cn');
})
.catch(() => {
localStorage.setItem('PREFER_GITHUB', 'true');
});
}, 1000);
}
},
mounted() {
localize(this.lang);
if (this.lang === 'zh-CN') {
this.suggestJump();
}
}
};
</script>
Loading

0 comments on commit 9561d8a

Please sign in to comment.