https://github.com/afeiship/next-event-value
Get event value from evet.target/detail/value.
https://github.com/afeiship/next-event-value
checkbox detail event form input mina mp next radio react switch target value weapp weixin
Last synced: 2 months ago
JSON representation
Get event value from evet.target/detail/value.
- Host: GitHub
- URL: https://github.com/afeiship/next-event-value
- Owner: afeiship
- License: mit
- Created: 2018-05-30T08:10:02.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-04-14T12:38:11.000Z (about 2 years ago)
- Last Synced: 2025-02-07T12:28:11.541Z (4 months ago)
- Topics: checkbox, detail, event, form, input, mina, mp, next, radio, react, switch, target, value, weapp, weixin
- Language: JavaScript
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# next-event-value
> Get event value from evet.target/detail/value.[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]## installation
```bash
npm install -S @jswork/next-event-value
```## usage
```js
import '@jswork/next-event-value';const event1 = { target: { value: 111 } };
const event2 = { detail: { value: 222 } };
const event3 = true;
const event4 = { xxx: { yyy: { aaa: 'v4' } } };nx.eventValue(event1) // 111
nx.eventValue(event2) // 222
nx.eventValue(event3) // true
nx.eventValue(event4, { path: 'xxx.yyy.aaa' }); // 'v4'
```## license
Code released under [the MIT license](https://github.com/afeiship/next-event-value/blob/master/LICENSE.txt).[version-image]: https://img.shields.io/npm/v/@jswork/next-event-value
[version-url]: https://npmjs.org/package/@jswork/next-event-value[license-image]: https://img.shields.io/npm/l/@jswork/next-event-value
[license-url]: https://github.com/afeiship/next-event-value/blob/master/LICENSE.txt[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-event-value
[size-url]: https://github.com/afeiship/next-event-value/blob/master/dist/next-event-value.min.js[download-image]: https://img.shields.io/npm/dm/@jswork/next-event-value
[download-url]: https://www.npmjs.com/package/@jswork/next-event-value