mirror of
https://github.com/youzan/vant.git
synced 2025-10-18 01:17:15 +00:00
fix(cli): nav back in mobile mode (#5957)
This commit is contained in:
@@ -26,7 +26,11 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
onBack() {
|
onBack() {
|
||||||
history.back();
|
if (history.length > 1) {
|
||||||
|
history.back();
|
||||||
|
} else {
|
||||||
|
this.$router.replace('/');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user