Skip to content

Commit

Permalink
chore: update vue example
Browse files Browse the repository at this point in the history
  • Loading branch information
crashmax-dev committed Apr 25, 2023
1 parent 6d14b4a commit d791d23
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions examples/with-vue/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ const options = ref<TWallpaperOptions>({
}
})
function updateColors() {
twallpaper.value?.twallpaper.updateColors([
'#eba',
'#681',
'#cf9',
'#0a50a5'
])
}
function toggleWallpaper() {
enabled.value = !enabled.value
}
Expand All @@ -35,6 +44,7 @@ function togglePatternMask() {
<div class="buttons">
<button v-on:click="toggleWallpaper">Toggle Wallpaper</button>
<button v-on:click="togglePatternMask">Toggle Mask</button>
<button v-on:click="updateColors">Update Colors</button>
</div>
<TWallpaper
ref="twallpaper"
Expand Down

0 comments on commit d791d23

Please sign in to comment.