Browse Source

解决router query 不刷新页面的问题

master
maochaoying 2 years ago
parent
commit
569103fc6b
  1. 11
      src/components/CaseCard.vue

11
src/components/CaseCard.vue

@ -30,12 +30,21 @@ import A6 from '@/static/img/caseshow/specialequip.png'
import A7 from '@/static/img/caseshow/healthcare.png'
import A8 from '@/static/img/caseshow/smarthome.png'
import A9 from '@/static/img/caseshow/electronics.png'
import router from '@/router'
import { useRoute, useRouter } from 'vue-router'
const router = useRouter()
const route = useRoute()
import { watch } from 'vue'
const props = defineProps({
activeTab: {
type: Number,
},
})
watch(
() => route.query.t,
() => {
router.go(0)
},
)
const toClassifyPage = id => {
router.push({
path: '/case-show',

Loading…
Cancel
Save