mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 18:54:24 +00:00
feat(cli): support switch lang
This commit is contained in:
@@ -9,7 +9,8 @@ export default {
|
||||
name: 'van-doc-simulator',
|
||||
|
||||
props: {
|
||||
src: String
|
||||
src: String,
|
||||
lang: String
|
||||
},
|
||||
|
||||
data() {
|
||||
@@ -32,6 +33,12 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
lang(val) {
|
||||
location.hash = `#${location.hash.replace(this.lang, val)}`;
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
window.addEventListener('scroll', () => {
|
||||
this.scrollTop = window.scrollY;
|
||||
|
Reference in New Issue
Block a user