1
0
mirror of synced 2024-11-22 05:16:05 +03:00
This commit is contained in:
1on 2020-11-13 12:28:12 +03:00
parent d4ca4d80df
commit 8ca723af00
4 changed files with 18 additions and 4 deletions

View File

@ -1319,9 +1319,10 @@ let FormularioInput = class FormularioInput extends Vue {
}
get model() {
const model = this.hasModel ? 'value' : 'proxy';
return this[model] !== undefined ? this[model] : '';
return this.modelGetConverter(this[model]);
}
set model(value) {
value = this.modelSetConverter(value, this.proxy);
if (!shallowEqualObjects(value, this.proxy)) {
this.proxy = value;
}
@ -1502,6 +1503,12 @@ __decorate([
__decorate([
Prop({ default: false })
], FormularioInput.prototype, "errorsDisabled", void 0);
__decorate([
Prop({ default: () => (value) => value })
], FormularioInput.prototype, "modelGetConverter", void 0);
__decorate([
Prop({ default: () => (value) => value })
], FormularioInput.prototype, "modelSetConverter", void 0);
__decorate([
Watch('proxy')
], FormularioInput.prototype, "onProxyChanged", null);

File diff suppressed because one or more lines are too long

View File

@ -1324,9 +1324,10 @@
}
get model() {
const model = this.hasModel ? 'value' : 'proxy';
return this[model] !== undefined ? this[model] : '';
return this.modelGetConverter(this[model]);
}
set model(value) {
value = this.modelSetConverter(value, this.proxy);
if (!shallowEqualObjects(value, this.proxy)) {
this.proxy = value;
}
@ -1507,6 +1508,12 @@
__decorate([
vuePropertyDecorator.Prop({ default: false })
], FormularioInput.prototype, "errorsDisabled", void 0);
__decorate([
vuePropertyDecorator.Prop({ default: () => (value) => value })
], FormularioInput.prototype, "modelGetConverter", void 0);
__decorate([
vuePropertyDecorator.Prop({ default: () => (value) => value })
], FormularioInput.prototype, "modelSetConverter", void 0);
__decorate([
vuePropertyDecorator.Watch('proxy')
], FormularioInput.prototype, "onProxyChanged", null);

View File

@ -1,6 +1,6 @@
{
"name": "@retailcrm/vue-formulario",
"version": "0.4.1",
"version": "0.4.2",
"author": "RetailDriverLLC <integration@retailcrm.ru>",
"scripts": {
"build": "npm run build:esm & npm run build:umd & npm run build:iife & wait && echo \"Build complete:\nesm: $(gzip -c dist/formulario.esm.js | wc -c)b gzip\numd: $(gzip -c dist/formulario.umd.js | wc -c)b gzip\nmin: $(gzip -c dist/formulario.min.js | wc -c)b gzip\"",