Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
async-validator-uniapp
Advanced tools
###安装
npm init -y
npm i async-validator-uniapp --save
import xPlus from 'async-validator-uniapp'
[WARNING] 1.0.3之后,可能会停止插件市场的更新,如果需要拷贝到项目,请npm下载后拷贝使用,入口文件是index.js
在main.js里面注册,目前uniapp全局组件不支持xPlus.intall(Vue)的这种方式
import xform from './components/async-validator-uniapp/src/xForm.vue'
import xinput from './components/async-validator-uniapp/src/xInput.vue'
import xcheckboxGroup from './components/async-validator-uniapp/src/xCheckboxGroup.vue'
import x from './components/async-validator-uniapp/src/xCheckbox.vue'
import xradioGroup from './components/async-validator-uniapp/src/xRadioGroup.vue'
import xradio from './components/async-validator-uniapp/src/xRadio.vue'
import xpicker from './components/async-validator-uniapp/src/xPicker.vue'
import xtextarea from './components/async-validator-uniapp/src/xTextarea.vue'
Vue.component("x-form", xform)
Vue.component("x-input", xinput)
Vue.component("x-checkbox-group", xcheckboxGroup)
Vue.component("x-checkbox", xcheckbox)
Vue.component("x-radio-group", xradioGroup)
Vue.component("x-radio", xradio)
Vue.component("x-picker",xpicker)
Vue.component("x-textarea", xtextarea)
在需要的页面里面导入,并且注册
import {xForm} from "async-validator-uniapp";
import {xInput} from "async-validator-uniapp";
import {xCheckboxGroup} from "async-validator-uniapp";
import {xCheckbox} from "async-validator-uniapp";
import {xRadioGroup} from "async-validator-uniapp";
import {xRadio} from "async-validator-uniapp";
import {xPicker} from "async-validator-uniapp";
import {xTextarea} from "async-validator-uniapp";
export default {
components:{xForm,xInput,xCheckboxGroup,xCheckbox,xRadioGroup,xRadio,xPicker,xTextarea}
}
this.$refs['form的ref'].validate
this.$refs['form的ref'].validateField('对应表单的prop')
this.$refs['form的ref'].resetFields('对应表单的prop,如果不填就是清空整个form')
属性名 | 类型 | 默认值 | 说明 |
---|---|---|---|
rules | object | -- | 必填,校验规则 |
model | object | -- | 必填,表单数据 |
ref | Object | -- | x-form组件的应用可以调用validateField和validate |
属性名 | 类型 | 默认值 | 说明 |
---|---|---|---|
type | string | -- | 默认text,类型请参考uniapp文档 |
value | string | -- | 表单显示值 |
disabled | Boolean | false | 禁用 |
prop | string | -- | 对应的校验规则,强烈推荐和该表单的绑定值的key保持一致 |
@input | Function | -- | 同步数据到当前页面 |
属性名 | 类型 | 默认值 | 说明 |
---|---|---|---|
value | string | -- | 表单显示值 |
prop | string | -- | 对应的校验规则,强烈推荐和该表单的绑定值的key保持一致 |
@input | Function | -- | 同步数据到当前页面 |
属性名 | 类型 | 默认值 | 说明 |
---|---|---|---|
value | string | -- | 表单显示值 |
label | string | -- | 提示文字 |
prop | string | -- | 对应的校验规则,强烈推荐和该表单的绑定值的key保持一致 |
@input | Function | -- | 同步数据到当前页面 |
属性名 | 类型 | 默认值 | 说明 |
---|---|---|---|
value | string | -- | 表单显示值 |
label | string | -- | 提示文字 |
disabled | Boolean | false | 禁用 |
prop | string | -- | 对应的校验规则,强烈推荐和该表单的绑定值的key保持一致 |
@input | Function | -- | 同步数据到当前页面 |
属性名 | 类型 | 默认值 | 说明 |
---|---|---|---|
value | string | -- | 表单显示值 |
label | string | -- | 提示文字 |
disabled | Boolean | false | 禁用 |
prop | string | -- | 对应的校验规则,强烈推荐和该表单的绑定值的key保持一致 |
@input | Function | -- | 同步数据到当前页面 |
属性名 | 类型 | 默认值 | 说明 |
---|---|---|---|
value | string | -- | 表单显示值 |
label | string | -- | 提示文字 |
disabled | Boolean | false | 禁用 |
prop | string | -- | 对应的校验规则,强烈推荐和该表单的绑定值的key保持一致 |
@input | Function | -- | 同步数据到当前页面 |
属性名 | 类型 | 默认值 | 说明 |
---|---|---|---|
value | string | -- | 表单显示值 |
disabled | Boolean | false | 禁用 |
placeholder | String | "请选择" | 占位符 |
prop | string | -- | 对应的校验规则,强烈推荐和该表单的绑定值的key保持一致 |
@input | Function | -- | 同步数据到当前页面 |
@cancel | Function | -- | 取消事件 |
FAQs
a simgle tool for valid form
The npm package async-validator-uniapp receives a total of 0 weekly downloads. As such, async-validator-uniapp popularity was classified as not popular.
We found that async-validator-uniapp 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
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.