【发布时间】:2020-01-22 18:12:49
【问题描述】:
我有一个 Quasar 表,其中有 5 列。在五列中,我希望第一列具有指向我从 api 获得的值的超链接。
这是我的 Blade.php 代码 -
colModel:[
{name:'name',index:'name', align:'center', sortable:false, formatter: 'showlink', width:211, cellattr: function (rowId, tv, rawObject, cm, rdata) { return 'style="white-space: normal;"' }, searchoptions:{sopt:["cn","eq","nc","bw"]}},
{name:'in',index:'in', align:'center', sorttype:'date', datefmt:'Y-m-d H:i:s', searchoptions:{sopt:["cn","eq","nc","bw"]}},
{name:'out',index:'out', align:'center', sortable:true, searchoptions:{sopt:["cn","eq","nc","bw"]}},
{name:'in_comments',index:'in_comments', align:'center', sorttype:'text', width:211, cellattr: function (rowId, tv, rawObject, cm, rdata) { return 'style="white-space: normal;"' }, searchoptions:{sopt:["cn","eq","nc","bw"]}},
{name:'out_comments',index:'out_comments', align:'center', sorttype:'text', width:211, cellattr: function (rowId, tv, rawObject, cm, rdata) { return 'style="white-space: normal;"' }, searchoptions:{sopt:["cn","eq","nc","bw"]}}
]
这是我的 Vue 代码 -
visibleColumns: ['name', 'in', 'out', 'in_comments', 'out_comments'],
columns: [
{ name: 'name', align: 'center', label: 'Name', field: 'name', sortable: true },
{ name: 'in', label: 'In', field: 'in', sortable: true },
{ name: 'out', label: 'Out', field: 'out', sortable: true },
{ name: 'in_comments', label: 'in comments', field: 'in_comments' },
{ name: 'out_comments', label: 'out comments', field: 'out_comments' },
],
名称应该用这样的超链接包裹 - 名称
我可以知道可以做些什么来实现这一目标吗?
【问题讨论】:
标签: html vuejs2 qtableview quasar-framework quasar