This repository was 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
Expand file tree
/
Copy pathaula-16-slots.html
More file actions
72 lines (59 loc) · 1.99 KB
/
aula-16-slots.html
File metadata and controls
72 lines (59 loc) · 1.99 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<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>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>
<body>
<div id="app">
<div class="container">
<card>
<h4 slot="title" class="card-title">Card Title 1 </h4>
<p slot="text" class="card-text">Example</p>
<a slot="action" href="#" class="btn btn-primary"> Go SomeWhere</a>
</card>
</div>
<div class="container">
<card>
<h4 slot="title" class="card-title">Card Title 2 </h4>
<template slot="text">
<p class="card-text">Example 2</p>
<p class="card-text">Example 2</p>
</template>
<a slot="action" href="#" class="btn btn-primary"> Go SomeWhere</a>
</card>
</div>
</div>
<template id="card">
<div class="card">
<img class="card-img-top" src="http://via.placeholder.com/350x150" class="img-resposive">
<div class="card-block">
<slot name="title"> </slot>
<slot name="text"></slot>
<slot name="action"></slot>
</div>
</div>
</template>
</body>
</html>
<script src="https://unpkg.com/vue"></script>
<script>
Vue.component('card',{
template:'#card',
data(){
return{
title:'',
}
}
})
Vue.component()
var app = new Vue({
el:'#app',
data:{
title:'VueJs'
}
})
</script>