mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
Fix all type errors in design system (#3956)
* 📘 Fix type errors in design system * 🔥 Remove unneeded `?` * 🔧 Add design system to Vetur * 📘 Improve typing of `$el` * ♻️ Address feedback * 📘 Type leftover `MouseEvent` * 📘 Type `event.target` properly
This commit is contained in:
@@ -155,7 +155,7 @@ export default mixins(Locale).extend({
|
||||
this.$emit('validate', !this.validationError);
|
||||
|
||||
if (this.focusInitially && this.$refs.input) {
|
||||
this.$refs.input.focus();
|
||||
(this.$refs.input as HTMLTextAreaElement).focus();
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -186,7 +186,7 @@ export default mixins(Locale).extend({
|
||||
} as { [key: string]: IValidator | RuleGroup };
|
||||
|
||||
if (this.required) {
|
||||
const error = getValidationError(this.value, validators, validators.REQUIRED as Validator);
|
||||
const error = getValidationError(this.value, validators, validators.REQUIRED as IValidator);
|
||||
if (error) {
|
||||
return error;
|
||||
}
|
||||
@@ -199,7 +199,7 @@ export default mixins(Locale).extend({
|
||||
const error = getValidationError(
|
||||
this.value,
|
||||
validators,
|
||||
validators[rule.name] as Validator,
|
||||
validators[rule.name] as IValidator,
|
||||
rule.config,
|
||||
);
|
||||
if (error) {
|
||||
@@ -235,9 +235,9 @@ export default mixins(Locale).extend({
|
||||
onFocus() {
|
||||
this.$emit('focus');
|
||||
},
|
||||
onEnter(e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
onEnter(event: Event) {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
this.$emit('enter');
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user