- {{ displaytitle }}
+ {{ localTitle || "Název hlavy" }}
- {{ displaytext }}
+ {{ localText || "Text hlavy" }}
-
+
-
+
Smazat hlavu
@@ -40,26 +40,26 @@ export default {
this.isactive = true;
},
makeinactive: function () {
- this.$emit('update:text', this.text)
- this.$emit('update:title', this.title)
this.isactive = false;
}
},
computed: {
- displaytitle: function () {
- if (!this.title) {
- return "Název hlavy"
- } else {
- return this.title
- }
+ localTitle: {
+ get: function() {
+ return this.title
+ },
+ set: function (value) {
+ this.$emit('update:title', value)
+ }
},
- displaytext: function () {
- if (!this.text) {
- return "Text hlavy"
- } else {
- return this.text
- }
+ localText: {
+ get: function() {
+ return this.text
+ },
+ set: function (value) {
+ this.$emit('update:text', value)
+ }
}
}
}
-
\ No newline at end of file
+