Directive for Vue, where this directive add attribute into tag table. Demo https://jsfiddle.net/xvn38w7f/1/