refactor(editor): Replace this.$props (no-changelog) (#5928)

* refactor(editor): Replace this. (no-changelog)

* Lintfix
This commit is contained in:
OlegIvaniv
2023-04-07 12:21:17 +02:00
committed by GitHub
parent 5651a52364
commit 07c360c30d
15 changed files with 60 additions and 61 deletions

View File

@@ -1,6 +1,6 @@
<template>
<el-dialog
:visible="uiStore.isModalOpen(this.$props.name)"
:visible="uiStore.isModalOpen(this.name)"
:before-close="closeDialog"
:class="{ 'dialog-wrapper': true, [$style.center]: center, scrollable: scrollable }"
:width="width"
@@ -10,7 +10,7 @@
:close-on-press-escape="closeOnPressEscape"
:style="styles"
append-to-body
:data-test-id="`${this.$props.name}-modal`"
:data-test-id="`${this.name}-modal`"
>
<template #title v-if="$scopedSlots.header">
<slot name="header" v-if="!loading" />
@@ -121,12 +121,12 @@ export default Vue.extend({
mounted() {
window.addEventListener('keydown', this.onWindowKeydown);
if (this.$props.eventBus) {
this.$props.eventBus.on('close', () => {
if (this.eventBus) {
this.eventBus.on('close', () => {
this.closeDialog();
});
this.$props.eventBus.on('closeAll', () => {
this.eventBus.on('closeAll', () => {
this.uiStore.closeAllModals();
});
}
@@ -163,7 +163,7 @@ export default Vue.extend({
},
methods: {
onWindowKeydown(event: KeyboardEvent) {
if (!this.uiStore.isModalActive(this.$props.name)) {
if (!this.uiStore.isModalActive(this.name)) {
return;
}
@@ -172,7 +172,7 @@ export default Vue.extend({
}
},
handleEnter() {
if (this.uiStore.isModalActive(this.$props.name)) {
if (this.uiStore.isModalActive(this.name)) {
this.$emit('enter');
}
},
@@ -184,12 +184,12 @@ export default Vue.extend({
return;
}
}
this.uiStore.closeModal(this.$props.name);
this.uiStore.closeModal(this.name);
},
getCustomClass() {
let classes = this.$props.customClass || '';
let classes = this.customClass || '';
if (this.$props.classic) {
if (this.classic) {
classes = `${classes} classic`;
}