diff --git a/index.html b/index.html index 45f606d..85ed5f3 100644 --- a/index.html +++ b/index.html @@ -13,6 +13,7 @@ + @@ -26,9 +27,7 @@ data(){ return{} }, - methods:{ - myFun:function(){} - } + methods:{} }); app.component('NavBar', NavBar); app.mount('#app'); diff --git a/src/class/team.js b/src/class/team.js new file mode 100644 index 0000000..f4b1254 --- /dev/null +++ b/src/class/team.js @@ -0,0 +1,6 @@ +class Team{ + constructor(id, name){ + this.id=id; + this.name=name; + } +} \ No newline at end of file diff --git a/src/view/nav-bar.js b/src/view/nav-bar.js index 936bcc8..2f7b99f 100644 --- a/src/view/nav-bar.js +++ b/src/view/nav-bar.js @@ -3,20 +3,44 @@ export default{ return { Home: '', Teams: '', - Results: '' + Results: '', + id:'', + name:'', + clicked: false } }, methods: { myfun: function() { - return true; + console.log("gngn"); + this.clicked=!this.clicked; + }, + addTeam: function() { + let team = new Team(this.id, this.name); + console.log(team); + this.id=''; + this.name=''; } }, template: `
Home - Teams + Teams Results
+
+ +
+
+ +
+ +
+
+ +
+ + +
` } \ No newline at end of file