Merge branch 'address_refactoring' into ggg

This commit is contained in:
Mathieu Jaumotte 2021-08-12 15:53:42 +02:00
commit 368bbcf9b2

View File

@ -205,25 +205,38 @@ export default {
return step2;
},
getTextTitle() {
if (this.options.title && (this.options.title.edit !== null || this.options.title.create !== null)) {
if ( typeof this.options.title !== 'undefined'
&& ( this.options.title.edit !== null
|| this.options.title.create !== null
)) {
return (this.context.edit) ? this.options.title.edit : this.options.title.create;
}
return (this.context.edit) ? this.$t(this.default.title.edit) : this.$t(this.default.title.create);
},
getTextButton() {
if (this.options.button && this.options.button.text && (this.options.button.text.edit !== null || this.options.button.text.create !== null)) {
if ( typeof this.options.button.text !== 'undefined'
&& ( this.options.button.text.edit !== null
|| this.options.button.text.create !== null
)) {
return (this.context.edit) ? this.options.button.text.edit : this.options.button.text.create;
}
return (this.context.edit) ? this.default.button.text.edit : this.default.button.text.create;
},
getClassButton() {
let size = (this.options.button && this.options.button.size !== null) ? this.options.button.size : '';
let type = (this.options.button && this.options.button.type !== null) ? this.options.button.type : this.default.button.type;
return size ? size + ' ' + type : type;
let type = this.default.button.type,
size = '';
if (typeof this.options.button !== 'undefined') {
type = typeof this.options.button.type !== 'undefined' ? this.options.button.type : type;
size = typeof this.options.button.size !== 'undefined' ? this.options.button.size : size;
}
return size ? `${size} ${type}` : type;
},
displayTextButton() {
return (this.options.button !== null && typeof this.options.button.display !== 'undefined') ?
return (typeof this.options.button !== 'undefined' && typeof this.options.button.display !== 'undefined') ?
this.options.button.display : this.default.button.display;
},
context() {
return this.context;
}
},
mounted() {