Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/sorting/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vue.js/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/drupal/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sorting 默认情况下,如何按降序对vuesax表组件数据进行排序?_Sorting_Vue.js - Fatal编程技术网

Sorting 默认情况下,如何按降序对vuesax表组件数据进行排序?

Sorting 默认情况下,如何按降序对vuesax表组件数据进行排序?,sorting,vue.js,Sorting,Vue.js,我尝试在默认情况下按降序对vuesax表组件数据进行排序并显示。但默认情况下,它是按升序排列的,在单击表中的标题Id时,它会借助vuesax中的sort key属性按降序排列。有人能帮我把这个默认值改成降序吗。我的脚本在Vue.Js中 我的Vuesax表组件代码 <template slot="thead"> <vs-th sort-key="id">Id</vs-th> <vs-th sort-key="first_name">

我尝试在默认情况下按降序对vuesax表组件数据进行排序并显示。但默认情况下,它是按升序排列的,在单击表中的标题Id时,它会借助vuesax中的sort key属性按降序排列。有人能帮我把这个默认值改成降序吗。我的脚本在Vue.Js中

我的Vuesax表组件代码

 <template slot="thead">
    <vs-th sort-key="id">Id</vs-th>
    <vs-th sort-key="first_name">Name</vs-th>
 </template>

<template slot-scope="{data}">
  <tbody>
    <vs-tr :data="tr" :key="indextr" v-for="(tr, indextr) in data">
       <vs-td>
        <p class="product-name font-medium truncate">{{ tr.id }}</p>
       </vs-td>  
     </vs-tr>
  </tbody>
</template>

身份证件
名称

{{tr.id}