Closed Fikri32 closed 1 year ago
It is data driven. You just need to synchronize the data every minute
can you give me a reference please?
Use setInterval in the mounted lifecycle,Here is an example. Online demo
<template>
<ve-table
:columns="columns"
:table-data="tableData"
:border-around="true"
:border-x="true"
:border-y="true"
/>
</template>
<script>
export default {
data() {
return {
columns: [
{ field: "name", key: "a", title: "Name" },
{ field: "date", key: "b", title: "Date" },
{ field: "hobby", key: "c", title: "Hobby" },
{ field: "address", key: "d", title: "Address" },
],
tableData: [],
};
},
methods: {
initTableData() {
const date = new Date().getTime();
this.tableData = [
{
name: date,
date: date,
hobby: date,
address: "-",
},
{
name: "Dickerson",
date: date,
hobby: "-",
address: "-",
},
];
},
},
mounted() {
this.initTableData();
setInterval(() => {
this.initTableData();
}, 500);
},
};
</script>
I am opening an issue for
vue-easytable
Issue Type
Feature
Issue Title
How to do refresh on the table grid
What problem does this feature solve?
How to do refresh on the table grid?i want to table can refresh every one minutes
What does the proposed API look like?
read documentation