Skip to content

Commit

Permalink
feat(#86): add value watch/model sync to CTTag (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
Decipher authored Nov 27, 2024
1 parent 7b7e024 commit 92d41b7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/components/Tag.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ export default {
[`ct-tag--${type}`]: type,
[`ct-tag--with-icon ct-tag--icon-${iconPosition}`]: icon && iconPosition,
})
},
watch: {
// Watch the value prop and update the model when it changes.
value() {
this.model = this.value
}
}
}
</script>

0 comments on commit 92d41b7

Please sign in to comment.