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.
region-select
Advanced tools
yarn add region-select
npm i region-select
依赖项:
element-ui
RegionSelect 0.3.0 版本升级
取消外部数据源,由于组件维护全国地区树JSON (如有个性化数据源,可通过data重置数据源)
如需部分地区地区树,可用filter筛选
地区级联选择组件,根据所选最后一级id数据级联选中
<RegionSelect
v-model="areaCode" 选中地区 code
:data='data' 数据源 (组件内置标准全国数据源,如有个性化数据源,可通过data重置数据源)
:label.sync='areaLabel' 选中地区 label
:size='size' 尺寸 默认medium (非必输)
:disabled='false' 是否禁用 默认false (非必输)
:placeholder='xxx' 占位文本 默认“所属地区” (非必输)
:props='props' 对象属性绑定 默认如props对象 (非必输)
:clearable='false' 是否可清空
filter='0001' 地区过滤,是否只需要部分地区
:filterShowChild='false' 只显示过滤地区的子类地区(需 filter 过滤才会生效)
:level='1' 地区树显示层级(如有地区过滤,则为过滤后地区树的层级)
@change='changeFun' change事件,当选中节点变化时触发
/>
props 默认对象
props = {
checkStrictly: false, // 任意层级可选,默认false 可通过 props.checkStrictly = true 来设置父子节点取消选中关联,从而达到选择任意一级选项的。
multiple: false // 是否多选,默认false 多选情况下,返回数据为字符数组
}
全局默认设置
如需在项目中对 RegionSelect 进行一些公共配置,可在 main.js 注册组件时,注入 config 属性对象
* 在页面中对 config 中属性进入重复设置,会覆盖全局设置
import RegionSelect from 'region-select'
Vue.use(RegionSelect,{
filter:'520000000000', 地区过滤,是否只需要其子类地区
level = '2' 地区树显示层级(如有地区过滤,则为过滤后地区树的层级)
placeholder = '所属地区' 占位文本
props = option.props 属性绑定
})
FAQs
The npm package region-select receives a total of 15 weekly downloads. As such, region-select popularity was classified as not popular.
We found that region-select demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 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.
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.