mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 18:54:24 +00:00
feat(cli): set title by lang
This commit is contained in:
@@ -65,6 +65,23 @@ export default {
|
||||
watch: {
|
||||
lang(val) {
|
||||
setLang(val);
|
||||
this.setTitle();
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
this.setTitle();
|
||||
},
|
||||
|
||||
methods: {
|
||||
setTitle() {
|
||||
let { title } = this.config;
|
||||
|
||||
if (this.config.description) {
|
||||
title += ` - ${this.config.description}`;
|
||||
}
|
||||
|
||||
document.title = title;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user