Skip to content

Instantly share code, notes, and snippets.

@PragatiVerma18
Created May 22, 2021 07:45
Show Gist options
  • Select an option

  • Save PragatiVerma18/6bb8f2a7d03d207aa9384d8948adfd55 to your computer and use it in GitHub Desktop.

Select an option

Save PragatiVerma18/6bb8f2a7d03d207aa9384d8948adfd55 to your computer and use it in GitHub Desktop.
The files required for building your first Adobe Photoshop and XD Plugin using VueJS - hello.vue contains the code for basic counter functionality
<template>
<form style="width: 300px;">
<h1>
{{ message }}
</h1>
<p>
Button has been clicked {{ count }} times.
</p>
<footer>
<button uxp-variant="cta" v-on:click="increment">Click me</button>
<button type="submit" uxp-variant="primary" v-on:click="close">Done</button>
</footer>
</form>
</template>
<script>
module.exports = {
props: {
dialog: {
type: Object
}
},
methods: {
increment() {
this.count++;
},
close() {
this.dialog.close();
}
},
data() {
return {
reactive: true,
message: 'Hello World Vue Component!',
count: 0
}
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment