mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Implement translation with Symfony translator within vue component
This commit is contained in:
parent
c602c27b39
commit
9732b80298
@ -17,7 +17,7 @@
|
||||
<slot name="body"></slot>
|
||||
</div>
|
||||
<div class="modal-footer" v-if="!hideFooter">
|
||||
<button class="btn btn-cancel" @click="$emit('close')">{{ closeKey }}</button>
|
||||
<button class="btn btn-cancel" @click="$emit('close')">{{ trans(modalActionClose) }}</button>
|
||||
<slot name="footer"></slot>
|
||||
</div>
|
||||
</div>
|
||||
@ -55,12 +55,14 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
emits: ['close'],
|
||||
computed: {
|
||||
closeKey() {
|
||||
console.log('close key', trans(MODAL_ACTION_CLOSE))
|
||||
return trans(MODAL_ACTION_CLOSE)
|
||||
}
|
||||
}
|
||||
setup() {
|
||||
const modalActionClose = MODAL_ACTION_CLOSE;
|
||||
|
||||
return {
|
||||
modalActionClose,
|
||||
trans
|
||||
};
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user