Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sensorskit/vue-on-modify

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sensorskit/vue-on-modify

vue custom directive of modify binding

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
2
Weekly downloads
 
Created
Source

vue-on-modify

npm (scoped) Build Status

[在线预览]

通用的「是否修改」监听逻辑:输入框失焦之后,字符相对输入框上次聚焦时发生变化

示例:

  • 输入框聚焦,输入字符后失焦,算修改
  • 输入框聚焦,输入字符后又把刚输入的字符删掉,再失焦,不算修改

使用

yarn add @sensorskit/vue-on-modify

在 Vue.js 项目的入口处引入:

import VueOnModify from '@sensorskit/vue-on-modify'

Vue.use(VueOnModify)

// 如果需要自定义选项
Vue.use(VueOnModify, {
  directive: 'your-custom-directive-name'
})

在需要绑定修改逻辑的地方引入自定义指令:

<input type="text" v-on-modify="onModify">

<!-- 如果自定义了directive name -->
<input type="text" v-your-custom-name="onModify">

FAQs

Package last updated on 29 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc