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

@alicd/crui-address-multi-field

v0.0.18

Published

--- category: Components type: UI Views component: Form chinese: 地址多选框 english: AddressMultiField ---

Downloads

7

Readme


category: Components type: UI Views component: Form chinese: 地址多选框 english: AddressMultiField

地址多选组件。

API

| 成员 | 说明 | 类型 | 默认值 | | ----- | ----- | ----- | ----- | | value | 当前组件中的地址值,以 JSON 对象的数组的形式表示,每一个元素包含 countryprovincecityareatown 等字段 | object[] | N/A | | onChange | 用户的选择等交互使地址值变化时所调用的函数参数:value: object 改变后的地址数组,可直接设置到 value 属性上nodes: object[]value 各值对应的地址详细信息,可用来取地名等 | (value: object[], nodes: object[]) => void | N/A | | root | 多选框选择弹层的根地址节点,用于指定地址选择的区域,地址组件只能选择区域内的地址 | object | { "country": 1 }(默认选择国内地址) | | className | 自定义类名 | string | N/A | | style | 自定义组件内联样式 | object | N/A | | size | 选择框大小 | "small""medium""large" | "medium" | | level | 选择到几级地址,1 为只选择省,4 为从省到街道全部选择(国家选择请使用 root 属性控制) | number | 4 (省、市、区、街道四级全部启用) | | placeholder | 选择框占位符 | string | N/A | | disabled | 是否禁止用户编辑地址 | boolean | false | | container | 指定渲染地址选择弹层的容器,一般不需要设置该属性 | any | 默认为地址组件本身 | | popupProps | 弹层的属性,参见 SelectField 组件 | object | N/A | | popupClassName | 弹层的类名 | string | N/A | | requestAddressUrl | 国家、省、市、区四级数据的接口地址,默认拉取最新数据 | string | "//division-data.alicdn.com/simple/addr_4_1111_1_0.js" | | requestTownUrl | 用于街道一级数据的接口地址 | string | "//lsp.wuliu.taobao.com/locationservice/addr/output_address_town.do" | | requestAddressLevelUrl | 用于街道一级数据的接口地址 | string | "//lsp.wuliu.taobao.com/locationservice/addr/outputParentDivisons.do" | | hiddenData |数据中不做展示的地址 ID 数组,用于去除部分数据。注意不要将该属性误写为 "hidden","hidden" 属性将会将组件隐藏|string[]|[]| | ignored |数据中忽略的地址 ID 数组,用于去除部分数据。注意 hiddenData 与本属性的区别,ignored 会将地址节点从数据中彻底剔除(用户无法选择,且使用被忽略掉的地址进行 setValue() 不被识别),hiddenData 仅仅在展示时隐藏地址节点(用户无法选择),且 ignoreddataOverridepreprocessor 等属性仅在地址数据加载时有效,之后对这些属性的更新均无效。一般推荐使用 hiddenData 属性|string[]|[]| | dataOverride |需要临时复写、增加新的地址数据时使用|{ [addressID: number]: string[] }||{}| | preprocessor |需要对地址数据定制更细致的预处理工作时使用的回调接口,一般优先使用 hiddenData, ignored, dataOverride 等属性,需求无法满足时再考虑使用本属性|(dataRaw: { [addressID: number]: string[] }) => { [addressID: number]: string[] }|默认直接返回第一个参数(不进行任何操作)|