0

https://codepen.io/oxy1023/pen/gOKzbBL

  methods: {
datas() {
  var vm = this;
  axios
    .get(`http://115.145.177.104:1807/machinerepairhistory`, [
      {
        company: "",
        factory: "",
        repairno: "",
        model_group: "",
        repairdate: "",
        repairtime: "",
        repaircomp: "",
        repairissue: "",
        sparepart: "",
        repairstory: "",
        repairamt: "",
        repairuserid: "",
        repairusernm: "",
        remark: "",
        createdate: "",
        createid: "",
        updatedate: "",
        updateid: "",
      },
    ])
    .then((response) => {
      console.log("response.data : " + JSON.stringify(response.data));
      vm.datas = response.data;
    })
    .catch((error) => {
      console.error(error);
    });
  axios;

I have created a table using vuesax. I want to insert data, but it doesn't come out properly. Why?

Is the data not entering properly in 'datas'?

kissu
  • 40,416
  • 14
  • 65
  • 133
  • Question body should contain all info that is necessary to understand the problem. You omitted `datas`. It's a computed without a good reason, it cannot be set – Estus Flask Nov 24 '22 at 14:25
  • You have a variable and a method with the same name, maybe when you're trying to set the property value the JS is confusing with the method. In this link have a similar problem https://github.com/vuejs/vue/issues/565#issuecomment-63259845 – Alexandre Heinen Nov 24 '22 at 14:43
  • Also you call a getData method that don't exist, and you override datas() function on the fly with vm.datas – Lk77 Nov 29 '22 at 08:44

0 Answers0