mirror of
https://github.com/youzan/vant.git
synced 2025-10-22 11:54:02 +00:00
feat(cli): support custom simulator (#8499)
This commit is contained in:
@@ -25,15 +25,20 @@ export default {
|
||||
},
|
||||
|
||||
data() {
|
||||
const path = location.pathname.replace(/\/index(\.html)?/, '/');
|
||||
|
||||
return {
|
||||
simulator: `${path}mobile.html${location.hash}`,
|
||||
hasSimulator: true,
|
||||
};
|
||||
},
|
||||
|
||||
computed: {
|
||||
simulator() {
|
||||
if (config.site.simulator?.url) {
|
||||
return config.site.simulator?.url;
|
||||
}
|
||||
const path = location.pathname.replace(/\/index(\.html)?/, '/');
|
||||
return `${path}mobile.html${location.hash}`;
|
||||
},
|
||||
|
||||
lang() {
|
||||
const { lang } = this.$route.meta;
|
||||
return lang || '';
|
||||
|
Reference in New Issue
Block a user