npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ws-china-area-data

v2.0.13

Published

省市区街道

Downloads

11

Readme

ws-china-area-data

文盛通用省市区级联组件 说明:此组件为elementui下cascade扩展,因此需要安装elementui库; 地址:https://www.npmjs.com/package/ws-china-area-data;

安装

npm i -S ws-china-area-data

或者

cnpm i -S ws-china-area-data

例子

<template>
	<chinaAreaData
	v-model="codes"
	:chinaAreaDataNames.sync="chinaAreaDataNames"
	:chinaAreaDataCodes.sync="chinaAreaDataCodes"
	:allOption="['全国','全部省','全部市']"
	:CodeToText.sync="wsCodeToText"
	:defaultPlaceCodes=” defaultPlaceCodes”
	common-service-url="公司公用数据源(js地址)"
      />
</template>
<script>
import chinaAreaData from 'ws-china-area-data/components/chinaAreaData'

export default {
  name: 'search',
  components: {
    chinaAreaData
  },
  data () {
    return {
		codes:[],
		chinaAreaDataNames:[],
      	chinaAreaDataCodes: [],
		wsCodeToText:{},
		defaultPlaceCodes:[]
    }
  }
}
</script>

Attributes

| 参数 | 说明 | 类型 | 默认值 | | ----------------- | ---------------- | :--------: | ---------------- | | chinaAreaDataCodes/sync(v-model) | 选中的绑定值(编码),可以通过v-model快捷绑定。 | string[] | - | | chinaAreaDataNames/sync | 选中的绑定值(名称)。| string[] | - | | CodeToText/sync | 编码转文字 | Object | - |

Options

| 参数 | 说明 | 类型 | 默认值 | | ----------------- | ---------------- | :--------: | ---------------- | | allOption | 全部选项的文字设置,不需要放空字符串即可,文字可修改 | string[] | ['全部','全部','全部'] | | commonServiceUrl | 公共js文件地址(必传),注意需要和提供方确认最新地址 | url | - | | checkStrictly | 设置父子节点取消选中关联 | boolean | false | | clearable | 是否支持清空选项 | boolean | false | | collapse-tags | 多选模式下是否折叠Tag | boolean | false | | defaultPlaceCodes | 预设地址编码,使用v-model方式可以不用此选项,此属性兼容老版组件 | string[] | - | | disabled | 选项是否禁用 | boolean | false | | level | 控件需要级别:1.省级、2.省市二级联动、3.省市区三级联动 | number | 3 | | locateCurrentCity | 是否定位当前城市 | boolean | false(当defaultPlacesCode有值是该项失效)| | myPlaceholder | 输入框占位文本 | string | 请选择 | | multiple | 选项是否多选 | boolean | false | | staticData | 传入自定义数据,数据结构例子[{label:'',value:'',children:[]}],注意字段名名要一致 | - | [] | size | 尺寸(同elementui) | string | - | | showAllLevels | 输入框中是否显示选中值的完整路径 | boolean | true | | update | 公共js文件的缓存周期(目前每月一更),一般不用设置。 | string | monthly | | whistList | 省级选择地区白名单,如果不为空数组,即只能选择白名单内的省份 | string[] | [] | | width | 组件宽度(单位px) | number | 200 |

Events

| 参数 | 说明 | 回调参数 | | ----------------- | ---------------- | ---------------- | | change | 当选中节点变化时触发 | 选中节点的值 | | remove-tag | 在多选模式下,移除Tag时触发 | 选中节点的值 |

Methods

| 方法名 | 说明 | 参数 | | ----------------- | ---------------- | ---------------- | | reset | 清空 | - |