@inkline/inkline
Version:
Inkline is the Vue.js UI/UX Library built for creating your next design system
34 lines • 974 B
JavaScript
import { defineComponent } from 'vue';
import { getValueByPath } from '../helpers/index.mjs';
export default defineComponent({
inject: {
formGroup: {
default: () => ({})
},
form: {
default: () => ({})
}
},
computed: {
isDisabled() {
return this.disabled || this.form.isDisabled || this.formGroup.isDisabled;
},
isReadonly() {
return this.readonly || this.form.isReadonly || this.formGroup.isReadonly;
},
parent() {
if (this.formGroup.$) {
return this.formGroup;
}
return this.form;
},
schema() {
const parentSchema = this.parent.schema || {};
if (this.name !== '') {
return getValueByPath(parentSchema, `${this.name}`);
}
return parentSchema;
}
}
});
//# sourceMappingURL=FormComponentMixin.mjs.map