vueカスタムラベル(directives)
931 ワード
export default{
data(){
return{
}
},
directives:{
"focus":{
bind:function(el,binding){
el.focus()
}
}
}
}
}
2.2つ目の書き方:
export default{
data(){
return{
txtInput:""
}
},
directives:{
"border":{
bind:function(el,binding){
el.style.border=binding.value
}
}
}
}