# citySelect **Repository Path**: hihopeorg/citySelect ## Basic Information - **Project Name**: citySelect - **Description**: 城市选择器 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-10-14 - **Last Updated**: 2022-05-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # citySelect ## 项目介绍 >本项目是基于开源项目citySelect进行ohos化的移植和开发的,可以通过项目标签以及github地址(https://github.com/chenjinxinlove/citySelect )追踪到原项目版本** ## 效果展示 ![](citySelect.gif) ## 下载安装 ```shell npm install @ohos/citySelect --save ``` OpenHarmony npm环境配置等更多内容,请参考 [如何安装OpenHarmony npm包](https://gitee.com/openharmony-tpc/docs/blob/master/OpenHarmony_npm_usage.md) 。 #### 安装教程 1.下载CitySelect源码 2.拷贝CitySelect源码中的组件功能目录到default目录下 3.在demo中引用 ```
{{ $item.initial }}
{{ value.city }}
``` ## 接口说明 1. cxgps() #城市定位功能 2. scrollToIndex #根据城市首字母导航到相应的城市 3. ohosSortPickerViewItemTap #记录历史选择过的城市 ## 兼容性 支持 OpenHarmony API version 8 及以上版本。 ## 目录结构 ```` |---- citySelect | |---- entry # 示例代码文件夹 |---- src |----js |----MainAbility |----pages |----index |----index.css #demo的样式 |----index.hml #demo |----index.js #demo的js |----citySelect |----src |----main |----js |----components |----tuil |----city.js #城市数据处理js |----util.js #时间格式处理 | |---- README.MD # 安装使用方法 ```` ## 贡献代码 使用过程中发现任何问题都可以提 [Issue](https://gitee.com/hihopeorg/citySelect/issues) 给我们,当然,我们也非常欢迎你给我们发 [PR](https://gitee.com/hihopeorg/citySelect/pulls) 。 ## 开源协议 本项目基于 [Apache License 2.0](https://gitee.com/hihopeorg/citySelect/blob/master/LICENSE) ,请自由地享受和参与开源。