Lazy table demo fixes
parent
3fce1c5c41
commit
0b6993d9ff
|
@ -156,7 +156,7 @@ export default {
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {CustomerService} from '@/service/CustomerService';
|
import { CustomerService } from '@/service/CustomerService';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
|
@ -181,10 +181,6 @@ export default {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
customerService: null,
|
|
||||||
created() {
|
|
||||||
this.customerService = new CustomerService();
|
|
||||||
},
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
|
||||||
|
@ -280,7 +276,7 @@ export default {
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted } from 'vue';
|
import { ref, onMounted } from 'vue';
|
||||||
import {CustomerService} from '@/service/CustomerService';
|
import { CustomerService } from '@/service/CustomerService';
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
|
@ -302,7 +298,6 @@ const totalRecords = ref(0);
|
||||||
const customers = ref();
|
const customers = ref();
|
||||||
const selectedCustomers = ref();
|
const selectedCustomers = ref();
|
||||||
const selectAll = ref(false);
|
const selectAll = ref(false);
|
||||||
const customerService = ref(new CustomerService());
|
|
||||||
const filters = ref({
|
const filters = ref({
|
||||||
'name': {value: '', matchMode: 'contains'},
|
'name': {value: '', matchMode: 'contains'},
|
||||||
'country.name': {value: '', matchMode: 'contains'},
|
'country.name': {value: '', matchMode: 'contains'},
|
||||||
|
@ -321,10 +316,10 @@ const loadLazyData = () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
CustomerService.getCustomers({ lazyEvent: JSON.stringify(this.lazyParams) }).then((data) => {
|
CustomerService.getCustomers({ lazyEvent: JSON.stringify(lazyParams.value) }).then((data) => {
|
||||||
this.customers = data.customers;
|
customers.value = data.customers;
|
||||||
this.totalRecords = data.totalRecords;
|
totalRecords.value = data.totalRecords;
|
||||||
this.loading = false;
|
loading.value = false;
|
||||||
});
|
});
|
||||||
}, Math.random() * 1000 + 250);
|
}, Math.random() * 1000 + 250);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue