diff --git a/packages/vant-cli/site/desktop/App.vue b/packages/vant-cli/site/desktop/App.vue index b633671c8..6e7cbc46f 100644 --- a/packages/vant-cli/site/desktop/App.vue +++ b/packages/vant-cli/site/desktop/App.vue @@ -23,7 +23,7 @@ export default { }, data() { - const path = location.pathname.replace('/index', '/'); + const path = location.pathname.replace(/\/index(\.html)?/, '/'); return { packageVersion,