This repository has been archived by the owner on Oct 21, 2020. It is now read-only.
forked from lorranpalmeira/VueJs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaula-14-transferind-dados-pais-filhos.html
115 lines (90 loc) · 3.85 KB
/
aula-14-transferind-dados-pais-filhos.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"/>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<div id="app">
<menu-nav></menu-nav>
<h1>{{title}}</h1>
<menu-bar></menu-bar>
<menu-bar></menu-bar>
</div>
</div>
<template id="menu-bar">
<ul>
<li v-for="item in itens">
<a class="nav-link" href="#">
{{item.label}}
</a>
</li>
</ul>
</template>
<template id="menu-nav">
<nav class="navbar navbar-default">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Brand</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<menu-bar :itens="topNav"></menu-bar>
</ul>
<form class="navbar-form navbar-left">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search">
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
<ul class="nav navbar-nav navbar-right">
<li><a href="#">Link</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li role="separator" class="divider"></li>
<li><a href="#">Separated link</a></li>
</ul>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
</template>
</body>
</html>
<script src="https://unpkg.com/vue"></script>
<script>
Vue.component('menu-nav',{
template:'#menu-nav',
data(){
return{
topNav: [{ label:'Home'},{ label:'Link'},{ label:'Disabled'}]
}
}
});
Vue.component('menu-bar',{
template:'#menu-bar',
props:['itens']
});
var app = new Vue({
el:'#app',
data:{
title:'VueJs'
}
})
</script>