feat(cli): set title by lang

This commit is contained in:
陈嘉涵
2019-12-09 17:07:01 +08:00
parent cf172f5cbc
commit 396002495f
10 changed files with 75 additions and 25 deletions

View File

@@ -9,8 +9,7 @@ export default {
name: 'van-doc-simulator',
props: {
src: String,
lang: String
src: String
},
data() {
@@ -33,12 +32,6 @@ export default {
}
},
watch: {
lang(val) {
location.hash = `#${location.hash.replace(this.lang, val)}`;
}
},
mounted() {
window.addEventListener('scroll', () => {
this.scrollTop = window.scrollY;