我正在为我的表使用 vue-good-table。我尝试使用降序对数据进行排序,firstSortType
而initialSortBy
它根本没有对表格进行排序。它总是按升序对表格进行排序。我的桌子看起来像这样
我试过firstSortType
这样
{
label: "Tracking Number",
field: "docket_no",
sortable: true,
firstSortType: "desc"
},
初始排序依据
<vue-good-table
:columns="tableColumns1"
:rows="shipments"
:line-numbers="true"
:search-options="{
enabled: true,
placeholder: 'Type to search',
}"
:pagination-options="{
enabled: true,
mode: 'pages',
}"
:sort-options="{
enabled: true,
initialSortBy: [
{field: 'docket_no', type: 'desc'}
],
}" />
当我尝试使用 initialSortBy 它向我显示此错误
TypeError: Cannot read property 'setInitialSort' of undefined