vue-password-strength-meter
vue-password-strength-meter copied to clipboard
Support for typescript
trafficstars
Can you add support for type definitions, please?
Not really experienced in ts. So if anyone want to make a PR, feel free to do it :)
:v:
Hi guys, made the component works with typescript just changing the import to:
import * as Password from 'vue-password-strength-meter'
Hope it helps, cheers.
Or create a file vue-password-strength-meter.d.t anywhere in your project with following line:
declare module 'vue-password-strength-meter';
And if you need to get it to work with Nuxt in `universal' mode
- Create a
vue-password-strength-meter.tsfile in the plugin directory
import Vue from 'vue'
import Password from 'vue-password-strength-meter'
Vue.use(Password)
- In the
nuxt.config.jsfile
...
plugin: [
{ src: '~plugins/vue-password-strength-metter', ssr: false }
],
...
- In a template:
<client-only>
<password v-model="password" :strength-meter-only="true" />
</client-only>