Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. Vue.component('check-mark', {
  2. name: 'check-mark',
  3. template: `
  4. <input :value="value">
  5. `,
  6. props: {
  7. value: {
  8. type: String,
  9. required: true,
  10. },
  11. },
  12. mounted: async function () {
  13. //trigger this.value watch() here
  14. },
  15. watch: {
  16. value: function (value) {
  17. if (value == 'Y') {
  18. this.class = 'checked';
  19. } else {
  20. this.class = 'unchecked';
  21. }
  22. },
  23. },
  24. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement