Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Vue.component('check-mark', {
- name: 'check-mark',
- template: `
- <input :value="value">
- `,
- props: {
- value: {
- type: String,
- required: true,
- },
- },
- mounted: async function () {
- //trigger this.value watch() here
- },
- watch: {
- value: function (value) {
- if (value == 'Y') {
- this.class = 'checked';
- } else {
- this.class = 'unchecked';
- }
- },
- },
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement