Refactor #6075
parent
d697f82c50
commit
573c04179e
|
@ -122,9 +122,6 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
},
|
|
||||||
getCXOptions(icon, iconProps) {
|
|
||||||
return { contenxt: { icon, iconClass: iconProps.class } };
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -141,35 +138,19 @@ export default {
|
||||||
return this.confirmation ? this.confirmation.position : null;
|
return this.confirmation ? this.confirmation.position : null;
|
||||||
},
|
},
|
||||||
acceptLabel() {
|
acceptLabel() {
|
||||||
if (!this.confirmation) {
|
if (this.confirmation) {
|
||||||
return null;
|
const confirmation = this.confirmation;
|
||||||
}
|
|
||||||
|
|
||||||
const confirmation = this.confirmation;
|
return confirmation.acceptLabel || confirmation.acceptProps?.label || this.$primevue.config.locale.accept;
|
||||||
|
|
||||||
if (confirmation.acceptLabel) {
|
|
||||||
return confirmation.acceptLabel;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (confirmation.acceptProps?.label) {
|
|
||||||
return confirmation.acceptProps.label;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.$primevue.config.locale.accept;
|
return this.$primevue.config.locale.accept;
|
||||||
},
|
},
|
||||||
rejectLabel() {
|
rejectLabel() {
|
||||||
if (!this.confirmation) {
|
if (this.confirmation) {
|
||||||
return null;
|
const confirmation = this.confirmation;
|
||||||
}
|
|
||||||
|
|
||||||
const confirmation = this.confirmation;
|
return confirmation.rejectLabel || confirmation.rejectProps?.label || this.$primevue.config.locale.reject;
|
||||||
|
|
||||||
if (confirmation.rejectLabel) {
|
|
||||||
return confirmation.rejectLabel;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (confirmation.rejectProps?.label) {
|
|
||||||
return confirmation.rejectProps.label;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.$primevue.config.locale.reject;
|
return this.$primevue.config.locale.reject;
|
||||||
|
|
|
@ -58,10 +58,10 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { ConnectedOverlayScrollHandler } from '@primevue/core/utils';
|
|
||||||
import { focus, absolutePosition, getOffset, addClass, isTouchDevice } from '@primeuix/utils/dom';
|
|
||||||
import { ZIndex } from '@primeuix/utils/zindex';
|
|
||||||
import { $dt } from '@primeuix/styled';
|
import { $dt } from '@primeuix/styled';
|
||||||
|
import { absolutePosition, addClass, focus, getOffset, isTouchDevice } from '@primeuix/utils/dom';
|
||||||
|
import { ZIndex } from '@primeuix/utils/zindex';
|
||||||
|
import { ConnectedOverlayScrollHandler } from '@primevue/core/utils';
|
||||||
import Button from 'primevue/button';
|
import Button from 'primevue/button';
|
||||||
import ConfirmationEventBus from 'primevue/confirmationeventbus';
|
import ConfirmationEventBus from 'primevue/confirmationeventbus';
|
||||||
import FocusTrap from 'primevue/focustrap';
|
import FocusTrap from 'primevue/focustrap';
|
||||||
|
@ -293,9 +293,6 @@ export default {
|
||||||
ConfirmationEventBus.emit('close', this.closeListener);
|
ConfirmationEventBus.emit('close', this.closeListener);
|
||||||
focus(this.target);
|
focus(this.target);
|
||||||
}
|
}
|
||||||
},
|
|
||||||
getCXOptions(icon, iconProps) {
|
|
||||||
return { contenxt: { icon, iconClass: iconProps.class } };
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -303,35 +300,19 @@ export default {
|
||||||
return this.confirmation ? this.confirmation.message : null;
|
return this.confirmation ? this.confirmation.message : null;
|
||||||
},
|
},
|
||||||
acceptLabel() {
|
acceptLabel() {
|
||||||
if (!this.confirmation) {
|
if (this.confirmation) {
|
||||||
return null;
|
const confirmation = this.confirmation;
|
||||||
}
|
|
||||||
|
|
||||||
const confirmation = this.confirmation;
|
return confirmation.acceptLabel || confirmation.acceptProps?.label || this.$primevue.config.locale.accept;
|
||||||
|
|
||||||
if (confirmation.acceptLabel) {
|
|
||||||
return confirmation.acceptLabel;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (confirmation.acceptProps?.label) {
|
|
||||||
return confirmation.acceptProps.label;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.$primevue.config.locale.accept;
|
return this.$primevue.config.locale.accept;
|
||||||
},
|
},
|
||||||
rejectLabel() {
|
rejectLabel() {
|
||||||
if (!this.confirmation) {
|
if (this.confirmation) {
|
||||||
return null;
|
const confirmation = this.confirmation;
|
||||||
}
|
|
||||||
|
|
||||||
const confirmation = this.confirmation;
|
return confirmation.rejectLabel || confirmation.rejectProps?.label || this.$primevue.config.locale.reject;
|
||||||
|
|
||||||
if (confirmation.rejectLabel) {
|
|
||||||
return confirmation.rejectLabel;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (confirmation.rejectProps?.label) {
|
|
||||||
return confirmation.rejectProps.label;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.$primevue.config.locale.reject;
|
return this.$primevue.config.locale.reject;
|
||||||
|
|
Loading…
Reference in New Issue