Skip to content

Commit

Permalink
fix(模板): 修复跳转参数
Browse files Browse the repository at this point in the history
  • Loading branch information
nihaojob committed Jun 12, 2024
1 parent 5de6f5c commit 3f9f30f
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/views/template/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: 秦少卫
* @Date: 2024-05-17 15:30:21
* @LastEditors: 秦少卫
* @LastEditTime: 2024-06-12 21:59:53
* @LastEditTime: 2024-06-12 22:52:04
* @Description: file content
-->
<template>
Expand Down Expand Up @@ -89,6 +89,9 @@
import { toRaw } from 'vue';
import { Spin } from 'view-ui-plus';
import qs from 'qs';
import { useRouter } from 'vue-router';
const router = useRouter();
// 路由
import banner from './components/banner.vue';
// 顶部组件
Expand Down Expand Up @@ -162,7 +165,15 @@ const search = () => {
getTmplListHandel();
const toInfo = (info) => {
window.open(`/#/?tempId=${info.id}`);
const href = router.resolve({
path: '/',
query: {
tempId: info.id,
},
});
console.log(href, 1111);
// 点击事件
window.open(href.href, '_blank');
};
</script>
<style lang="less" scoped>
Expand Down

0 comments on commit 3f9f30f

Please sign in to comment.