
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@mathewparet/vue-bs-disabled
Advanced tools
A Vue.Js directive to disable bootstrap controls. Unlike normal disable property of control buttons, bootstrap requires disabled added to the class to get the control to be disabled. This is useful mostly when you need to disable some controls in VUE based on certain conditions.
# install dependencies
npm install
# build for production with minification
npm run build
npm i @mathewparet/vue-bs-disabled
// In your App.js
import Vue from 'vue';
import BsDisabled from '@mathewparet/vue-bs-disabled';
Vue.use(BsDisabled)
To use the directive simply add v-bs-disabled
to the corresponding element with the required condition.
<div>
<a class="btn btn-primary" v-bs-disabled="1==1">This button is disabled</a><br>
<a class="btn btn-primary" v-bs-disabled="1==0">This button is enabled</a><br>
<a class="btn btn-primary" v-bs-disabled.hidden="1==1">This button is hidden</a><br>
<a class="btn btn-primary" v-bs-disabled.hidden="1==0">This button is enabled + visible</a><br>
</div>
<div>
<a class="btn btn-primary" v-bs-disabled="{hidden: false, condition: 1==1}">This button is disabled</a><br>
<a class="btn btn-primary" v-bs-disabled="{hidden: false, condition: 1==0}">This button is enabled</a><br>
<a class="btn btn-primary" v-bs-disabled="{hidden: true, condition: 1==1}">This button is hidden</a><br>
<a class="btn btn-primary" v-bs-disabled="{hidden: true, condition: 1==0}">This button is enabled + visible</a><br>
</div>
When both .hidden
modifier and the hidden
property of the v-bs-disabled
directives are present, then the element is hidden if the condition evaluates to true
.
FAQs
A Vue.Js directive to disable bootstrap controls
We found that @mathewparet/vue-bs-disabled 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.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.