Created
June 5, 2020 06:53
-
-
Save manutheblacker/36c380c2fa0ee041282fc767fc5ff29f to your computer and use it in GitHub Desktop.
JS Bin [add your bin description] // source https://jsbin.com/larelopedo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="[add your bin description]"> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div id="app"> | |
<a v-bind:href="link"> {{message}}</a> | |
<div class='tintin' v-show='success'> | |
La vie est belle | |
</div> | |
<div class='tata' > | |
<div v-if='success'> | |
Dangereux | |
</div> | |
<div v-else> | |
Mondiale | |
</div> | |
</div> | |
<input type="text" v-model="message"> | |
<input type="checkbox" v-model="success"> | |
<button class='btn' :class="success ? 'btn-primary' : 'btn-error' ">ok</button> | |
<p>{{firstName}}</p> | |
<p>{{lastName}}</p> | |
<p><input v-model='fullname'> </p> | |
<kpego :message="message"></kpego> | |
</div> | |
<div id="app2"> | |
<div class='posso'> | |
<ul class='form-control'> | |
<li v-for='p in persons'>{{p}}</li> | |
</ul> | |
</div> | |
<a href="https://homescriptone.com" @mouseenter="close" target="__blank"> HS</a> | |
<a :href="link" :title="message"> {{message}}</a> | |
<a :href='link' target="__blank" @click="addPerson">{{message}}</a> | |
</div> | |
<script src="https://code.jquery.com/jquery.min.js"></script> | |
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet" type="text/css" /> | |
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script> | |
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> | |
<script id="jsbin-javascript"> | |
Vue.component('kpego',{ | |
props : ["message"], | |
template: "<div>{{message}}</div>" | |
}) | |
var card= new Vue({ | |
el:"#app", | |
data:{ | |
message : "Salut les gens, les gens sont bizarres", | |
link : "https://homescriptone.com", | |
success : true, | |
firstName : "Jean", | |
lastName : "Didier" | |
}, computed : { | |
fullname : { | |
get : function (){ | |
return this.firstName +" " + this.lastName; | |
}, | |
set : function(value){ | |
let parts = value.split(' ') | |
this.firstName = parts[0] | |
this.lastName = parts[1] | |
} | |
} | |
} , methods : { | |
close : function(){ | |
console.log('hello world') | |
}} | |
} ) | |
var card2= new Vue({el:"#app2",data:{ | |
message : "Salut les gens", | |
link : "https://homescriptone.com", | |
persons : ['hello','world','i love you'] | |
}, methods : { | |
close : function(){ | |
console.log('hello world') | |
}, | |
addPerson : function(name){ | |
this.persons.push(name) | |
} | |
}}) | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">Vue.component('kpego',{ | |
props : ["message"], | |
template: "<div>{{message}}</div>" | |
}) | |
var card= new Vue({ | |
el:"#app", | |
data:{ | |
message : "Salut les gens, les gens sont bizarres", | |
link : "https://homescriptone.com", | |
success : true, | |
firstName : "Jean", | |
lastName : "Didier" | |
}, computed : { | |
fullname : { | |
get : function (){ | |
return this.firstName +" " + this.lastName; | |
}, | |
set : function(value){ | |
let parts = value.split(' ') | |
this.firstName = parts[0] | |
this.lastName = parts[1] | |
} | |
} | |
} , methods : { | |
close : function(){ | |
console.log('hello world') | |
}} | |
} ) | |
var card2= new Vue({el:"#app2",data:{ | |
message : "Salut les gens", | |
link : "https://homescriptone.com", | |
persons : ['hello','world','i love you'] | |
}, methods : { | |
close : function(){ | |
console.log('hello world') | |
}, | |
addPerson : function(name){ | |
this.persons.push(name) | |
} | |
}})</script></body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vue.component('kpego',{ | |
props : ["message"], | |
template: "<div>{{message}}</div>" | |
}) | |
var card= new Vue({ | |
el:"#app", | |
data:{ | |
message : "Salut les gens, les gens sont bizarres", | |
link : "https://homescriptone.com", | |
success : true, | |
firstName : "Jean", | |
lastName : "Didier" | |
}, computed : { | |
fullname : { | |
get : function (){ | |
return this.firstName +" " + this.lastName; | |
}, | |
set : function(value){ | |
let parts = value.split(' ') | |
this.firstName = parts[0] | |
this.lastName = parts[1] | |
} | |
} | |
} , methods : { | |
close : function(){ | |
console.log('hello world') | |
}} | |
} ) | |
var card2= new Vue({el:"#app2",data:{ | |
message : "Salut les gens", | |
link : "https://homescriptone.com", | |
persons : ['hello','world','i love you'] | |
}, methods : { | |
close : function(){ | |
console.log('hello world') | |
}, | |
addPerson : function(name){ | |
this.persons.push(name) | |
} | |
}}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment