Vue loading problem

<html xmlns:th="http://www.thymeleaf.org">
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<div th:include="/common/common::common"></div>
<head>
<meta content="text/html;charset=UTF-8" />
<link rel="stylesheet" th:href="@{/css/common/animate.min.css}">
<link rel="stylesheet" th:href="@{/css/common/nprogress.css}">
<link rel="stylesheet" th:href="@{/css/common/font-awesome.min.css}">
<link rel="stylesheet" th:href="@{/css/common/bootstrap.min.css}">
<link rel="stylesheet" th:href="@{/css/common/custom.min.css}">
<script th:src="@{/js/login.js}"></script>
</head>
<body class="nav-md">
    <div class="container body">
        <div class="main_container">
            <div class="col-md-3 left_col">
                <div class="left_col scroll-view">
                    <div th:include="/common/left::left"></div>
                </div>
            </div>
            <div th:include="/common/header::header"></div>
            <div class="right_col" role="main" style="min-height: 100%;"><br>
            
            <div>
              <i-table :columns="columns1" :data="historyData"></i-table>
              <Page :total="dataCount" :page-size="pageSize" @on-change="changepage" show-sizer></Page>
            </div>
            </div>
        </div>
    </div>
</body>
</head>
<script>
var vue =  new Vue({
    el: "-sharpapp",
    data (){
        return {
        //Columns1titlekeyK-V
            columns1: [
                {
                    title: "",
                    key: "username"
                },
                {
                    title: "",
                    key: "email"
                },
                {
                    title: "",
                    key: "createTime"
                },
                {
                    title: "",
                    key: "updateTime"
                }
            ],
            //key
            historyData: [],
            // 
            dataCount:0,
            // 
            pageSize:10
        };
    },
    methods: {
        querytable : function(){
          axios.get("/user/getUsers")//postget
              .then(function (response) {
                  // 
                  this.dataCount = response.list.length;
                  // 
                  if(response.list.length < this.pageSize){
                      this.historyData = response.list;
                  }else{
                      this.historyData = response.list.slice(0,this.pageSize);
                  }
              })
              .catch(function (error) {
                alert(error);
              });
      },
      changepage(index){
          var _start = ( index - 1 ) * this.pageSize;
          var _end = index * this.pageSize;
          this.historyData = response.data.slice(_start,_end);
      },
      //
         created () {
            querytable();
        }
     }
    });
</script>
</html>

Why isn"t methods loaded? data is gone

Mar.10,2021

use this. Querytable ()

 created () {
   this.querytable()
 }

created should not be wrapped in methods, the two are juxtaposed. The method call is this.function ()


methods: {
    querytable : function(){
      axios.get("/user/getUsers")//postget
          .then(function (response) {
              // 
              this.dataCount = response.list.length;
              // 
              if(response.list.length < this.pageSize){
                  this.historyData = response.list;
              }else{
                  this.historyData = response.list.slice(0,this.pageSize);
              }
          })
          .catch(function (error) {
            alert(error);
          });
      },
      changepage(index){
          var _start = ( index - 1 ) * this.pageSize;
          var _end = index * this.pageSize;
          this.historyData = response.data.slice(_start,_end);
      },
     
},
created () {
    this.querytable();
}
Menu