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

@sensorskit/vue-on-delete

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sensorskit/vue-on-delete

vue custom directive of delete binding

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

vue-on-delete

npm (scoped) Build Status

通用的「是否删除」监听逻辑:输入框字符减少的同时没有新增字符

示例:

  • 输入框里有字符存在时,按下了退格键,算删除
  • 输入框里没有字符,按下退格键,不算删除
  • 输入框里选中了一段文字,按下退格键,算删除
  • 输入框里选中了一段文字,键入别的字符,此时选中文字会被替换掉,不算删除

使用

yarn add @sensorskit/vue-on-delete

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

import VueOnDelete from '@sensorskit/vue-on-delete'

Vue.use(VueOnDelete)

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

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

<input type="text" v-on-delete="onDelete">

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

FAQs

Package last updated on 20 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