在当前文件夹下index中设置
<template>
<div id="app">
<router-view />
</div>
</template>
<script>
export default {
name: 'App',
// 需要router-view中使用默认
created: function () {
this.$router.push({name: '路径一级名称-二级名称'})
}
}
</script>
在当前文件夹下index中设置
<template>
<div id="app">
<router-view />
</div>
</template>
<script>
export default {
name: 'App',
// 需要router-view中使用默认
created: function () {
this.$router.push({name: '路径一级名称-二级名称'})
}
}
</script>