diff --git a/en/application-dev/quick-start/typescript-to-arkts-migration-guide.md b/en/application-dev/quick-start/typescript-to-arkts-migration-guide.md index eb3a47adb6545ddb001689b8374b206703a0b9b3..29865c79c490f4ad1678034e001b71e1011f1ab3 100644 --- a/en/application-dev/quick-start/typescript-to-arkts-migration-guide.md +++ b/en/application-dev/quick-start/typescript-to-arkts-migration-guide.md @@ -779,7 +779,9 @@ interface Employee extends Identity, Contact {} **Severity: error** -ArkTS does not support the returning `this` type. Use explicit type instead. +ArkTS does not support type notation using the `this` keyword (for example, +specifying a method's return type `this` is not allowed). Use explicit type +instead. **TypeScript** @@ -959,7 +961,9 @@ type N = number **Severity: error** ArkTS does not support indexed access for class fields. Use dot notation -instead. +instead. An exception are all typed arrays from the standard library +(for example, `Int32Array`), which support access to their elements through +`container[index]` syntax. **TypeScript** @@ -975,6 +979,9 @@ let x = p["x"] class Point {x: number = 0; y: number = 0} let p: Point = {x: 1, y: 2} let x = p.x + +let arr = new Int32Array(1) +console.log(arr[0]) ``` ## Recipe: Structural identity is not supported @@ -1541,33 +1548,6 @@ let a2: C[] = [{n: 1, s: "1"}, {n: 2, s : "2"}] // ditto * Recipe: Object literal must correspond to some explicitly declared class or interface * Recipe: Object literals cannot be used as type declarations -## Recipe: Lambdas require explicit type annotation for parameters - -**Rule `arkts-explicit-param-types-in-lambdas`** - -**Severity: error** - -Currently, ArkTS requires the types of lambda parameters -to be explicitly specified. - -**TypeScript** - -```typescript -// Compile-time error only with noImplicitAny: -let f = (s /* type any is assumed */) => { - console.log(s) -} -``` - -**ArkTS** - -```typescript -// Explicit types for lambda parameters are mandatory: -let f = (s: string) => { - console.log(s) -} -``` - ## Recipe: Use arrow functions instead of function expressions **Rule `arkts-no-func-expressions`** @@ -1989,9 +1969,9 @@ let f = "string" + true // "stringtrue" let g = (new Object()) + "string" // "[object Object]string" -let i = true + true // JS: 2, TS: compile-time error -let j = true + 2 // JS: 3, TS: compile-time error -let k = E.E1 + true // JS: 1, TS: compile-time error +let i = true + true // compile-time error +let j = true + 2 // compile-time error +let k = E.E1 + true // compile-time error ``` **ArkTS** @@ -2011,7 +1991,7 @@ let g = (new Object()).toString() + "string" let i = true + true // compile-time error -let j = true + 2 // compile-time error +let j = true + 2 // compile-time error let k = E.E1 + true // compile-time error ``` @@ -2341,7 +2321,8 @@ iterate over data. **Severity: error** ArkTS supports the iteration over arrays and strings by the `for .. of` loop, -but does not support the iteration of objects content. +but does not support the iteration of objects content. All typed arrays from +the standard library (for example, `Int32Array`) are also supported. **TypeScript** @@ -2433,7 +2414,8 @@ console.log("Area: ", Math.PI * r * r) **Severity: error** -ArkTS supports `case` statements that contain only compile-time values. +ArkTS supports `case` statements that contain only compile-time values, +top-level scope `const` values, and `static readonly` class fields. Use `if` statements as an alternative. **TypeScript** @@ -2907,7 +2889,8 @@ function main(): void { The only supported scenario for the spread operator is to spread an array into the rest parameter. Otherwise, manually “unpack” data from arrays and objects, -where necessary. +where necessary. All typed arrays from the standard library (for example, +`Int32Array`) are also supported. **TypeScript** @@ -3880,34 +3863,6 @@ let ce = new CustomError() * Recipe: Prototype assignment is not supported -## Recipe: Runtime import expressions are not supported - -**Rule `arkts-no-runtime-import`** - -**Severity: error** - -ArkTS does not support such “runtime” import expressions as `await import...` -because in the language import is a compile-time, not a runtime feature. -Use regular import syntax instead. - -**TypeScript** - -```typescript -const zipUtil = await import("utils/create-zip-file") -``` - -**ArkTS** - -```typescript -import { zipUtil } from "utils/create-zip-file" -``` - -**See also** - -* Recipe: Wildcards in module names are not supported -* Recipe: Universal module definitions (UMD) are not supported -* Recipe: Import assertions are not supported - ## Recipe: Definite assignment assertions are not supported **Rule `arkts-no-definite-assignment`** @@ -4065,8 +4020,7 @@ M.abc = 200 **Severity: error** Currently ArkTS does not support utility types from TypeScript extensions to the -standard library (`Omit`, `Pick`, etc.). Exceptions are: `Partial`, -`Record`. +standard library, except following: `Partial`, `Record`. For the type *Record*, the type of an indexing expression *rec[index]* is of the type *V | undefined*. @@ -4349,7 +4303,6 @@ import { something } from "module" * Recipe: Wildcards in module names are not supported * Recipe: Universal module definitions (UMD) are not supported -* Recipe: Runtime import expressions are not supported ## Recipe: Usage of standard library is restricted @@ -4364,9 +4317,7 @@ the following APIs is prohibited: Properties and functions of the global object: `eval`, `Infinity`, `NaN`, `isFinite`, `isNaN`, `parseFloat`, `parseInt`, -`encodeURI`, `encodeURIComponent`, `Encode`, -`decodeURI`, `decodeURIComponent`, `Decode`, -`escape`, `unescape`, `ParseHexOctet` +`Encode`, `Decode`, `ParseHexOctet` `Object`: `__proto__`, `__defineGetter__`, `__defineSetter__`, `__lookupGetter__`, `__lookupSetter__`, `assign`, `create`, @@ -4561,3 +4512,54 @@ class BugReport { } ``` +## Recipe: Classes cannot be used as objects + +**Rule `arkts-no-classes-as-obj`** + +**Severity: error** + +ArkTS does not support using classes as objects (assigning them to variables, +etc.) because in ArkTS, a `class` declaration introduces a new type, +not a value. + +**TypeScript** + +```typescript +class C { + s: string = "" + n: number = 0 +} + +let c = C +``` + +## Recipe: `import` statements after other statements are not allowed + +**Rule `arkts-no-misplaced-imports`** + +**Severity: error** + +In ArkTS, all `import` statements should go before all other statements +in the program. + +**TypeScript** + +```typescript +class C { + s: string = "" + n: number = 0 +} + +import foo from "module1" +``` + +**ArkTS** + +```typescript +import foo from "module1" + +class C { + s: string = "" + n: number = 0 +} +``` diff --git a/zh-cn/application-dev/quick-start/start-overview.md b/zh-cn/application-dev/quick-start/start-overview.md index 94fdb74b5f722c6f40a5d6dccb58b4ee8016e19c..e8181d9a38a1fa75e4992954ae59907658a317b3 100644 --- a/zh-cn/application-dev/quick-start/start-overview.md +++ b/zh-cn/application-dev/quick-start/start-overview.md @@ -35,7 +35,7 @@ OpenHarmony提供了一套UI开发框架,即方舟开发框架(ArkUI框架 FA模型和Stage模型的整体架构和设计思想等更多区别,请见[应用模型解读](../application-models/application-model-description.md)。 -快速入门提供了一个含有两个页面的开发实例,并使用了不同的开发语言或不同的应用模型进行开发,以便开发者理解以上基本概念及应用开发流程。 +快速入门提供了一个含有两个页面的开发实例,并基于Stage模型构建第一个ArkTS应用,以便开发者理解以上基本概念及应用开发流程。 ## 工具准备 diff --git a/zh-cn/application-dev/quick-start/typescript-to-arkts-migration-guide.md b/zh-cn/application-dev/quick-start/typescript-to-arkts-migration-guide.md index 936d48a0e7aab7592af9b28a32c8acbaebd5f009..9b3f5c465425e460dbc17728550509929aa1ba5e 100644 --- a/zh-cn/application-dev/quick-start/typescript-to-arkts-migration-guide.md +++ b/zh-cn/application-dev/quick-start/typescript-to-arkts-migration-guide.md @@ -837,6 +837,7 @@ type N = number **级别:错误** ArkTS不支持通过索引访问对象的字段。改用点操作符。 +ArkTS支持通过索引访问`TypedArray`(例如`Int32Array`)中的元素。 **TypeScript** @@ -852,6 +853,9 @@ let x = p["x"] class Point {x: number = 0; y: number = 0} let p: Point = {x: 1, y: 2} let x = p.x + +let arr = new Int32Array(1) +console.log(arr[0]) ``` ### 不支持structural identity @@ -1305,7 +1309,7 @@ class Point { y: number = 0 // 在字面量初始化之前,使用constructor()创建一个有效对象。 - // 由于Point没有其它构造函数,编译器将自动添加一个默认构造函数。 + // 由于没有为Point定义构造函数,编译器将自动添加一个默认构造函数。 } function id_x_y(o: Point): Point { @@ -1392,32 +1396,6 @@ let a2: C[] = [{n: 1, s: "1"}, {n: 2, s : "2"}] // a2的类型为“C[]” * 对象字面量必须对应某些显式声明的类或接口 * 对象字面量不能用于类型声明 -### 显式标注Lambda函数的参数类型 - -**规则:**`arkts-explicit-param-types-in-lambdas` - -**级别:错误** - -当前ArkTS要求显式标注lambda函数的参数的类型。 - -**TypeScript** - -```typescript -// 只有在开启noImplicitAny选项时会产生编译时错误 -let f = (s /* type any is assumed */) => { - console.log(s) -} -``` - -**ArkTS** - -```typescript -// 显式标注Lambda函数的参数类型 -let f = (s: string) => { - console.log(s) -} -``` - ### 使用箭头函数而非函数表达式 **规则:**`arkts-no-func-expressions` @@ -1814,9 +1792,9 @@ let f = "string" + true // "stringtrue" let g = (new Object()) + "string" // "[object Object]string" -let i = true + true // JS: 2, TS: 编译时错误 -let j = true + 2 // JS: 3, TS: 编译时错误 -let k = E.E1 + true // JS: 1, TS: 编译时错误 +let i = true + true // 编译时错误 +let j = true + 2 // 编译时错误 +let k = E.E1 + true // 编译时错误 ``` **ArkTS** @@ -1835,7 +1813,7 @@ let f = "string" + true // "stringtrue" let g = (new Object()).toString() + "string" let i = true + true // 编译时错误 -let j = true + 2 // 编译时错误 +let j = true + 2 // 编译时错误 let k = E.E1 + true // 编译时错误 ``` @@ -2142,7 +2120,7 @@ ArkTS不支持`Symbol`API、`Symbol.iterator`和最终可迭代的接口。请 **级别:错误** -ArkTS支持通过`for .. of`迭代数组和字符串,但不支持迭代对象。 +ArkTS支持通过`for .. of`迭代数组、字符串和`TypedArray`(例如`Int32Array`),但不支持迭代对象。 **TypeScript** @@ -2232,7 +2210,7 @@ console.log("Area: ", Math.PI * r * r) **级别:错误** -在ArkTS中,`case`语句仅支持编译期值。若值无法在编译期确定,请使用`if`语句。 +在ArkTS中,`case`语句仅支持编译期值,支持`const`常量和`class`的`static readonly`属性。若值无法在编译期确定,请使用`if`语句。 **TypeScript** @@ -2689,7 +2667,7 @@ function main(): void { **级别:错误** -展开运算符唯一支持的场景是函数剩余参数为数组类型。 +展开运算符唯一支持的场景是函数剩余参数为数组类型,包括`TypedArray`(例如`Int32Array`)。 **TypeScript** @@ -3273,7 +3251,7 @@ import "path/to/module" **ArkTS** ```typescript -import * from "path/to/module" +import * as ns from "path/to/module" ``` ### 不支持`import default as ...` @@ -3326,7 +3304,7 @@ import * as m from "mod" **级别:错误** -ArkTS支持大多数场景下的重导出,比如命名导出和重命名导出,重导出import的。不支持`export * as ...`。 +ArkTS支持大多数场景下的重导出,例如命名重导出和重命名重导出。不支持`export * as ...`。 **TypeScript** @@ -3512,7 +3490,7 @@ declare namespace N { function foo(x: number): number } -import * from "module" +import * as m from "module" console.log("N.foo called: ", N.foo(42)) ``` @@ -3622,32 +3600,6 @@ let ce = new CustomError() * 不支持在原型上赋值 -### 不支持动态导入 - -**规则:**`arkts-no-runtime-import` - -**级别:错误** - -由于在ArkTS中,导入是编译时而非运行时特性,因此,ArkTS不支持动态导入,如`await import...`。改用静态`import`语法。 - -**TypeScript** - -```typescript -const zipUtil = await import("utils/create-zip-file") -``` - -**ArkTS** - -```typescript -import { zipUtil } from "utils/create-zip-file" -``` - -**相关约束** - -* 不支持在模块名中使用通配符 -* 不支持通用模块定义(UMD) -* 不支持导入断言 - ### 不支持确定赋值断言 **规则:**`arkts-no-definite-assignment` @@ -3796,7 +3748,7 @@ M.abc = 200 **级别:错误** -当前ArkTS不支持从TypeScript扩展到标准库的utility类型(例如`Omit`、`Pick`等)。支持`Partial`和`Record`。 +ArkTS仅支持`Partial`和`Record`,不支持TypeScript中其他的`Utility Types`。 对于*Record*类型,表达式*rec[index]*的类型是*V | undefined*。 对于`Record`类型,键-值中的值的类型必须是可选类型或者包含`undefined`的联合类型。 @@ -4079,9 +4031,7 @@ ArkTS不允许使用TypeScript或JavaScript标准库中的某些接口。大部 全局对象的属性和方法:`eval`、 `Infinity`、`NaN`、`isFinite`、`isNaN`、`parseFloat`、`parseInt`、 -`encodeURI`、`encodeURIComponent`、`Encode`、 -`decodeURI`、`decodeURIComponent`、`Decode`、 -`escape`、`unescape`、`ParseHexOctet` +`Encode`、`Decode`、`ParseHexOctet` `Object`:`__proto__`、`__defineGetter__`、`__defineSetter__`、 `__lookupGetter__`、`__lookupSetter__`、`assign`、`create`、 @@ -4267,3 +4217,52 @@ function classDecorator(x: number, y: number): void { class BugReport { } ``` + +### `class`不能被用作对象 + +**规则:**`arkts-no-classes-as-obj` + +**级别:错误** + +在ArkTS中,`class`声明的是一个新的类型,不是一个值。因此,不支持将`class`用作对象(例如将`class`赋值给一个对象)。 + +**TypeScript** + +```typescript +class C { + s: string = "" + n: number = 0 +} + +let c = C +``` + +### 不支持在`import`语句前使用其他语句 + +**规则:**`arkts-no-misplaced-imports` + +**级别:错误** + +在ArkTS中,除动态`import`语句外,所有`import`语句需要放在所有其他语句之前。 + +**TypeScript** + +```typescript +class C { + s: string = "" + n: number = 0 +} + +import foo from "module1" +``` + +**ArkTS** + +```typescript +import foo from "module1" + +class C { + s: string = "" + n: number = 0 +} +``` diff --git a/zh-cn/application-dev/reference/apis/js-apis-arkui-drawableDescriptor.md b/zh-cn/application-dev/reference/apis/js-apis-arkui-drawableDescriptor.md index ed1e4495a6798ce533d8f1a9966ff3d8ae786a3c..9ab4f8912c9090f474adbd8ee0b8e3f3e65a7720 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-arkui-drawableDescriptor.md +++ b/zh-cn/application-dev/reference/apis/js-apis-arkui-drawableDescriptor.md @@ -17,7 +17,7 @@ import { DrawableDescriptor, LayeredDrawableDescriptor } from '@ohos.arkui.drawa ## DrawableDescriptor.constructor constructor() -创建DrawableDescriptor或LayeredDrawableDescriptor对象。对象构造需要使用全球化接口[getDrawableDescriptor](js-apis-resource-manager.md##getdrawabledescriptor)或[getDrawableDescriptorByName](js-apis-resource-manager.md##getdrawabledescriptorbyname)。 +创建DrawableDescriptor或LayeredDrawableDescriptor对象。对象构造需要使用全球化接口[getDrawableDescriptor](js-apis-resource-manager.md#getdrawabledescriptor)或[getDrawableDescriptorByName](js-apis-resource-manager.md#getdrawabledescriptorbyname)。 **系统接口:** 此接口为系统接口。 diff --git a/zh-cn/application-dev/reference/apis/js-apis-cooperate.md b/zh-cn/application-dev/reference/apis/js-apis-cooperate.md index 2bc41d10e707d58fad81d7c56f43e42ca70ac810..4066876203a6cd13668a951063a082711fdceffb 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-cooperate.md +++ b/zh-cn/application-dev/reference/apis/js-apis-cooperate.md @@ -108,8 +108,8 @@ start(sinkDeviceDescriptor: string, srcInputDeviceId: number, callback: AsyncCal | 错误码ID | 错误信息 | | -------- | ---------------------------------------- | -| 4400001 | 当调用键鼠穿越接口传入无效的设备描述符参数时,系统会产生此错误码。 | -| 4400002 | 当调用键鼠穿越接口时穿越状态异常,系统会产生此错误码。 | +| 4400001 | Incorrect descriptor for the target device. | +| 4400002 | Screen hop failed. | **示例**: @@ -158,8 +158,8 @@ start(sinkDeviceDescriptor: string, srcInputDeviceId: number): Promise\ | 错误码ID | 错误信息 | | -------- | ---------------------------------------- | -| 4400001 | 当调用键鼠穿越接口传入无效的设备描述符参数时,系统会产生此错误码。 | -| 4400002 | 当调用键鼠穿越接口时穿越状态异常,系统会产生此错误码。 | +| 4400001 | Incorrect descriptor for the target device. | +| 4400002 | Screen hop failed. | **示例**: diff --git a/zh-cn/application-dev/reference/apis/js-apis-uitest.md b/zh-cn/application-dev/reference/apis/js-apis-uitest.md index 83e02f23576b652c0f09226766acef321bdaafe2..64f8f48376eec85566706e143c267af6cfe3f127 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-uitest.md +++ b/zh-cn/application-dev/reference/apis/js-apis-uitest.md @@ -3840,6 +3840,15 @@ assertComponentExist(by: By): Promise\ | ------ | ------------------- | ---- | -------------------- | | by | [By](#bydeprecated) | 是 | 目标控件的属性要求。 | +**错误码:** + +以下错误码的详细介绍请参见[uitest测试框架错误码](../errorcodes/errorcode-uitest.md)。 + +| 错误码ID | 错误信息 | +| -------- | ------------------------------------------------ | +| 17000002 | if the async function was not called with await. | +| 17000003 | if the assertion failed. | + **示例:** ```js diff --git a/zh-cn/application-dev/reference/arkui-ts/Readme-CN.md b/zh-cn/application-dev/reference/arkui-ts/Readme-CN.md index 7483e00c88d4d0c6dc1f1a0652b71fea1b5aa70a..5c3d84a57f7637d25763872ba8850c69cb1a493a 100644 --- a/zh-cn/application-dev/reference/arkui-ts/Readme-CN.md +++ b/zh-cn/application-dev/reference/arkui-ts/Readme-CN.md @@ -40,7 +40,7 @@ - [分布式迁移标识](ts-universal-attributes-restoreId.md) - [前景色设置](ts-universal-attributes-foreground-color.md) - [组件内容模糊](ts-universal-attributes-foreground-blur-style.md) - - [点击回弹](ts-universal-attributes-click-effect.md) + - [点击回弹效果](ts-universal-attributes-click-effect.md) - [无障碍属性](ts-universal-attributes-accessibility.md) - 触摸交互控制 - [触摸热区设置](ts-universal-attributes-touch-target.md) @@ -117,6 +117,7 @@ - [Column](ts-container-column.md) - [ColumnSplit](ts-container-columnsplit.md) - [Counter](ts-container-counter.md) + - [EffectComponent](ts-container-effectcomponent.md) - [Flex](ts-container-flex.md) - [FlowItem](ts-container-flowitem.md) - [FormLink](ts-container-formlink.md) @@ -142,7 +143,6 @@ - [TabContent](ts-container-tabcontent.md) - [UIExtensionComponent](ts-container-ui-extension-component.md) - [WaterFlow](ts-container-waterflow.md) - - [EffectComponent](ts-container-effectcomponent.md) - 媒体组件 - [Video](ts-media-components-video.md) - 绘制组件 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-navdestination.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-navdestination.md index fd2ca1a9b280cbea25ead154b267da9ae8167e85..5f4904999aa1b210f774b06f1dad54ed25d690b8 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-navdestination.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-navdestination.md @@ -26,7 +26,7 @@ NavDestination() | 名称 | 参数类型 | 描述 | | ------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| title | string \| [CustomBuilder](ts-types.md#custombuilder8) \| [NavigationCommonTitle](ts-basic-components-navigation.md#navigationcommontitle类型说明) \| [NavigationCustomTitle](ts-basic-components-navigation.md##navigationcustomtitle类型说明) | 页面标题。
**说明:**
使用NavigationCustomTitle类型设置height高度时,titleMode属性不会生效。
字符串超长时,如果不设置副标题,先缩小再换行2行后以...截断。如果设置副标题,先缩小后以...截断。 | +| title | string \| [CustomBuilder](ts-types.md#custombuilder8) \| [NavigationCommonTitle](ts-basic-components-navigation.md#navigationcommontitle类型说明) \| [NavigationCustomTitle](ts-basic-components-navigation.md#navigationcustomtitle类型说明) | 页面标题。
**说明:**
使用NavigationCustomTitle类型设置height高度时,titleMode属性不会生效。
字符串超长时,如果不设置副标题,先缩小再换行2行后以...截断。如果设置副标题,先缩小后以...截断。 | | hideTitleBar | boolean | 是否显示标题栏。
默认值:false
true: 隐藏标题栏。
false: 显示标题栏。 | ## 事件 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-click-effect.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-click-effect.md index ee0065f626e3e91548618f2c602f5a479b191d10..31e254f8fa45296c20eb8f18b03caae211178e0e 100755 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-click-effect.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-click-effect.md @@ -7,20 +7,20 @@ > 从API Version 10开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 -### 属性 +## 属性 | 名称 | 参数类型 | 描述 | | ----------- | ------------------------------------------- | ------------------------------------------------------------ | | clickEffect | [ClickEffect](#clickeffect对象说明) \| null | 设置当前组件点击回弹效果。
**说明:**
可通过undefined或者null取消点击回弹效果。
不建议在组件大小动态变化的场景中使用该功能。
当组件无法触发通用事件时,不支持该属性。 | -### ClickEffect对象说明 +## ClickEffect对象说明 | 名称 | 参数类型 | 必填 | 描述 | | ----- | ----------------------------------------------------------- | ---- | ------------------------------------------------------------ | | level | [ClickEffectLevel](ts-appendix-enums.md#clickeffectlevel10) | 是 | 设置当前组件点击回弹效果。
**说明:**
level等于undefined或者null时, ClickEffect采用ClickEffectLevel.LIGHT对应的回弹效果, 缩放比参照scale说明。 | | scale | number | 否 | 回弹缩放比例,支持在设置ClickEffectLevel的基础上微调回弹缩放比例。
**说明:**
level等于ClickEffectLevel.LIGHT时,默认值:0.90
level等于ClickEffectLevel.MIDDLE或者ClickEffectLevel.HEAVY时,默认值:0.95
level等于undefined或者null时,level为ClickEffectLevel.LIGHT,默认值:0.90
scale等于undefined或者null时,scale与当前设置的level对应的默认缩放比相同。
| -### 示例 +## 示例 ```ts // xxx.ets diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-drag-drop.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-drag-drop.md index b6fdbb6102b2f24ea840502baeaaf2c6bb22d471..92b52a7f8b6867d173c717b63bd5a31b70041f6c 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-drag-drop.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-drag-drop.md @@ -6,7 +6,7 @@ > > 从API Version 10开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 -ArkUI组件默认支持拖拽。 +ArkUI组件默认不支持拖拽。 当以下组件的draggable属性设置为true时可以响应拖拽事件,此时,组件不需要配置数据传输,即可进行拖拽。其他组件需要开发者将draggable属性设置为true且在onDragStart等接口中实现数据传输相关内容,才能完成拖拽。 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-events-drag-drop.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-events-drag-drop.md index a9309ac3e26c482aecda550352b57fde64676a1b..053a6e4a90e9f480cfcb9ee24f4b9676ba6a18d1 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-events-drag-drop.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-events-drag-drop.md @@ -8,7 +8,7 @@ > > 应用本身预置的资源文件(即应用在安装前的HAP包中已经存在的资源文件)仅支持本地应用内拖拽。 -ArkUI组件默认支持拖拽。 +ArkUI组件默认不支持拖拽。 当以下组件的[draggable](ts-universal-attributes-drag-drop.md)属性设置为true时可以响应拖拽事件,此时,组件不需要配置数据传输,即可进行拖拽。其他组件需要开发者将[draggable](ts-universal-attributes-drag-drop.md)属性设置为true且在onDragStart等接口中实现数据传输相关内容,才能完成拖拽。 diff --git a/zh-cn/application-dev/reference/errorcodes/Readme-CN.md b/zh-cn/application-dev/reference/errorcodes/Readme-CN.md index 5b4332201142200ab3d3de57c0300979ee061418..a1f4847bd3210c5ff1e5bb57cc3a064288251619 100644 --- a/zh-cn/application-dev/reference/errorcodes/Readme-CN.md +++ b/zh-cn/application-dev/reference/errorcodes/Readme-CN.md @@ -14,12 +14,12 @@ - [事件错误码](errorcode-CommonEventService.md) - [通知错误码](errorcode-notification.md) - [DistributedNotificationService错误码](errorcode-DistributedNotificationService.md) - - [拖拽事件错误码](errorcode-drag-event.md) - UI界面 - [动画错误码](errorcode-animator.md) - [弹窗错误码](errorcode-promptAction.md) - [页面路由错误码](errorcode-router.md) - [用户界面外观服务错误码](errorcode-uiappearance.md) + - [拖拽事件错误码](errorcode-drag-event.md) - 图形图像 - [色彩管理错误码](errorcode-colorspace-manager.md) - [屏幕错误码](errorcode-display.md)