clxx 3.0.1 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -481,6 +481,7 @@ showCitySelect({
481
481
  | `onLetterChange` | `(letter: string) => void` | — | 侧边栏当前字母变化回调 |
482
482
  | `getLocation` | `() => string \| null \| undefined \| Promise<string \| null \| undefined>` | — | 外部定位能力,可同步或异步,返回城市名或城市 code |
483
483
  | `primary` | `string` | `'#2f7dff'` | 主题主色,形如 `#rrggbb`;active 态颜色自动派生 |
484
+ | `taiwanHKMacau` | `boolean` | `false` | 是否包含香港/澳门/台湾;false 时在列表、搜索与定位结果中均不出现 |
484
485
 
485
486
  **SelectedCity:**
486
487
 
@@ -603,7 +604,8 @@ showRegionPicker({
603
604
  | `maskClosable` | `boolean` | `true` | 点击遮罩是否可关闭(仅 `showRegionPicker` 路径生效) |
604
605
  | `primary` | `string` | `'#2f7dff'` | 主题主色 |
605
606
  | `rounded` | `boolean` | `true` | 顶部圆角 |
606
- | `onConfirm` | `(selection: RegionSelection) => void` | | 确认回调,仅在三级齐全时可点击 |
607
+ | `taiwanHKMacau` | `boolean` | `false` | 是否包含香港/澳门/台湾;false 时这三个顶层省份不会出现在列表中 |
608
+ | `onConfirm` | `(selection: RegionSelection) => void` | — | 确认回调;选中的市无区级时选到市即可提交 |
607
609
  | `onCancel` | `() => void` | — | 取消回调 |
608
610
  | `onClose` | `() => void` | — | 请求关闭(由外部处理动画与卸载) |
609
611
 
@@ -617,14 +619,15 @@ interface RegionNode {
617
619
  interface RegionSelection {
618
620
  province: RegionNode;
619
621
  city: RegionNode;
620
- district: RegionNode;
622
+ // 部分城市无区级时为 null
623
+ district: RegionNode | null;
621
624
  }
622
625
  ```
623
626
 
624
627
  **特性:**
625
628
  - **tabs 联动**:选中后自动跳到下一级;切换上级会清空所有下级。
626
629
  - **滚动定位**:切 tab 时把当前选中项对齐到列表顶部(用 `getBoundingClientRect` 差分计算偏移,不依赖 offsetParent)。
627
- - **三级未齐时**:确认按钮置灰禁用,避免半选确认。
630
+ - **选择未完成时**:确认按钮置灰禁用;选中的市无区级时,选到市使可提交。
628
631
 
629
632
  ---
630
633
 
@@ -1,3 +1,3 @@
1
- import type { ProvinceData, CityData } from './type';
1
+ import type { ProvinceData, CityData } from "./type";
2
2
  export declare const provinceData: ProvinceData;
3
3
  export declare const cityData: CityData;