我的需求是跳转到第三方网站,看官方是写了如何跳转站内路由,不符合我的要求,在csdn发现了一篇文章,我贴一下代码

- <template>
- <Table border :columns="ReportColumns" :data="ReportData">
- <template #name="{ row }">
- <strong>{{ row.name }}strong>
- template>
- <template #action="{ row, index }">
-
- <Button type="error" size="small" @click="remove(index)">DeleteButton>
- template>
- Table>
- template>
- data(){
- return{
-
- ReportColumns:[
- {
- title: '生成时间',
- key: 'createTime',
- width: 220
- },
- {
- title: '生成用户',
- key: 'creator',
- width: 200
- },
- {
- title:'报告地址',
- key:'reportUrl',
- width: 800,
- render: (h, params) => {
- return h('span',
- {
- domProps: {
- }
- }
- )
- }
-
- },
- {
- title: '操作',
- slot: 'action',
- }
- ],
后端接口报文格式
- {
- "ret": true,
- "code": 0,
- "msg": "查询成功",
- "content": [
- {
- "id": 522,
- "reportId": 2561,
- "creator": "李朝阳",
- "createTime": "2023-11-03 12:05:00",
- "reportUrl":"http://192.168.0.1:1111/view/project/5f1e8e97b6e123455555"
- },
- {
-
- "id": 523,
- "reportId": 2562,
- "creator": "白克玲",
- "createTime": "2023-10-03 11:25:00",
- "reportUrl":"https://blog.csdn.net/qq_42772400/article/details/128386185"
- }
- ]
- }
原贴地址