Code Monkey home page Code Monkey logo

xss-vue's Introduction

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 和组件使用时 同时传入参数时 以 后者 为准

xss-vue's People

Contributors

zhjoker avatar dependabot[bot] avatar

Stargazers

ChasLui avatar  avatar  avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.