jd-opensource / jd-opensource/taro-ui

AtRate onChange事件参数在d.ts中的描述与实际参数不符

Open
#1,369 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.7k
Forks
740
PR merge metrics
No merged PRs in 30d

Description

### Taro UI 版本信息

3.0.0-alpha.10

### 问题描述

在支付宝小程序中,AtRate组件的onChange在d.ts的描述是事件对象,实际传的是number,查看js源码,组件中调用onChange也是传的event

### 复现步骤

export interface AtRateProps extends AtComponent {
/**
* 输入框值改变时触发的事件,开发者需要通过 onChange 事件来更新 value 值变化,但不填写 onChange 函数时,该组件只读
*/
onChange?: CommonEventFunction
}

### 复现代码

export interface AtRateProps extends AtComponent {
/**
* 输入框值改变时触发的事件,开发者需要通过 onChange 事件来更新 value 值变化,但不填写 onChange 函数时,该组件只读
*/
onChange?: CommonEventFunction
}

### 报错信息

类型不符合

### 系统信息

👽 Taro v3.2.15

Taro CLI 3.2.15 environment info:
System:
OS: macOS 11.4
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.16.1 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.12 - /usr/local/bin/npm

### 补充信息

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.