@avakhula/ui 0.0.86 → 0.0.88
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
|
@@ -135,6 +135,9 @@ export default {
|
|
|
135
135
|
type: [String, Number],
|
|
136
136
|
default: "",
|
|
137
137
|
},
|
|
138
|
+
modelValue: {
|
|
139
|
+
type: [String, Number],
|
|
140
|
+
},
|
|
138
141
|
settingsVerticalPosition: {
|
|
139
142
|
type: String,
|
|
140
143
|
default: verticalPosition.bottom,
|
|
@@ -146,7 +149,7 @@ export default {
|
|
|
146
149
|
},
|
|
147
150
|
data() {
|
|
148
151
|
return {
|
|
149
|
-
actualValue: this.value,
|
|
152
|
+
actualValue: this.modelValue || this.value,
|
|
150
153
|
showPassword: false,
|
|
151
154
|
};
|
|
152
155
|
},
|
|
@@ -157,18 +160,20 @@ export default {
|
|
|
157
160
|
clearInput() {
|
|
158
161
|
this.actualValue = "";
|
|
159
162
|
this.$emit("input", this.actualValue);
|
|
163
|
+
this.$emit("update:modelValue", this.actualValue);
|
|
160
164
|
},
|
|
161
|
-
onBlur(
|
|
162
|
-
this.$emit("blur",
|
|
165
|
+
onBlur() {
|
|
166
|
+
this.$emit("blur", this.actualValue);
|
|
163
167
|
},
|
|
164
|
-
onFocus(
|
|
165
|
-
this.$emit("focus",
|
|
168
|
+
onFocus() {
|
|
169
|
+
this.$emit("focus", this.actualValue);
|
|
166
170
|
},
|
|
167
|
-
onInput(
|
|
171
|
+
onInput() {
|
|
168
172
|
if (this.debounce) {
|
|
169
|
-
this.delayedInput(
|
|
173
|
+
this.delayedInput(this.actualValue);
|
|
170
174
|
} else {
|
|
171
|
-
this.$emit("input",
|
|
175
|
+
this.$emit("input", this.actualValue);
|
|
176
|
+
this.$emit("update:modelValue", this.actualValue);
|
|
172
177
|
}
|
|
173
178
|
},
|
|
174
179
|
delayedInput(value) {
|
|
@@ -179,6 +184,7 @@ export default {
|
|
|
179
184
|
|
|
180
185
|
this.timer = setTimeout(() => {
|
|
181
186
|
this.$emit("input", value);
|
|
187
|
+
this.$emit("update:modelValue", value);
|
|
182
188
|
}, this.debounce);
|
|
183
189
|
},
|
|
184
190
|
},
|