Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
regional-selection
Advanced tools
Readme
基本功能:
npm install regional-selection --save
# 或者
yarn add regional-selection
组件引入:
// import包
import regionalSelection from 'regional-selection'
// use
Vue.use(regionalSelection)
使用:
<regional-selection
v-model="pickCity"
@on-pick-city="pickedCity = $event"
>
</regional-selection>
<!-- 省略代码 -->
data () {
return {
pickCity: []
}
}
选择返回的数据:
[{
"cityIndex": 37,
"id": "210200",
"name": "大连市",
"pinYin": "dalian",
"shortName": "大连"
}, {
"cityIndex": 41,
"id": "210600",
"name": "丹东市",
"pinYin": "dadong",
"shortName": "丹东"
}]
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
placeholder | - | String | 选择城市 |
showCloseBtn | 是否显示input框清空按钮 | Boolean | true |
clickModal | 是否点击遮罩关闭弹层 | Boolean | true |
inputClass | 替换预设的输入框样式 | String | null |
width | input框宽度 | Number | 200 |
事件 | 说明 | 参数 |
---|---|---|
on-pick-city | 城市选择的回调事件 | 勾选的城市 |
安装:npm install
运行:npm run dev
如果项目npm安装完毕后无法运行,找到index.html文件里面这段注释即可。
<script src="https://cdn.bootcss.com/vue/2.5.18-beta.0/vue.min.js"></script>
FAQs
Vue城市选择组件。
The npm package regional-selection receives a total of 1 weekly downloads. As such, regional-selection popularity was classified as not popular.
We found that regional-selection 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.