0

我正在使用 vue-tables-2 来管理数据。我想实现服务器端。但我有一个问题。我也可以得到数据。但我不知道为什么我收到该错误消息。这是我的代码:

HTML

 <v-server-table :columns="columns" :options="options"></v-server-table>

Vue Js

<script>
var config = {
  "PMI-API-KEY": "erpepsimprpimaiy"
};
export default {
  name: "user-profile",
  data() {
    return {
      columns: ["golongan_name"],
      options: {
        requestFunction: function(data) {
          return this.$http({
            url: "api/v1/golongan_darah/get_all_data",
            method: "post",
            headers: config
          }).then(res => {
            this.data = res.data.data;
            console.log(res);
          });
        },
        filterable: ["golongan_name"],
        sortable: ["golongan_name"],
        filterByColumn: true,
        perPage: 3,
        pagination: { chunk: 10, dropdown: false },
        responseAdapter: function(resp) {
          return {
            data: resp.data,
            count: resp.total
          };
        }
      }
    };
  }
};
</script>

这是错误:

在此处输入图像描述

4

0 回答 0