perf: 优化标签页操作-路由传参模式用法

This commit is contained in:
xiaoxian521
2023-05-29 11:30:53 +08:00
parent c4ddf840b4
commit 87da9b881c
4 changed files with 54 additions and 26 deletions

View File

@@ -56,10 +56,17 @@ function onCloseTags() {
class="m-2"
v-for="index in 6"
:key="index"
@click="toDetail(index, 'query')"
@click="toDetail({ id: index }, 'query')"
>
打开{{ index }}详情页
</el-button>
<el-button
@click="
toDetail({ id: 666, name: '小明', age: 18, job: '工程师' }, 'query')
"
>
多个参数
</el-button>
</div>
<el-divider />
@@ -70,7 +77,7 @@ function onCloseTags() {
class="m-2"
v-for="index in 6"
:key="index"
@click="toDetail(index, 'params')"
@click="toDetail({ id: index }, 'params')"
>
打开{{ index }}详情页
</el-button>