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.
2021-01-18 23:22:34 +01:00
|
|
|
"use strict";
|
|
|
|
|
|
|
|
const app = Vue.createApp({
|
|
|
|
data() {
|
|
|
|
return {
|
2021-01-18 23:34:24 +01:00
|
|
|
inputClass: "",
|
2021-01-18 23:22:34 +01:00
|
|
|
paragraphVisible: true,
|
|
|
|
inputColor: "",
|
|
|
|
};
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
classFromUserInput() {
|
|
|
|
return {
|
2021-01-18 23:35:06 +01:00
|
|
|
user1: this.inputClass === "user1",
|
|
|
|
user2: this.inputClass === "user2",
|
2021-01-18 23:22:34 +01:00
|
|
|
visible: this.paragraphVisible,
|
2021-01-18 23:35:06 +01:00
|
|
|
hidden: !this.paragraphVisible,
|
2021-01-18 23:22:34 +01:00
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
toggleParagraphVisibility() {
|
|
|
|
this.paragraphVisible = !this.paragraphVisible;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
app.mount("#assignment");
|