1
0
mirror of synced 2024-11-21 21:06:04 +03:00

fix: Build

This commit is contained in:
1on 2021-09-30 13:51:12 +03:00
parent 3eeff5fe1e
commit 8e36a9f59d
3 changed files with 39 additions and 13 deletions

View File

@ -885,6 +885,11 @@ function validate(validators, context) {
});
}
const UNREGISTER_BEHAVIOR = {
NONE: 'none',
UNSET: 'unset',
};
const VALIDATION_BEHAVIOR = {
DEMAND: 'demand',
LIVE: 'live',
@ -963,7 +968,7 @@ let FormularioField = class FormularioField extends Vue {
*/
beforeDestroy() {
if (typeof this.__FormularioForm_unregister === 'function') {
this.__FormularioForm_unregister(this.fullPath);
this.__FormularioForm_unregister(this.fullPath, this.unregisterBehavior);
}
}
syncProxy(value) {
@ -1074,6 +1079,12 @@ __decorate([
__decorate([
Prop({ default: () => (value) => value })
], FormularioField.prototype, "modelSetConverter", void 0);
__decorate([
Prop({ default: 'div' })
], FormularioField.prototype, "tag", void 0);
__decorate([
Prop({ default: UNREGISTER_BEHAVIOR.NONE })
], FormularioField.prototype, "unregisterBehavior", void 0);
__decorate([
Watch('value')
], FormularioField.prototype, "onValueChange", null);
@ -1169,8 +1180,8 @@ var __vue_render__ = function() {
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c(
"div",
_vm._b({}, "div", _vm.$attrs, false),
_vm.tag,
_vm._b({ tag: "component" }, "component", _vm.$attrs, false),
[_vm._t("default", null, { context: _vm.context })],
2
)
@ -1318,11 +1329,13 @@ let FormularioForm = class FormularioForm extends Vue {
field.setErrors(this.fieldsErrorsComputed[path]);
}
}
unregister(path) {
unregister(path, behavior) {
if (this.registry.has(path)) {
this.registry.delete(path);
this.proxy = unset(this.proxy, path);
this.emitInput();
if (behavior === UNREGISTER_BEHAVIOR.UNSET) {
this.proxy = unset(this.proxy, path);
this.emitInput();
}
}
}
getState() {

File diff suppressed because one or more lines are too long

View File

@ -890,6 +890,11 @@
});
}
const UNREGISTER_BEHAVIOR = {
NONE: 'none',
UNSET: 'unset',
};
const VALIDATION_BEHAVIOR = {
DEMAND: 'demand',
LIVE: 'live',
@ -968,7 +973,7 @@
*/
beforeDestroy() {
if (typeof this.__FormularioForm_unregister === 'function') {
this.__FormularioForm_unregister(this.fullPath);
this.__FormularioForm_unregister(this.fullPath, this.unregisterBehavior);
}
}
syncProxy(value) {
@ -1079,6 +1084,12 @@
__decorate([
vuePropertyDecorator.Prop({ default: () => (value) => value })
], FormularioField.prototype, "modelSetConverter", void 0);
__decorate([
vuePropertyDecorator.Prop({ default: 'div' })
], FormularioField.prototype, "tag", void 0);
__decorate([
vuePropertyDecorator.Prop({ default: UNREGISTER_BEHAVIOR.NONE })
], FormularioField.prototype, "unregisterBehavior", void 0);
__decorate([
vuePropertyDecorator.Watch('value')
], FormularioField.prototype, "onValueChange", null);
@ -1174,8 +1185,8 @@
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c(
"div",
_vm._b({}, "div", _vm.$attrs, false),
_vm.tag,
_vm._b({ tag: "component" }, "component", _vm.$attrs, false),
[_vm._t("default", null, { context: _vm.context })],
2
)
@ -1323,11 +1334,13 @@
field.setErrors(this.fieldsErrorsComputed[path]);
}
}
unregister(path) {
unregister(path, behavior) {
if (this.registry.has(path)) {
this.registry.delete(path);
this.proxy = unset(this.proxy, path);
this.emitInput();
if (behavior === UNREGISTER_BEHAVIOR.UNSET) {
this.proxy = unset(this.proxy, path);
this.emitInput();
}
}
}
getState() {