Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
vue-bootstrap-slider
Advanced tools
Easily use seiyria's Bootstrap Slider component in Vue.js
Click here for a live example
Install from npm with:
npm install --save vue-bootstrap-slider
The default export of this package is a VuePlugin.
import bFormSlider from 'vue-bootstrap-slider';
Vue.use(bFormSlider)
if you wish to import the component you can use:
import bFormSlider from 'vue-bootstrap-slider/es/form-slider';
Next import the bootstrap-slider styles (or use less or sass):
import 'bootstrap-slider/dist/css/bootstrap-slider.css'
debounce
0
milliseconds
The events triggered by bootstrap-slider
originates from mouse-move events and can easily flood your listeners. Setting this value will debounce the events trigger. You can also just debounce or throttle your own listenertrigger-slide-event
false
If the slide event should be triggered when programmatically setting the valuetrigger-change-event
false
If the change (and input) event should be triggered when programmatically setting the valueSee bootstrap-slider for a full list of options
:exclamation: When listening to slider events, listen to the kebab-case'd event name and not the camelCase'd. E.g. listen for
@slide-start
and not for@slideStart
<template>
<div>
<b-form-slider :value="value" @slide-start="slideStart" @slide-stop="slideStop"></b-form-slider>
<p>Slider has value {{ value }}</p>
</div>
</template>
<script>
export default {
data () {
return {
value: 5
}
},
methods: {
slideStart () {
console.log('slideStarted')
},
slideStop () {
console.log('slideStopped')
}
}
}
</script>
By default seiyria/bootstrap-slider requires jquery which means that if you include this package you will also add jquery to your project. If you do not use jquery anywhere in your project, check here how to prevent the full jquery library from being added to your project build.
If you are using nuxt
you can set the following in your nuxt.config.js
:
{
build: {
extend (config, ctx) {
config.resolve.alias['jquery'] = '~components/jquery-stub.js'
}
}
}
<b-form-slider ref="mySlider"></b-form-slider>
const mySlider = this.$refs.mySlider
mySlider.slider.refresh()
2.1.8 (2019-02-07)
<a name="2.1.7"></a>
FAQs
Vue bindings for seiyria/bootstrap-slider
The npm package vue-bootstrap-slider receives a total of 437 weekly downloads. As such, vue-bootstrap-slider popularity was classified as not popular.
We found that vue-bootstrap-slider demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.