0.3.3 • Published 9 months ago

element-ui-types v0.3.3

Weekly downloads
-
License
MIT
Repository
github
Last release
9 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.3

9 months ago

0.3.2

10 months ago

0.3.1

10 months ago

0.3.0

12 months ago

0.3.0-beta.0

12 months ago

0.1.10

1 year ago

0.1.11

1 year ago

0.1.12

1 year ago

0.2.0-beta.0

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.8

1 year ago

0.1.7

1 year ago

0.1.9

1 year ago

0.2.2

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago