Socket
Socket
Sign inDemoInstall

xss-vue

Package Overview
Dependencies
11
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    xss-vue

[xss-vue](https://github.com/Zhjoker/xss-vue) 基于 [js-xss](https://github.com/leizongmin/js-xss/tree/master/),过滤xss,可配置白名单,可快速的在vue的项目中使用,详细文档可见[JS-XSS文档](https://github.com/leizongmin/js-xss/blob/master/README.md) ## 快速开始 ``` javascript npm i xss-vue ```


Version published
Weekly downloads
4
increased by300%
Maintainers
1
Install size
3.85 MB
Created
Weekly downloads
 

Readme

Source

xss-vue

xss-vue 基于 js-xss,过滤xss,可配置白名单,可快速的在vue的项目中使用,详细文档可见JS-XSS文档

快速开始

npm i xss-vue
import xssVue from "xss-vue";
Vue.use(vueXss,?options);

在vue中使用

方法调用

this.$xss(text,?options)

指令调用

<input v-xss="message">
//自定义参数
<input v-xss="{text:'alert(xss)',option:{}}">

修饰符

  • .lazy 修饰符 在默认情况下,v-xss 在每次 input 事件触发后将输入框的值与数据进行同步 (除了上述输入法组合文字时)。你可以添加 lazy 修饰符,从而转变为在每次 input 事件触发停止 500ms 后数据进行同步

options 参数说明

  • 参数是非必传参数
  • 可以初始化的时候通过 Vue.use 传入参数 或者是在组件中使用的时候传入参数
  • Vue.use 和组件使用时 同时传入参数时 以 后者 为准

Keywords

FAQs

Last updated on 14 Jan 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc