0.3.4 • Published 4 months ago

element-ui-types v0.3.4

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

Provide types support for ElementUI under Volar.

Install and usage

1. Install element-ui-types

npm i element-ui-types -D

# Or
pnpm add element-ui-types -D

2. Add the following configuration to tsconfig.json

// tsconfig.json
{
  "vueCompilerOptions": {
    "target": 2.7,
    // "target": 2, // For Vue version <= 2.6.14
  },
  "compilerOptions": {
    "types": ["element-ui-types"]
  }
}

3. Reload IDE

Demo

<template>
  <ElForm ref="formRef">
    ...
  </ElForm>
</template>

<script lang="ts" setup>
import { type Form } from 'element-ui'

const formRef = ref<InstanceType<typeof Form>>()

formRef.value?.validate(valid => {
  // `valid` is type of  `boolean`
})
</script>

npm.io

0.3.4

4 months ago

0.3.3

2 years ago

0.3.2

2 years ago

0.3.1

2 years ago

0.3.0

2 years ago

0.3.0-beta.0

2 years ago

0.1.10

2 years ago

0.1.11

2 years ago

0.1.12

2 years ago

0.2.0-beta.0

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.9

2 years ago

0.2.2

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago