Socket
Book a DemoInstallSign in
Socket

v-decimal-pro

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

v-decimal-pro

专注于输入框数字处理

1.0.7
latest
npmnpm
Version published
Maintainers
1
Created
Source

v-decimal-pro

输入框限制组件:限制只能输入整数或者小数且支持动态规则

安装

使用 npm 安装:

npm i v-decimal-pro --save
import decimal from 'v-decimal-pro';
 Vue.directive('decimal',decimal)

使用

### 使用

```vue 
1. 保留两位置小数
<template>
     <input v-decimal/>
</template>

2. 0-100,小数2位
<template>
    <input v-decimal.range0_100="2" />
</template>

3. 整数3位,小数2位,且≥1
<template>
    <input v-decimal.min1="[3,2]" />
</template>

4.动态规则
<template>
    <input :v-decimal="{ modifiers: { range0_100: true }, value: 2 }" />
</template>

FAQs

Package last updated on 29 Aug 2025

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.