Vue -- 在Table中將某一列設置成點擊跳轉詳情的效果

html

<el-table-column prop="name" :label="$t('columns.appTemplate')"  align="center" min-width="10"> 
	<template slot-scope="scope">
		<a  style="color:#1890ff;cursor:pointer" @click="handleAppTemplateDetail(scope.$index,scope.row)" >{{scope.row.name}}</a>
	</template>
</el-table-column>

js

 handleAppTemplateDetail(index,row){  
      this.$router.push({name: "addAppTemplate", params: {appTemplateId:row.id,isAdd:false}})
}

<頁面間如何傳遞參數>更多參考:https://blog.csdn.net/weixin_38645718/article/details/105473059

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章