This repository has been archived on 2021-09-06. You can view files and clone it, but cannot push or open issues or pull requests.
vuejs_course/basics-assignment-4-problem/app.js

33 lines
756 B
JavaScript

"use strict";
const app = Vue.createApp({
data() {
return {
user1: false,
user2: false,
inputClass: "",
paragraphVisible: true,
paragraphHidden: false,
inputColor: "",
};
},
computed: {
classFromUserInput() {
return {
user1: this.user1,
user2: this.user2,
visible: this.paragraphVisible,
hidden: this.paragraphHidden,
};
},
},
methods: {
toggleParagraphVisibility() {
this.paragraphVisible = !this.paragraphVisible;
this.paragraphHidden = !this.paragraphHidden;
},
},
});
app.mount("#assignment");