mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat: Replace this.$refs.refName as Vue with InstanceType<T> (no-changelog) (#6050)
* refactor: use InstanceType<T> for all this.$refs types * refactor: update refs type in N8nSelect * fix: remove inputRef non-null assertion Co-authored-by: Mutasem Aldmour <4711238+mutdmour@users.noreply.github.com> * fix: remove non-null assertion --------- Co-authored-by: Mutasem Aldmour <4711238+mutdmour@users.noreply.github.com>
This commit is contained in:
@@ -27,6 +27,8 @@
|
||||
import { Input as ElInput } from 'element-ui';
|
||||
import { defineComponent } from 'vue';
|
||||
|
||||
type InputRef = InstanceType<typeof ElInput>;
|
||||
|
||||
export default defineComponent({
|
||||
name: 'n8n-input',
|
||||
components: {
|
||||
@@ -92,7 +94,7 @@ export default defineComponent({
|
||||
},
|
||||
methods: {
|
||||
focus() {
|
||||
const innerInput = this.$refs.innerInput as Vue | undefined;
|
||||
const innerInput = this.$refs.innerInput as InputRef | undefined;
|
||||
|
||||
if (!innerInput) return;
|
||||
|
||||
@@ -105,7 +107,7 @@ export default defineComponent({
|
||||
inputElement.focus();
|
||||
},
|
||||
blur() {
|
||||
const innerInput = this.$refs.innerInput as Vue | undefined;
|
||||
const innerInput = this.$refs.innerInput as InputRef | undefined;
|
||||
|
||||
if (!innerInput) return;
|
||||
|
||||
@@ -118,7 +120,7 @@ export default defineComponent({
|
||||
inputElement.blur();
|
||||
},
|
||||
select() {
|
||||
const innerInput = this.$refs.innerInput as Vue | undefined;
|
||||
const innerInput = this.$refs.innerInput as InputRef | undefined;
|
||||
|
||||
if (!innerInput) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user