@whitetrefoil/vue-elem-id
v2.0.1
Published
A tiny plugin to help generate dynamic element ID in Vue
Downloads
10
Readme
@whitetrefoil/vue-elem-id
A tiny plugin to help generate dynamic element ID in Vue. Useful with labels and form inputs.
Usage
import VueElemId from '@whitetrefoil/vue-elem-id'
import Vue from 'vue'
Vue.use(VueElemId)
<template>
<form>
<label :for="$eid('username')>Username:</label>
<input :id="$eid('username')/>
</form>
</template>
Changelog
v2.0.1
- Fix wrong version number in "package.json".
v2.0.0
- Prefix with "eid" to prevent IDs start with digit.
- Migrate to yarn.
- Upgrade some dependencies.
v1.1.0
- Add LICENSE file to publish this in proper license.
- Add Travis CI.
v1.0.0
- Initial release.