未验证 提交 821cf320 编写于 作者: O openharmony_ci 提交者: Gitee

!16960 【挑单3.2-Release】翻译完成 16587:系统组件和组件名,类名,函数名重名约束+图片链接修改

Merge pull request !16960 from ester.zhou/C2-16587
......@@ -83,7 +83,7 @@ struct bindPopupPage {
}
```
![datePicker](../../application-dev/reference/arkui-ts/figures/datePicker.gif)
![datePicker](figures/restrictions-data-type-declarations.gif)
2. The data type declaration of the **@State**, **@Provide**, **@Link**, or **@Consume** decorated state variables can consist of only one of the primitive data types or reference data types.
......@@ -232,3 +232,26 @@ struct Child {
}
}
```
## Restrictions on Naming Custom Components, Classes, and Functions
The name of a custom component, class, or function cannot be the same as any system component name.
Example:
```
// Rect.ets
export class Rect {
constructor(){}
}
// Index.ets
// ERROR: The module name 'Rect' can not be the same as the inner component name.
import { Rect } from './Rect';
@Entry
@Component
struct Index {
build() {
}
}
```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册