Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@sweetui/sweet-mobile
Advanced tools
使用的是饿了么的form验证组件 el-form
el-form-item
校验规则参见 async-validator
表单组件 input 使用 sweet-input
demo
// 这里 el-form-item 的 class="sweet-input-form" 必须有,
<el-form-item prop="name" class="sweet-input-form">
<sweet-input v-model="formData.name" type="text" placeholder="Name"/>
</el-form-item>
表单组件 单选和多选 使用 sweet-group
sweet-group组件的参数数码
参数 | 类型 | 默认值 | 说明 |
---|---|---|---|
data | array | [] | 数据列表 |
type | string | radio | 单选or多选(checkbox) |
name | string | - | 表单的名称 |
注:data值必须是一组对象,并且还有value属性,下面是demo
[
{value: 'facebook1', title: 'Facebook1 Radio'},
{value: 'facebook2', title: 'Facebook2 Radio'}
]
checkbox demo
// 这里 el-form-item 的 class="sweet-group-form" 必须有
// template 的 v-if="scope" 必须有
<el-form-item prop="checkVal" class="sweet-group-form">
<sweet-group :data="checkList" name="demo-checkbox" type="checkbox" v-model="formData.checkVal">
<!--自定义radio|checkbox的html 模版-->
<template slot-scope="{scope}" v-if="scope">
<div>{{scope.title}}</div>
</template>
</sweet-group>
<!--radio checkbox 使用隐藏的input进行校验-->
<input v-model="formData.checkBox" type="hidden">
</el-form-item>
radio demo
// 这里 el-form-item 的 class="sweet-group-form" 必须有
// template 的 v-if="scope" 必须有
<el-form-item prop="radioVal" class="sweet-group-form">
<sweet-group :data="radioList" name="demo-checkbox" v-model="formData.radioVal">
<!--自定义radio|checkbox的html 模版-->
<template slot-scope="{scope}" v-if="scope">
<div>{{scope.title}}</div>
</template>
</sweet-group>
<!--radio checkbox 使用隐藏的input进行校验-->
<input v-model="formData.radioVal" type="hidden">
</el-form-item>
FAQs
Sweet Mobile Core
The npm package @sweetui/sweet-mobile receives a total of 1 weekly downloads. As such, @sweetui/sweet-mobile popularity was classified as not popular.
We found that @sweetui/sweet-mobile demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.