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'?

3
  • 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 Commented Nov 24, 2022 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 github.com/vuejs/vue/issues/565#issuecomment-63259845 Commented Nov 24, 2022 at 14:43
  • Also you call a getData method that don't exist, and you override datas() function on the fly with vm.datas Commented Nov 29, 2022 at 8:44

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.