debug pour les crayons
This commit is contained in:
parent
ce85685a89
commit
1f3026c1d5
2 changed files with 16 additions and 5 deletions
|
@ -234,6 +234,7 @@ let monTableau = {
|
|||
return this.apiuri.match(/.*page=(.*)/)[1];
|
||||
},
|
||||
chargerJson(id) {
|
||||
console.log('chargerJson');
|
||||
let url = this.apiuri;
|
||||
if (parseInt(id) > 0) {
|
||||
url += '&id=' + id;
|
||||
|
@ -270,7 +271,10 @@ let monTableau = {
|
|||
if (parseInt(id) > 0) {
|
||||
if (data.length > 0) {
|
||||
let i = this.table.findIndex((ligne) => ligne.html.id === parseInt(id));
|
||||
Vue.set(this.table, i, data[0]);
|
||||
//Vue.set(this.table, i, data[0]);
|
||||
//console.log(this.table[245]);
|
||||
this.table[i] = data[0];
|
||||
//console.log(this.table[245]);
|
||||
} else {
|
||||
let i = this.table.findIndex((ligne) => ligne.html.id === parseInt(id));
|
||||
Vue.delete(this.table, i);
|
||||
|
@ -443,9 +447,11 @@ const gamuTable = {
|
|||
components: { monTableau },
|
||||
methods: {
|
||||
rechargerJson(id) {
|
||||
console.log('coucou');
|
||||
console.log(id);
|
||||
this.$refs.montableau.chargerJson(id);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Vue.createApp(gamuTable).mount('#app');
|
||||
let app = Vue.createApp(gamuTable).mount('#app');
|
||||
|
|
|
@ -277,6 +277,7 @@ var monTableau = {
|
|||
chargerJson: function chargerJson(id) {
|
||||
var _this2 = this;
|
||||
|
||||
console.log('chargerJson');
|
||||
var url = this.apiuri;
|
||||
|
||||
if (parseInt(id) > 0) {
|
||||
|
@ -325,9 +326,11 @@ var monTableau = {
|
|||
if (data.length > 0) {
|
||||
var i = _this2.table.findIndex(function (ligne) {
|
||||
return ligne.html.id === parseInt(id);
|
||||
});
|
||||
}); //Vue.set(this.table, i, data[0]);
|
||||
//console.log(this.table[245]);
|
||||
|
||||
Vue.set(_this2.table, i, data[0]);
|
||||
|
||||
_this2.table[i] = data[0]; //console.log(this.table[245]);
|
||||
} else {
|
||||
var _i2 = _this2.table.findIndex(function (ligne) {
|
||||
return ligne.html.id === parseInt(id);
|
||||
|
@ -459,8 +462,10 @@ var gamuTable = {
|
|||
},
|
||||
methods: {
|
||||
rechargerJson: function rechargerJson(id) {
|
||||
console.log('coucou');
|
||||
console.log(id);
|
||||
this.$refs.montableau.chargerJson(id);
|
||||
}
|
||||
}
|
||||
};
|
||||
Vue.createApp(gamuTable).mount('#app');
|
||||
var app = Vue.createApp(gamuTable).mount('#app');
|
Loading…
Add table
Reference in a new issue