Vue3的el-table-column增加跳轉其他頁面的方法
更新時間:2025年02月06日 09:50:02 作者:KrityCat
文章介紹了如何在Vue3的el-table-column中增加跳轉其他頁面的功能,并提供了示例代碼和handleUpdate方法的源碼分析,感興趣的朋友跟隨小編一起看看吧
效果圖
既不影響顯示內容,也不影響頁面跳轉

el-table-column寫法
<el-table-column
label="系統(tǒng)單號"
align="center"
prop="systematicReceipt"
width="180"
>
<template #default="scope">
<el-link type="primary">
<a target="_blank" @click="handleUpdate(scope.row)">{{
scope.row.systematicReceipt
}}</a>
</el-link>
</template>
</el-table-column>handleUpdate方法
function handleUpdate(row) {
const systematicReceipt = row.systematicReceipt;
router.push({
path: "/purchase/purchaseDocumentProcessing",
query: { systematicReceipt },
});
}源碼分析
可參考鎧思進銷存系統(tǒng)的ks-vue3/src/views/system/purchase/purchaseDocumentQuery.vue
到此這篇關于Vue3的el-table-column增加跳轉其他頁面的文章就介紹到這了,更多相關Vue3 el-table-column跳轉其他頁面內容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持腳本之家!
相關文章
vue.js自定義組件實現(xiàn)v-model雙向數(shù)據(jù)綁定的示例代碼
這篇文章主要介紹了vue.js自定義組件實現(xiàn)v-model雙向數(shù)據(jù)綁定的示例代碼,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧2020-01-01
Vue3中的createGlobalState用法及示例詳解
createGlobalState 是 Vue 3 中一種管理全局狀態(tài)的簡便方式,通常用于管理多個組件間共享的狀態(tài),由 @vueuse/core 提供的,允許創(chuàng)建一個響應式的全局狀態(tài),本文給大家介紹了Vue3中的createGlobalState用法及示例,需要的朋友可以參考下2024-10-10

