@nixweb/nixloc-ui 0.0.64 → 0.0.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -42,6 +42,7 @@ export default {
|
|
|
42
42
|
desabilitado: Boolean,
|
|
43
43
|
formNome: String,
|
|
44
44
|
requerido: Boolean,
|
|
45
|
+
tamanhoMaximo: Number,
|
|
45
46
|
tipo: {
|
|
46
47
|
type: String,
|
|
47
48
|
default: "float",
|
|
@@ -76,6 +77,11 @@ export default {
|
|
|
76
77
|
var mensagem = `${this.titulo} não pode ser vazio!`;
|
|
77
78
|
this.notificacoes.push(mensagem);
|
|
78
79
|
}
|
|
80
|
+
|
|
81
|
+
if (this.valor.toString().length > this.tamanhoMaximo) {
|
|
82
|
+
var mensagem = `Valor inválido!`;
|
|
83
|
+
this.notificacoes.push(mensagem);
|
|
84
|
+
}
|
|
79
85
|
},
|
|
80
86
|
apertouEnter() {
|
|
81
87
|
if (this.enter) this.enter();
|
|
@@ -91,15 +97,16 @@ export default {
|
|
|
91
97
|
},
|
|
92
98
|
valor() {
|
|
93
99
|
this.valida();
|
|
94
|
-
this.formSujo = true;
|
|
95
|
-
this.insereFormSujo(true);
|
|
96
100
|
|
|
97
101
|
let valor;
|
|
98
102
|
if (this.tipo === "int") valor = parseInt(this.valor);
|
|
99
103
|
if (this.tipo === "float") valor = parseFloat(this.valor);
|
|
100
104
|
|
|
101
|
-
this.valor = valor;
|
|
102
105
|
this.$emit("input", valor);
|
|
106
|
+
this.formSujo = true;
|
|
107
|
+
this.insereFormSujo(true);
|
|
108
|
+
|
|
109
|
+
this.valor = valor;
|
|
103
110
|
},
|
|
104
111
|
notificacoes() {
|
|
105
112
|
let self = this;
|