Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const app = Vue.createApp({
- data() {
- return {
- currentTask: '',
- tasks: [],
- listVisible: true,
- };
- },
- methods: {
- addTask() {
- this.tasks.push(this.currentTask);
- },
- toggleListVisibility() {
- this.listVisible = ! this.listVisible;
- }
- },
- computed: {
- buttonCaption() {
- return this.listVisible ? 'Hide' : 'Show';
- }
- }
- });
- app.mount('#assignment');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement