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