Skip to content
Snippets Groups Projects
Commit a336f8d4 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Utilisatioh de v-model pour UTableAjax

parent d34bc7da
No related branches found
No related tags found
No related merge requests found
Pipeline #27443 passed
CHANGELOG
=========
6.2.2 (04/04/2024)
------------------
- Utilisatioh de v-model pour UTableAjax
6.2.1 (29/03/2024)
------------------
......
......@@ -37,7 +37,9 @@
export default {
name: "UTableAjax",
emits: ['update:modelValue'],
props: {
modelValue: {required: true},
id: {required: false, type: String},
size: {required: false, default: 10},
count: {required: false},
......@@ -127,7 +129,7 @@ export default {
}).then(response => {
let data = response.data;
this.dCount = data.count;
this.$emit('data', data.data);
this.$emit('update:modelValue', data.data)
});
},
orderBy(column)
......
......@@ -6,7 +6,7 @@ Exemple d'utilisation côté client, dans un composant Vue :
```vue
<template>
<u-table-ajax :data-url="this.dataUrl" @data="maj">
<u-table-ajax :data-url="this.dataUrl" v-model="lines">
<thead>
<tr>
<th column="ID">Id</th><!-- l'attribut column doit être renseigné pour pouvoir la rendre triable -->
......@@ -42,10 +42,6 @@ export default {
};
},
methods: {
maj(lines)
{
this.lines = lines;
},
editUrl(id)
{
return unicaenVue.url('mon-url/:id', {id: id});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment