From 0cd86e3e542774898775b5a3dc1657214d809528 Mon Sep 17 00:00:00 2001 From: SimonGschnell Date: Fri, 5 Apr 2024 14:57:00 +0200 Subject: [PATCH] cannot use this keyword when assigning default values to props in componenets --- public/js/apps/Cis/Profil.js | 7 ++++--- .../Cis/Profil/MitarbeiterProfil.js | 20 ++++++++++--------- .../Profil/ProfilComponents/Mailverteiler.js | 5 ++++- .../Profil/ProfilComponents/ProfilEmails.js | 2 +- .../Cis/Profil/ProfilComponents/QuickLinks.js | 2 +- 5 files changed, 21 insertions(+), 15 deletions(-) diff --git a/public/js/apps/Cis/Profil.js b/public/js/apps/Cis/Profil.js index 62905e2d9..c1b1142f2 100755 --- a/public/js/apps/Cis/Profil.js +++ b/public/js/apps/Cis/Profil.js @@ -367,6 +367,7 @@ const profilApp = Vue.createApp({ `, }); -profilApp.use(primevue.config.default, { zIndex: { overlay: 9999 } }); -profilApp.use(Phrasen); -profilApp.mount("#content"); +profilApp + .use(primevue.config.default, { zIndex: { overlay: 9999 } }) + .use(Phrasen) + .mount("#content"); diff --git a/public/js/components/Cis/Profil/MitarbeiterProfil.js b/public/js/components/Cis/Profil/MitarbeiterProfil.js index db4b2253f..536af7619 100755 --- a/public/js/components/Cis/Profil/MitarbeiterProfil.js +++ b/public/js/components/Cis/Profil/MitarbeiterProfil.js @@ -222,6 +222,8 @@ export default { }, mounted() { + console.log("this mitarbeter",this) + console.log("this p",this.$p) this.$refs.betriebsmittelTable.tabulator.on("tableBuilt", () => { this.$refs.betriebsmittelTable.tabulator.setData(this.data.mittel); }); @@ -234,7 +236,7 @@ export default { template: /*html*/ `
- +
@@ -242,7 +244,7 @@ export default {
- +
@@ -289,7 +291,7 @@ export default {
- +
@@ -300,7 +302,7 @@ export default {
- +
@@ -316,7 +318,7 @@ export default {
- +
@@ -377,14 +379,14 @@ export default { - +
- +
@@ -402,7 +404,7 @@ export default {
- + @@ -447,7 +449,7 @@ export default {
- +
diff --git a/public/js/components/Cis/Profil/ProfilComponents/Mailverteiler.js b/public/js/components/Cis/Profil/ProfilComponents/Mailverteiler.js index 2d612b661..bd8592532 100755 --- a/public/js/components/Cis/Profil/ProfilComponents/Mailverteiler.js +++ b/public/js/components/Cis/Profil/ProfilComponents/Mailverteiler.js @@ -1,11 +1,14 @@ export default { props: { data: Object, - title: { type: String, default: this.$p.t('profil','mailverteiler') }, + title: { type: String, default: '' },//this.$p.t('profil','mailverteiler') }, data() { return {}; }, + created(){ + console.log("this",this); + }, template: /*html*/`
diff --git a/public/js/components/Cis/Profil/ProfilComponents/ProfilEmails.js b/public/js/components/Cis/Profil/ProfilComponents/ProfilEmails.js index f24a3778a..23ac82bac 100755 --- a/public/js/components/Cis/Profil/ProfilComponents/ProfilEmails.js +++ b/public/js/components/Cis/Profil/ProfilComponents/ProfilEmails.js @@ -7,7 +7,7 @@ export default { props:{ title:{ type:String, - default:this.$p.t('person','email'), + }, data:{ type:Array, diff --git a/public/js/components/Cis/Profil/ProfilComponents/QuickLinks.js b/public/js/components/Cis/Profil/ProfilComponents/QuickLinks.js index ed121b8d8..de0ee0b98 100755 --- a/public/js/components/Cis/Profil/ProfilComponents/QuickLinks.js +++ b/public/js/components/Cis/Profil/ProfilComponents/QuickLinks.js @@ -7,7 +7,7 @@ export default{ }, title:{ type:String, - default: this.$p.t('profil','quickLinks'), + }, mobile:{ type:Boolean,