forked from owthub/vuejs2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvideo-19.js
33 lines (32 loc) · 873 Bytes
/
video-19.js
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
Vue.directive('custom-owt', {
bind: function(el,binding,vnode){
//console.log(el); // dom element
el.style.backgroundColor = "blue"; // style="background-color:"
el.style.fontSize = "20px";
el.style.color = "green";
el.title = "Title is now updated";
//console.log(binding); // properties of directive
//console.log("Value = "+binding.value);
console.log("Name: "+binding.value.name);
},
update: function(object1,object2){
//console.log("Running");
var data = JSON.parse(JSON.stringify(object2));
//console.log(data);
},
unbind: function(){
}
});
//v-on:click.prevent
var myapp1 = new Vue({
el:"#my-app",
data:{
message: "This is custom call"
},
methods:{
updateValue: function(){
console.log("update...");
this.message = "Value has been updated now."
}
}
});