feat(subject): finish the subject synchronize between wheel and table

This commit is contained in:
2020-01-13 23:55:10 +01:00
parent b2771a0caf
commit fdca7dd6b9
3 changed files with 33 additions and 20 deletions

View File

@@ -12,14 +12,20 @@
data: function () {
return {
container: null,
subjects : [
{Nom:"Un film", Lien:""},
{Nom:"Une serie", Lien:""},
{Nom:"Un logiciel", Lien:""}
],
spinData: [],
}
},
props: {
subjects: {
type: Array
}
},
methods : {
replaceSubject(replace){
Object.assign(this.subjects[replace.index], replace.subject)
this.removeGraph()
this.buildGraph()
},
getSubjects(){
return this.subjects;
},
@@ -106,9 +112,6 @@
.style({"fill":"black"});
}
},
created() {
},
computed: {
formTitle () {
return this.editedIndex === -1 ? 'New Item' : 'Edit Item'
@@ -118,6 +121,10 @@
dialog (val) {
val || this.close()
},
subjects: function() {
this.removeGraph();
this.buildGraph();
},
},
mounted() {
this.buildGraph()