{"Global":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.globleMethods)","eval":{"name":"### eval(x)","description":"eval() 函数会将传入的字符串当做 JavaScript 代码进行执行。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| x | string | 是 | - | - | 一个表示 JavaScript 表达式、语句或一系列语句的字符串。表达式可以包含变量与已存在对象的属性。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| any | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n","itemType":"method","tutorial":"\n**参见** \n\n [相关 Bug](https://issues.dcloud.net.cn/?mid=uts.globleMethods.eval)"},"parseInt":{"name":"### parseInt(string, radix?)","description":"parseInt(string, radix) 解析一个字符串并返回指定基数的十进制整数,radix 是 2-36 之间的整数,表示被解析字符串的基数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| string | string | 是 | - | - | 要被解析的值。字符串开头的空白符将会被忽略。(注意:只接收字符串类型的参数,其他类型将编译报错。) |\n| radix | number | 否 | - | - | 从 2 到 36 的整数,表示进制的基数。例如指定 16 表示被解析值是十六进制数。如果超出这个范围,将返回 NaN。假如指定 0 或未指定,基数将会根据字符串的值进行推算。注意,推算的结果不会永远是默认值 10! | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 从给定的字符串中解析出的一个整数,或者 NaN。当radix 小于 2 或大于 36,或第一个非空格字符不能转换为数字时返回 NAN。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | 3.9 | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","tutorial":"\n**参见** \n\n [相关 Bug](https://issues.dcloud.net.cn/?mid=uts.globleMethods.parseInt)","test":"```uts\n console.log(parseInt(\"123.456\")) // 123;\n console.log(parseInt(\"123\")) // 123;\n console.log(parseInt(\"123\", 10)) // 123;\n console.log(parseInt(\" 123\", 10)) // 123;\n console.log(parseInt(\"077\")) // 77;\n console.log(parseInt(\"1.9\")) // 1;\n console.log(parseInt(\"ff\", 16)) // 255;\n console.log(parseInt(\"0xFF\", 0)) // 255;\n console.log(parseInt(\"0xFF\", 16)) // 255;\n console.log(parseInt(\"0xFF\")) // 255;\n console.log(parseInt(\"0xFF\", 10)) // 0;\n console.log(parseInt(\"0xF\", 16)) // 15;\n console.log(parseInt(\"F\", 16)) // 15;\n console.log(parseInt(\"021\", 8)) // 17;\n console.log(parseInt(\"015\", 10)) // 15;\n console.log(parseInt(\"15,123\", 10)) // 15;\n console.log(parseInt(\"FXX123.99\", 16)) // 15;\n console.log(parseInt(\"1111\", 2)) // 15;\n console.log(parseInt(\"15 * 3\", 10)) // 15;\n console.log(parseInt(\"15e2\", 10)) // 15;\n console.log(parseInt(\"15px\", 10)) // 15;\n console.log(parseInt(\"12\", 13)) // 15;\n console.log(parseInt(\"17\", 8)) // 15;\n console.log(isNaN(parseInt(\"a\"))) // true\n console.log(parseInt(\"a\", 16)) // 10\n console.log(isNaN(parseInt(\"345\", 2))) // true\n console.log(isNaN(parseInt(\"hello\"))) // true\n console.log(parseInt(\"6.022e23\")) // 6\n console.log(parseInt(\"9223372036854775807\")) // 9.223372036854778e+18\n console.log(parseInt(\"9223372036854775807000\")) // 9.223372036854777e+21\n console.log(parseInt(\"922337203685477580700099999999999999999999999999999999999999999999999999999999999999999\")) // 9.223372036854776e+86\n console.log(parseInt(\"50\") / 100) // 0.5;\n console.log(parseInt(\"500\") / 100) // 5;\n console.log(parseInt(\"3.0\")) // 3;\n console.log(parseInt(\"3.02\")) // 3;\n```"},"parseFloat":{"name":"### parseFloat(string)","description":"parseFloat() 函数解析一个参数(直接收字符串类型的参数,其他类型编译报错)并返回一个浮点数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| string | string | 是 | - | - | 需要被解析成为浮点数的值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 给定值被解析成浮点数。如果给定值不能被转换成数值,则会返回 NaN。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | 3.9 | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","tutorial":"\n**参见** \n\n [相关 Bug](https://issues.dcloud.net.cn/?mid=uts.globleMethods.parseFloat)","test":"```uts\n console.log(parseFloat(\"11.20\")) // 11.2;\n console.log(parseFloat(\"3.14\")) // 3.14;\n console.log(parseFloat(\" 3.14 \")) // 3.14;\n console.log(parseFloat(\"314e-2\")) // 3.14;\n console.log(parseFloat(\"0.0314E+2\")) // 3.14;\n console.log(parseFloat(\"3.14some non-digit characters\")) // 3.14;\n console.log(parseFloat(\"100\") / 50) // 2;\n console.log(parseFloat(\"105\") / 50) // 2.1;\n \n console.log(parseFloat(\"3.0\")) // 3;\n console.log(parseFloat(\"3.02\").toString()) // \"3.02\";\n```"},"isNaN":{"name":"### isNaN(number)","description":"isNaN() 函数用来确定一个值是否为NaN 。注:isNaN函数内包含一些非常有趣的规则;你也可以使用 ECMAScript 2015 中定义的 Number.isNaN() 来判断。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| number | number | 是 | - | - | 要被检测的值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 如果给定值为 NaN则返回值为true;否则为false。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | 3.9 | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","tutorial":"\n**参见** \n\n [相关 Bug](https://issues.dcloud.net.cn/?mid=uts.globleMethods.isNaN)","test":"```uts\n console.log(parseInt(\"123.456\")) // 123;\n console.log(parseInt(\"123\")) // 123;\n console.log(parseInt(\"123\", 10)) // 123;\n console.log(parseInt(\" 123\", 10)) // 123;\n console.log(parseInt(\"077\")) // 77;\n console.log(parseInt(\"1.9\")) // 1;\n console.log(parseInt(\"ff\", 16)) // 255;\n console.log(parseInt(\"0xFF\", 0)) // 255;\n console.log(parseInt(\"0xFF\", 16)) // 255;\n console.log(parseInt(\"0xFF\")) // 255;\n console.log(parseInt(\"0xFF\", 10)) // 0;\n console.log(parseInt(\"0xF\", 16)) // 15;\n console.log(parseInt(\"F\", 16)) // 15;\n console.log(parseInt(\"021\", 8)) // 17;\n console.log(parseInt(\"015\", 10)) // 15;\n console.log(parseInt(\"15,123\", 10)) // 15;\n console.log(parseInt(\"FXX123.99\", 16)) // 15;\n console.log(parseInt(\"1111\", 2)) // 15;\n console.log(parseInt(\"15 * 3\", 10)) // 15;\n console.log(parseInt(\"15e2\", 10)) // 15;\n console.log(parseInt(\"15px\", 10)) // 15;\n console.log(parseInt(\"12\", 13)) // 15;\n console.log(parseInt(\"17\", 8)) // 15;\n console.log(isNaN(parseInt(\"a\"))) // true\n console.log(parseInt(\"a\", 16)) // 10\n console.log(isNaN(parseInt(\"345\", 2))) // true\n console.log(isNaN(parseInt(\"hello\"))) // true\n console.log(parseInt(\"6.022e23\")) // 6\n console.log(parseInt(\"9223372036854775807\")) // 9.223372036854778e+18\n console.log(parseInt(\"9223372036854775807000\")) // 9.223372036854777e+21\n console.log(parseInt(\"922337203685477580700099999999999999999999999999999999999999999999999999999999999999999\")) // 9.223372036854776e+86\n console.log(parseInt(\"50\") / 100) // 0.5;\n console.log(parseInt(\"500\") / 100) // 5;\n console.log(parseInt(\"3.0\")) // 3;\n console.log(parseInt(\"3.02\")) // 3;\n```"},"isFinite":{"name":"### isFinite(number)","description":"isFinite() 函数用来判断被传入的参数值是否为一个有限数值(finite number)。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| number | number | 是 | - | - | 要被检测的值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 如果参数是 NaN,正无穷大或者负无穷大,会返回false,其他返回 true。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | 3.9 | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","tutorial":"\n**参见** \n\n [相关 Bug](https://issues.dcloud.net.cn/?mid=uts.globleMethods.isFinite)"},"decodeURI":{"name":"### decodeURI(encodedURI)","description":"decodeURI() 函数能解码由encodeURI 创建或其他流程得到的统一资源标识符(URI)。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| encodedURI | string | 是 | - | - | 一个完整的编码过的 URI | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string\\|null | 返回一个给定编码统一资源标识符 (URI) 的未编码版本的新字符串, 当 encodedURI 包含无效字符序列时,会返回null | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.91 | 4.11 | x | 3.91 | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.91 | 3.91 | - | - | - | - |","itemType":"method","tutorial":"\n**参见** \n\n [相关 Bug](https://issues.dcloud.net.cn/?mid=uts.globleMethods.decodeURI)","test":"```uts\n console.log(decodeURI('%E4%BD%A0%E5%A5%BD')) // '你好'\n console.log(decodeURI(\"%E4%BD%A0%E5%A5%BD+22\")) // '你好+22'\n console.log(decodeURI(\"%E4%BD%A0;/=%E5%A5%BD+22\")) // '你;/=好+22'\n console.log(decodeURI(\"https://demo.dcloud.net.cn/mock/%E6%9C%80%E6%96%B0/12\")) // 'https://demo.dcloud.net.cn/mock/最新/12'\n```"},"decodeURIComponent":{"name":"### decodeURIComponent(encodedURIComponent)","description":"decodeURIComponent() 方法用于解码由 encodeURIComponent 方法或者其他类似方法编码的部分统一资源标识符(URI)。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| encodedURIComponent | string | 是 | - | - | 编码后的部分 URI | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string\\|null | 一个解码后的统一资源标识符(URI)字符串,处理前的 URI 经过了给定格式的编码。当 encodedURI 包含无效字符序列时,会返回null. | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.91 | 4.11 | x | 3.91 | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.91 | 3.91 | - | - | - | - |","itemType":"method","tutorial":"\n**参见** \n\n [相关 Bug](https://issues.dcloud.net.cn/?mid=uts.globleMethods.decodeURIComponent)","test":"```uts\n console.log(decodeURIComponent('%E4%BD%A0%E5%A5%BD')) // '你好'\n console.log(decodeURIComponent('%E4%BD%A0%E5%A5%BD%2B22')) // '你好+22'\n console.log(decodeURIComponent('%E4%BD%A0%3B%2F%3D%E5%A5%BD%2B22')) // '你;/=好+22'\n console.log(decodeURIComponent(\"https://demo.dcloud.net.cn/mock/%E6%9C%80%E6%96%B0/12\")) // 'https://demo.dcloud.net.cn/mock/最新/12'\n```"},"encodeURI":{"name":"### encodeURI(uri)","description":"encodeURI() 函数通过将特定字符的每个实例替换为一个、两个、三或四转义序列来对统一资源标识符 (URI) 进行编码 (该字符的 UTF-8 编码仅为四转义序列) 由两个 \"代理\" 字符组成)。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| uri | string | 是 | - | - | 一个完整的 URI。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string\\|null | 一个新字符串,表示提供的字符串编码为统一资源标识符 (URI)。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.91 | 4.11 | x | 3.91 | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.91 | 3.91 | - | - | - | - |","itemType":"method","tutorial":"\n**参见** \n\n [相关 Bug](https://issues.dcloud.net.cn/?mid=uts.globleMethods.encodeURI)","test":"```uts\n console.log(encodeURI(\"你好\")) // '%E4%BD%A0%E5%A5%BD'\n console.log(encodeURI(\"你好+22\")) // '%E4%BD%A0%E5%A5%BD+22'\n console.log(encodeURI(\"你;/=好+22\")) // '%E4%BD%A0;/=%E5%A5%BD+22'\n console.log(encodeURI(\"https://demo.dcloud.net.cn/mock/最新/12\")) // 'https://demo.dcloud.net.cn/mock/%E6%9C%80%E6%96%B0/12'\n```"},"encodeURIComponent":{"name":"### encodeURIComponent(uriComponent)","description":"encodeURIComponent() 函数通过将特定字符的每个实例替换成代表字符的 UTF-8 编码的一个、两个、三个或四个转义序列来编码 URI(只有由两个“代理”字符组成的字符会被编码为四个转义序列)。与 encodeURI() 相比,此函数会编码更多的字符,包括 URI 语法的一部分。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| uriComponent | string | 是 | - | - | 要被检测的 string 值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string\\|null | 原字串作为 URI 组成部分被被编码后的新字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.91 | 4.11 | x | 3.91 | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.91 | 3.91 | - | - | - | - |","itemType":"method","tutorial":"\n**参见** \n\n [相关 Bug](https://issues.dcloud.net.cn/?mid=uts.globleMethods.encodeURIComponent)","test":"```uts\n console.log(encodeURIComponent(\"你好\")) // '%E4%BD%A0%E5%A5%BD'\n console.log(encodeURIComponent(\"你好+22\")) // '%E4%BD%A0%E5%A5%BD%2B22'\n console.log(encodeURIComponent(\"你;/=好+22\")) // '%E4%BD%A0%3B%2F%3D%E5%A5%BD%2B22'\n console.log(encodeURIComponent(\"https://demo.dcloud.net.cn/mock/最新/12\")) // 'https%3A%2F%2Fdemo.dcloud.net.cn%2Fmock%2F%E6%9C%80%E6%96%B0%2F12'\n```"},"atob":{"name":"### atob(encodedData)","description":"atob() 函数会对经过 Base64 编码的字符串进行解码","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| encodedData | string | 是 | - | - | 一个包含 base64 编码数据的二进制字符串(即字符串中的每个字符都被视为一字节的二进制数据)。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 从 encodedData 解码出来的 ASCII 字符串 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | 4.25 | - | - | - | - |","itemType":"method","tutorial":"\n**参见** \n\n [相关 Bug](https://issues.dcloud.net.cn/?mid=uts.globleMethods.atob)","test":"```uts\n // #ifdef APP-ANDROID\n console.log(atob(\"\")) // '';\n console.log(atob('aGVsbG8gd29ybGQ=')) // 'hello world';\n console.log(atob(\"QC0xMjM0NTY3ODkwcXdlcnR5dWlvcGFzZGZnaGprbHp4Y3Zibm0tUVdFUlRZVUlPUEFTREZHSEpLTFpYQ1ZCTk1ALTEyMzQ1Njc4OTBxd2VydHl1aW9wYXNkZmdoamtsenhjdmJubS1RV0VSVFlVSU9QQVNERkdISktMWlhDVkJOTUAtMTIzNDU2Nzg5MHF3ZXJ0eXVpb3Bhc2RmZ2hqa2x6eGN2Ym5tLVFXRVJUWVVJT1BBU0RGR0hKS0xaWENWQk5NQC0xMjM0NTY3ODkwcXdlcnR5dWlvcGFzZGZnaGprbHp4Y3Zibm0tUVdFUlRZVUlPUEFTREZHSEpLTFpYQ1ZCTk1ALTEyMzQ1Njc4OTBxd2VydHl1aW9wYXNkZmdoamtsenhjdmJubS1RV0VSVFlVSU9QQVNERkdISktMWlhDVkJOTQ==\")) // '@-1234567890qwertyuiopasdfghjklzxcvbnm-QWERTYUIOPASDFGHJKLZXCVBNM@-1234567890qwertyuiopasdfghjklzxcvbnm-QWERTYUIOPASDFGHJKLZXCVBNM@-1234567890qwertyuiopasdfghjklzxcvbnm-QWERTYUIOPASDFGHJKLZXCVBNM@-1234567890qwertyuiopasdfghjklzxcvbnm-QWERTYUIOPASDFGHJKLZXCVBNM@-1234567890qwertyuiopasdfghjklzxcvbnm-QWERTYUIOPASDFGHJKLZXCVBNM';\n // #endif\n```"},"btoa":{"name":"### btoa(stringToEncode)","description":"btoa() 方法可以将一个二进制字符串(例如,将字符串中的每一个字节都视为一个二进制数据字节)编码为 Base64 编码的 ASCII 字符串","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| stringToEncode | string | 是 | - | - | 一个需要编码的二进制字符串 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 一个包含 stringToEncode 的 Base64 表示的 ASCII 字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | 4.25 | - | - | - | - |","itemType":"method","tutorial":"\n**参见** \n\n [相关 Bug](https://issues.dcloud.net.cn/?mid=uts.globleMethods.btoa)","test":"```uts\n // #ifdef APP-ANDROID\n console.log(btoa(\"\")) // '';\n console.log(btoa(\"hello world\")) // 'aGVsbG8gd29ybGQ=';\n console.log(btoa(\"@-1234567890qwertyuiopasdfghjklzxcvbnm-QWERTYUIOPASDFGHJKLZXCVBNM@-1234567890qwertyuiopasdfghjklzxcvbnm-QWERTYUIOPASDFGHJKLZXCVBNM@-1234567890qwertyuiopasdfghjklzxcvbnm-QWERTYUIOPASDFGHJKLZXCVBNM@-1234567890qwertyuiopasdfghjklzxcvbnm-QWERTYUIOPASDFGHJKLZXCVBNM@-1234567890qwertyuiopasdfghjklzxcvbnm-QWERTYUIOPASDFGHJKLZXCVBNM\")) // 'QC0xMjM0NTY3ODkwcXdlcnR5dWlvcGFzZGZnaGprbHp4Y3Zibm0tUVdFUlRZVUlPUEFTREZHSEpLTFpYQ1ZCTk1ALTEyMzQ1Njc4OTBxd2VydHl1aW9wYXNkZmdoamtsenhjdmJubS1RV0VSVFlVSU9QQVNERkdISktMWlhDVkJOTUAtMTIzNDU2Nzg5MHF3ZXJ0eXVpb3Bhc2RmZ2hqa2x6eGN2Ym5tLVFXRVJUWVVJT1BBU0RGR0hKS0xaWENWQk5NQC0xMjM0NTY3ODkwcXdlcnR5dWlvcGFzZGZnaGprbHp4Y3Zibm0tUVdFUlRZVUlPUEFTREZHSEpLTFpYQ1ZCTk1ALTEyMzQ1Njc4OTBxd2VydHl1aW9wYXNkZmdoamtsenhjdmJubS1RV0VSVFlVSU9QQVNERkdISktMWlhDVkJOTQ==';\n // #endif\n```"},"requestAnimationFrame":{"name":"### requestAnimationFrame(callback)","description":"在下一次重绘之前,调用用户提供的回调函数","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callback | (task: number) => void | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | x | - | - | - | - |","itemType":"method","tutorial":"\n**参见** \n\n [相关 Bug](https://issues.dcloud.net.cn/?mid=uts.globleMethods.requestAnimationFrame)"},"cancelAnimationFrame":{"name":"### cancelAnimationFrame(taskId)","description":"取消一个先前通过调用 requestAnimationFrame() 方法添加到计划中的动画帧请求","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| taskId | number | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | x | - | - | - | - |","itemType":"method","tutorial":"\n**参见** \n\n [相关 Bug](https://issues.dcloud.net.cn/?mid=uts.globleMethods.cancelAnimationFrame)"},"setInterval":{"name":"### setInterval(handler, timeout?, ...arguments)","description":"setInterval() 方法重复调用一个函数或执行一个代码片段,在每次调用之间具有固定的时间间隔。<br/>它返回一个 interval ID,该 ID 唯一地标识时间间隔,因此你可以稍后通过调用 clearInterval() 来移除定时器。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| handler | string \\| Function | 是 | - | - | - |\n| timeout | number | 否 | - | - | - |\n| arguments | any[\\] | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | 3.9 | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","tutorial":"\n**参见** \n\n [相关 Bug](https://issues.dcloud.net.cn/?mid=uts.globleMethods.setInterval)","test":"```uts\n // #ifdef APP-ANDROID\n let aCount = 0\n let taskId = setInterval(function () {\n aCount += 1\n }, 0)\n setTimeout(function () {\n console.log(aCount)\n console.log(taskId)\n clearInterval(taskId)\n console.log(aCount > 10) // true;\n }, 200)\n // #endif\n```"},"setTimeout":{"name":"### setTimeout(handler, timeout?, ...arguments)","description":"全局的 setTimeout() 方法设置一个定时器,一旦定时器到期,就会执行一个函数或指定的代码片段。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| handler | string \\| Function | 是 | - | - | - |\n| timeout | number | 否 | - | - | - |\n| arguments | any[\\] | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | 3.9 | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","tutorial":"\n**参见** \n\n [相关 Bug](https://issues.dcloud.net.cn/?mid=uts.globleMethods.setTimeout)"},"clearInterval":{"name":"### clearInterval(id)","description":"clearInterval() 方法可取消先前通过 setInterval() 设置的重复定时任务。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| id | number \\| undefined | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | 3.9 | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","tutorial":"\n**参见** \n\n [相关 Bug](https://issues.dcloud.net.cn/?mid=uts.globleMethods.clearInterval)"},"clearTimeout":{"name":"### clearTimeout(id)","description":"clearTimeout() 方法取消了先前通过调用setTimeout()建立的定时器","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| id | number \\| undefined | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | 3.9 | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","tutorial":"\n**参见** \n\n [相关 Bug](https://issues.dcloud.net.cn/?mid=uts.globleMethods.clearTimeout)"}},"Timers":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.timerMethods)","eval":{"name":"### eval(x)","description":"eval() 函数会将传入的字符串当做 JavaScript 代码进行执行。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| x | string | 是 | - | - | 一个表示 JavaScript 表达式、语句或一系列语句的字符串。表达式可以包含变量与已存在对象的属性。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| any | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n","itemType":"method","tutorial":"\n**参见** \n\n [相关 Bug](https://issues.dcloud.net.cn/?mid=uts.timerMethods.eval)"},"parseInt":{"name":"### parseInt(string, radix?)","description":"parseInt(string, radix) 解析一个字符串并返回指定基数的十进制整数,radix 是 2-36 之间的整数,表示被解析字符串的基数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| string | string | 是 | - | - | 要被解析的值。字符串开头的空白符将会被忽略。(注意:只接收字符串类型的参数,其他类型将编译报错。) |\n| radix | number | 否 | - | - | 从 2 到 36 的整数,表示进制的基数。例如指定 16 表示被解析值是十六进制数。如果超出这个范围,将返回 NaN。假如指定 0 或未指定,基数将会根据字符串的值进行推算。注意,推算的结果不会永远是默认值 10! | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 从给定的字符串中解析出的一个整数,或者 NaN。当radix 小于 2 或大于 36,或第一个非空格字符不能转换为数字时返回 NAN。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | 3.9 | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","tutorial":"\n**参见** \n\n [相关 Bug](https://issues.dcloud.net.cn/?mid=uts.timerMethods.parseInt)"},"parseFloat":{"name":"### parseFloat(string)","description":"parseFloat() 函数解析一个参数(直接收字符串类型的参数,其他类型编译报错)并返回一个浮点数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| string | string | 是 | - | - | 需要被解析成为浮点数的值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 给定值被解析成浮点数。如果给定值不能被转换成数值,则会返回 NaN。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | 3.9 | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","tutorial":"\n**参见** \n\n [相关 Bug](https://issues.dcloud.net.cn/?mid=uts.timerMethods.parseFloat)"},"isNaN":{"name":"### isNaN(number)","description":"isNaN() 函数用来确定一个值是否为NaN 。注:isNaN函数内包含一些非常有趣的规则;你也可以使用 ECMAScript 2015 中定义的 Number.isNaN() 来判断。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| number | number | 是 | - | - | 要被检测的值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 如果给定值为 NaN则返回值为true;否则为false。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | 3.9 | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","tutorial":"\n**参见** \n\n [相关 Bug](https://issues.dcloud.net.cn/?mid=uts.timerMethods.isNaN)"},"isFinite":{"name":"### isFinite(number)","description":"isFinite() 函数用来判断被传入的参数值是否为一个有限数值(finite number)。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| number | number | 是 | - | - | 要被检测的值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 如果参数是 NaN,正无穷大或者负无穷大,会返回false,其他返回 true。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | 3.9 | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","tutorial":"\n**参见** \n\n [相关 Bug](https://issues.dcloud.net.cn/?mid=uts.timerMethods.isFinite)"},"decodeURI":{"name":"### decodeURI(encodedURI)","description":"decodeURI() 函数能解码由encodeURI 创建或其他流程得到的统一资源标识符(URI)。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| encodedURI | string | 是 | - | - | 一个完整的编码过的 URI | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string\\|null | 返回一个给定编码统一资源标识符 (URI) 的未编码版本的新字符串, 当 encodedURI 包含无效字符序列时,会返回null | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.91 | 4.11 | x | 3.91 | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.91 | 3.91 | - | - | - | - |","itemType":"method","tutorial":"\n**参见** \n\n [相关 Bug](https://issues.dcloud.net.cn/?mid=uts.timerMethods.decodeURI)"},"decodeURIComponent":{"name":"### decodeURIComponent(encodedURIComponent)","description":"decodeURIComponent() 方法用于解码由 encodeURIComponent 方法或者其他类似方法编码的部分统一资源标识符(URI)。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| encodedURIComponent | string | 是 | - | - | 编码后的部分 URI | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string\\|null | 一个解码后的统一资源标识符(URI)字符串,处理前的 URI 经过了给定格式的编码。当 encodedURI 包含无效字符序列时,会返回null. | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.91 | 4.11 | x | 3.91 | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.91 | 3.91 | - | - | - | - |","itemType":"method","tutorial":"\n**参见** \n\n [相关 Bug](https://issues.dcloud.net.cn/?mid=uts.timerMethods.decodeURIComponent)"},"encodeURI":{"name":"### encodeURI(uri)","description":"encodeURI() 函数通过将特定字符的每个实例替换为一个、两个、三或四转义序列来对统一资源标识符 (URI) 进行编码 (该字符的 UTF-8 编码仅为四转义序列) 由两个 \"代理\" 字符组成)。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| uri | string | 是 | - | - | 一个完整的 URI。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string\\|null | 一个新字符串,表示提供的字符串编码为统一资源标识符 (URI)。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.91 | 4.11 | x | 3.91 | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.91 | 3.91 | - | - | - | - |","itemType":"method","tutorial":"\n**参见** \n\n [相关 Bug](https://issues.dcloud.net.cn/?mid=uts.timerMethods.encodeURI)"},"encodeURIComponent":{"name":"### encodeURIComponent(uriComponent)","description":"encodeURIComponent() 函数通过将特定字符的每个实例替换成代表字符的 UTF-8 编码的一个、两个、三个或四个转义序列来编码 URI(只有由两个“代理”字符组成的字符会被编码为四个转义序列)。与 encodeURI() 相比,此函数会编码更多的字符,包括 URI 语法的一部分。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| uriComponent | string | 是 | - | - | 要被检测的 string 值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string\\|null | 原字串作为 URI 组成部分被被编码后的新字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.91 | 4.11 | x | 3.91 | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.91 | 3.91 | - | - | - | - |","itemType":"method","tutorial":"\n**参见** \n\n [相关 Bug](https://issues.dcloud.net.cn/?mid=uts.timerMethods.encodeURIComponent)"},"atob":{"name":"### atob(encodedData)","description":"atob() 函数会对经过 Base64 编码的字符串进行解码","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| encodedData | string | 是 | - | - | 一个包含 base64 编码数据的二进制字符串(即字符串中的每个字符都被视为一字节的二进制数据)。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 从 encodedData 解码出来的 ASCII 字符串 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | 4.25 | - | - | - | - |","itemType":"method","tutorial":"\n**参见** \n\n [相关 Bug](https://issues.dcloud.net.cn/?mid=uts.timerMethods.atob)"},"btoa":{"name":"### btoa(stringToEncode)","description":"btoa() 方法可以将一个二进制字符串(例如,将字符串中的每一个字节都视为一个二进制数据字节)编码为 Base64 编码的 ASCII 字符串","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| stringToEncode | string | 是 | - | - | 一个需要编码的二进制字符串 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 一个包含 stringToEncode 的 Base64 表示的 ASCII 字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | 4.25 | - | - | - | - |","itemType":"method","tutorial":"\n**参见** \n\n [相关 Bug](https://issues.dcloud.net.cn/?mid=uts.timerMethods.btoa)"},"requestAnimationFrame":{"name":"### requestAnimationFrame(callback)","description":"在下一次重绘之前,调用用户提供的回调函数","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callback | (task: number) => void | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | x | - | - | - | - |","itemType":"method","tutorial":"\n**参见** \n\n [相关 Bug](https://issues.dcloud.net.cn/?mid=uts.timerMethods.requestAnimationFrame)"},"cancelAnimationFrame":{"name":"### cancelAnimationFrame(taskId)","description":"取消一个先前通过调用 requestAnimationFrame() 方法添加到计划中的动画帧请求","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| taskId | number | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | x | - | - | - | - |","itemType":"method","tutorial":"\n**参见** \n\n [相关 Bug](https://issues.dcloud.net.cn/?mid=uts.timerMethods.cancelAnimationFrame)"},"setInterval":{"name":"### setInterval(handler, timeout?, ...arguments)","description":"setInterval() 方法重复调用一个函数或执行一个代码片段,在每次调用之间具有固定的时间间隔。<br/>它返回一个 interval ID,该 ID 唯一地标识时间间隔,因此你可以稍后通过调用 clearInterval() 来移除定时器。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| handler | string \\| Function | 是 | - | - | - |\n| timeout | number | 否 | - | - | - |\n| arguments | any[\\] | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | 3.9 | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","tutorial":"\n**参见** \n\n [相关 Bug](https://issues.dcloud.net.cn/?mid=uts.timerMethods.setInterval)"},"setTimeout":{"name":"### setTimeout(handler, timeout?, ...arguments)","description":"全局的 setTimeout() 方法设置一个定时器,一旦定时器到期,就会执行一个函数或指定的代码片段。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| handler | string \\| Function | 是 | - | - | - |\n| timeout | number | 否 | - | - | - |\n| arguments | any[\\] | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | 3.9 | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","tutorial":"\n**参见** \n\n [相关 Bug](https://issues.dcloud.net.cn/?mid=uts.timerMethods.setTimeout)"},"clearInterval":{"name":"### clearInterval(id)","description":"clearInterval() 方法可取消先前通过 setInterval() 设置的重复定时任务。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| id | number \\| undefined | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | 3.9 | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","tutorial":"\n**参见** \n\n [相关 Bug](https://issues.dcloud.net.cn/?mid=uts.timerMethods.clearInterval)"},"clearTimeout":{"name":"### clearTimeout(id)","description":"clearTimeout() 方法取消了先前通过调用setTimeout()建立的定时器","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| id | number \\| undefined | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | 3.9 | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","tutorial":"\n**参见** \n\n [相关 Bug](https://issues.dcloud.net.cn/?mid=uts.timerMethods.clearTimeout)"}},"Number":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.buildInObject.Number)","MAX_VALUE":{"name":"### MAX_VALUE","description":"在 JavaScript 里所能表示的最大数值。无限接近于 1.79E+308。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"prop"},"MIN_VALUE":{"name":"### MIN_VALUE","description":"表示在 JavaScript 中所能表示的最小的正值。 无限接近于 5.00E-324。<br/>","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"prop"},"NaN":{"name":"### NaN","description":"表示“非数字”(Not-A-Number)。和 NaN 相同。<br/>在相等比较中,NaN不等于任何值,包括它自己。要测试一个值是否等于NaN,使用isNaN函数。<br/>","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"prop"},"NEGATIVE_INFINITY":{"name":"### NEGATIVE_INFINITY","description":"表示负无穷大。<br/>Number.NEGATIVE_INFINITY 的值和全局对象的 Infinity 属性的负值相同。<br/>","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"prop"},"POSITIVE_INFINITY":{"name":"### POSITIVE_INFINITY","description":"表示正无穷大。<br/>Number.POSITIVE_INFINITY 的值同全局对象 Infinity 属性的值相同。<br/>","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"prop"},"toString":{"name":"### toString(radix?)","description":"返回指定 Number 对象的字符串表示形式。如果转换的基数大于 10,则会使用字母来表示大于 9 的数字,比如基数为 16 的情况,则使用 a 到 f 的字母来表示 10 到 15。如果基数没有指定,则使用 10。如果对象是负数,则会保留负号。即使 radix 是 2 时也是如此:返回的字符串包含一个负号(-)前缀和正数的二进制表示,不是 数值的二进制补码。进行数字到字符串的转换时,建议用小括号将要转换的目标括起来,防止出错。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| radix | number | 否 | - | - | 指定要用于数字到字符串的转换的基数 (从 2 到 36)。如果未指定 radix 参数,则默认值为 10。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| string | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n console.log((10).toString())//10\n```"},"toFixed":{"name":"### toFixed(fractionDigits?)","description":"使用定点表示法来格式化一个数值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| fractionDigits | number | 否 | - | - | 小数点后数字的个数;介于 0 到 20(包括)之间,实现环境可能支持更大范围。如果忽略该参数,则默认为 0。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 使用定点表示法表示给定数字的字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n function financial(x : Number) : String {\n return x.toFixed(2);\n }\n console.log(financial(123.456));\n // expected output: \"123.46\"\n console.log(financial(0.004));\n // expected output: \"0.00\"\n```"},"toExponential":{"name":"### toExponential(fractionDigits?)","description":"以指数表示法返回该数值字符串表示形式。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| fractionDigits | number | 否 | - | - | 可选。一个整数,用来指定小数点后有几位数字。默认情况下用尽可能多的位数来显示数字。如果 fractionDigits 太小或太大将会抛出该错误。必须介于 0 和 20(包括 20)之间。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 一个用幂的形式 (科学记数法) 来表示Number 对象的字符串。小数点后以 fractionDigits 提供的值来四舍五入。如果 fractionDigits 参数被忽略了,小数点后的将尽可能用最多的位数来表示该数值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"toPrecision":{"name":"### toPrecision(precision?)","description":"以指定的精度返回该数值对象的字符串表示。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| precision | number | 否 | - | - | 一个用来指定有效数个数的整数。 必须介于 1 到 21 之间。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 以定点表示法或指数表示法表示的一个数值对象的字符串表示,四舍五入到 precision 参数指定的显示数字位数。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method","test":"```uts\n console.log(123.456.toPrecision(4))//123.5\n```"},"valueOf":{"name":"### valueOf()","description":"返回一个被 Number 对象包装的原始值。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 表示指定 Number 对象的原始值的数字。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n console.log((10).valueOf()) //10\n```"},"toInt":{"name":"### toInt()","description":"返回一个Int 值","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Int | 返回 number 对应的 Int 值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| x | 3.90 | 4.11 | x | √ | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n let a = 12\n console.log(a.toInt());\n // expected output: 12\n\n // Int最大值2147483647,溢出了\n let b = 2147483648\n // expected output: -2147483648\n```"},"toFloat":{"name":"### toFloat()","description":"返回一个Float 值","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Float | 返回 number 对应的 Float 值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| x | 3.90 | 4.11 | x | √ | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"toDouble":{"name":"### toDouble()","description":"返回一个 Double 值","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Double | 返回 number 对应的 Double 值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| x | 3.90 | 4.11 | x | √ | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"toInt64":{"name":"### toInt64()","description":"返回一个 Int64 值, app-iOS平台特有。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Int64 | 返回 number 对应的 Int64 值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.11 | x | 3.9 | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"toInt32":{"name":"### toInt32()","description":"返回一个 Int32 值, app-iOS平台特有。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Int32 | 返回 number 对应的 Int32 值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.11 | x | 3.9 | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"toInt16":{"name":"### toInt16()","description":"返回一个 Int16 值, app-iOS平台特有。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Int16 | 返回 number 对应的 Int16 值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.11 | x | 3.9 | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"toInt8":{"name":"### toInt8()","description":"返回一个 Int8 值, app-iOS平台特有。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Int8 | 返回 number 对应的 Int8 值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.11 | x | 3.9 | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"toUInt":{"name":"### toUInt()","description":"返回一个 UInt 值","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| UInt | 返回 number 对应的 UInt 值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| x | 3.90 | 4.11 | x | 3.9 | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"toUInt64":{"name":"### toUInt64()","description":"返回一个 UInt64 值, app-iOS平台特有。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| UInt64 | 返回 number 对应的 UInt64 值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.11 | x | 3.9 | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"toUInt32":{"name":"### toUInt32()","description":"返回一个 UInt32 值, app-iOS平台特有。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| UInt32 | 返回 number 对应的 UInt32 值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.11 | x | 3.9 | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"toUInt16":{"name":"### toUInt16()","description":"返回一个 UInt16 值, app-iOS平台特有。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| UInt16 | 返回 number 对应的 UInt16 值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.11 | x | 3.9 | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"toUInt8":{"name":"### toUInt8()","description":"返回一个 UInt8 值, app-iOS平台特有。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| UInt8 | 返回 number 对应的 UInt8 值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.11 | x | 3.9 | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"toByte":{"name":"### toByte()","description":"将当前的Number数据转换为Byte表示,如果超出Byte最大值表示范围,会得到溢出后余数表示, app-andorid平台特有。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Byte | 返回 number 对应的 Byte 值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| x | 3.90 | x | x | x | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n let a = 12\n // #ifdef APP-ANDROID\n console.log(a.toByte());\n // #endif\n // expected output: 12\n```"},"toLong":{"name":"### toLong()","description":"将当前的Number数据转换为Long表示,如果超出Long最大值表示范围,会得到溢出后余数表示, app-andorid平台特有。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Long | 返回 number 对应的 Long 值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| x | 3.90 | x | x | x | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n let a = 12\n console.log(a.toLong());\n // expected output: 12\n```"},"toShort":{"name":"### toShort()","description":"将当前的Number数据转换为Short表示,如果超出Short最大值表示范围,会得到溢出后余数表示, app-andorid平台特有。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Short | 返回 number 对应的 Short 值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| x | 3.90 | x | x | x | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"toUShort":{"name":"### toUShort()","description":"将当前的 Number 数据转换为 UShort 表示,如果超出 UShort 最大值表示范围,会得到溢出后余数表示, app-andorid平台特有。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| UShort | 返回 number 对应的 UShort 值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| x | 3.90 | x | x | x | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"toULong":{"name":"### toULong()","description":"将当前的 Number 数据转换为 ULong 表示,如果超出 ULong 最大值表示范围,会得到溢出后余数表示, app-andorid平台特有。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| ULong | 返回 number 对应的 ULong 值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| x | 3.90 | x | x | x | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"Constructor":{"name":"### Constructor(value?)","description":"创建一个 Number 对象。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| value | any | 否 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"from":{"name":"### from(value)","description":"通过 Int \\| Float \\| Double \\| Int64 \\| Int32 \\| Int16 \\| Int8 \\| UInt \\| UInt64 \\| UInt32 \\| UInt16 \\| UInt8 \\| Byte \\| Short \\| Long 类型创建一个 number","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| value | Int \\| Float \\| Double \\| Int64 \\| Int32 \\| Int16 \\| Int8 \\| UInt \\| UInt64 \\| UInt32 \\| UInt16 \\| UInt8 \\| Byte \\| Short \\| Long | 是 | - | - | 必填。一个 Swift 或者 Kotlin 专有数字类型的值。其中 Swift 平台 支持 Int, Float, Double, Int64, Int32, Int16, Int8, UInt, UInt64, UInt32, UInt16, UInt8。Kotlin 平台支持 Int, Float, Double, Byte, Short, Long | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 返回 number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| x | 3.90 | 4.11 | x | 3.9 | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","test":"```uts\n let a: Int = 12\n let b = Number.from(a)\n console.log(b);\n // expected output: 12\n```"}},"String":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.buildInObject.String)","length":{"name":"### length","description":"返回字符串的 UTF-16 码元长度。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"prop","test":"```uts\n const x = \"Mozilla\";\n const e = \"\";\n\n console.log(\"Mozilla is \" + `${x.length}` + \" code units long\");\n /* \"Mozilla is 7 code units long\" */\n\n console.log(\"The empty string is has a length of \" + `${e.length}`);\n /* \"The e string is has a length of 0\" */\n```"},"toString":{"name":"### toString()","description":"返回一个字符串,表示指定的字符串。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | String 包装对象的字符串值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"charAt":{"name":"### charAt(pos)","description":"返回一个由给定索引处的单个 UTF-16 码元构成的新字符串。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| pos | number | 是 | - | - | 要返回的字符的索引,从零开始。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 返回一个字符串,该字符串表示指定 index 处的字符(恰好是一个 UTF-16 码元)。如果 index 超出了 0 – str.length - 1 的范围,charAt() 将返回一个空字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const anyString = \"Brave new world\";\n console.log(\"The character at index 0 is '\" + anyString.charAt(0) + \"'\");\n // The character at index 0 is 'B'\n console.log(\"The character at index 1 is '\" + anyString.charAt(1) + \"'\");\n // The character at index 1 is 'r'\n console.log(\"The character at index 2 is '\" + anyString.charAt(2) + \"'\");\n // The character at index 2 is 'a'\n console.log(\"The character at index 3 is '\" + anyString.charAt(3) + \"'\");\n // The character at index 3 is 'v'\n console.log(\"The character at index 4 is '\" + anyString.charAt(4) + \"'\");\n // The character at index 4 is 'e'\n console.log(\"The character at index 999 is '\" + anyString.charAt(999) + \"'\");\n // The character at index 999 is ''\n```"},"toWellFormed":{"name":"### toWellFormed()","description":"String 的 toWellFormed() 方法返回一个字符串,其中该字符串的所有单独代理项都被替换为 Unicode 替换字符 U+FFFD。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 新的字符串是原字符串的一个拷贝,其中所有的单独代理项被替换为 Unicode 替换字符 U+FFFD。如果 str 是格式正确的,仍然会返回一个新字符串(本质上是 str 的一个拷贝)。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | 4.25 | - | - | - | - |","itemType":"method","test":"```uts\n let ret = \"ab\\uD800\".toWellFormed()\n console.log(ret) //\"ab\\uFFFD\"\n```"},"isWellFormed":{"name":"### isWellFormed()","description":"String 值的 isWellFormed() 方法返回一个表示该字符串是否包含单独代理项的布尔值。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 如果字符串不包含单独代理项,返回 true,否则返回 false。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | 4.25 | - | - | - | - |","itemType":"method","test":"```uts\n let ret = \"ab\\uD800\".isWellFormed()\n console.log(ret) //false\n```"},"toCharArray":{"name":"### toCharArray()","description":"返回包含此字符串的字符的\\[kotlin.CharArray]","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| CharArray | 字符数组 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| x | 3.90 | x | x | x | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"charCodeAt":{"name":"### charCodeAt(index)","description":"返回 0 到 65535 之间的整数,表示给定索引处的 UTF-16 代码单元","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| index | number | 是 | - | - | 一个大于等于 0,小于字符串长度的整数。如果不是一个数值,则默认为 0。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 指定 index 处字符的 UTF-16 代码单元值的一个数字;如果 index 超出范围,charCodeAt() 返回 NaN。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const sentence = 'The quick brown fox jumps over the lazy dog.';\n const index = 4;\n console.log(`The character code ${sentence.charCodeAt(index)} is equal to ${sentence.charAt(index)}`);\n // expected output: \"The character code 113 is equal to q\"\n```"},"concat":{"name":"### concat(...strings)","description":"将字符串参数连接到调用的字符串,并返回一个新的字符串。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| strings | string[\\] | 是 | - | - | T要连接到 str 的一个或多个字符串。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 一个包含所提供的多个字符串文本组合的新字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n let hello = 'Hello, '\n let ret1 = hello.concat('Kevin', '. Have a nice day.')\n console.log(ret1)\n // Hello, Kevin. Have a nice day.\n```"},"indexOf":{"name":"### indexOf(searchString, position?)","description":"在字符串中搜索指定子字符串,并返回其第一次出现的位置索引。它可以接受一个可选的参数指定搜索的起始位置,如果找到了指定的子字符串,则返回的位置索引大于或等于指定的数字。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| searchString | string | 是 | - | - | 要搜索的子字符串。 |\n| position | number | 否 | - | - | 该方法返回指定子字符串在大于或等于 position 位置的第一次出现的索引,默认为 0。如果 position 大于调用字符串的长度,则该方法根本不搜索调用字符串。如果 position 小于零,该方法的行为就像 position 为 0 时一样。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 查找的字符串 searchValue 的第一次出现的索引,如果没有找到,则返回 -1。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const paragraph = 'The quick brown fox jumps over the lazy dog. If the dog barked, was it really lazy?';\n const searchTerm = 'dog';\n const indexOfFirst = paragraph.indexOf(searchTerm);\n console.log(`The index of the first \"${searchTerm}\" from the beginning is ${indexOfFirst}`);\n // expected output: \"The index of the first \"dog\" from the beginning is 40\"\n\n console.log(`The index of the 2nd \"${searchTerm}\" is ${paragraph.indexOf(searchTerm, (indexOfFirst + 1))}`);\n // expected output: \"The index of the 2nd \"dog\" is 52\"\n```"},"lastIndexOf":{"name":"### lastIndexOf(searchString, position?)","description":"搜索该字符串并返回指定子字符串最后一次出现的索引。它可以接受一个可选的起始位置参数,并返回指定子字符串在小于或等于指定数字的索引中的最后一次出现的位置。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| searchString | string | 是 | - | - | 要搜索的子字符串。 |\n| position | number | 否 | - | - | 该方法返回指定子字符串在小于或等于 position 的位置中的最后一次出现的索引,默认为 +Infinity。如果 position 大于调用字符串的长度,则该方法将搜索整个字符串。如果 position 小于 0,则行为与 0 相同,即该方法只在索引 0 处查找指定的子字符串。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 如果找到了 searchString,则返回最后一次出现的索引,否则返回 -1。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n console.log('canal'.lastIndexOf('a'))//3\n```"},"localeCompare":{"name":"### localeCompare(that)","description":"返回一个数字,表示参考字符串在排序顺序中是在给定字符串之前、之后还是与之相同。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| that | string | 是 | - | - | 与 referenceStr 进行比较的字符串。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 返回一个数字表示 referenceStr 在排序中是否位于 compareString 的前面、后面或二者相同。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"match":{"name":"### match(regexp)","description":"match() 方法检索字符串与正则表达式进行匹配的结果。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| regexp | string \\| RegExp | 是 | - | - | 一个正则表达式对象或者任何具有 Symbol.match 方法的对象。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| RegExpMatchArray \\| null | 一个 Array,其内容取决于是否存在全局(g)标志,如果没有匹配,则返回 null。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const str = 'The quick brown fox jumps over the lazy dog. It barked.';\n const result = str.match(new RegExp('[A-Z]', 'g'));\n console.log(result![0])//\"T\"\n```"},"replace":{"name":"### replace(searchValue, replaceValue)","description":"返回一个由替换值(replacement)替换部分或所有的模式(pattern)匹配项后的新字符串。模式可以是一个字符串或者一个正则表达式。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| searchValue | string \\| RegExp | 是 | - | - | RegExp: 一个RegExp 对象或者其字面量。该正则所匹配的内容会被第二个参数的返回值替换掉。string: 一个将被 newSubStr 替换的 字符串。其被视为一整个字符串,而不是一个正则表达式。仅第一个匹配项会被替换。 |\n| replaceValue | string | 是 | - | - | 用于替换掉第一个参数在原字符串中的匹配部分的字符串。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 一个部分或全部匹配由替代模式所取代的新的字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const p = 'The quick brown fox jumps over the lazy dog. If the dog reacted, was it really lazy?';\n let ret1 = p.replace('dog', 'monkey')\n\n console.log(ret1);\n // expected output: \"The quick brown fox jumps over the lazy monkey. If the dog reacted, was it really lazy?\"\n const regex = /Dog/i;\n let ret2 = p.replace(regex, 'ferret')\n console.log(ret2);\n // expected output: \"The quick brown fox jumps over the lazy ferret. If the dog reacted, was it really lazy?\"\n```"},"replace_1":{"name":"### replace(searchValue, replacer)","description":"返回一个由替换值(replacement)替换部分或所有的模式(pattern)匹配项后的新字符串。模式可以是一个字符串或者一个正则表达式,替换值是一个每次匹配都要调用的回调函数。如果pattern是字符串,则仅替换第一个匹配项。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| searchValue | string \\| RegExp | 是 | - | - | RegExp: 一个RegExp 对象或者其字面量。该正则所匹配的内容会被第二个参数的返回值替换掉。string: 一个将被 newSubStr 替换的 字符串。其被视为一整个字符串,而不是一个正则表达式。仅第一个匹配项会被替换。 |\n| replacer | (substring: string, args?: Array\\<any\\>) => string | 是 | - | - | 一个用来创建新子字符串的函数,该函数的返回值将替换掉第一个参数匹配到的结果。在iOS中replacer的第二个参数是字符串数组而非可变参数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 一个部分或全部匹配由替代模式所取代的新的字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n // #ifdef APP-ANDROID\n // 不包含捕捉组的示例\n let a = \"The quick brown fox jumps over the lazy dog. If the dog reacted, was it really lazy?\"\n let b = a.replace(RegExp(\"fox\"), function (match : string, offset : number, string : string) : string {\n console.log(\"match\", match)\n console.log(\"offset\", offset)\n console.log(\"string\", string)\n return \"cat\"\n })\n console.log(\"b:\", b)\n \n // 包含一个捕获组的示例。注意,目前android仅支持最多五个捕获组\n let a1 = \"The quick brown fox jumps over the lazy dog. If the dog reacted, was it really lazy?\"\n let b1 = a1.replace(RegExp(\"(fox)\"), function (match : string, p1 : string, offset : number, string : string) : string {\n console.log(\"match\", match)\n console.log(\"p1\", p1)\n console.log(\"offset\", offset)\n console.log(\"string\", string)\n return \"cat\"\n })\n console.log(\"b1\", b1)\n // #endif\n\n```"},"search":{"name":"### search(regexp)","description":"search() 方法执行正则表达式和 String 对象之间的一个搜索匹配。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| regexp | string \\| RegExp | 是 | - | - | 一个正则表达式(regular expression)对象。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 如果匹配成功,则 search() 返回正则表达式在字符串中首次匹配项的索引;否则,返回 -1。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const paragraph = 'The quick brown fox jumps over the lazy dog. If the dog barked, was it really lazy?';\n const regex = /[^\\w\\s]/g;\n // #ifdef APP-ANDROID\n console.log(paragraph.search(regex));\n // expected output: 43\n console.log(paragraph[paragraph.search(regex)]);\n // expected output: \".\"\n // #endif\n```"},"slice":{"name":"### slice(start?, end?)","description":"slice() 方法提取某个字符串的一部分,并返回一个新的字符串,且不会改动原字符串。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| start | number | 否 | - | - | 可选。从该索引(以 0 为基数)处开始提取原字符串中的字符。如果值为负数,会被当做 strLength + beginIndex 看待,这里的strLength 是字符串的长度(例如,如果 beginIndex 是 -3 则看作是:strLength - 3) |\n| end | number | 否 | - | - | 可选。在该索引(以 0 为基数)处结束提取字符串。如果省略该参数,slice() 会一直提取到字符串末尾。如果该参数为负数,则被看作是 strLength + endIndex,这里的 strLength 就是字符串的长度 (例如,如果 endIndex 是 -3,则是,strLength - 3)。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 返回一个从原字符串中提取出来的新字符串 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const str = 'The quick brown fox jumps over the lazy dog.';\n let ret = str.slice(31)\n console.log(ret);\n // expected output: \"the lazy dog.\"\n console.log(str.slice(4, 19));\n // expected output: \"quick brown fox\"\n```"},"split":{"name":"### split(separator, limit?)","description":"split() 方法接受一个模式,通过搜索模式将字符串分割成一个有序的子串列表,将这些子串放入一个数组,并返回该数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| separator | string \\| RegExp | 是 | - | - | 描述每个分割应该发生在哪里的模式。 |\n| limit | number | 否 | - | - | 一个非负整数,指定数组中包含的子字符串的数量限制。当提供此参数时,split 方法会在指定 separator 每次出现时分割该字符串,但在已经有 limit 个元素时停止分割。任何剩余的文本都不会包含在数组中。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string[\\] | 在给定字符串中出现 separator 的每一个点上进行分割而成的字符串数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const str = 'The quick brown fox jumps over the lazy dog.';\n const words = str.split(' ');\n let ret1 = words[3]\n console.log(ret1);\n // expected output: \"fox\"\n const chars = str.split('');\n console.log(chars[8]);\n // expected output: \"k\"\n```"},"substring":{"name":"### substring(start, end?)","description":"返回一个字符串在开始索引到结束索引之间的一个子集,或从开始索引直到字符串的末尾的一个子集。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| start | number | 是 | - | - | 要截取的第一个字符的索引,该索引位置的字符作为返回的字符串的首字母。 |\n| end | number | 否 | - | - | 可选。一个 0 到字符串长度之间的整数,以该数字为索引的字符不包含在截取的字符串内。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 包含给定字符串的指定部分的新字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"toLowerCase":{"name":"### toLowerCase()","description":"toLowerCase() 会将调用该方法的字符串值转为小写形式,并返回。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 一个新的字符串,表示转换为小写的调用字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const str1 = '中文简体 zh-CN || zh-Hans';\n const str2 = 'ALPHABET';\n console.log('str1'.toLowerCase());\n // 中文简体 zh-cn || zh-hans\n console.log(str2.toLowerCase());\n // \"alphabet\"\n```"},"toLocaleLowerCase":{"name":"### toLocaleLowerCase(locales?)","description":"根据任何指定区域语言环境设置的大小写映射,返回调用字符串被转换为小写的格式。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| locales | string \\| string[\\] | 否 | - | - | 可选。指明要转换成小写格式的特定语言区域。如果以一个数组 Array 形式给出多个 locales, 最合适的地区将被选出来应用。默认的 locale 是主机环境的当前区域 (locale) 设置。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 根据任何特定于语言环境的案例映射规则将被调用字串转换成小写格式的一个新字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"toUpperCase":{"name":"### toUpperCase()","description":"将调用该方法的字符串转为大写形式并返回(如果调用该方法的值不是字符串类型会被强制转换)。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 一个新的字符串,表示转换为大写的调用字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const sentence = 'The quick brown fox jumps over the lazy dog.';\n console.log(sentence.toUpperCase());\n // expected output: \"THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.\"\n```"},"toLocaleUpperCase":{"name":"### toLocaleUpperCase(locales?)","description":"根据本地主机语言环境把字符串转换为大写格式,并返回转换后的字符串。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| locales | string \\| string[\\] | 否 | - | - | locales参数指示要用于根据任何特定于语言环境的大小写映射转换为大写的语言环境。如果Array中给出了多个区域设置,则使用最佳可用区域设置。默认语言环境是主机环境的当前语言环境。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 根据任何特定于语言环境的大小写映射,表示转换为大写的调用字符串的新字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"trim":{"name":"### trim()","description":"从字符串的两端清除空格,返回一个新的字符串,而不修改原始字符串。此上下文中的空格是指所有的空白字符(空格、tab、不换行空格等)以及所有行终止符字符(如 LF、CR 等)。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 一个表示 str 去掉了开头和结尾的空白字符后的新字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n let greeting = ' Hello world! ';\n let ret = greeting.trim()\n console.log(ret) //Hello world!\n```"},"substr":{"name":"### substr(from, length?)","description":"返回一个字符串中从指定位置开始到指定字符数的字符。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| from | number | 是 | - | - | 开始提取字符的位置。如果为负值,则被看作 strLength + start,其中 strLength 为字符串的长度(例如,如果 start 为 -3,则被看作 strLength + (-3))。 |\n| length | number | 否 | - | - | 可选。提取的字符数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 返回一个字符串中从指定位置开始到指定字符数的字符。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method","test":"```uts\n var str1 = \"Mozilla\";\n let ret = str1.substring(0, 3)\n console.log(ret)//\"Moz\"\n```"},"valueOf":{"name":"### valueOf()","description":"返回 String 对象的原始值","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | String 对象的原始值 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"padStart":{"name":"### padStart(targetLength, padString?)","description":"用另一个字符串填充当前字符串(如果需要会重复填充),直到达到给定的长度。填充是从当前字符串的开头开始的。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| targetLength | number | 是 | - | - | 当前 str 填充后的长度。如果该值小于或等于 str.length,则会直接返回当前 str。 |\n| padString | string | 否 | - | - | 可选。用于填充当前 str 的字符串。如果 padString 太长,无法适应 targetLength,则会从末尾被截断。默认值为“ ”字符(U+0020)。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 在开头填充 padString 直到达到给定的 targetLength 所形成的 String。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const str1 = '5';\n let ret = str1.padStart(2, '0')\n console.log(ret);\n // expected output: \"05\"\n```"},"padEnd":{"name":"### padEnd(targetLength, padString?)","description":"将当前字符串从末尾开始填充给定的字符串(如果需要会重复填充),直到达到给定的长度。填充是从当前字符串的末尾开始的。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| targetLength | number | 是 | - | - | 当前 str 填充后的长度。如果该值小于或等于 str.length,则会直接返回当前 str。 |\n| padString | string | 否 | - | - | 可选。用于填充当前 str 的字符串。如果 padString 太长,无法适应 targetLength,则会被截断。默认值为“ ”字符(U+0020)。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 在开头填充 padString 直到达到给定的 targetLength 所形成的 String。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const str1 = 'Breaded Mushrooms';\n let ret1= str1.padEnd(25, '.')\n console.log(ret1);\n // expected output: \"Breaded Mushrooms........\"\n const str2 = '200';\n let ret2=str2.padEnd(5)\n console.log(ret2);\n // expected output: \"200 \"\n```"},"codePointAt":{"name":"### codePointAt(pos)","description":"返回一个小于 1114112 (0x110000) 的非负整数 Number,它是 UTF-16 编码的代码点的代码点值,该代码点始于将此对象转换为字符串而产生的字符串中位置 pos 处的字符串元素。<br/>如果该位置没有元素,则结果未定义。<br/>如果有效的 UTF-16 代理项对不是从 pos 开始,则结果是 pos 处的代码单元。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| pos | number | 是 | - | - | 这个字符串中需要转码的元素的位置。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number \\| null | 返回值是在字符串中的给定索引的编码单元体现的数字,如果在索引处没找到元素则返回 null。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"includes":{"name":"### includes(searchString, position?)","description":"如果 searchString 作为此对象转换为 String 的结果的子字符串出现在大于或等于position的一个或多个位置,则返回 true;否则,返回 false。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| searchString | string | 是 | - | - | 要在 str 中搜索的字符串。不能是正则表达式。 |\n| position | number | 否 | - | - | 在字符串中开始搜索 searchString 的位置。(默认为 0。) | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 如果在给定的字符串中找到了要搜索的字符串(包括 searchString 为空字符串的情况),则返回 true,否则返回 false。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const sentence = 'The quick brown fox jumps over the lazy dog.';\n const word = 'fox';\n console.log(sentence.includes(word)) // true\n```"},"endsWith":{"name":"### endsWith(searchString, endPosition?)","description":"endsWith() 方法用于判断一个字符串是否以指定字符串结尾,如果是则返回 true,否则返回 false。该方法区分大小写。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| searchString | string | 是 | - | - | 要搜索的作为结尾的字符串,不能是正则表达式。所有非正则表达式的值都会被强制转换为字符串。 |\n| endPosition | number | 否 | - | - | 可选,预期找到 searchString 的末尾位置(即 searchString 最后一个字符的索引加 1)。默认为 str.length。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 如果被检索字符串的末尾出现了指定的字符串(包括 searchString 为空字符串的情况),则返回 true;否则返回 false。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const str1 = 'Cats are the best!';\n console.log(str1.endsWith('best!'));\n // expected output: true\n console.log(str1.endsWith('best', 17));\n // expected output: true\n const str2 = 'Is this a question?';\n console.log(str2.endsWith('question'));\n // expected output: false\n```"},"normalize":{"name":"### normalize(form)","description":"normalize() 方法会按照指定的一种 Unicode 正规形式将当前字符串规范化。(如果该值不是字符串,则首先将其转换为一个字符串)。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| form | \"NFC\" \\| \"NFD\" \\| \"NFKC\" \\| \"NFKD\" | 是 | - | - | 四种 Unicode 正规形式(Unicode Normalization Form)\"NFC\"、\"NFD\"、\"NFKC\",或 \"NFKD\" 其中的一个,默认值为 \"NFC\"。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 含有给定字符串的 Unicode 规范化形式的字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"normalize_1":{"name":"### normalize(form?)","description":"normalize() 方法会按照指定的一种 Unicode 正规形式将当前字符串规范化。(如果该值不是字符串,则首先将其转换为一个字符串)。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| form | string | 否 | - | - | 四种 Unicode 正规形式(Unicode Normalization Form)\"NFC\"、\"NFD\"、\"NFKC\",或 \"NFKD\" 其中的一个,默认值为 \"NFC\"。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 含有给定字符串的 Unicode 规范化形式的字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"repeat":{"name":"### repeat(count)","description":"repeat() 构造并返回一个新字符串,该字符串包含被连接在一起的指定数量的字符串的副本。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| count | number | 是 | - | - | 介于 0 和 +Infinity 之间的整数。表示在新构造的字符串中重复了多少遍原字符串。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 包含指定字符串的指定数量副本的新字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n \"abc\".repeat(0) // \"\"\n \"abc\".repeat(1) // \"abc\"\n \"abc\".repeat(2) // \"abcabc\"\n \"abc\".repeat(3.5) // \"abcabcabc\" 参数 count 将会被自动转换成整数。\n```"},"startsWith":{"name":"### startsWith(searchString, position?)","description":"startsWith() 方法用来判断当前字符串是否以另外一个给定的子字符串开头,并根据判断结果返回 true 或 false。这个方法区分大小写。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| searchString | string | 是 | - | - | 要搜索的子字符串。 |\n| position | number | 否 | - | - | 在 str 中搜索 searchString 的开始位置,默认值为 0。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 如果在字符串的开头找到了给定的字符则返回 true;否则返回 false。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const str = 'hello world';\n console.log(str.startsWith('hello'))//true\n```"},"anchor":{"name":"### anchor(name)","description":"anchor() 方法创建一个 \\<a> HTML 锚元素,被用作超文本靶标(hypertext target)。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| name | string | 是 | - | - | 一个字符串,表示被创建的标签的 name 属性。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 包含 \\<a> HTML 元素的一个字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"big":{"name":"### big()","description":"创建一个使字符串显示大号字体的\\<big>标签。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 带有 \\<big>标签的字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"blink":{"name":"### blink()","description":"blink() 方法创建一个字符串,其在 \\<blink>str\\</blink> 中嵌入字符串,这使得字符串在旧版浏览器中闪烁。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 包含 \\<blink> HTML 元素的字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"bold":{"name":"### bold()","description":"bold() 方法会创建 HTML 元素“b”,并将字符串加粗展示。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 包含 HTML 元素 \\<b> 的字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"fixed":{"name":"### fixed()","description":"fixed() 方法创建了一个 \\<tt> 标签元素将字符串包裹起来,从而让这个字符串里面的内容具有固定间距。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 返回一个表示 \\<tt> HTML 元素的字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"fontcolor":{"name":"### fontcolor(color)","description":"创建一个\\<font>的 HTML 元素让字符串被显示成指定的字体颜色。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| color | string | 是 | - | - | 代表颜色的一个字符串,可以是三个一组的十六进制的 RGB 值,也可以是一个颜色名称的字符串字面量. | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 一个包含一个\\<font> HTML 元素的字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"fontsize":{"name":"### fontsize(size)","description":"返回一个' \\<font> ' HTML元素并设置size属性值","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| size | number | 是 | - | - | 1到7之间的整数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 包含\\<font> HTML元素的字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"fontsize_1":{"name":"### fontsize(size)","description":"返回一个' \\<font> ' HTML元素并设置size属性值","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| size | string | 是 | - | - | 表示1到7之间的有符号整数的字符串。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 包含\\<font> HTML元素的字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"italics":{"name":"### italics()","description":"italics()方法创建一个\\<i> HTML元素,使字符串变为斜体。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 返回一个\\<i> HTML元素,使字符串变为斜体。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"link":{"name":"### link(url)","description":"link() 方法创建一个 HTML 元素 \\<a> ,用该字符串作为超链接的显示文本,参数作为指向另一个 URL 的超链接。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| url | string | 是 | - | - | 任何能够指定 a 标签的 href 属性的字符串;它应当是有效的 URL(相对或绝对),任何 & 字符将会被转义为 &,任何 \" 字符将会被转义为 "。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 一个带有一个 HTML 元素 \\<a> 的字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"small":{"name":"### small()","description":"small() 方法的作用是创建一个使字符串显示小号字体的 \\<small> 标签。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 带有 \\<small> 标签的字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"strike":{"name":"### strike()","description":"strike()方法创建\\<strike> HTML 元素,使字符串展示为被删除的文本。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 包含\\<strike> HTML 元素的字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"sub":{"name":"### sub()","description":"sub()方法创建一个 \\<sub> HTML 元素,使字符串展示为下标。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 包含\\<sub> HTML 元素的字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"sup":{"name":"### sup()","description":"sup()方法创建 一个\\<sup>HTML 元素,使字符串显示为上标。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 包含\\<sup> HTML 元素的字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"at":{"name":"### at(index)","description":"方法接受一个整数值,并返回一个新的 String,该字符串由位于指定偏移量处的单个 UTF-16 码元组成","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| index | number | 是 | - | - | 字符指定偏移量处,允许正整数和负整数,负整数从字符串中的最后一个字符开始倒数。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| string \\| null | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const sentence = 'The quick brown fox jumps over the lazy dog.';\n let index = 5;\n console.log(`Using an index of ${index} the character returned is ${sentence.at(index)}`);\n // expected output: \"Using an index of 5 the character returned is u\"\n index = -4;\n console.log(`Using an index of ${index} the character returned is ${sentence.at(index)}`);\n // expected output: \"Using an index of -4 the character returned is d\"\n```"},"fromCharCode":{"name":"### fromCharCode(...codes)","description":"","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| codes | number[\\] | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| string | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | 4.11 | x | 3.9 | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n console.log(String.fromCharCode(65, 66, 67));\n // expected output: \"ABC\"\n console.log(String.fromCharCode(0x12014));\n // expected output: \"𝌆a𝌇\"\n```"}},"Array":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.buildInObject.Array)","length":{"name":"### length","description":"length 是 Array 的实例属性,表示该数组中元素的个数。该值是一个无符号 32 位整数,并且其数值总是大于数组最大索引。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"prop","test":"```uts\n const arr = ['shoes', 'shirts', 'socks', 'sweaters'];\n console.log(arr.length)//4\n console.log(arr[1])//'shoes'\n console.log(arr[1])//'shirts'\n```"},"toString":{"name":"### toString()","description":"toString() 方法返回一个字符串,表示指定的数组及其元素。","param":"","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| string | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const array1 : number[] = [1, 2, 3];\n console.log(array1.toString()) //\"1,2,3\"\n```"},"toKotlinList":{"name":"### toKotlinList()","description":"toKotlinList() 将当前的Array对象转换为 kotlin 中对应的List对象","param":"","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| kotlin.collections.List\\<any> | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","test":"```uts\n // #ifdef APP-ANDROID\n let utsArray = [\"1\", 2, 3.0]\n let javaArray = utsArray.toTypedArray();\n let kotlinArray = utsArray.toKotlinList()\n\n let convertArrayFromJava = Array.fromNative(javaArray);\n let convertArrayFromKotlin = Array.fromNative(kotlinArray);\n console.log(convertArrayFromJava[0] == convertArrayFromKotlin[0])//true\n\n console.log(convertArrayFromJava[0])//\"1\"\n```"},"add":{"name":"### add(item)","description":"将指定的元素追加到此列表的末尾","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| item | T | 是 | - | - | 添加到数组的元素。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 是否成功添加 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"toLocaleString":{"name":"### toLocaleString()","description":"toLocaleString() 方法返回一个字符串,表示数组中的所有元素。每个元素通过调用它们自己的 toLocaleString 方法转换为字符串,并且使用特定于语言环境的字符串(例如逗号“,”)分隔开。","param":"","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| string | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"joinToString":{"name":"### joinToString(separator)","description":"从所有元素中使用\\[separator]建字符串","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| separator | string | 是 | - | - | 分隔符 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 拼接完成的字符串 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"pop":{"name":"### pop()","description":"pop() 方法从数组中删除最后一个元素,并返回该元素的值。此方法会更改数组的长度。<br/>","param":"","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| T \\| null | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const plants : string[] = ['broccoli', 'cauliflower', 'cabbage', 'kale', 'tomato'];\n let ret1 = plants.pop()\n console.log(ret1)//\"tomato\"\n console.log(plants)//[\"broccoli\", \"cauliflower\", \"cabbage\", \"kale\"]\n```"},"push":{"name":"### push(...items)","description":"push() 方法将指定的元素添加到数组的末尾,并返回新的数组长度。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| items | T[\\] | 是 | - | - | 添加到数组末尾的元素。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 调用方法的对象的新 length 属性。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const animals : string[] = ['pigs', 'goats', 'sheep'];\n const count = animals.push('cows');\n console.log(count)//4\n console.log(animals) //['pigs', 'goats', 'sheep', 'cows']\n```"},"concat":{"name":"### concat(...items)","description":"concat() 方法用于合并两个或多个数组。此方法不会更改现有数组,而是返回一个新数组。<br/>","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| items | ConcatArray\\<T>[\\] | 是 | - | - | 数组和/或值,将被合并到一个新的数组中。如果省略了所有 valueN 参数,则 concat 会返回调用此方法的现存数组的一个浅拷贝。详情请参阅下文描述。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| T[\\] | 新的 Array 实例。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n let ret = ['a', 'b', 'c'].concat(['d', 'e', 'f'])\n console.log(ret) //[\"a\", \"b\", \"c\", \"d\", \"e\", \"f\"]\n let ret1 = [1, 2, 3].concat([4, 5, 6])\n console.log(ret1)//[1, 2, 3, 4, 5, 6]\n let ret2 = [''].concat([''])//\n console.log(ret2)//[\"\", \"\"]\n\n const num1 = [1, 2, 3];\n const num2 = [4, 5, 6];\n const num3 = [7, 8, 9];\n const numbers = num1.concat(num2, num3);\n console.log(numbers)//[1, 2, 3, 4, 5, 6, 7, 8, 9]\n```"},"concat_1":{"name":"### concat(...items)","description":"concat() 方法用于合并两个或多个数组。此方法不会更改现有数组,而是返回一个新数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| items | (T \\| ConcatArray\\<T>)[\\] | 是 | - | - | 数组和/或值,将被合并到一个新的数组中。如果省略了所有 valueN 参数,则 concat 会返回调用此方法的现存数组的一个浅拷贝。详情请参阅下文描述。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| T[\\] | 新的 Array 实例。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n let ret = ['a', 'b', 'c'].concat(['d', 'e', 'f'])\n console.log(ret) //[\"a\", \"b\", \"c\", \"d\", \"e\", \"f\"]\n let ret1 = [1, 2, 3].concat([4, 5, 6])\n console.log(ret1)//[1, 2, 3, 4, 5, 6]\n let ret2 = [''].concat([''])//\n console.log(ret2)//[\"\", \"\"]\n\n const num1 = [1, 2, 3];\n const num2 = [4, 5, 6];\n const num3 = [7, 8, 9];\n const numbers = num1.concat(num2, num3);\n console.log(numbers)//[1, 2, 3, 4, 5, 6, 7, 8, 9]\n```"},"join":{"name":"### join(separator?)","description":"join() 方法将一个数组(或一个类数组对象)的所有元素连接成一个字符串并返回这个字符串,用逗号或指定的分隔符字符串分隔。如果数组只有一个元素,那么将返回该元素而不使用分隔符。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| separator | string | 否 | - | - | 指定一个字符串来分隔数组的每个元素。如果需要,将分隔符转换为字符串。如果省略,数组元素用逗号(,)分隔。如果 separator 是空字符串(\"\"),则所有元素之间都没有任何字符。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 一个所有数组元素连接的字符串。如果 arr.length 为 0,则返回空字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | 4.11 | x | √ | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const elements : string[] = ['Fire', 'Air', 'Water'];\n let ret1 = elements.join()//Fire,Air,Water\n let ret2 = elements.join('') //FireAirWater\n let ret3 = elements.join('-')//Fire-Air-Water\n console.log(ret1) // \"Fire,Air,Water\";\n console.log(ret2) // \"FireAirWater\";\n console.log(ret3) // \"Fire-Air-Water\";\n```"},"reverse":{"name":"### reverse()","description":"reverse() 方法就地反转数组中的元素,并返回同一数组的引用。数组的第一个元素会变成最后一个,数组的最后一个元素变成第一个。换句话说,数组中的元素顺序将被翻转,变为与之前相反的方向。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| T[\\] | 原始数组反转后的引用。注意,数组是就地反转的,并且没有复制。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"shift":{"name":"### shift()","description":"shift() 方法从数组中删除第一个元素,并返回该元素的值。此方法更改数组的长度。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| T \\| null | 从数组中删除的元素;如果数组为空则返回 null。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const array1 = [1, 2, 3];\n\n const firstElement = array1.shift();\n\n console.log(array1); // [2, 3] \n\n console.log(firstElement); //1\n```"},"slice":{"name":"### slice(start?, end?)","description":"slice() 方法返回一个新的数组对象,这一对象是一个由 start 和 end 决定的原数组的浅拷贝(包括 start,不包括 end),其中 start 和 end 代表了数组元素的索引。原始数组不会被改变。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| start | number | 否 | - | - | 提取起始处的索引(从 0 开始),会转换为整数。 |\n| end | number | 否 | - | - | 提取终止处的索引(从 0 开始),会转换为整数。slice() 会提取到但不包括 end 的位置。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| T[\\] | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const animals = ['ant', 'bison', 'camel', 'duck', 'elephant'];\n\n console.log(animals.slice(2));\n // [\"camel\", \"duck\", \"elephant\"]\n\n console.log(animals.slice(2, 4));\n //[\"camel\", \"duck\"]\n\n console.log(animals.slice(1, 5));\n // [\"bison\", \"camel\", \"duck\", \"elephant\"]\n\n console.log(animals.slice(-2));\n // [\"duck\", \"elephant\"]\n\n console.log(animals.slice(2, -1));\n // [\"camel\", \"duck\"]\n\n console.log(animals.slice());\n //[\"ant\", \"bison\", \"camel\", \"duck\", \"elephant\"]\n```"},"sort":{"name":"### sort(compareFn?)","description":"sort() 方法就地对数组的元素进行排序,并返回对相同数组的引用。默认排序是将元素转换为字符串,然后按照它们的 UTF-16 码元值升序排序。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| compareFn | (a: T, b: T) => number | 否 | - | - | 定义排序顺序的函数。返回值应该是一个数字,其正负性表示两个元素的相对顺序。该函数使用以下参数调用: a:第一个用于比较的元素。不会是 null。 b:第二个用于比较的元素。不会是 null。 如果省略该函数,数组元素会被转换为字符串,然后根据每个字符的 Unicode 码位值进行排序。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| this | 经过排序的原始数组的引用。注意数组是就地排序的,不会进行复制。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"splice":{"name":"### splice(start, deleteCount?)","description":"splice() 方法通过移除或者替换已存在的元素和/或添加新元素就地改变一个数组的内容。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| start | number | 是 | - | - | 从 0 开始计算的索引,表示要开始改变数组的位置,它会被转换成整数。 |\n| deleteCount | number | 否 | - | - | 一个整数,表示数组中要从 start 开始删除的元素数量。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| T[\\] | 一个包含了删除的元素的数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const months : string[] = ['Jan', 'March', 'April', 'June'];\n months.splice(1, 0, 'Feb');\n console.log(months)//[\"Jan\", \"Feb\", \"March\", \"April\", \"June\"]\n```"},"splice_1":{"name":"### splice(start, deleteCount, ...items)","description":"splice() 方法通过移除或者替换已存在的元素和/或添加新元素就地改变一个数组的内容。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| start | number | 是 | - | - | 从 0 开始计算的索引,表示要开始改变数组的位置,它会被转换成整数。 |\n| deleteCount | number | 是 | - | - | 一个整数,表示数组中要从 start 开始删除的元素数量。 |\n| items | T[\\] | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| T[\\] | 一个包含了删除的元素的数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"unshift":{"name":"### unshift(...items)","description":"unshift() 方法将指定元素添加到数组的开头,并返回数组的新长度。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| items | T[\\] | 是 | - | - | 添加到 arr 开头的元素。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const array1 = [1, 2, 3];\n let ret1 = array1.unshift(4, 5)\n console.log(ret1);\n // 5\n\n console.log(array1);\n // [4, 5, 1, 2, 3]\n```"},"indexOf":{"name":"### indexOf(searchElement, fromIndex?)","description":"indexOf() 方法返回数组中第一次出现给定元素的下标,如果不存在则返回 -1。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| searchElement | T | 是 | - | - | 数组中要查找的元素。 |\n| fromIndex | number | 否 | - | - | 开始搜索的索引(从零开始),会转换为整数。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const beasts : string[] = ['ant', 'bison', 'camel', 'duck', 'bison'];\n\n console.log(beasts.indexOf('bison')); // 1\n\n\n console.log(beasts.indexOf('bison', 2));// 2\n\n console.log(beasts.indexOf('giraffe'));// -1\n```"},"lastIndexOf":{"name":"### lastIndexOf(searchElement, fromIndex?)","description":"lastIndexOf() 方法返回数组中给定元素最后一次出现的索引,如果不存在则返回 -1。该方法从 fromIndex 开始向前搜索数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| searchElement | T | 是 | - | - | 被查找的元素。 |\n| fromIndex | number | 否 | - | - | 以 0 起始的索引,表明反向搜索的起始位置,会被转换为整数。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const animals : string[] = ['Dodo', 'Tiger', 'Penguin', 'Dodo'];\n console.log(animals.lastIndexOf('Dodo'));//3\n console.log(animals.lastIndexOf('Tiger'));//1\n```"},"every":{"name":"### every(predicate, thisArg?)","description":"every() 方法测试一个数组内的所有元素是否都能通过指定函数的测试。它返回一个布尔值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: T, index: number, array: Array\\<T\\>) => boolean | 是 | - | - | 为数组中的每个元素执行的函数。它应该返回一个真值以指示元素通过测试,否则返回一个假值。该函数被调用时将传入以下参数: value:数组中当前正在处理的元素。 index:正在处理的元素在数组中的索引。 array:调用了 every() 的数组本身。 |\n| thisArg | any | 否 | - | - | 执行 callbackFn 时用作 this 的值 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| this is S[\\] | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n","itemType":"method","test":"```uts\n const isBelowThreshold = (currentValue : number) : boolean => currentValue < 40;\n const array1 : number[] = [1, 30, 39, 29, 10, 13];\n console.log(array1.every(isBelowThreshold));// true\n\n const array2 : number[] = [1, 30, 39, 29, 10, 13, 41];\n console.log(array2.every(isBelowThreshold));// false\n\n const array3 : number[] = [1, 2, 3];\n array3.every((element : number, index : number, array : number[]) : boolean => {\n console.log(array[index])//1=>2->3\n return true;\n })\n\n```"},"every_1":{"name":"### every(predicate, thisArg?)","description":"every() 方法测试一个数组内的所有元素是否都能通过指定函数的测试。它返回一个布尔值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: T, index: number) => boolean | 是 | - | - | 为数组中的每个元素执行的函数。它应该返回一个真值以指示元素通过测试,否则返回一个假值。该函数被调用时将传入以下参数: value:数组中当前正在处理的元素。 index:正在处理的元素在数组中的索引。 |\n| thisArg | any | 否 | - | - | 执行 callbackFn 时用作 this 的值 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| this is S[\\] | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n","itemType":"method","test":"```uts\n const isBelowThreshold = (currentValue : number) : boolean => currentValue < 40;\n const array1 : number[] = [1, 30, 39, 29, 10, 13];\n console.log(array1.every(isBelowThreshold));// true\n\n const array2 : number[] = [1, 30, 39, 29, 10, 13, 41];\n console.log(array2.every(isBelowThreshold));// false\n\n const array3 : number[] = [1, 2, 3];\n array3.every((element : number, index : number, array : number[]) : boolean => {\n console.log(array[index])//1=>2->3\n return true;\n })\n\n```"},"every_2":{"name":"### every(predicate, thisArg?)","description":"every() 方法测试一个数组内的所有元素是否都能通过指定函数的测试。它返回一个布尔值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: T) => boolean | 是 | - | - | 为数组中的每个元素执行的函数。它应该返回一个真值以指示元素通过测试,否则返回一个假值。该函数被调用时将传入以下参数: value:数组中当前正在处理的元素。 |\n| thisArg | any | 否 | - | - | 执行 callbackFn 时用作 this 的值 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| this is S[\\] | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n","itemType":"method","test":"```uts\n const isBelowThreshold = (currentValue : number) : boolean => currentValue < 40;\n const array1 : number[] = [1, 30, 39, 29, 10, 13];\n console.log(array1.every(isBelowThreshold));// true\n\n const array2 : number[] = [1, 30, 39, 29, 10, 13, 41];\n console.log(array2.every(isBelowThreshold));// false\n\n const array3 : number[] = [1, 2, 3];\n array3.every((element : number, index : number, array : number[]) : boolean => {\n console.log(array[index])//1=>2->3\n return true;\n })\n\n```"},"every_3":{"name":"### every(predicate, thisArg?)","description":"every() 方法测试一个数组内的所有元素是否都能通过指定函数的测试。它返回一个布尔值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: T, index: number, array: Array\\<T\\>) => any | 是 | - | - | 为数组中的每个元素执行的函数。它应该返回一个真值以指示元素通过测试,否则返回一个假值。该函数被调用时将传入以下参数: value:数组中当前正在处理的元素。 index:正在处理的元素在数组中的索引。 array:调用了 every() 的数组本身。 |\n| thisArg | any | 否 | - | - | 执行 callbackFn 时用作 this 的值 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| boolean | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const isBelowThreshold = (currentValue : number) : boolean => currentValue < 40;\n const array1 : number[] = [1, 30, 39, 29, 10, 13];\n console.log(array1.every(isBelowThreshold));// true\n\n const array2 : number[] = [1, 30, 39, 29, 10, 13, 41];\n console.log(array2.every(isBelowThreshold));// false\n\n const array3 : number[] = [1, 2, 3];\n array3.every((element : number, index : number, array : number[]) : boolean => {\n console.log(array[index])//1=>2->3\n return true;\n })\n\n```"},"every_4":{"name":"### every(predicate, thisArg?)","description":"every() 方法测试一个数组内的所有元素是否都能通过指定函数的测试。它返回一个布尔值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: T, index: number) => any | 是 | - | - | 为数组中的每个元素执行的函数。它应该返回一个真值以指示元素通过测试,否则返回一个假值。该函数被调用时将传入以下参数: value:数组中当前正在处理的元素。 index:正在处理的元素在数组中的索引。 |\n| thisArg | any | 否 | - | - | 执行 callbackFn 时用作 this 的值 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| boolean | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"every_5":{"name":"### every(predicate, thisArg?)","description":"every() 方法测试一个数组内的所有元素是否都能通过指定函数的测试。它返回一个布尔值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: T) => any | 是 | - | - | 为数组中的每个元素执行的函数。它应该返回一个真值以指示元素通过测试,否则返回一个假值。该函数被调用时将传入以下参数: value:数组中当前正在处理的元素。 |\n| thisArg | any | 否 | - | - | 执行 callbackFn 时用作 this 的值 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| boolean | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"some":{"name":"### some(predicate, thisArg?)","description":"some() 方法测试数组中是否至少有一个元素通过了由提供的函数实现的测试。如果在数组中找到一个元素使得提供的函数返回 true,则返回 true;否则返回 false。它不会修改数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: T, index: number, array: Array\\<T\\>) => any | 是 | - | - | 为数组中的每个元素执行的函数。它应该返回一个真值以指示元素通过测试,否则返回一个假值。该函数被调用时将传入以下参数: value:数组中当前正在处理的元素。 index:正在处理的元素在数组中的索引。 array:调用了 some() 的数组本身。 |\n| thisArg | any | 否 | - | - | 执行 callbackFn 时用作 this 的值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 如果回调函数对数组中至少一个元素返回一个真值,则返回 true。否则返回 false。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const array : number[] = [1, 2, 3, 4, 5];\n const even = (element : number) : boolean => element % 2 == 0;\n console.log(array.some(even));//true\n```"},"some_1":{"name":"### some(predicate, thisArg?)","description":"some() 方法测试数组中是否至少有一个元素通过了由提供的函数实现的测试。如果在数组中找到一个元素使得提供的函数返回 true,则返回 true;否则返回 false。它不会修改数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: T, index: number) => any | 是 | - | - | 为数组中的每个元素执行的函数。它应该返回一个真值以指示元素通过测试,否则返回一个假值。该函数被调用时将传入以下参数: value:数组中当前正在处理的元素。 index:正在处理的元素在数组中的索引。 |\n| thisArg | any | 否 | - | - | 执行 callbackFn 时用作 this 的值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 如果回调函数对数组中至少一个元素返回一个真值,则返回 true。否则返回 false。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"some_2":{"name":"### some(predicate, thisArg?)","description":"some() 方法测试数组中是否至少有一个元素通过了由提供的函数实现的测试。如果在数组中找到一个元素使得提供的函数返回 true,则返回 true;否则返回 false。它不会修改数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: T) => any | 是 | - | - | 为数组中的每个元素执行的函数。它应该返回一个真值以指示元素通过测试,否则返回一个假值。该函数被调用时将传入以下参数: value:数组中当前正在处理的元素。 |\n| thisArg | any | 否 | - | - | 执行 callbackFn 时用作 this 的值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 如果回调函数对数组中至少一个元素返回一个真值,则返回 true。否则返回 false。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"forEach":{"name":"### forEach(callbackfn, thisArg?)","description":"forEach() 方法对数组的每个元素执行一次给定的函数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (value: T, index: number, array: Array\\<T\\>) => void | 是 | - | - | 为数组中每个元素执行的函数。并会丢弃它的返回值。该函数被调用时将传入以下参数: value:数组中正在处理的当前元素。 index:数组中正在处理的当前元素的索引。 array:调用了 forEach() 的数组本身。 |\n| thisArg | any | 否 | - | - | 执行 callbackFn 时用作 this 的值。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const array1 : string[] = ['a', 'b', 'c'];\n array1.forEach(element => console.log(element));\n // expected output: \"a\"\n // expected output: \"b\"\n // expected output: \"c\"\n const items : string[] = ['item1', 'item2', 'item3'];\n const copyItems : string[] = [];\n items.forEach((item : string) => {\n copyItems.push(item);\n });\n console.log(copyItems)//['item1', 'item2', 'item3']\n```"},"forEach_1":{"name":"### forEach(callbackfn, thisArg?)","description":"forEach() 方法对数组的每个元素执行一次给定的函数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (value: T, index: number) => void | 是 | - | - | 为数组中每个元素执行的函数。并会丢弃它的返回值。该函数被调用时将传入以下参数: value:数组中正在处理的当前元素。 index:数组中正在处理的当前元素的索引。 |\n| thisArg | any | 否 | - | - | 执行 callbackFn 时用作 this 的值。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const array1 : string[] = ['a', 'b', 'c'];\n array1.forEach(element => console.log(element));\n // expected output: \"a\"\n // expected output: \"b\"\n // expected output: \"c\"\n const items : string[] = ['item1', 'item2', 'item3'];\n const copyItems : string[] = [];\n items.forEach((item : string) => {\n copyItems.push(item);\n });\n console.log(copyItems)//['item1', 'item2', 'item3']\n```"},"forEach_2":{"name":"### forEach(callbackfn, thisArg?)","description":"forEach() 方法对数组的每个元素执行一次给定的函数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (value: T) => void | 是 | - | - | 为数组中每个元素执行的函数。并会丢弃它的返回值。该函数被调用时将传入以下参数: value:数组中正在处理的当前元素。 |\n| thisArg | any | 否 | - | - | 执行 callbackFn 时用作 this 的值。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const array1 : string[] = ['a', 'b', 'c'];\n array1.forEach(element => console.log(element));\n // expected output: \"a\"\n // expected output: \"b\"\n // expected output: \"c\"\n const items : string[] = ['item1', 'item2', 'item3'];\n const copyItems : string[] = [];\n items.forEach((item : string) => {\n copyItems.push(item);\n });\n console.log(copyItems)//['item1', 'item2', 'item3']\n```"},"map":{"name":"### map(callbackfn, thisArg?)","description":"map() 方法创建一个新数组,这个新数组由原数组中的每个元素都调用一次提供的函数后的返回值组成。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (value: T, index: number, array: Array\\<T\\>) => any | 是 | - | - | 为数组中的每个元素执行的函数。它的返回值作为一个元素被添加为新数组中。该函数被调用时将传入以下参数: value:数组中当前正在处理的元素。 index:正在处理的元素在数组中的索引。 array:调用了 map() 的数组本身。 |\n| thisArg | any | 否 | - | - | 执行 callbackFn 时用作 this 的值 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| U[\\] | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const array1 : number[] = [1, 4, 9, 16];\n const map1 = array1.map((x : number) : number => x * 2);\n console.log(map1);\n // expected output: Array [2, 8, 18, 32]\n const numbers : number[] = [1, 4, 9];\n const roots = numbers.map((num : number) : number => num + 1);\n\n\n const array2 : number[] = [1, 2, 3];\n array2.map((element : number, index : number, array : number[]) => {\n console.log(array[index]) //1=>2=>3\n })\n```"},"map_1":{"name":"### map(callbackfn, thisArg?)","description":"map() 方法创建一个新数组,这个新数组由原数组中的每个元素都调用一次提供的函数后的返回值组成。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (value: T, index: number) => any | 是 | - | - | 为数组中的每个元素执行的函数。它的返回值作为一个元素被添加为新数组中。该函数被调用时将传入以下参数: value:数组中当前正在处理的元素。 index:正在处理的元素在数组中的索引。 |\n| thisArg | any | 否 | - | - | 执行 callbackFn 时用作 this 的值 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| U[\\] | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const array1 : number[] = [1, 4, 9, 16];\n const map1 = array1.map((x : number) : number => x * 2);\n console.log(map1);\n // expected output: Array [2, 8, 18, 32]\n const numbers : number[] = [1, 4, 9];\n const roots = numbers.map((num : number) : number => num + 1);\n\n\n const array2 : number[] = [1, 2, 3];\n array2.map((element : number, index : number, array : number[]) => {\n console.log(array[index]) //1=>2=>3\n })\n```"},"map_2":{"name":"### map(callbackfn, thisArg?)","description":"map() 方法创建一个新数组,这个新数组由原数组中的每个元素都调用一次提供的函数后的返回值组成。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (value: T) => any | 是 | - | - | 为数组中的每个元素执行的函数。它的返回值作为一个元素被添加为新数组中。该函数被调用时将传入以下参数: value:数组中当前正在处理的元素。 |\n| thisArg | any | 否 | - | - | 执行 callbackFn 时用作 this 的值 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| U[\\] | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const array1 : number[] = [1, 4, 9, 16];\n const map1 = array1.map((x : number) : number => x * 2);\n console.log(map1);\n // expected output: Array [2, 8, 18, 32]\n const numbers : number[] = [1, 4, 9];\n const roots = numbers.map((num : number) : number => num + 1);\n\n\n const array2 : number[] = [1, 2, 3];\n array2.map((element : number, index : number, array : number[]) => {\n console.log(array[index]) //1=>2=>3\n })\n```"},"filter":{"name":"### filter(predicate, thisArg?)","description":"filter() 方法创建给定数组一部分的浅拷贝,其包含通过所提供函数实现的测试的所有元素。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: T, index: number, array: Array\\<T\\>) => boolean | 是 | - | - | 为数组中的每个元素执行的函数。它应该返回一个真值以将元素保留在结果数组中,否则返回一个假值。该函数被调用时将传入以下参数: value:数组中当前正在处理的元素。 index:正在处理的元素在数组中的索引。 array:调用了 filter() 的数组本身。 |\n| thisArg | any | 否 | - | - | 执行 callbackFn 时用作 this 的值 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| S[\\] | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n","itemType":"method","test":"```uts\n const words : string[] = ['spray', 'limit', 'elite', 'exuberant', 'destruction', 'present'];\n const result = words.filter((word : string) : boolean => word.length > 6);\n console.log(result);// [\"exuberant\", \"destruction\", \"present\"]\n\n const array1 : number[] = [-3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13];\n const isPrime = array1.filter((num : number) : boolean => {\n for (let i = 2; num > i; i++) {\n // swift里,基础类型暂不支持!==,===对比\n if (num % i == 0) {\n return false;\n }\n }\n return num > 1;\n })\n console.log(isPrime)//[2, 3, 5, 7, 11, 13]\n\n const array2 : number[] = [1, 2, 3];\n array2.filter((element : number, index : number, array : number[]) : boolean => {\n console.log(array[index])//1=>2=>3\n return true;\n })\n```"},"filter_1":{"name":"### filter(predicate, thisArg?)","description":"filter() 方法创建给定数组一部分的浅拷贝,其包含通过所提供函数实现的测试的所有元素。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: T, index: number) => boolean | 是 | - | - | 为数组中的每个元素执行的函数。它应该返回一个真值以将元素保留在结果数组中,否则返回一个假值。该函数被调用时将传入以下参数: value:数组中当前正在处理的元素。 index:正在处理的元素在数组中的索引。 |\n| thisArg | any | 否 | - | - | 执行 callbackFn 时用作 this 的值 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| S[\\] | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n","itemType":"method","test":"```uts\n const words : string[] = ['spray', 'limit', 'elite', 'exuberant', 'destruction', 'present'];\n const result = words.filter((word : string) : boolean => word.length > 6);\n console.log(result);// [\"exuberant\", \"destruction\", \"present\"]\n\n const array1 : number[] = [-3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13];\n const isPrime = array1.filter((num : number) : boolean => {\n for (let i = 2; num > i; i++) {\n // swift里,基础类型暂不支持!==,===对比\n if (num % i == 0) {\n return false;\n }\n }\n return num > 1;\n })\n console.log(isPrime)//[2, 3, 5, 7, 11, 13]\n\n const array2 : number[] = [1, 2, 3];\n array2.filter((element : number, index : number, array : number[]) : boolean => {\n console.log(array[index])//1=>2=>3\n return true;\n })\n```"},"filter_2":{"name":"### filter(predicate, thisArg?)","description":"filter() 方法创建给定数组一部分的浅拷贝,其包含通过所提供函数实现的测试的所有元素。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: T) => boolean | 是 | - | - | 为数组中的每个元素执行的函数。它应该返回一个真值以将元素保留在结果数组中,否则返回一个假值。该函数被调用时将传入以下参数: value:数组中当前正在处理的元素。 |\n| thisArg | any | 否 | - | - | 执行 callbackFn 时用作 this 的值 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| S[\\] | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n","itemType":"method","test":"```uts\n const words : string[] = ['spray', 'limit', 'elite', 'exuberant', 'destruction', 'present'];\n const result = words.filter((word : string) : boolean => word.length > 6);\n console.log(result);// [\"exuberant\", \"destruction\", \"present\"]\n\n const array1 : number[] = [-3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13];\n const isPrime = array1.filter((num : number) : boolean => {\n for (let i = 2; num > i; i++) {\n // swift里,基础类型暂不支持!==,===对比\n if (num % i == 0) {\n return false;\n }\n }\n return num > 1;\n })\n console.log(isPrime)//[2, 3, 5, 7, 11, 13]\n\n const array2 : number[] = [1, 2, 3];\n array2.filter((element : number, index : number, array : number[]) : boolean => {\n console.log(array[index])//1=>2=>3\n return true;\n })\n```"},"filter_3":{"name":"### filter(predicate, thisArg?)","description":"filter() 方法创建给定数组一部分的浅拷贝,其包含通过所提供函数实现的测试的所有元素。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: T, index: number, array: Array\\<T\\>) => any | 是 | - | - | 为数组中的每个元素执行的函数。它应该返回一个真值以将元素保留在结果数组中,否则返回一个假值。该函数被调用时将传入以下参数: value:数组中当前正在处理的元素。 index:正在处理的元素在数组中的索引。 array:调用了 filter() 的数组本身。 |\n| thisArg | any | 否 | - | - | 执行 callbackFn 时用作 this 的值 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| T[\\] | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const words : string[] = ['spray', 'limit', 'elite', 'exuberant', 'destruction', 'present'];\n const result = words.filter((word : string) : boolean => word.length > 6);\n console.log(result);// [\"exuberant\", \"destruction\", \"present\"]\n\n const array1 : number[] = [-3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13];\n const isPrime = array1.filter((num : number) : boolean => {\n for (let i = 2; num > i; i++) {\n // swift里,基础类型暂不支持!==,===对比\n if (num % i == 0) {\n return false;\n }\n }\n return num > 1;\n })\n console.log(isPrime)//[2, 3, 5, 7, 11, 13]\n\n const array2 : number[] = [1, 2, 3];\n array2.filter((element : number, index : number, array : number[]) : boolean => {\n console.log(array[index])//1=>2=>3\n return true;\n })\n```"},"filter_4":{"name":"### filter(predicate, thisArg?)","description":"filter() 方法创建给定数组一部分的浅拷贝,其包含通过所提供函数实现的测试的所有元素。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: T, index: number) => any | 是 | - | - | 为数组中的每个元素执行的函数。它应该返回一个真值以将元素保留在结果数组中,否则返回一个假值。该函数被调用时将传入以下参数: value:数组中当前正在处理的元素。 index:正在处理的元素在数组中的索引。 |\n| thisArg | any | 否 | - | - | 执行 callbackFn 时用作 this 的值 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| T[\\] | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"filter_5":{"name":"### filter(predicate, thisArg?)","description":"filter() 方法创建给定数组一部分的浅拷贝,其包含通过所提供函数实现的测试的所有元素。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: T) => any | 是 | - | - | 为数组中的每个元素执行的函数。它应该返回一个真值以将元素保留在结果数组中,否则返回一个假值。该函数被调用时将传入以下参数: value:数组中当前正在处理的元素。 |\n| thisArg | any | 否 | - | - | 执行 callbackFn 时用作 this 的值 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| T[\\] | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"reduce":{"name":"### reduce(callbackfn)","description":"reduce() 方法对数组中的每个元素按序执行一个提供的 reducer 函数,每一次运行 reducer 会将先前元素的计算结果作为参数传入,最后将其结果汇总为单个返回值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (previousValue: T, currentValue: T, currentIndex: number, array: Array\\<T\\>) => T | 是 | - | - | 为数组中每个元素执行的函数。其返回值将作为下一次调用 callbackFn 时的 accumulator 参数。对于最后一次调用,返回值将作为 reduce() 的返回值。该函数被调用时将传入以下参数: previousValue:上一次调用 callbackFn 的结果。在第一次调用时,如果指定了 initialValue 则为指定的值,否则为 array\\[0] 的值。 currentValue:当前元素的值。在第一次调用时,如果指定了 initialValue,则为 array[0] 的值,否则为 array[1] currentIndex:currentValue 在数组中的索引位置。在第一次调用时,如果指定了 initialValue 则为 0,否则为 1 array:调用了 reduce() 的数组本身。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| T | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const array1 : number[] = [1, 2, 3, 4];\n const initialValue : number = 0;\n const sumWithInitial = array1.reduce(\n (previousValue : number, currentValue : number) : number => previousValue + currentValue,\n initialValue\n );\n console.log(sumWithInitial)//10\n```"},"reduce_1":{"name":"### reduce(callbackfn)","description":"reduce() 方法对数组中的每个元素按序执行一个提供的 reducer 函数,每一次运行 reducer 会将先前元素的计算结果作为参数传入,最后将其结果汇总为单个返回值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (previousValue: T, currentValue: T, currentIndex: number) => T | 是 | - | - | 为数组中每个元素执行的函数。其返回值将作为下一次调用 callbackFn 时的 accumulator 参数。对于最后一次调用,返回值将作为 reduce() 的返回值。该函数被调用时将传入以下参数: previousValue:上一次调用 callbackFn 的结果。在第一次调用时,如果指定了 initialValue 则为指定的值,否则为 array\\[0] 的值。 currentValue:当前元素的值。在第一次调用时,如果指定了 initialValue,则为 array[0] 的值,否则为 array[1] currentIndex:currentValue 在数组中的索引位置。在第一次调用时,如果指定了 initialValue 则为 0,否则为 1 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| T | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const array1 : number[] = [1, 2, 3, 4];\n const initialValue : number = 0;\n const sumWithInitial = array1.reduce(\n (previousValue : number, currentValue : number) : number => previousValue + currentValue,\n initialValue\n );\n console.log(sumWithInitial)//10\n```"},"reduce_2":{"name":"### reduce(callbackfn)","description":"reduce() 方法对数组中的每个元素按序执行一个提供的 reducer 函数,每一次运行 reducer 会将先前元素的计算结果作为参数传入,最后将其结果汇总为单个返回值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (previousValue: T, currentValue: T) => T | 是 | - | - | 为数组中每个元素执行的函数。其返回值将作为下一次调用 callbackFn 时的 accumulator 参数。对于最后一次调用,返回值将作为 reduce() 的返回值。该函数被调用时将传入以下参数: previousValue:上一次调用 callbackFn 的结果。在第一次调用时,如果指定了 initialValue 则为指定的值,否则为 array\\[0] 的值。 currentValue:当前元素的值。在第一次调用时,如果指定了 initialValue,则为 array[0] 的值,否则为 array[1] | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| T | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const array1 : number[] = [1, 2, 3, 4];\n const initialValue : number = 0;\n const sumWithInitial = array1.reduce(\n (previousValue : number, currentValue : number) : number => previousValue + currentValue,\n initialValue\n );\n console.log(sumWithInitial)//10\n```"},"reduce_3":{"name":"### reduce(callbackfn, initialValue)","description":"reduce() 方法对数组中的每个元素按序执行一个提供的 reducer 函数,每一次运行 reducer 会将先前元素的计算结果作为参数传入,最后将其结果汇总为单个返回值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (previousValue: T, currentValue: T, currentIndex: number, array: Array\\<T\\>) => T | 是 | - | - | 为数组中每个元素执行的函数。其返回值将作为下一次调用 callbackFn 时的 accumulator 参数。对于最后一次调用,返回值将作为 reduce() 的返回值。该函数被调用时将传入以下参数: previousValue:上一次调用 callbackFn 的结果。在第一次调用时,如果指定了 initialValue 则为指定的值,否则为 array\\[0] 的值。 currentValue:当前元素的值。在第一次调用时,如果指定了 initialValue,则为 array[0] 的值,否则为 array[1] currentIndex:currentValue 在数组中的索引位置。在第一次调用时,如果指定了 initialValue 则为 0,否则为 1 array:调用了 reduce() 的数组本身。 |\n| initialValue | T | 是 | - | - | 第一次调用回调时初始化 accumulator 的值。如果指定了 initialValue,则 callbackFn 从数组中的第一个值作为 currentValue 开始执行。如果没有指定 initialValue,则 accumulator 初始化为数组中的第一个值,并且 callbackFn 从数组中的第二个值作为 currentValue 开始执行。在这种情况下,如果数组为空(没有第一个值可以作为 accumulator 返回),则会抛出错误。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| T | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const array1 : number[] = [1, 2, 3, 4];\n const initialValue : number = 0;\n const sumWithInitial = array1.reduce(\n (previousValue : number, currentValue : number) : number => previousValue + currentValue,\n initialValue\n );\n console.log(sumWithInitial)//10\n```"},"reduce_4":{"name":"### reduce(callbackfn, initialValue)","description":"reduce() 方法对数组中的每个元素按序执行一个提供的 reducer 函数,每一次运行 reducer 会将先前元素的计算结果作为参数传入,最后将其结果汇总为单个返回值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (previousValue: T, currentValue: T, currentIndex: number) => T | 是 | - | - | 为数组中每个元素执行的函数。其返回值将作为下一次调用 callbackFn 时的 accumulator 参数。对于最后一次调用,返回值将作为 reduce() 的返回值。该函数被调用时将传入以下参数: previousValue:上一次调用 callbackFn 的结果。在第一次调用时,如果指定了 initialValue 则为指定的值,否则为 array\\[0] 的值。 currentValue:当前元素的值。在第一次调用时,如果指定了 initialValue,则为 array[0] 的值,否则为 array[1] currentIndex:currentValue 在数组中的索引位置。在第一次调用时,如果指定了 initialValue 则为 0,否则为 1 |\n| initialValue | T | 是 | - | - | 第一次调用回调时初始化 accumulator 的值。如果指定了 initialValue,则 callbackFn 从数组中的第一个值作为 currentValue 开始执行。如果没有指定 initialValue,则 accumulator 初始化为数组中的第一个值,并且 callbackFn 从数组中的第二个值作为 currentValue 开始执行。在这种情况下,如果数组为空(没有第一个值可以作为 accumulator 返回),则会抛出错误。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| T | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const array1 : number[] = [1, 2, 3, 4];\n const initialValue : number = 0;\n const sumWithInitial = array1.reduce(\n (previousValue : number, currentValue : number) : number => previousValue + currentValue,\n initialValue\n );\n console.log(sumWithInitial)//10\n```"},"reduce_5":{"name":"### reduce(callbackfn, initialValue)","description":"reduce() 方法对数组中的每个元素按序执行一个提供的 reducer 函数,每一次运行 reducer 会将先前元素的计算结果作为参数传入,最后将其结果汇总为单个返回值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (previousValue: T, currentValue: T) => T | 是 | - | - | 为数组中每个元素执行的函数。其返回值将作为下一次调用 callbackFn 时的 accumulator 参数。对于最后一次调用,返回值将作为 reduce() 的返回值。该函数被调用时将传入以下参数: previousValue:上一次调用 callbackFn 的结果。在第一次调用时,如果指定了 initialValue 则为指定的值,否则为 array\\[0] 的值。 currentValue:当前元素的值。在第一次调用时,如果指定了 initialValue,则为 array[0] 的值,否则为 array[1] |\n| initialValue | T | 是 | - | - | 第一次调用回调时初始化 accumulator 的值。如果指定了 initialValue,则 callbackFn 从数组中的第一个值作为 currentValue 开始执行。如果没有指定 initialValue,则 accumulator 初始化为数组中的第一个值,并且 callbackFn 从数组中的第二个值作为 currentValue 开始执行。在这种情况下,如果数组为空(没有第一个值可以作为 accumulator 返回),则会抛出错误。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| T | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const array1 : number[] = [1, 2, 3, 4];\n const initialValue : number = 0;\n const sumWithInitial = array1.reduce(\n (previousValue : number, currentValue : number) : number => previousValue + currentValue,\n initialValue\n );\n console.log(sumWithInitial)//10\n```"},"reduce_6":{"name":"### reduce(callbackfn, initialValue)","description":"reduce() 方法对数组中的每个元素按序执行一个提供的 reducer 函数,每一次运行 reducer 会将先前元素的计算结果作为参数传入,最后将其结果汇总为单个返回值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (previousValue: any, currentValue: T, currentIndex: number, array: Array\\<T\\>) => any | 是 | - | - | 为数组中每个元素执行的函数。其返回值将作为下一次调用 callbackFn 时的 accumulator 参数。对于最后一次调用,返回值将作为 reduce() 的返回值。该函数被调用时将传入以下参数: previousValue:上一次调用 callbackFn 的结果。在第一次调用时,如果指定了 initialValue 则为指定的值,否则为 array\\[0] 的值。 currentValue:当前元素的值。在第一次调用时,如果指定了 initialValue,则为 array[0] 的值,否则为 array[1] currentIndex:currentValue 在数组中的索引位置。在第一次调用时,如果指定了 initialValue 则为 0,否则为 1 array:调用了 reduce() 的数组本身。 |\n| initialValue | U | 是 | - | - | 第一次调用回调时初始化 accumulator 的值。如果指定了 initialValue,则 callbackFn 从数组中的第一个值作为 currentValue 开始执行。如果没有指定 initialValue,则 accumulator 初始化为数组中的第一个值,并且 callbackFn 从数组中的第二个值作为 currentValue 开始执行。在这种情况下,如果数组为空(没有第一个值可以作为 accumulator 返回),则会抛出错误。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| U | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n","itemType":"method"},"reduce_7":{"name":"### reduce(callbackfn, initialValue)","description":"reduce() 方法对数组中的每个元素按序执行一个提供的 reducer 函数,每一次运行 reducer 会将先前元素的计算结果作为参数传入,最后将其结果汇总为单个返回值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (previousValue: any, currentValue: T, currentIndex: number) => any | 是 | - | - | 为数组中每个元素执行的函数。其返回值将作为下一次调用 callbackFn 时的 accumulator 参数。对于最后一次调用,返回值将作为 reduce() 的返回值。该函数被调用时将传入以下参数: previousValue:上一次调用 callbackFn 的结果。在第一次调用时,如果指定了 initialValue 则为指定的值,否则为 array\\[0] 的值。 currentValue:当前元素的值。在第一次调用时,如果指定了 initialValue,则为 array[0] 的值,否则为 array[1] currentIndex:currentValue 在数组中的索引位置。在第一次调用时,如果指定了 initialValue 则为 0,否则为 1 |\n| initialValue | U | 是 | - | - | 第一次调用回调时初始化 accumulator 的值。如果指定了 initialValue,则 callbackFn 从数组中的第一个值作为 currentValue 开始执行。如果没有指定 initialValue,则 accumulator 初始化为数组中的第一个值,并且 callbackFn 从数组中的第二个值作为 currentValue 开始执行。在这种情况下,如果数组为空(没有第一个值可以作为 accumulator 返回),则会抛出错误。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| U | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n","itemType":"method"},"reduce_8":{"name":"### reduce(callbackfn, initialValue)","description":"reduce() 方法对数组中的每个元素按序执行一个提供的 reducer 函数,每一次运行 reducer 会将先前元素的计算结果作为参数传入,最后将其结果汇总为单个返回值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (previousValue: any, currentValue: T) => any | 是 | - | - | 为数组中每个元素执行的函数。其返回值将作为下一次调用 callbackFn 时的 accumulator 参数。对于最后一次调用,返回值将作为 reduce() 的返回值。该函数被调用时将传入以下参数: previousValue:上一次调用 callbackFn 的结果。在第一次调用时,如果指定了 initialValue 则为指定的值,否则为 array\\[0] 的值。 currentValue:当前元素的值。在第一次调用时,如果指定了 initialValue,则为 array[0] 的值,否则为 array[1] |\n| initialValue | U | 是 | - | - | 第一次调用回调时初始化 accumulator 的值。如果指定了 initialValue,则 callbackFn 从数组中的第一个值作为 currentValue 开始执行。如果没有指定 initialValue,则 accumulator 初始化为数组中的第一个值,并且 callbackFn 从数组中的第二个值作为 currentValue 开始执行。在这种情况下,如果数组为空(没有第一个值可以作为 accumulator 返回),则会抛出错误。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| U | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n","itemType":"method"},"reduceRight":{"name":"### reduceRight(callbackfn)","description":"reduceRight() 方法对累加器(accumulator)和数组的每个值(按从右到左的顺序)应用一个函数,并使其成为单个值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (previousValue: T, currentValue: T, currentIndex: number, array: Array\\<T\\>) => T | 是 | - | - | 为数组中的每个元素执行的函数。其返回值将作为下一次调用 callbackFn 时的 accumulator 参数。对于最后一次调用,返回值将成为 reduceRight() 的返回值。该函数被调用时将传入以下参数: previousValue:上一次调用 callbackFn 的结果。在第一次调用时,如果指定了 initialValue 则为指定的值,否则为数组最后一个元素的值。 currentValue:数组中当前正在处理的元素。 currentIndex:正在处理的元素在数组中的索引。 array:调用了 reduceRight() 的数组本身。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| T | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const array1 : number[][] = [[0, 1], [2, 3], [4, 5]];\n const result1 = array1.reduceRight((accumulator : number[], currentValue : number[]) : number[] => accumulator.concat(currentValue));\n console.log(result1) //[4, 5, 2, 3, 0, 1]\n\n\n const array2 : number[] = [1, 2, 3, 4];\n let result2 = array2.reduceRight((acc : number, cur : number, index : number, array : number[]) : number => {\n return acc + cur;\n });\n\n console.log(result2) //10\n\n\n const result3 = array2.reduceRight((acc : number, cur : number) : number => acc + cur, 5);\n console.log(result3) //15\n```"},"reduceRight_1":{"name":"### reduceRight(callbackfn)","description":"reduceRight() 方法对累加器(accumulator)和数组的每个值(按从右到左的顺序)应用一个函数,并使其成为单个值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (previousValue: T, currentValue: T, currentIndex: number) => T | 是 | - | - | 为数组中的每个元素执行的函数。其返回值将作为下一次调用 callbackFn 时的 accumulator 参数。对于最后一次调用,返回值将成为 reduceRight() 的返回值。该函数被调用时将传入以下参数: previousValue:上一次调用 callbackFn 的结果。在第一次调用时,如果指定了 initialValue 则为指定的值,否则为数组最后一个元素的值。 currentValue:数组中当前正在处理的元素。 currentIndex:正在处理的元素在数组中的索引。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| T | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const array1 : number[][] = [[0, 1], [2, 3], [4, 5]];\n const result1 = array1.reduceRight((accumulator : number[], currentValue : number[]) : number[] => accumulator.concat(currentValue));\n console.log(result1) //[4, 5, 2, 3, 0, 1]\n\n\n const array2 : number[] = [1, 2, 3, 4];\n let result2 = array2.reduceRight((acc : number, cur : number, index : number, array : number[]) : number => {\n return acc + cur;\n });\n\n console.log(result2) //10\n\n\n const result3 = array2.reduceRight((acc : number, cur : number) : number => acc + cur, 5);\n console.log(result3) //15\n```"},"reduceRight_2":{"name":"### reduceRight(callbackfn)","description":"reduceRight() 方法对累加器(accumulator)和数组的每个值(按从右到左的顺序)应用一个函数,并使其成为单个值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (previousValue: T, currentValue: T) => T | 是 | - | - | 为数组中的每个元素执行的函数。其返回值将作为下一次调用 callbackFn 时的 accumulator 参数。对于最后一次调用,返回值将成为 reduceRight() 的返回值。该函数被调用时将传入以下参数: previousValue:上一次调用 callbackFn 的结果。在第一次调用时,如果指定了 initialValue 则为指定的值,否则为数组最后一个元素的值。 currentValue:数组中当前正在处理的元素。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| T | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const array1 : number[][] = [[0, 1], [2, 3], [4, 5]];\n const result1 = array1.reduceRight((accumulator : number[], currentValue : number[]) : number[] => accumulator.concat(currentValue));\n console.log(result1) //[4, 5, 2, 3, 0, 1]\n\n\n const array2 : number[] = [1, 2, 3, 4];\n let result2 = array2.reduceRight((acc : number, cur : number, index : number, array : number[]) : number => {\n return acc + cur;\n });\n\n console.log(result2) //10\n\n\n const result3 = array2.reduceRight((acc : number, cur : number) : number => acc + cur, 5);\n console.log(result3) //15\n```"},"reduceRight_3":{"name":"### reduceRight(callbackfn, initialValue)","description":"reduceRight() 方法对累加器(accumulator)和数组的每个值(按从右到左的顺序)应用一个函数,并使其成为单个值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (previousValue: T, currentValue: T, currentIndex: number, array: Array\\<T\\>) => T | 是 | - | - | 为数组中的每个元素执行的函数。其返回值将作为下一次调用 callbackFn 时的 accumulator 参数。对于最后一次调用,返回值将成为 reduceRight() 的返回值。该函数被调用时将传入以下参数: previousValue:上一次调用 callbackFn 的结果。在第一次调用时,如果指定了 initialValue 则为指定的值,否则为数组最后一个元素的值。 currentValue:数组中当前正在处理的元素。 currentIndex:正在处理的元素在数组中的索引。 array:调用了 reduceRight() 的数组本身。 |\n| initialValue | T | 是 | - | - | 首次调用 callbackFn 时累加器的值。如果不提供初始值,则将使用数组中的最后一个元素,并在迭代时跳过它。没有初始值的情况下,在空数组上调用 reduceRight() 会产生 TypeError。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| T | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const array1 : number[][] = [[0, 1], [2, 3], [4, 5]];\n const result1 = array1.reduceRight((accumulator : number[], currentValue : number[]) : number[] => accumulator.concat(currentValue));\n console.log(result1) //[4, 5, 2, 3, 0, 1]\n\n\n const array2 : number[] = [1, 2, 3, 4];\n let result2 = array2.reduceRight((acc : number, cur : number, index : number, array : number[]) : number => {\n return acc + cur;\n });\n\n console.log(result2) //10\n\n\n const result3 = array2.reduceRight((acc : number, cur : number) : number => acc + cur, 5);\n console.log(result3) //15\n```"},"reduceRight_4":{"name":"### reduceRight(callbackfn, initialValue)","description":"reduceRight() 方法对累加器(accumulator)和数组的每个值(按从右到左的顺序)应用一个函数,并使其成为单个值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (previousValue: T, currentValue: T, currentIndex: number) => T | 是 | - | - | 为数组中的每个元素执行的函数。其返回值将作为下一次调用 callbackFn 时的 accumulator 参数。对于最后一次调用,返回值将成为 reduceRight() 的返回值。该函数被调用时将传入以下参数: previousValue:上一次调用 callbackFn 的结果。在第一次调用时,如果指定了 initialValue 则为指定的值,否则为数组最后一个元素的值。 currentValue:数组中当前正在处理的元素。 currentIndex:正在处理的元素在数组中的索引。 |\n| initialValue | T | 是 | - | - | 首次调用 callbackFn 时累加器的值。如果不提供初始值,则将使用数组中的最后一个元素,并在迭代时跳过它。没有初始值的情况下,在空数组上调用 reduceRight() 会产生 TypeError。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| T | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const array1 : number[][] = [[0, 1], [2, 3], [4, 5]];\n const result1 = array1.reduceRight((accumulator : number[], currentValue : number[]) : number[] => accumulator.concat(currentValue));\n console.log(result1) //[4, 5, 2, 3, 0, 1]\n\n\n const array2 : number[] = [1, 2, 3, 4];\n let result2 = array2.reduceRight((acc : number, cur : number, index : number, array : number[]) : number => {\n return acc + cur;\n });\n\n console.log(result2) //10\n\n\n const result3 = array2.reduceRight((acc : number, cur : number) : number => acc + cur, 5);\n console.log(result3) //15\n```"},"reduceRight_5":{"name":"### reduceRight(callbackfn, initialValue)","description":"reduceRight() 方法对累加器(accumulator)和数组的每个值(按从右到左的顺序)应用一个函数,并使其成为单个值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (previousValue: T, currentValue: T) => T | 是 | - | - | 为数组中的每个元素执行的函数。其返回值将作为下一次调用 callbackFn 时的 accumulator 参数。对于最后一次调用,返回值将成为 reduceRight() 的返回值。该函数被调用时将传入以下参数: previousValue:上一次调用 callbackFn 的结果。在第一次调用时,如果指定了 initialValue 则为指定的值,否则为数组最后一个元素的值。 currentValue:数组中当前正在处理的元素。 |\n| initialValue | T | 是 | - | - | 首次调用 callbackFn 时累加器的值。如果不提供初始值,则将使用数组中的最后一个元素,并在迭代时跳过它。没有初始值的情况下,在空数组上调用 reduceRight() 会产生 TypeError。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| T | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const array1 : number[][] = [[0, 1], [2, 3], [4, 5]];\n const result1 = array1.reduceRight((accumulator : number[], currentValue : number[]) : number[] => accumulator.concat(currentValue));\n console.log(result1) //[4, 5, 2, 3, 0, 1]\n\n\n const array2 : number[] = [1, 2, 3, 4];\n let result2 = array2.reduceRight((acc : number, cur : number, index : number, array : number[]) : number => {\n return acc + cur;\n });\n\n console.log(result2) //10\n\n\n const result3 = array2.reduceRight((acc : number, cur : number) : number => acc + cur, 5);\n console.log(result3) //15\n```"},"reduceRight_6":{"name":"### reduceRight(callbackfn, initialValue)","description":"reduceRight() 方法对累加器(accumulator)和数组的每个值(按从右到左的顺序)应用一个函数,并使其成为单个值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (previousValue: any, currentValue: T, currentIndex: number, array: Array\\<T\\>) => any | 是 | - | - | 为数组中的每个元素执行的函数。其返回值将作为下一次调用 callbackFn 时的 accumulator 参数。对于最后一次调用,返回值将成为 reduceRight() 的返回值。该函数被调用时将传入以下参数: previousValue:上一次调用 callbackFn 的结果。在第一次调用时,如果指定了 initialValue 则为指定的值,否则为数组最后一个元素的值。 currentValue:数组中当前正在处理的元素。 index:正在处理的元素在数组中的索引。 array:调用了 reduceRight() 的数组本身。 |\n| initialValue | U | 是 | - | - | 首次调用 callbackFn 时累加器的值。如果不提供初始值,则将使用数组中的最后一个元素,并在迭代时跳过它。没有初始值的情况下,在空数组上调用 reduceRight() 会产生 TypeError。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| U | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n","itemType":"method","test":"```uts\n const array1 : number[][] = [[0, 1], [2, 3], [4, 5]];\n const result1 = array1.reduceRight((accumulator : number[], currentValue : number[]) : number[] => accumulator.concat(currentValue));\n console.log(result1) //[4, 5, 2, 3, 0, 1]\n\n\n const array2 : number[] = [1, 2, 3, 4];\n let result2 = array2.reduceRight((acc : number, cur : number, index : number, array : number[]) : number => {\n return acc + cur;\n });\n\n console.log(result2) //10\n\n\n const result3 = array2.reduceRight((acc : number, cur : number) : number => acc + cur, 5);\n console.log(result3) //15\n```"},"reduceRight_7":{"name":"### reduceRight(callbackfn, initialValue)","description":"reduceRight() 方法对累加器(accumulator)和数组的每个值(按从右到左的顺序)应用一个函数,并使其成为单个值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (previousValue: any, currentValue: T, currentIndex: number) => any | 是 | - | - | 为数组中的每个元素执行的函数。其返回值将作为下一次调用 callbackFn 时的 accumulator 参数。对于最后一次调用,返回值将成为 reduceRight() 的返回值。该函数被调用时将传入以下参数: previousValue:上一次调用 callbackFn 的结果。在第一次调用时,如果指定了 initialValue 则为指定的值,否则为数组最后一个元素的值。 currentValue:数组中当前正在处理的元素。 index:正在处理的元素在数组中的索引。 |\n| initialValue | U | 是 | - | - | 首次调用 callbackFn 时累加器的值。如果不提供初始值,则将使用数组中的最后一个元素,并在迭代时跳过它。没有初始值的情况下,在空数组上调用 reduceRight() 会产生 TypeError。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| U | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n","itemType":"method"},"reduceRight_8":{"name":"### reduceRight(callbackfn, initialValue)","description":"reduceRight() 方法对累加器(accumulator)和数组的每个值(按从右到左的顺序)应用一个函数,并使其成为单个值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (previousValue: any, currentValue: T) => any | 是 | - | - | 为数组中的每个元素执行的函数。其返回值将作为下一次调用 callbackFn 时的 accumulator 参数。对于最后一次调用,返回值将成为 reduceRight() 的返回值。该函数被调用时将传入以下参数: previousValue:上一次调用 callbackFn 的结果。在第一次调用时,如果指定了 initialValue 则为指定的值,否则为数组最后一个元素的值。 currentValue:数组中当前正在处理的元素。 |\n| initialValue | U | 是 | - | - | 首次调用 callbackFn 时累加器的值。如果不提供初始值,则将使用数组中的最后一个元素,并在迭代时跳过它。没有初始值的情况下,在空数组上调用 reduceRight() 会产生 TypeError。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| U | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n","itemType":"method"},"find":{"name":"### find(predicate, thisArg?)","description":"find() 方法返回数组中满足提供的测试函数的第一个元素的值。否则返回 null。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: T, index: number, obj: Array\\<T\\>) => boolean | 是 | - | - | 为数组中的每个元素执行的函数。它应该返回一个真值来表示已经找到了匹配的元素。 |\n| thisArg | any | 否 | - | - | 执行 callbackFn 时用作 this 的值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| S \\| null | 数组中第一个满足所提供测试函数的元素的值,否则返回 null | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n let array2 : number[] = [1, 2, 3];\n array2.find((element : number, index : number, array : number[]) : boolean => {\n console.log(array[index]) //1=>2=>3\n return true;\n })\n```"},"find_1":{"name":"### find(predicate, thisArg?)","description":"find() 方法返回数组中满足提供的测试函数的第一个元素的值。否则返回 null。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: T, index: number) => boolean | 是 | - | - | 为数组中的每个元素执行的函数。它应该返回一个真值来表示已经找到了匹配的元素。 |\n| thisArg | any | 否 | - | - | 执行 callbackFn 时用作 this 的值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| S \\| null | 数组中第一个满足所提供测试函数的元素的值,否则返回 null | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const array3 : number[] = [5, 12, 8, 130, 44];\n const found2 = array3.find((element : number, index : number) : boolean => element < 5);\n console.log(found2) // null\n```"},"find_2":{"name":"### find(predicate, thisArg?)","description":"find() 方法返回数组中满足提供的测试函数的第一个元素的值。否则返回 null。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: T) => boolean | 是 | - | - | 为数组中的每个元素执行的函数。它应该返回一个真值来表示已经找到了匹配的元素。 |\n| thisArg | any | 否 | - | - | 执行 callbackFn 时用作 this 的值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| S \\| null | 数组中第一个满足所提供测试函数的元素的值,否则返回 null | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const array1 : number[] = [5, 12, 8, 130, 44];\n const found1 = array1.find((element : number) : boolean => element > 10);\n console.log(found1) //12\n```"},"findIndex":{"name":"### findIndex(predicate, thisArg?)","description":"findIndex() 方法返回数组中满足提供的测试函数的第一个元素的索引。若没有找到对应元素则返回 -1。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: T, index: number, obj: Array\\<T\\>) => any | 是 | - | - | 为数组中的每个元素执行的函数。它应该返回一个真值以指示已找到匹配元素,否则返回一个假值。 |\n| thisArg | any | 否 | - | - | 执行 callbackFn 时用作 this 的值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 数组中第一个满足测试条件的元素的索引。否则返回 -1。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const array1 : number[] = [5, 12, 8, 130, 44];\n let isLargeNumber = (element : number, index : number) : boolean => element > 13;\n console.log(isLargeNumber)//3\n\n const array2 : number[] = [10, 11, 12];\n console.log(array2.findIndex(isLargeNumber))//3\n\n const array3 : number[] = [1, 2, 3];\n array3.findIndex((element : number, index : number, array : number[]) : boolean => {\n console.log(array[index]) //1=>2=>3\n return true;\n })\n```"},"findIndex_1":{"name":"### findIndex(predicate, thisArg?)","description":"findIndex() 方法返回数组中满足提供的测试函数的第一个元素的索引。若没有找到对应元素则返回 -1。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: T, index: number) => any | 是 | - | - | 为数组中的每个元素执行的函数。它应该返回一个真值以指示已找到匹配元素,否则返回一个假值。 |\n| thisArg | any | 否 | - | - | 执行 callbackFn 时用作 this 的值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 数组中第一个满足测试条件的元素的索引。否则返回 -1。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const array1 : number[] = [5, 12, 8, 130, 44];\n let isLargeNumber = (element : number, index : number) : boolean => element > 13;\n console.log(isLargeNumber)//3\n\n const array2 : number[] = [10, 11, 12];\n console.log(array2.findIndex(isLargeNumber))//3\n\n const array3 : number[] = [1, 2, 3];\n array3.findIndex((element : number, index : number, array : number[]) : boolean => {\n console.log(array[index]) //1=>2=>3\n return true;\n })\n```"},"findIndex_2":{"name":"### findIndex(predicate, thisArg?)","description":"findIndex() 方法返回数组中满足提供的测试函数的第一个元素的索引。若没有找到对应元素则返回 -1。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: T) => any | 是 | - | - | 为数组中的每个元素执行的函数。它应该返回一个真值以指示已找到匹配元素,否则返回一个假值。 |\n| thisArg | any | 否 | - | - | 执行 callbackFn 时用作 this 的值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 数组中第一个满足测试条件的元素的索引。否则返回 -1。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const array1 : number[] = [5, 12, 8, 130, 44];\n let isLargeNumber = (element : number, index : number) : boolean => element > 13;\n console.log(isLargeNumber)//3\n\n const array2 : number[] = [10, 11, 12];\n console.log(array2.findIndex(isLargeNumber))//3\n\n const array3 : number[] = [1, 2, 3];\n array3.findIndex((element : number, index : number, array : number[]) : boolean => {\n console.log(array[index]) //1=>2=>3\n return true;\n })\n```"},"fill":{"name":"### fill(value, start?, end?)","description":"fill() 方法用一个固定值填充一个数组中从起始索引(默认为 0)到终止索引(默认为 array.length)内的全部元素。它返回修改后的数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| value | T | 是 | - | - | 用来填充数组元素的值。注意所有数组中的元素都将是这个确定的值:如果 value 是个对象,那么数组的每一项都会引用这个元素。 |\n| start | number | 否 | - | - | 基于零的索引,从此开始填充,转换为整数。 |\n| end | number | 否 | - | - | 基于零的索引,在此结束填充,转换为整数。fill() 填充到但不包含 end 索引。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| this | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const array1 : number[] = [1, 2, 3, 4];\n let ret1 = array1.fill(0, 2, 4)\n console.log(ret1); //[1, 2, 0, 0]\n```"},"copyWithin":{"name":"### copyWithin(target, start?, end?)","description":"copyWithin() 方法浅复制数组的一部分到同一数组中的另一个位置,并返回它,不会改变原数组的长度。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| target | number | 是 | - | - | 序列开始替换的目标位置,以 0 为起始的下标表示,且将被转换为整数 |\n| start | number | 否 | - | - | 要复制的元素序列的起始位置,以 0 为起始的下标表示,且将被转换为整数 |\n| end | number | 否 | - | - | 要复制的元素序列的结束位置,以 0 为起始的下标表示,且将被转换为整数。copyWithin 将会拷贝到该位置,但不包括 end 这个位置的元素。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| this | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const arr = ['a', 'b', 'c', 'd', 'e'];\n let ret1 = arr.copyWithin(0, 3, 4)\n console.log(ret1)//[\"d\", \"b\", \"c\", \"d\", \"e\"]\n```"},"includes":{"name":"### includes(searchElement, fromIndex?)","description":"includes() 方法用来判断一个数组是否包含一个指定的值,根据情况,如果包含则返回 true,否则返回 false。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| searchElement | any | 是 | - | - | 需要查找的值。 |\n| fromIndex | number | 否 | - | - | 可选。开始搜索的索引(从零开始),会转换为整数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 一个布尔值,如果在数组中(或者在 fromIndex 所指示的数组部分中,如果指定 fromIndex 的话)找到 searchElement 值,则该值为 true。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const array1 : number[] = [1, 2, 3];\n console.log(array1.includes(2))//true\n```"},"Constructor":{"name":"### Constructor(...items)","description":"","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| items | T[\\] | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| T[\\] | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n let a1 = [1, 2, 3]\n let a2 = [1, '2', 3]\n console.log(a1) //[1, 2, 3]\n console.log(a2) // [1, '2', 3]\n```"},"isArray":{"name":"### isArray(arg)","description":"Array.isArray() 静态方法用于确定传递的值是否是一个 Array。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| arg | any | 是 | - | - | 需要检测的值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| arg is any[\\] | 如果 value 是 Array,则为 true;否则为 false。如果 value 是 TypedArray 实例,则总是返回 false。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n console.log(Array.isArray([1, 3, 5]));\n // Expected output: true\n\n console.log(Array.isArray('[]'));\n // Expected output: false\n\n console.log(Array.isArray(new Array(5)));\n // Expected output: true\n // #ifdef APP-ANDROID\n console.log(Array.isArray(new Int16Array([15, 33])));\n // #endif\n // Expected output: false\n```"},"sampleCreate":{"test":"```uts\n const fruits = ['Apple', 'Banana']\n console.log(fruits.length)\n```"},"sampleVisit":{"test":"```uts\n const first = fruits[0]\n console.log(first) // Apple\n\n const last = fruits[fruits.length - 1]\n console.log(last) // Banana\n```"},"sampleForEach":{"test":"```uts\n fruits.forEach(function (item, index: number, array) {\n console.log(item, index)\n })\n // Apple 0\n // Banana 1\n```"},"sampleAdd":{"test":"```uts\n let newLength = fruits.push('Orange')\n // [\"Apple\", \"Banana\", \"Orange\"]\n console.log(newLength)//3\n```"},"samplePop":{"test":"```uts\n const lastE = fruits.pop() // remove Orange (from the end)\n // [\"Apple\", \"Banana\"]\n console.log(lastE)\n```"},"sampleShift":{"test":"```uts\n const firstE = fruits.shift() // remove Apple from the front\n console.log(firstE) // [\"Banana\"]\n```"},"sampleUnshift":{"test":"```uts\n newLength = fruits.unshift('Strawberry') // add to the front\n console.log(newLength) // 2\n // [\"Strawberry\", \"Banana\"]\n```"},"sampleIndexOf":{"test":"```uts\n fruits.push('Mango')\n // [\"Strawberry\", \"Banana\", \"Mango\"]\n let pos = fruits.indexOf('Banana')\n // 1\n```"},"sampleSplice":{"test":"```uts\n const removedItem = fruits.splice(pos, 1) // this is how to remove an item\n console.log(removedItem) // [\"Banana\"]\n\n```"},"sampleSpliceMul":{"test":"```uts\n const vegetables = ['Cabbage', 'Turnip', 'Radish', 'Carrot']\n console.log(vegetables)\n // [\"Cabbage\", \"Turnip\", \"Radish\", \"Carrot\"]\n pos = 1\n const n = 2\n const removedItems = vegetables.splice(pos, n)\n // this is how to remove items, n defines the number of items to be removed,\n // starting at the index position specified by pos and progressing toward the end of array.\n console.log(vegetables)\n // [\"Cabbage\", \"Carrot\"] (the original array is changed)\n console.log(removedItems)\n // [\"Turnip\", \"Radish\"]\n```"},"sampleSpliceCopy":{"test":"```uts\n const shallowCopy = fruits.slice() // this is how to make a copy\n console.log(shallowCopy) // [\"Strawberry\", \"Mango\"]\n```"},"sampleForEachCallback":{"test":"```uts\n let array = ['a', 'b', 'c'];\n array.forEach(element => {\n console.log(element)\n // array.pop() // 此行为在 Android 平台会造成闪退,在 iOS 平台会输出 'a', 'b', 'c', 而 JS 会输出 'a', 'b'\n });\n\n // 如果想让上述行为正常运行,可以用 while 循环实现:\n\n array = ['a', 'b', 'c'];\n let index = 0;\n while (index < array.length) {\n console.log(array[index]);\n array.pop();\n index += 1;\n }\n```"},"sampleSort":{"test":"```uts\n // #ifdef APP-ANDROID\n let a = [2, 0, 4];\n a.sort((a, b) : number => {\n // 这里的判断不能省略\n if (a.compareTo(b) == 0) {\n return 0\n }\n return a - b\n })\n // #endif\n\n```"},"sampleFill":{"test":"```uts\n let b = new Array<Number>()\n for (let i = 0; i < 20; i++) {\n b.push(0)\n }\n```"},"sampleFillError":{"test":"```uts\n // #ifdef APP-ANDROID\n new Array(20).fill(0)\n // #endif\n \n```"}},"Set":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.buildInObject.Set)","size":{"name":"### size","description":"返回 Set 对象中(唯一的)元素的个数。","param":"","returnValue":"**返回值** \n\n返回 Set 对象中(唯一的)元素的个数。","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"prop","test":"```uts\n const set1 = new Set<any>();\n const object1 = {};\n set1.add(42);\n set1.add('forty two');\n set1.add('forty two');\n set1.add(object1);\n console.log(set1.size);\n // expected output: 3\n```"},"add":{"name":"### add(value)","description":"如果 Set 对象中没有具有相同值的元素,则 add() 方法将插入一个具有指定值的新元素到 Set 对象中。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| value | T | 是 | - | - | 要添加到 Set 对象的元素的值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| this | Set 对象本身。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const set1 = new Set<number>();\n set1.add(42);\n set1.add(42);\n set1.add(13);\n set1.forEach((item) => {\n console.log(item);\n // expected output: 42\n // expected output: 13\n })\n```"},"clear":{"name":"### clear()","description":"移除 Set 对象中所有元素。","param":"","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const set1 = new Set<any>();\n set1.add(1);\n set1.add('foo');\n set1.clear();\n console.log(set1.size);\n // expected output: 0\n```"},"delete":{"name":"### delete(value)","description":"从 Set 对象中删除指定的值(如果该值在 Set 中)。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| value | T | 是 | - | - | 要从 Set 中移除的值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 成功删除返回 true,否则返回 false。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const set1 = new Set<any>();\n set1.add(10);\n set1.add(20);\n\n set1.delete(10);\n console.log(set1.size) //1\n```"},"forEach":{"name":"### forEach(callbackfn, thisArg?)","description":"对 Set 对象中的每个值按插入顺序执行一次提供的函数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (value: T, value2: T, set: Set\\<T>) => void | 是 | - | - | 为集合中每个元素执行的回调函数,该函数接收三个参数:value、key: Set 中正在处理的当前元素。因为 Set 中没有键,所以 value 会被共同传递给这两个参数。set: 调用 forEach() 的 Set 对象。 |\n| thisArg | any | 否 | - | - | 值在执行 callbackFn 时作为 this 使用。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const set1 = new Set<any>(['foo', 'bar'])\n let logSetElements = (value : any) => {\n console.log(value);\n // expected output: foo\n // expected output: bar\n }\n```"},"forEach_1":{"name":"### forEach(callbackfn, thisArg?)","description":"对 Set 对象中的每个值按插入顺序执行一次提供的函数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (value: T, value2: T) => void | 是 | - | - | 为集合中每个元素执行的回调函数,该函数接收两个参数:value、key。 |\n| thisArg | any | 否 | - | - | 值在执行 callbackFn 时作为 this 使用。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"forEach_2":{"name":"### forEach(callbackfn, thisArg?)","description":"对 Set 对象中的每个值按插入顺序执行一次提供的函数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (value: T) => void | 是 | - | - | 为集合中每个元素执行的回调函数,该函数接收一个参数:value。 |\n| thisArg | any | 否 | - | - | 值在执行 callbackFn 时作为 this 使用。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const set1 = new Set<any>(['foo', 'bar'])\n let logSetElements = (value : any) => {\n console.log(value);\n // expected output: foo\n // expected output: bar\n }\n```"},"has":{"name":"### has(value)","description":"返回一个布尔值来指示对应的值是否存在于 Set 对象中。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| value | T | 是 | - | - | 要测试是否存在于 Set 对象中的值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 如果 Set 对象中存在具有指定值的元素,则返回 true;否则返回 false。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const set1 = new Set<number>([1, 2, 3, 4, 5]);\n console.log(set1.has(1));\n // expected output: true\n \n console.log(set1.has(5));\n // expected output: true\n \n console.log(set1.has(6));\n // expected output: false\n```"},"Constructor":{"name":"### Constructor(values?)","description":"","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| values | readonly T[] \\| null | 否 | - | - | | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Set\\<T> | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"}},"Map":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.buildInObject.Map)","size":{"name":"### size","description":"","param":"","returnValue":"**返回值** \n\nMap 对象的成员数量。","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"prop","test":"```uts\n const map1 : Map<string, string> = new Map();\n map1.set('a', 'alpha');\n map1.set('b', 'beta');\n map1.set('g', 'gamma');\n console.log(map1.size);\n // expected output: 3\n```"},"clear":{"name":"### clear()","description":"移除 Map 对象中的所有元素。","param":"","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const map1 = new Map<string, string>();\n map1.set('bar', 'baz');\n map1.set(\"1\", 'foo');\n map1.clear();\n console.log(map1.size);\n // expected output: 0\n```"},"delete":{"name":"### delete(key)","description":"用于移除 Map 对象中指定的元素。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| key | K | 是 | - | - | 要从 Map 对象中删除的元素的键。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 如果 Map 对象中的元素存在并已被移除,则为 true;如果该元素不存在,则为 false。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const map1 = new Map<string, string>();\n map1.set('bar', 'foo');\n let ret1 = map1.delete('bar')\n console.log(ret1);\n // expected result: true\n // (true indicates successful removal)\n console.log(map1.has('bar'));\n // expected result: false\n```"},"forEach":{"name":"### forEach(callbackfn, thisArg?)","description":"按照插入顺序依次对 Map 中每个键/值对执行一次给定的函数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (value: any, key: any, map: Map\\<K, V>) => void | 是 | - | - | Map 中每个元素所要执行的函数。它具有如下的参数: value: 每个迭代的值。 key: 每个迭代的键。 map: 正在迭代的 Map。 |\n| thisArg | any | 否 | - | - | 在 callbackfn 执行中使用的 this 的值。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const map1 = new Map<string, string>();\n map1.set('key1', 'value1');\n map1.set('key2', 'value2');\n map1.set('key3', 'value3');\n map1.forEach((value : string, key : string, map : Map<string, string>) => {\n console.log(key)\n console.log(value)\n })\n```"},"forEach_1":{"name":"### forEach(callbackfn, thisArg?)","description":"按照插入顺序依次对 Map 中每个键/值对执行一次给定的函数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (value: any, key: any) => void | 是 | - | - | Map 中每个元素所要执行的函数。它具有如下的参数: value: 每个迭代的值。 key: 每个迭代的键。 |\n| thisArg | any | 否 | - | - | 在 callbackfn 执行中使用的 this 的值。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const map1 = new Map<string, string>();\n map1.set('key1', 'value1');\n map1.set('key2', 'value2');\n map1.set('key3', 'value3');\n map1.forEach((value : string, key : string, map : Map<string, string>) => {\n console.log(key)\n console.log(value)\n })\n```"},"forEach_2":{"name":"### forEach(callbackfn, thisArg?)","description":"按照插入顺序依次对 Map 中每个键/值对执行一次给定的函数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (value: any) => void | 是 | - | - | Map 中每个元素所要执行的函数。它具有如下的参数: value: 每个迭代的值。 |\n| thisArg | any | 否 | - | - | 在 callbackfn 执行中使用的 this 的值。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const map1 = new Map<string, string>();\n map1.set('key1', 'value1');\n map1.set('key2', 'value2');\n map1.set('key3', 'value3');\n map1.forEach((value : string, key : string, map : Map<string, string>) => {\n console.log(key)\n console.log(value)\n })\n```"},"get":{"name":"### get(key)","description":"从 Map 对象返回指定的元素。如果与所提供的键相关联的值是一个对象,那么你将获得该对象的引用,对该对象所做的任何更改都会有效地在 Map 对象中修改它。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| key | K | 是 | - | - | 从 Map 对象返回的元素的键。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| V \\| null | 与指定键相关联的元素,如果键在 Map 对象中找不到,则返回 null。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const map1 = new Map<string, string>();\n map1.set('bar', 'foo');\n console.log(map1.get('bar'));\n // expected output: \"foo\"\n```"},"has":{"name":"### has(key)","description":"返回一个布尔值,指示具有指定键的元素是否存在。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| key | K | 是 | - | - | 用于测试 Map 对象中是否存在的元素的键。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 如果 Map 对象中存在具有指定键的元素,则返回 true;否则返回 false。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const map1 = new Map<string, string>();\n map1.set('bar', 'foo');\n console.log(map1.has('bar'));\n // expected output: true\n\n console.log(map1.has('baz'));\n // expected output: false\n```"},"set":{"name":"### set(key, value)","description":"为 Map 对象添加或更新一个指定了键(key)和值(value)的(新)键值对。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| key | K | 是 | - | - | 要添加到 Map 对象的元素的键。该值可以是任何数据类型(任何原始值或任何类型的对象)。 |\n| value | V | 是 | - | - | 要添加到 Map 对象的元素的值。该值可以是任何数据类型(任何原始值或任何类型的对象)。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| this | Map 对象 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n let map1 = new Map<string, string>();\n map1.set('bar', 'foo');\n console.log(map1.get('bar'));\n // expected output: \"foo\"\n\n console.log(map1.get('baz'));\n // expected output: null\n```"},"Constructor":{"name":"### Constructor()","description":"","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Map\\<any, any> | Map 对象。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"Constructor_1":{"name":"### Constructor(entries?)","description":"","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| entries | readonly (readonly \\\\[K, V])[]\\| null | 否 | - | - | 元素为键值对的数组,eg: \\[[key1, value1], [key2, value2]] | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Map\\<K, V> | Map 对象。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"set_1":{"test":"```uts\n map1 = new Map(); //定义一个map,key为string类型,value也是string类型\n map1.set('key1', \"abc\");\n map1.set('key1', \"def\");\n console.log(map1.get('key1')) //返回 def\n```"},"sample_create":{"test":"```uts\n let map = new Map<string, any>()\n map.set(\"name\", \"zhangsan\")\n map.set(\"age\", 12)\n //Map(2) {\"name\":\"zhangsan\",\"age\":12}\n console.log(map)\n```"},"sample_visit":{"test":"```uts\n let map1 = new Map<string, any>()\n map1.set(\"name\", \"zhangsan\")\n map1.set(\"age\", 12)\n let nameVal = map1.get('name')\n //zhangsan\n console.log(nameVal)\n```"},"sample_forEach":{"test":"```uts\n let map2 = new Map<string, any | null>()\n map2.set(\"name\", \"zhangsan\")\n map2.set(\"age\", 12)\n\n // 遍历函数 1\n map2.forEach(function (value : any | null) {\n console.log(value)\n })\n // 遍历函数 2\n map2.forEach(function (value : any | null, key : string) {\n console.log(key)\n console.log(value)\n })\n // 遍历函数 3\n map2.forEach(function (value : any | null, key : string, map : Map<string, any | null>) {\n console.log(value)\n console.log(key)\n console.log(map)\n })\n```"}},"UTSJSONObject":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.buildInObject.UTSJSONObject)","get":{"name":"### get(key)","description":"获取一个 属性,返回类型是any 或者 null","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| key | string | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| any\\|null | 如果属性存在返回结果,不存在返回null | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","test":"```uts\n const person : UTSJSONObject = {\n name: 'Tom',\n printName: () => {\n // ...\n }\n }\n //返回指定键对应的值,如果对象中不存在此键则返回 null。\n let name : string = person[\"name\"] as String\n //get 方法可以简化为使用下标运算符 `[]` 访问\n name = person['name'] as string\n //增加或更新指定键对应的值。\n person.set('name', 'Tom1')\n //set 方法可以简化为使用下标运算符 `[]` 赋值\n person['name'] = 'Tom2'\n```"},"set":{"name":"### set(key, value)","description":"添加或更新一个指定的属性","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| key | string | 是 | - | - | - |\n| value | any | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","test":"```uts\n const person : UTSJSONObject = {\n name: 'Tom',\n printName: () => {\n // ...\n }\n }\n //返回指定键对应的值,如果对象中不存在此键则返回 null。\n let name : string = person[\"name\"] as String\n //get 方法可以简化为使用下标运算符 `[]` 访问\n name = person['name'] as string\n //增加或更新指定键对应的值。\n person.set('name', 'Tom1')\n //set 方法可以简化为使用下标运算符 `[]` 赋值\n person['name'] = 'Tom2'\n```"},"getAny":{"name":"### getAny(key)","description":"获取一个 属性,返回类型是any 或者 null","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| key | string | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| any\\|null | 如果属性存在返回结果,不存在返回null | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method"},"getAny_1":{"name":"### getAny(key, def)","description":"获取一个 属性,返回类型是any","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| key | string | 是 | - | - | 属性值, 可以是keyPath |\n| def | any | 是 | - | - | 指定的默认值 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| any | 如果属性存在返回结果,不存在返回指定的默认值 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method"},"getBoolean":{"name":"### getBoolean(key)","description":"获取一个Boolean属性,返回类型是Boolean 或者 null","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| key | string | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean\\|null | 如果属性名存在,且类型为Boolean返回对应的结果,不存在返回null | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method"},"getBoolean_1":{"name":"### getBoolean(key, def)","description":"获取一个Boolean属性,返回类型是Boolean","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| key | string | 是 | - | - | 属性值, 可以是keyPath |\n| def | boolean | 是 | - | - | 指定的默认值 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 如果属性名存在,且类型为Boolean返回对应的结果,不存在返回指定的默认值 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method"},"getNumber":{"name":"### getNumber(key)","description":"获取一个number属性,返回类型是number 或者 null","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| key | string | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number\\|null | 如果属性名存在,且类型为number返回对应的结果,不存在返回null | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method"},"getNumber_1":{"name":"### getNumber(key, def)","description":"获取一个number属性,返回类型是number","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| key | string | 是 | - | - | 属性值, 可以是keyPath |\n| def | number | 是 | - | - | 指定的默认值 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 如果属性名存在,且类型为number返回对应的结果,不存在返回指定的默认值 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method"},"getString":{"name":"### getString(key)","description":"获取一个string属性,返回类型是string 或者 null","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| key | string | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string\\|null | 如果属性名存在,且类型为string返回对应的结果,不存在返回null | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","test":"```uts\n const utsObj : UTSJSONObject = {} as any as UTSJSONObject\n for (let i = 0; i < 100; i++) {\n utsObj.set('' + i, '' + i)\n }\n\n console.log('--start--')\n let startTime = Date.now()\n for (let i = 0; i < 10000; i++) {\n utsObj.getString('0')\n }\n```"},"getString_1":{"name":"### getString(key, def)","description":"获取一个string属性,返回类型是string","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| key | string | 是 | - | - | 属性值, 可以是keyPath |\n| def | string | 是 | - | - | 指定的默认值 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 如果属性名存在,且类型为string返回对应的结果,不存在返回指定的默认值 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method"},"getJSON":{"name":"### getJSON(key)","description":"获取一个UTSJSONObject属性,返回类型是UTSJSONObject 或者 null","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| key | string | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| UTSJSONObject\\|null | 如果属性名存在,且类型为UTSJSONObject返回对应的结果,不存在返回null | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","test":"```uts\n let obj = {\n \"cars\": [\n {\n name: \"car1\",\n value: 100\n }\n ]\n }\n\n let cars = obj.getArray<UTSJSONObject>(\"cars\")\n cars![0].set(\"value\", 20)\n let firstCar = obj.getJSON(\"cars[0]\")\n console.log(firstCar!['value'])//20\n```"},"getJSON_1":{"name":"### getJSON(key, def)","description":"获取一个UTSJSONObject属性,返回类型是UTSJSONObject","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| key | string | 是 | - | - | 属性值, 可以是keyPath |\n| def | [UTSJSONObject](/uts/buildin-object-api/utsjsonobject.md) | 是 | - | - | 指定的默认值 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| UTSJSONObject | 如果属性名存在,且类型为UTSJSONObject返回对应的结果,不存在返回指定的默认值 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method"},"getArray":{"name":"### getArray(key)","description":"获取一个Array属性,返回类型是Array 或者 null, 数组元素类型由泛型T决定","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| key | string | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Array\\<T>\\|null | 如果属性名存在,且类型为Array返回对应的结果,不存在返回null | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","test":"```uts\n let obj = {\n \"cars\": [\n {\n name: \"car1\",\n value: 100\n }\n ]\n }\n\n let cars = obj.getArray<UTSJSONObject>(\"cars\")\n cars![0].set(\"value\", 20)\n let firstCar = obj.getJSON(\"cars[0]\")\n console.log(firstCar!['value'])//20\n```"},"getArray_1":{"name":"### getArray(key, def)","description":"获取一个Array属性,返回类型是Array, 数组元素类型由泛型T决定","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| key | string | 是 | - | - | 属性值, 可以是keyPath |\n| def | Array\\<T\\>\\<T> | 是 | - | - | 指定的默认值 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Array\\<T> | 如果属性名存在,且类型为Array返回对应的结果,不存在返回指定的默认值 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","test":"```uts\n //这个方法用来获取指定元素类型的数组\n let obj = JSON.parseObject('{\"name\":\"tom\",\"tag\":[\"student\",\"user\"]}')\n\n // 这里得到是 Array<*>\n let noGenericArray = obj!.getArray(\"tag\")\n console.log(noGenericArray)\n\n // 这里得到是 Array<string>\n let genericArray = obj!.getArray<string>(\"tag\")\n console.log(genericArray)\n```"},"getArray_2":{"name":"### getArray(key)","description":"获取一个Array属性,返回类型是Array 或者 null","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| key | string | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Array\\<any>\\|null | 如果属性名存在,且类型为Array返回对应的结果,不存在返回null | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method"},"getArray_3":{"name":"### getArray(key, def)","description":"获取一个Array属性,返回类型是Array","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| key | string | 是 | - | - | 属性值, 可以是keyPath |\n| def | Array\\<any\\>\\<any> | 是 | - | - | 指定的默认值 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Array\\<any> | 如果属性名存在,且类型为Array返回对应的结果,不存在返回指定的默认值 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | x | x | x | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method"},"toMap":{"name":"### toMap()","description":"将当前 UTSJSONObject 实例转换为 Map 实例。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Map\\<string, any> | 返回 Map\\<string, any> 类型的 map | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","test":"```uts\n person1 = JSON.parseObject('{\"name\":\"Tom\"}')!\n person1.toMap().forEach((value, key) => {\n console.log(key)\n console.log(value)\n })\n```"},"parse":{"name":"### parse()","description":"将当前的UTSJSONObject对象转换为某一个具体的类型 T","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| T\\|null | 具体的类型T,如果失败返回null | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| x | 3.90 | x | x | x | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method"},"keys":{"name":"### keys(item)","description":"以数组的形式返回指定UTSJSONObjetc 对象内可枚举属性的名称列表","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| item | [UTSJSONObject](/uts/buildin-object-api/utsjsonobject.md) | 是 | - | - | 需要检索的UTSJSONObject 实例对象 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Array\\<string> | 返回 Array\\<string> 类型的可枚举属性的名称列表 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | 4.18 | 4.23 | x | 4.23 | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | 4.18 | - | - | - | - |","itemType":"method","test":"```uts\n let obj = {\n name: \"zhangsan\",\n age: 11\n }\n\n let ret1 = UTSJSONObject.keys(obj).length\n console.log(ret1) //2\n```"},"assign":{"name":"### assign(...items)","description":"该方法允许输入一个或者多个UTSJSONObject对象,合并后返回一个新的UTSJSONObject,其中包含全部输入对象的属性字段,如果存在同名的属性会以后传入的属性为准","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| items | UTSJSONObject[\\] | 是 | - | - | 需要被合并的UTSJSONObject 实例对象 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| UTSJSONObject | 合并后的UTSJSONObject | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | 4.18 | 4.23 | x | 4.23 | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | 4.18 | - | - | - | - |","itemType":"method","test":"```uts\n let target = { a: 1, b: 2 };\n let source = { b: 4, c: 5 };\n // 得到一个UTSJSONObject对象\n let returnedTarget = UTSJSONObject.assign(target, source);\n```"},"assign_1":{"name":"### assign(...items)","description":"该方法允许输入一个或者多个UTSJSONObject对象,合并后返回一个新的泛型对象T,其中包含全部输入对象的属性字段,如果存在同名的属性会以后传入的属性为准","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| items | any[\\] | 是 | - | - | 需要被合并的实例对象 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| T | 合并后的泛型对象 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | 4.18 | 4.23 | x | 4.23 | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | 4.18 | - | - | - | - |","itemType":"method","test":"```uts\n let target1 = { a: 1, b: 2 };\n let source1 = { b: 4, c: 5 };\n // 得到一个UTSJSONObject对象\n let returned= UTSJSONObject.assign<UTSJSONObject>(target1, source1);\n console.log(returned)\n```"},"sample_create":{"test":"```uts\n const person : UTSJSONObject = {\n name: 'Tom',\n printName: () => {\n // ...\n }\n }\n //返回指定键对应的值,如果对象中不存在此键则返回 null。\n let name : string = person[\"name\"] as String\n //get 方法可以简化为使用下标运算符 `[]` 访问\n name = person['name'] as string\n //增加或更新指定键对应的值。\n person.set('name', 'Tom1')\n //set 方法可以简化为使用下标运算符 `[]` 赋值\n person['name'] = 'Tom2'\n```"},"sample_create1":{"test":"```uts\n // 写法1 推荐\n let person1 : UTSJSONObject = JSON.parseObject('{\"name\":\"Tom\"}')!\n\n // 写法2 推荐\n const person2 : UTSJSONObject = JSON.parse<UTSJSONObject>('{\"name\":\"Tom\"}')!\n\n\n // 写法3 如果 as 转换的实际类型不匹配 会导致 crash,建议先通过 `instanceof` 判断类型再进行as转换。\n const parseRet3 = JSON.parse('{\"name\":\"Tom\"}')\n if (parseRet3 instanceof UTSJSONObject) {\n const person = parseRet3 as UTSJSONObject\n }\n\n```"},"convert":{"test":"```uts\n type User = {\n name : string,\n age : number\n }\n let jsonObj = {\n name: \"张三\",\n age: 12\n }\n // UTSJSONObject => 自定义type\n let userA = JSON.parse<User>(JSON.stringify(jsonObj)!)\n console.log(userA!.name)\n // 自定义type => UTSJSONObject\n let utsJsonA = JSON.parseObject(JSON.stringify(userA)!)\n console.log(utsJsonA)\n```"}},"JSON":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.buildInObject.JSON)","parse":{"name":"### parse(text, reviver?)","description":"JSON.parse() 方法用来解析 JSON 字符串,构造由字符串描述的 JavaScript 值或对象。提供可选的 reviver 函数用以在返回之前对所得到的对象执行变换 (操作)。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| text | string | 是 | - | - | 要被解析成 JavaScript 值的字符串 |\n| reviver | (this: any, key: string, value: any) => any | 否 | - | - | \\[可选]转换器,如果传入该参数 (函数),可以用来修改解析生成的原始值,调用时机在 parse 函数返回之前。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| any \\| null | 返回一个any 或者 null | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const json = `{\"result\":true, \"count\":42}`;\n const obj = JSON.parse(json) as UTSJSONObject;\n console.log(obj[\"count\"]);\n // expected output: 42\n\n console.log(obj[\"result\"]);\n // expected output: true\n```"},"parse_1":{"name":"### parse(text)","description":"JSON.parse() 方法用来解析 JSON 字符串,构造由字符串描述的值或者对象,其类型由泛型参数T决定<br/>如果输入的是一个合法的json值或者对象,返回一个对应的T值或者对象,如果json描述的值或对象和 T 指定的类型不符,将返回null","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| text | string | 是 | - | - | 要被解析成 JavaScript 值的字符串 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| T \\| null | 返回一个T类型的值或者对象 或者 null | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | 3.9 | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","test":"```uts\n const json2 = '{\"string\":\"Hello\",\"number\":42,\"boolean\":true,\"nullValue\":null,\"array\":[1,2,3],\"object\":{\"nestedKey\":\"nestedValue\"}}';\n const obj2 = JSON.parse<UTSJSONObject>(json2)!;\n```"},"parseObject":{"name":"### parseObject(text)","description":"JSON.parseObject() 方法用来解析 JSON 字符串,构造由字符串描述的对象。<br/>如果输入的是一个合法的json对象,返回一个对应的UTSJSONObject,如果是json array 或者其他格式的字符串返回null","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| text | string | 是 | - | - | 要被解析成 JavaScript 值的字符串 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| UTSJSONObject \\| null | 返回一个UTSJSONObjet 或者 null | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","test":"```uts\n const json = `{\"result\":true, \"count\":42}`;\n const obj = JSON.parseObject(json);\n console.log(obj?.[\"count\"])//42\n```"},"parseObject_1":{"name":"### parseObject(text)","description":"JSON.parseObject() 方法用来解析 JSON 字符串,构造由字符串描述的对象,该对象的类型由泛型参数T决定<br/>如果输入的是一个合法的json对象,返回一个对应的T对象,如果是json array 或者其他格式的字符串返回null","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| text | string | 是 | - | - | 要被解析成 JavaScript 值的字符串 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| T \\| null | 返回一个T类型对象 或者 null | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | 3.9 | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","test":"```uts\n const json1 = `{\n\t\t\t \"name\": \"John\",\n\t\t\t \"id\": \"30\"\n\t\t\t }`;\n let obj2 = JSON.parseObject<UserJSON>(json1);\n console.log(obj2!.id) //30\n```"},"parseArray":{"name":"### parseArray(text)","description":"JSON.parseArray() 方法用来解析 JSON 字符串,构造由字符串描述的数组。数组元素类型为any<br/>如果输入的是一个合法的json数组,返回一个对应的Array,如果是json object 或者其他格式的字符串返回null","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| text | string | 是 | - | - | 要被解析成 JavaScript 值的字符串 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Array\\<any> \\| null | 返回一个Array 或者 null | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","test":"```uts\n const json1 = `[1,2,3]`;\n const array1 = JSON.parseArray(json1);\n console.log(array1)//[1, 2, 3]\n```"},"parseArray_1":{"name":"### parseArray(text)","description":"JSON.parseArray() 方法用来解析 JSON 字符串,构造由字符串描述的数组。数组元素类型由泛型T决定<br/>如果输入的是一个合法的json数组,返回一个对应的Array,如果是json object 或者其他格式的字符串返回null","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| text | string | 是 | - | - | 要被解析成 JavaScript 值的字符串 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Array\\<T> \\| null | 返回一个Array 或者 null | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","test":"```uts\n const json3 = `[{\"name\":\"John\",\"id\":\"30\"},{\"name\":\"jack\",\"id\":\"21\"}]`;\n const array3 = JSON.parseArray<UTSJSONObject>(json3);\n console.log((array3![0])[\"name\"])//\"John\"\n```"},"stringify":{"name":"### stringify(value, replacer?, space?)","description":"JSON.stringify() 方法将一个 JavaScript 对象或值转换为 JSON 字符串,如果指定了一个 replacer 函数,则可以选择性地替换值,或者指定的 replacer 是数组,则可选择性地仅包含数组指定的属性","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| value | any \\| null | 是 | - | - | 将要序列化成 一个 JSON 字符串的值。 |\n| replacer | any \\| null | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"4.25\",\"4.25\",\"x\"]]}' /> | 如果该参数是一个函数,则在序列化过程中,被序列化的值的每个属性都会经过该函数的转换和处理;如果该参数是一个数组,则只有包含在这个数组中的属性名才会被序列化到最终的 JSON 字符串中;如果该参数为 null 或者未提供,则对象所有的属性都会被序列化。 仅Android/web HBuilder X 4.25之后支持 |\n| space | any \\| null | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"4.25\",\"4.25\",\"x\"]]}' /> | 指定缩进用的空白字符串,用于美化输出(pretty-print);如果参数是个数字,它代表有多少的空格;上限为 10。该值若小于 1,则意味着没有空格;如果该参数为字符串(当字符串长度超过 10 个字母,取其前 10 个字母),该字符串将被作为空格;如果该参数没有提供(或者为 null),将没有空格。 仅Android/web HBuilder X 4.25之后支持 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| string | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n console.log(JSON.stringify({ x: 5, y: 6 }));\n // expected output: \"{\"x\":5,\"y\":6}\"\n\n console.log(JSON.stringify(new Date(2006, 0, 2, 15, 4, 5)));\n // expected output: \"\"2006-01-02T15:04:05.000Z\"\"\n```"},"parse_tip":{"test":"```uts\n const json = `{\"result\":true, \"count\":42}`;\n const obj = JSON.parse(json) as UTSJSONObject;\n console.log(obj[\"count\"]);\n // expected output: 42\n\n console.log(obj[\"result\"]);\n // expected output: true\n```"}},"Date":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.buildInObject.Date)","toString":{"name":"### toString()","description":"返回一个字符串,以本地的时区表示该 Date 对象。","param":"","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| string | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","test":"```uts\n let event = new Date('1995-12-17T03:24:00');\n let ret = event.toString()\n console.log(ret)//\"Sun Dec 17 1995 03:24:00 GMT+0800\"\n```"},"toDateString":{"name":"### toDateString()","description":"以美式英语和人类易读的形式返回一个日期对象日期部分的字符串。","param":"","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| string | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","test":"```uts\n event = new Date('1995-12-17T03:24:00');\n let ret1 = event.toDateString() //\"Sun Dec 17 1995\"\n```"},"toTimeString":{"name":"### toTimeString()","description":"以人类易读形式返回一个日期对象时间部分的字符串,该字符串以美式英语格式化。","param":"","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| string | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method","test":"```uts\n event = new Date('1995-12-17T03:24:00');\n let ret2 = event.toTimeString() // \"03:24:00 GMT+0800\"\n```"},"toLocaleString":{"name":"### toLocaleString()","description":"返回该日期对象的字符串,该字符串格式因不同语言而不同。","param":"","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| string | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"toLocaleDateString":{"name":"### toLocaleDateString()","description":"返回指定日期对象日期部分的字符串,该字符串格式因不同语言而不同。","param":"","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| string | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"toLocaleTimeString":{"name":"### toLocaleTimeString()","description":"返回该日期对象时间部分的字符串,该字符串格式因语言而异。","param":"","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| string | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"valueOf":{"name":"### valueOf()","description":"返回从UTC时间1970年1月1日午夜开始以毫秒为单位存储的时间值。","param":"","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method","test":"```uts\n const date1 = new Date('December 17, 1995 03:24:00');\n console.log(date1.valueOf())//819141840000\n```"},"getTime":{"name":"### getTime()","description":"返回从UTC时间1970年1月1日午夜开始以毫秒为单位存储的时间值。","param":"","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","test":"```uts\n const moonLanding = new Date('July 20, 69 20:17:40 GMT+00:00');\n console.log(moonLanding.getTime()); // -14182940000\n\n const dateEpoch = new Date(0);\n console.log(dateEpoch.getTime()); // 0\n\n const dateOneMillisecond = new Date(1);\n console.log(dateOneMillisecond.getTime()); // 1\n```"},"getFullYear":{"name":"### getFullYear()","description":"根据本地时间返回指定日期的年份。此方法替代 getYear() 。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 根据当地时间,返回一个对应于给定日期的年份数字。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const moonLanding = new Date('July 20, 69 00:20:18');\n const firstMillisecondYear = new Date(2016, 0);\n const previousMillisecondYear = new Date(2016, 0, 1, 0, 0, 0, -1);\n const finalMillisecondYear = new Date(2016, 11, 31, 23, 59, 59, 999);\n const subsequentMillisecondYear = new Date(2016, 11, 31, 23, 59, 59, 1000);\n\n console.log('Moon landing year:', moonLanding.getFullYear()); // 1969\n\n console.log('First millisecond year:', firstMillisecondYear.getFullYear()); // 2016\n console.log('Previous millisecond year:', previousMillisecondYear.getFullYear()); // 2015\n console.log('Final millisecond year:', finalMillisecondYear.getFullYear()); // 2016\n console.log('Subsequent millisecond year:', subsequentMillisecondYear.getFullYear()); // 2017\n\n```"},"getUTCFullYear":{"name":"### getUTCFullYear()","description":"以世界时为标准,返回一个指定的日期对象的年份。","param":"","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"getMonth":{"name":"### getMonth()","description":"根据本地时间,返回一个指定的日期对象的月份,为基于 0 的值(0 表示一年中的第一月)。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 一个 0 到 11 的整数值:0 代表一月份,1 代表二月份,2 代表三月份,依次类推。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const moonLanding = new Date('July 20, 69 00:20:18');\n const firstMillisecondMonth = new Date(2016, 6);\n const previousMillisecondMonth = new Date(2016, 6, 0, 0, 0, 0, -1);\n const finalMillisecondMonth = new Date(2016, 6, 31, 23, 59, 59, 999);\n const subsequentMillisecondMonth = new Date(2016, 6, 31, 23, 59, 59, 1000);\n\n console.log('Moon landing month:', moonLanding.getMonth()); // 6\n\n console.log('First millisecond month:', firstMillisecondMonth.getMonth()); // 6\n console.log('Previous millisecond month:', previousMillisecondMonth.getMonth()); // 5\n console.log('Final millisecond month:', finalMillisecondMonth.getMonth()); // 6\n console.log('Subsequent millisecond month:', subsequentMillisecondMonth.getMonth()); // 7\n\n```"},"getUTCMonth":{"name":"### getUTCMonth()","description":"以世界时为标准,返回一个指定的日期对象的月份,它是从 0 开始计数的(0 代表一年的第一个月)。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 返回一个 0 到 11 的整数,分别对应以下月份:0 代表一月,1 代表二月,2 代表三月,依次类推。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"getDate":{"name":"### getDate()","description":"根据本地时间,返回一个指定的日期对象为一个月中的哪一日(从 1--31)。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 返回一个 1 到 31 的整数值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n // Common variables\n const birthday = new Date('August 19, 1975 23:15:30');\n const firstMillisecondDate = new Date(2016, 6, 6);\n const previousMillisecondDate = new Date(2016, 6, 6, 0, 0, 0, -1);\n const finalMillisecondDate = new Date(2016, 6, 6, 23, 59, 59, 999);\n const subsequentMillisecondDate = new Date(2016, 6, 6, 23, 59, 59, 1000);\n\n const firstMonthBoundaryDate = new Date(2016, 1, 29);\n const previousMonthBoundaryDate = new Date(2016, 1, 29, 0, 0, 0, -1);\n const finalMonthBoundaryDate = new Date(2016, 1, 29, 23, 59, 59, 999);\n const subsequentMonthBoundaryDate = new Date(2016, 1, 29, 23, 59, 59, 1000);\n\n console.log('Birthday date:', birthday.getDate()); // 19\n\n console.log('First millisecond date:', firstMillisecondDate.getDate()); // 6\n console.log('Previous millisecond date:', previousMillisecondDate.getDate()); // 5\n console.log('Final millisecond date:', finalMillisecondDate.getDate()); // 6\n console.log('Subsequent millisecond date:', subsequentMillisecondDate.getDate()); // 7\n\n console.log('First millisecond (month boundary) date:', firstMonthBoundaryDate.getDate()); // 29\n console.log('Previous millisecond (month boundary) date:', previousMonthBoundaryDate.getDate()); // 28\n console.log('Final millisecond (month boundary) date:', finalMonthBoundaryDate.getDate()); // 29\n console.log('Subsequent millisecond (month boundary) date:', subsequentMonthBoundaryDate.getDate()); // 1\n\n // #ifndef WEB\n // safari 15不支持此格式的日期字符串\n const parsedDate = Date.parse(\"2024-01-09 22:00:00\");\n console.log('Parsed date:', parsedDate); // 1704808800000\n // #endif\n\n```"},"getUTCDate":{"name":"### getUTCDate()","description":"以世界时为标准,返回一个指定的日期对象为一个月中的第几天","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 返回一个 1 到 31 的整数值 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"getDay":{"name":"### getDay()","description":"根据本地时间,返回一个具体日期中一周的第几天,0 表示星期天。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 根据本地时间,返回一个 0 到 6 之间的整数值,代表星期几:0 代表星期日,1 代表星期一,2 代表星期二,依次类推。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const birthday = new Date('August 19, 1975 23:15:30');\n const firstMillisecondDay = new Date(2016, 6, 6);\n const previousMillisecondDay = new Date(2016, 6, 6, 0, 0, 0, -1);\n const finalMillisecondDay = new Date(2016, 6, 6, 23, 59, 59, 999);\n const subsequentMillisecondDay = new Date(2016, 6, 6, 23, 59, 59, 1000);\n\n const firstWeekBoundaryDay = new Date(2016, 6, 9);\n const previousWeekBoundaryDay = new Date(2016, 6, 9, 0, 0, 0, -1);\n const finalWeekBoundaryDay = new Date(2016, 6, 9, 23, 59, 59, 999);\n const subsequentWeekBoundaryDay = new Date(2016, 6, 9, 23, 59, 59, 1000);\n\n console.log('Birthday day:', birthday.getDay()); // 2 (Tuesday)\n\n console.log('First millisecond day:', firstMillisecondDay.getDay()); // 3 (Wednesday)\n console.log('Previous millisecond day:', previousMillisecondDay.getDay()); // 2 (Tuesday)\n console.log('Final millisecond day:', finalMillisecondDay.getDay()); // 3 (Wednesday)\n console.log('Subsequent millisecond day:', subsequentMillisecondDay.getDay()); // 4 (Thursday)\n\n console.log('First millisecond (week boundary) day:', firstWeekBoundaryDay.getDay()); // 6 (Saturday)\n console.log('Previous millisecond (week boundary) day:', previousWeekBoundaryDay.getDay()); // 5 (Friday)\n console.log('Final millisecond (week boundary) day:', finalWeekBoundaryDay.getDay()); // 6 (Saturday)\n console.log('Subsequent millisecond (week boundary) day:', subsequentWeekBoundaryDay.getDay()); // 0 (Sunday)\n\n```"},"getUTCDay":{"name":"### getUTCDay()","description":"以世界时为标准,返回一个指定的日期对象为一星期中的第几天,其中 0 代表星期天。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 返回一个对应一星期中第几天的整数:0 代表星期天,1 代表星期一,2 代表星期二,依次类推。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"getHours":{"name":"### getHours()","description":"根据本地时间,返回一个指定的日期对象的小时。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 返回一个 0 到 23 之间的整数值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","test":"```uts\n const birthday = new Date('March 13, 08 04:20');\n console.log('Birthday hours:', birthday.getHours()); // 4\n\n const date1 = new Date(2016, 6, 6, 13);\n const date2 = new Date(2016, 6, 6, 13, 0, 0, -1);\n const date3 = new Date(2016, 6, 6, 13, 59, 59, 999);\n const date4 = new Date(2016, 6, 6, 13, 59, 59, 1000);\n\n console.log('First millisecond hours:', date1.getHours()); // 13\n console.log('Previous millisecond hours:', date2.getHours()); // 12\n console.log('Final millisecond hours:', date3.getHours()); // 13\n console.log('Subsequent millisecond hours:', date4.getHours()); // 14\n```"},"getUTCHours":{"name":"### getUTCHours()","description":"以世界时为标准,返回一个指定的日期对象的小时数。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 返回一个 0 到 23 的整数。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"getMinutes":{"name":"### getMinutes()","description":"根据本地时间,返回一个指定的日期对象的分钟数。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 返回一个 0 到 59 的整数值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","test":"```uts\n const birthday = new Date('March 13, 08 04:20');\n console.log('Birthday minutes:', birthday.getMinutes()); // 20\n\n const date1 = new Date(2016, 6, 6, 14, 6);\n const date2 = new Date(2016, 6, 6, 14, 6, 0, -1);\n const date3 = new Date(2016, 6, 6, 14, 6, 59, 999);\n const date4 = new Date(2016, 6, 6, 14, 6, 59, 1000);\n\n console.log('First millisecond minutes:', date1.getMinutes()); // 6\n console.log('Previous millisecond minutes:', date2.getMinutes()); // 5\n console.log('Final millisecond minutes:', date3.getMinutes()); // 6\n console.log('Subsequent millisecond minutes:', date4.getMinutes()); // 7\n```"},"getUTCMinutes":{"name":"### getUTCMinutes()","description":"以世界时为标准,返回一个指定的日期对象的分钟数。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 返回一个 0 到 59 的整数。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"getSeconds":{"name":"### getSeconds()","description":"根据本地时间,返回一个指定的日期对象的秒数。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 返回一个 0 到 59 的整数值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","test":"```uts\n const moonLanding = new Date('July 20, 69 00:20:18');\n console.log('Moon landing seconds:', moonLanding.getSeconds()); // 18\n\n const date1 = new Date(2016, 6, 6, 14, 16, 30);\n const date2 = new Date(2016, 6, 6, 14, 16, 30, -1);\n const date3 = new Date(2016, 6, 6, 14, 16, 30, 999);\n const date4 = new Date(2016, 6, 6, 14, 16, 30, 1000);\n\n console.log('First millisecond seconds:', date1.getSeconds()); // 30\n console.log('Previous millisecond seconds:', date2.getSeconds()); // 29\n console.log('Final millisecond seconds:', date3.getSeconds()); // 30\n console.log('Subsequent millisecond seconds:', date4.getSeconds()); // 31\n```"},"getUTCSeconds":{"name":"### getUTCSeconds()","description":"以世界时为标准,返回一个指定的日期对象的秒数。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 返回一个 0 到 59 的整数。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"getUTCMilliseconds":{"name":"### getUTCMilliseconds()","description":"以世界时为标准,返回一个指定的日期对象的毫秒数。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 返回一个 0 到 999 的整数。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"getTimezoneOffset":{"name":"### getTimezoneOffset()","description":"返回协调世界时(UTC)相对于当前时区的时间差值,单位为分钟。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 时区偏差(time-zone offset)表示协调世界时(UTC)与本地时区之间的差值,单位为分钟。需要注意的是如果本地时区后于协调世界时,则该差值为正值,如果先于协调世界时则为负值。例如你所在时区为 UTC+10(澳大利亚东部标准时间),将会返回 -600。对于同一个时区,夏令时(Daylight Saving Time)将会改变这个值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"setTime":{"name":"### setTime(time)","description":"以一个表示从 1970-1-1 00:00:00 UTC 计时的毫秒数为来为 Date 对象设置时间。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| time | number | 是 | - | - | 一个整数,表示从 1970-1-1 00:00:00 UTC 开始计时的毫秒数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | UTC 1970 年 1 月 1 日 00:00:00 与更新日期之间的毫秒数(实际上是自变量的值)。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","test":"```uts\n const launchDate = new Date('July 1, 1999, 12:00:00');\n\n const futureDate = new Date();\n futureDate.setTime(launchDate.getTime());\n console.log('Future date time:', futureDate.getTime()); // Should match launchDate.getTime()\n```"},"setMilliseconds":{"name":"### setMilliseconds(ms)","description":"根据本地时间设置一个日期对象的豪秒数。如果指定的数字超出了合理范围,则日期对象的时间信息会被相应地更新。例如,如果指定了 1005,则秒数加 1,豪秒数为 5。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| ms | number | 是 | - | - | 一个 0 到 999 的数字,表示豪秒数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 返回更新后的时间距 1970 年 1 月 1 日 00:00:00 的毫秒数。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","test":"```uts\n const event = new Date('August 19, 1975 23:15:30');\n console.log('Original milliseconds:', event.getMilliseconds()); // 0\n\n event.setMilliseconds(456);\n console.log('Updated milliseconds:', event.getMilliseconds()); // 456\n```"},"setUTCMilliseconds":{"name":"### setUTCMilliseconds(ms)","description":"根据世界时来设置指定时间的毫秒数。如果传递的参数超出了指定的范围,setUTCMilliseconds() 方法会相应地尝试更新储存在 Date 的时间信息。例如,假设你传递参数的值是 1100,存储在 Date 的秒数会加 1,然后使用 100 来作为毫秒数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| ms | number | 是 | - | - | 0 - 999 之间的数值,代表毫秒数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 返回更新后的时间距 1970 年 1 月 1 日 00:00:00 (UTC) 的毫秒数。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"setSeconds":{"name":"### setSeconds(sec)","description":"根据本地时间设置一个日期对象的秒数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| sec | number | 是 | - | - | 一个 0 到 59 的整数。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","test":"```uts\n const event = new Date('August 19, 1975 23:15:30');\n console.log('Original seconds:', event.getSeconds()); // 30\n\n event.setSeconds(42);\n console.log('Updated seconds:', event.getSeconds()); // 42\n```"},"setUTCSeconds":{"name":"### setUTCSeconds(sec)","description":"为一个依据国际通用时间的特定日期设置秒数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| sec | number | 是 | - | - | 一个在 0 到 59 之间的整数,表示秒数。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"setMinutes":{"name":"### setMinutes(min)","description":"根据本地时间为一个日期对象设置分钟数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| min | number | 是 | - | - | 一个 0 到 59 的整数,表示分钟数。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","test":"```uts\n const event = new Date('August 19, 1975 23:15:30');\n console.log('Original minutes:', event.getMinutes()); // 15\n\n event.setMinutes(45);\n console.log('Updated minutes:', event.getMinutes()); // 45\n```"},"setUTCMinutes":{"name":"### setUTCMinutes(min)","description":"根据世界协调时(UTC)来设置指定日期的分钟数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| min | number | 是 | - | - | 必填,表示要设置的分钟数,是一个介于 0 和 59 之间的整数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 返回从 UTC 时间 1970 年 1 月 1 日 0 时 0 分 0 秒至设置后的时间的毫秒数。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"setHours":{"name":"### setHours(hours)","description":"根据本地时间为一个日期对象设置小时数,返回从 1970-01-01 00:00:00 UTC 到更新后的 日期 对象实例所表示时间的毫秒数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| hours | number | 是 | - | - | 必填,一个 0 到 23 的整数,表示小时。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","test":"```uts\n const event = new Date('August 19, 1975 23:15:30');\n console.log('Original hours:', event.getHours()); // 23\n\n event.setHours(20);\n console.log('Updated hours:', event.getHours()); // 20\n```"},"setUTCHours":{"name":"### setUTCHours(hours)","description":"根据世界协调时(UTC)为一个日期对象设置小时数,返回从 1970-01-01 00:00:00 UTC 到更新后的 日期 对象实例所表示时间的毫秒数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| hours | number | 是 | - | - | 必填,表示小时的整数,取值 0 到 23 之间。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 返回从 1970-01-01 00:00:00 UTC 到更新后的日期所表示时间的毫秒数。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"setDate":{"name":"### setDate(date)","description":"根据本地时间来指定一个日期对象的天数。如果 dayValue 超出了月份的合理范围,setDate 将会相应地更新 Date 对象。例如,如果为 dayValue 指定 0,那么日期就会被设置为上个月的最后一天。如果 dayValue 被设置为负数,日期会设置为上个月最后一天往前数这个负数绝对值天数后的日期。-1 会设置为上月最后一天的前一天(译者注:例如当前为 4 月,如果 setDate(-2),则为 3 月 29 日)","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| date | number | 是 | - | - | 一个整数,表示该月的第几天。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","test":"```uts\n const event = new Date('August 19, 1975 23:15:30');\n console.log('Original date:', event.getDate()); // 19\n\n event.setDate(24);\n console.log('Updated date (24):', event.getDate()); // 24\n\n event.setDate(32);\n console.log('Updated date (32):', event.getDate()); // 1\n```"},"setUTCDate":{"name":"### setUTCDate(date)","description":"根据全球时间设置特定 date 对象的日期。如果你指定的参数超出了范围,setUTCDate() 会尝试更新对应的Date 中的日期信息。例如,如果你使用了 40 来作为参数,但是Date 中存储的月份为 6 月,那么日期将被改写为 10 且月份被增到 7 月。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| date | number | 是 | - | - | 一个 1-31 的整形数字,用来指定日期。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"setMonth":{"name":"### setMonth(month)","description":"根据本地时间为一个日期对象设置月份。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| month | number | 是 | - | - | 必填参数,介于 0 到 11 之间的整数(表示一月到十二月)。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 基于 1 January 1970 00:00:00 UTC 开始计算的毫秒数。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","test":"```uts\n const event = new Date('August 19, 1975 23:15:30');\n console.log('Original month:', event.getMonth()); // 7 (August)\n\n event.setMonth(3);\n console.log('Updated month:', event.getMonth()); // 3 (April)\n```"},"setUTCMonth":{"name":"### setUTCMonth(month)","description":"根据通用的时间( UTC )来设置一个准确的月份。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| month | number | 是 | - | - | 必填参数,一个 0-11 的整数,代表 1 月到 12 月。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 这个数值是从 1970 年 1 月 1 号 00:00:00 到当前时间的毫秒数(国际通用时间) | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"setFullYear":{"name":"### setFullYear(year)","description":"根据本地时间为一个日期对象设置年份。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| year | number | 是 | - | - | 指定年份的整数值,例如 1995。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | 3.90 | - | - | - | - |","itemType":"method","test":"```uts\n const event = new Date('August 19, 1975 23:15:30');\n event.setFullYear(1969);\n console.log('Updated year:', event.getFullYear()); // 1969\n```"},"setUTCFullYear":{"name":"### setUTCFullYear(year)","description":"根据世界标准时间 (UTC) 为一个具体日期设置年份。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| year | number | 是 | - | - | 指定年份整数值,例如,1995 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"toUTCString":{"name":"### toUTCString()","description":"把一个日期转换为一个字符串,使用 UTC 时区。","param":"","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| string | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"toISOString":{"name":"### toISOString()","description":"一个 ISO(ISO 8601 Extended Format)格式的字符串: YYYY-MM-DDTHH:mm:ss.sssZ。时区总是 UTC(协调世界时),加一个后缀“Z”标识。","param":"","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| string | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 4.11 | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.11 | 4.11 | - | - | - | - |","itemType":"method","test":"```uts\n event = new Date('1995-12-17T03:24:00');\n console.log(event.toISOString())//\"1995-12-16T19:24:00.000Z\"\n```"},"toJSON":{"name":"### toJSON(key?)","description":"返回 Date 对象的字符串形式。调用 toJSON() 返回一个 JSON 格式字符串 (使用 toISOString()),表示该日期对象的值。默认情况下,这个方法常用于 JSON序列化Date对象。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| key | any | 否 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| string | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 4.11 | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.11 | 4.11 | - | - | - | - |","itemType":"method","test":"```uts\n event = new Date('1995-12-17T03:24:00');\n console.log(event.toJSON()) //\"1995-12-16T19:24:00.000Z\"\n```"},"Constructor":{"name":"### Constructor()","description":"新创建的 Date 对象代表当前的日期和时间。","param":"","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Date | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const futureDate = new Date();\n console.log(futureDate)//日期和时间\n```"},"Constructor_1":{"name":"### Constructor(value)","description":"","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| value | number \\| string | 是 | - | - | 为整数时,代表自 UTC 1970 年 1 月 1 日 00:00:00 (ECMAScript 纪元,与 UNIX 纪元相同)以来的毫秒数,忽略闰秒。请记住,大多数 UNIX 时间戳函数只精确到最近的秒。为字符串时:代表日期的字符串值,其格式由 Date.parse() 方法所识别。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Date | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n let date1 = new Date('1992-02-02');\n console.log(date1.getTime()) // 696988800000\n```"},"Constructor_2":{"name":"### Constructor(year, monthIndex, date?, hours?, minutes?, seconds?, ms?)","description":"构造一个新的日期。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| year | number | 是 | - | - | 表示年的整数。从 0 到 99 的值映射了 1900 到 1999 年。其他值对应真实的年份。 |\n| monthIndex | number | 是 | - | - | 表示月份的整数,从代表一月的 0 开始到代表十二月的 11 结束。 |\n| date | number | 否 | - | - | 可选:表示一个月中第几天的整数。默认为 1。 |\n| hours | number | 否 | - | - | 可选:表示一天中的小时数的整数值,在 0 到 23 之间。默认值为 0。 |\n| minutes | number | 否 | - | - | 可选:表示时间的分钟段的整数值。默认为小时后的 0 分钟。 |\n| seconds | number | 否 | - | - | 可选:表示时间的秒数段的整数值。默认为分钟后的 0 秒。 |\n| ms | number | 否 | - | - | 可选:表示时间的毫秒段的整数值。默认为 0 毫秒的秒数。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Date | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n let date7 = new Date(2016, 6, 6, 14, 6, 59, 1000)\n console.log(date7.getMinutes()) //7\n```"},"parse":{"name":"### parse(s)","description":"解析一个表示某个日期的字符串,并返回从 1970-1-1 00:00:00 UTC 到该日期对象(该日期对象的 UTC 时间)的毫秒数,如果该字符串无法识别,或者一些情况下,包含了不合法的日期数值(如:2015-02-31),则返回值为 NaN。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| s | string | 是 | - | - | 一个符合 RFC2822 或 ISO 8601 日期格式的字符串(其他格式也许也支持,但结果可能与预期不符)。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 一个表示从 1970-1-1 00:00:00 UTC 到给定日期字符串所表示时间的毫秒数的数值。如果参数不能解析为一个有效的日期,则返回NaN。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const unixTimeZero = Date.parse('01 Jan 1970 00:00:00 GMT');\n console.log('Unix time zero:', unixTimeZero); // 0\n\n const javaScriptRelease = Date.parse('04 Dec 1995 00:12:00 GMT');\n console.log('JavaScript release:', javaScriptRelease); // 818035920000\n```"},"UTC":{"name":"### UTC(year, monthIndex, date?, hours?, minutes?, seconds?, ms?)","description":"接受的参数同 Date 构造函数接受最多参数时一样,但该前者会视它们为 UTC 时间,其返回从 1970 年 1 月 1 日 00:00:00 UTC 到指定时间的毫秒数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| year | number | 是 | - | - | 一个表示年份的整数值。从 0 到 99 的值会被映射到 1900 至 1999 年。其他的值则代表实际的年份。 |\n| monthIndex | number | 是 | - | - | 0(一月)到 11(十二月)之间的一个整数,表示月份。从 ECMAScript 2017 开始,如果忽略该值,则默认为 0。(直到 ECMAScript 2016,month 都是必须的参数。而从 ES2017 开始,它不再是必须的。) |\n| date | number | 否 | - | - | 1 到 31 之间的一个整数,表示某月当中的第几天。如果忽略该值,则默认为 1。 |\n| hours | number | 否 | - | - | 0 到 23 之间的一个整数,表示小时。如果忽略该值,则默认为 0。 |\n| minutes | number | 否 | - | - | 0 到 59 之间的一个整数,表示分钟。如果忽略该值,则默认为 0。 |\n| seconds | number | 否 | - | - | 0 到 59 之间的一个整数,表示秒。如果忽略该值,则默认为 0。 |\n| ms | number | 否 | - | - | 0 到 999 之间的一个整数,表示毫秒。如果忽略该值,则默认为 0。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 一个数字,表示从 1970 年 1 月 1 日 00:00:00 UTC 到给定时间的毫秒数。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"now":{"name":"### now()","description":"返回自 1970 年 1 月 1 日 00:00:00 (UTC) 到当前时间的毫秒数。","param":"","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const start = Date.now()\n // this example takes 2 seconds to run\n console.log('starting timer...')\n // expected output: starting timer...\n setTimeout(() => {\n const millis = Date.now() - start\n console.log(`seconds elapsed = ${Math.floor(millis / 1000)}`)\n // expected output: seconds elapsed = 2\n }, 2000)\n```"}},"Math":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.buildInObject.Math)","E":{"name":"### E","description":"Math.E 属性表示自然对数的底数(或称为基数),e,约等于 2.718。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"prop","test":"```uts\n function getNapier() : number {\n return Math.E\n }\n console.log(getNapier());\n // expected output: 2.718281828459045\n```"},"LN10":{"name":"### LN10","description":"Math.LN10 属性表示 10 的自然对数,约为 2.302<br/>","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"prop","test":"```uts\n function getNatLog10() : number {\n return Math.LN10;\n }\n console.log(getNatLog10());\n // expected output: 2.302585092994046\n```"},"LN2":{"name":"### LN2","description":"Math.LN2 属性表示 2 的自然对数,约为 0.693","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"prop","test":"```uts\n function getNatLog2() : number {\n return Math.LN2;\n }\n console.log(getNatLog2());\n // expected output: 0.6931471805599453\n```"},"LOG2E":{"name":"### LOG2E","description":"Math.LOG2E 属性表示以 2 为底数,e 的对数,约为 1.442","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"prop","test":"```uts\n function getLog2e() : number {\n return Math.LOG2E;\n }\n console.log(getLog2e());\n // expected output: 1.4426950408889634\n```"},"LOG10E":{"name":"### LOG10E","description":"Math.LOG10E 属性表示以 10 为底数,e 的对数,约为 0.434","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"prop","test":"```uts\n function getLog10e() : number {\n return Math.LOG10E;\n }\n console.log(getLog10e());\n // expected output: 0.4342944819032518\n```"},"PI":{"name":"### PI","description":"Math.PI 表示一个圆的周长与直径的比例,约为 3.14159","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"prop","test":"```uts\n function calculateCircumference(radius : number) : number {\n return 2 * Math.PI * radius;\n }\n console.log(calculateCircumference(1));\n // expected output: 6.283185307179586\n```"},"SQRT1_2":{"name":"### SQRT1_2","description":"Math.SQRT1_2 属性表示 1/2 的平方根,约为 0.707","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"prop","test":"```uts\n function getRoot1_2() : number {\n return Math.SQRT1_2;\n }\n console.log(getRoot1_2());\n // expected output: 0.7071067811865476\n```"},"SQRT2":{"name":"### SQRT2","description":"Math.SQRT2 属性表示 2 的平方根,约为 1.414","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"prop","test":"```uts\n function getRoot2() : number {\n return Math.SQRT2;\n }\n console.log(getRoot2());\n // expected output: 1.4142135623730951\n```"},"abs":{"name":"### abs(x)","description":"RMath.abs(x) 函数返回一个数字的绝对值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| x | number | 是 | - | - | 一个数字 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | x 的绝对值。如果 x 是负数(包括 -0),则返回 -x。否则,返回 x | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n function difference(a : number, b : number) : number {\n return Math.abs(a - b);\n }\n\n console.log(difference(3, 5));\n // expected output: 2\n\n console.log(difference(5, 3));\n // expected output: 2\n\n console.log(difference(1.23456, 7.89012));\n // expected output: 6.6555599999999995\n```"},"acos":{"name":"### acos(x)","description":"Math.acos() 返回一个数的反余弦值(单位为弧度)","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| x | number | 是 | - | - | 一个数值. | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n console.log(Math.acos(-1));\n // expected output: 3.141592653589793\n // #ifdef APP-ANDROID\n console.log(Math.acos(NaN));\n // #endif\n // expected output: NaN\n\n console.log(Math.acos(0));\n // expected output: 1.5707963267948966\n\n console.log(Math.acos(1));\n // expected output: 0\n```"},"asin":{"name":"### asin(x)","description":"Math.asin() 方法返回一个数值的反正弦(单位为弧度)","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| x | number | 是 | - | - | 一个数值 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n // #ifdef APP-ANDROID\n console.log(Math.asin(NaN));\n // #endif\n // expected output: NaN\n\n console.log(Math.asin(-1));\n // expected output: -1.5707963267948966\n\n console.log(Math.asin(0));\n // expected output: 0\n\n // console.log(Math.asin(0.5));\n // expected output: 0.5235987755982989\n\n console.log(Math.asin(1));\n // expected output: 1.5707963267948966\n```"},"atan":{"name":"### atan(x)","description":"Math.atan() 函数返回一个数值的反正切(以弧度为单位)","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| x | number | 是 | - | - | 一个数值 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n // #ifdef APP-ANDROID\n console.log(Math.atan(NaN));\n // #endif\n // expected output: NaN\n\n console.log(Math.atan(1));\n // expected output: 0.7853981633974483\n\n console.log(Math.atan(0));\n // expected output: 0\n```"},"atan2":{"name":"### atan2(y, x)","description":"Math.atan2() 返回从原点 (0,0) 到 (x,y) 点的线段与 x 轴正方向之间的平面角度 (弧度值),也就是 Math.atan2(y,x)","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| y | number | 是 | - | - | 数值 |\n| x | number | 是 | - | - | 数值 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n console.log(Math.atan2(90, 15));\n // expected output: 1.4056476493802699\n\n console.log(Math.atan2(15, 90));\n // expected output: 0.16514867741462683\n```"},"ceil":{"name":"### ceil(x)","description":"Math.ceil() 函数总是四舍五入并返回大于等于给定数字的最小整数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| x | number | 是 | - | - | 一个数值 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n console.log(Math.ceil(0.95));\n // expected output: 1\n // #ifdef APP-ANDROID\n console.log(Math.ceil(NaN));\n // #endif\n // expected output: NaN\n\n console.log(Math.ceil(4));\n // expected output: 4\n\n console.log(Math.ceil(7.004));\n // expected output: 8\n\n console.log(Math.ceil(-7.004));\n // expected output: -7\n\n console.log(Math.ceil(37110233000.223));\n // expected output: 37110233001\n\n console.log(Math.ceil(-37110233000.223));\n // expected output: -37110233000\n```"},"cos":{"name":"### cos(x)","description":"Math.cos() 函数返回一个数值的余弦值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| x | number | 是 | - | - | 一个以弧度为单位的数值。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n console.log(Math.cos(0));\n // expected output: 1.0\n\n console.log(Math.cos(1));\n // expected output: 0.5403023058681398\n```"},"exp":{"name":"### exp(x)","description":"Math.exp() 函数返回 e^x,x 表示参数,e 是欧拉常数(Euler's constant),自然对数的底数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| x | number | 是 | - | - | 一个数值 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n console.log(Math.exp(-1));\n // expected output: 0.36787944117144233\n\n console.log(Math.exp(0));\n // expected output: 1.0\n\n console.log(Math.exp(1));\n // expected output: 2.718281828459045\n```"},"floor":{"name":"### floor(x)","description":"Math.floor() 函数总是返回小于等于一个给定数字的最大整数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| x | number | 是 | - | - | 一个数字。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n console.log(Math.floor(5.95));\n // expected output: 5\n\n console.log(Math.floor(5.05));\n // expected output: 5\n\n console.log(Math.floor(5));\n // expected output: 5\n\n console.log(Math.floor(-5.05));\n // expected output: -6\n\n console.log(Math.floor(37110233000.223));\n // expected output: 37110233000\n\n console.log(Math.floor(-37110233000.223));\n // expected output: -37110233001\n```"},"log":{"name":"### log(x)","description":"Math.log() 函数返回一个数的自然对数","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| x | number | 是 | - | - | 一个数字。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n console.log(Math.log(1));\n // expected output: 0.0\n\n console.log(Math.log(10));\n // expected output: 2.302585092994046\n```"},"max":{"name":"### max(...values)","description":"Math.max() 函数返回作为输入参数的最大数字,如果没有参数,则返回 -Infinity","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| values | number[\\] | 是 | - | - | 0 个或多个数字,将在其中选择,并返回最大的值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 给定数值中最大的数。如果任一参数不能转换为数值,则返回 NaN。如果没有提供参数,返回 -Infinity。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n console.log(Math.max(1, 3, 2));\n // expected output: 3\n\n console.log(Math.max(-1, -3, -2));\n // expected output: -1\n```"},"min":{"name":"### min(...values)","description":"Math.min() 函数返回作为输入参数的数字中最小的一个,如果没有参数,则返回 Infinity。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| values | number[\\] | 是 | - | - | 0 个或多个数字,将在其中选择,并返回最小值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 给定数值中最小的数。如果任一参数不能转换为数值,则返回 NaN。如果没有提供参数,返回 Infinity。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n console.log(Math.min(2, 3, 1));\n // expected output: 1\n\n console.log(Math.min(-2, -3, -1));\n // expected output: -3\n```"},"pow":{"name":"### pow(x, y)","description":"Math.pow() 函数返回基数(base)的指数(exponent)次幂,即 base^exponent。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| x | number | 是 | - | - | 基数 |\n| y | number | 是 | - | - | 指数 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n console.log(Math.pow(7, 3));\n // expected output: 343\n\n console.log(Math.pow(4, 0.5));\n // expected output: 2\n```"},"random":{"name":"### random()","description":"Math.random() 函数返回一个浮点数,伪随机数在范围从0 到小于1,也就是说,从 0(包括 0)往上,但是不包括 1(排除 1),然后您可以缩放到所需的范围。实现将初始种子选择到随机数生成算法;它不能被用户选择或重置。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 一个浮点型伪随机数字,在0(包括 0)和1(不包括)之间。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n function getRandomInt(max : number) : number {\n return Math.floor(Math.random() * max);\n }\n\n console.log(getRandomInt(getRandomInt(1)));\n // expected output: 0\n```"},"round":{"name":"### round(x)","description":"Math.round() 函数返回一个数字四舍五入后最接近的整数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| x | number | 是 | - | - | 一个数值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 给定数字的值四舍五入到最接近的整数。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n console.log(Math.round(0.9)) // 1;\n console.log(Math.round(5.95)) // 6;\n console.log(Math.round(-5.05)) // -5;\n console.log(Math.round(37110233000.223)) // 37110233000;\n console.log(Math.round(-37110233000.223)) // -37110233000;\n```"},"sin":{"name":"### sin(x)","description":"Math.sin() 函数返回一个数值的正弦值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| x | number | 是 | - | - | 一个数值(以弧度为单位)。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n console.log(Math.sin(0));\n // expected output: 0.0\n\n console.log(Math.sin(1));\n // expected output: 0.8414709848078965\n```"},"sqrt":{"name":"### sqrt(x)","description":"Math.sqrt() 函数返回一个数的平方根","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| x | number | 是 | - | - | 一个数值 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n function calcHypotenuse(a : number, b : number) : number {\n return (Math.sqrt((a * a) + (b * b)));\n }\n console.log(calcHypotenuse(3, 4));\n // expected output: 5.0\n\n console.log(calcHypotenuse(5, 12));\n // expected output: 13.0\n\n console.log(calcHypotenuse(0, 0));\n // expected output: 0.0\n```"},"tan":{"name":"### tan(x)","description":"Math.tan() 方法返回一个数值的正切值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| x | number | 是 | - | - | 一个数值,表示一个角(单位:弧度)。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n console.log(Math.tan(0));\n // expected output: 0.0\n\n // console.log(Math.tan(1));\n // expected output: 1.5574077246549023\n```"},"clz32":{"name":"### clz32(x)","description":"Math.clz32() 函数返回一个数字在转换成 32 无符号整形数字的二进制形式后,开头的 0 的个数","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| x | number | 是 | - | - | 一个数字。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n console.log(Math.clz32(1000));\n // expected output: 22\n```"},"imul":{"name":"### imul(x, y)","description":"该函数将两个参数分别转换为 32 位整数,相乘后返回 32 位结果,类似 C 语言的 32 位整数相乘。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| x | number | 是 | - | - | 被乘数。 |\n| y | number | 是 | - | - | 乘数。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"sign":{"name":"### sign(x)","description":"Math.sin() 函数返回一个数值的正弦值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| x | number | 是 | - | - | 一个数值(以弧度为单位)。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n console.log(Math.sign(3));\n // expected output: 1\n\n console.log(Math.sign(-3));\n // expected output: -1\n\n console.log(Math.sign(0));\n // expected output: 0\n```"},"log10":{"name":"### log10(x)","description":"Math.log10() 函数返回一个数字以 10 为底的对数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| x | number | 是 | - | - | 任意数字。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n console.log(Math.log10(10));\n // expected output: 1\n\n console.log(Math.log10(100));\n // expected output: 2\n\n console.log(Math.log10(1));\n // expected output: 0\n```"},"log2":{"name":"### log2(x)","description":"Math.log2() 函数返回一个数字以 2 为底的对数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| x | number | 是 | - | - | 任意数字。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n console.log(Math.log2(2));\n // expected output: 1.0\n\n console.log(Math.log2(1024));\n // expected output: 10.0\n\n console.log(Math.log2(1));\n // expected output: 0.0\n // 解决精度问题\n```"},"log1p":{"name":"### log1p(x)","description":"Math.log1p() 函数返回一个数字加 1 后的自然对数 (底为 E), 既log(x+1).","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| x | number | 是 | - | - | 任意数字。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n console.log(Math.log1p(Math.E - 1));\n // expected output: 1.0\n\n console.log(Math.log1p(0));\n // expected output: 0.0\n // 解决精度问题\n```"},"expm1":{"name":"### expm1(x)","description":"Math.expm1() 函数返回 E^x - 1, 其中 x 是该函数的参数,E 是自然对数的底数 2.718281828459045。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| x | number | 是 | - | - | 任意数字。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n console.log(Math.expm1(1));\n // expected output: 1.718281828459045\n\n console.log(Math.expm1(-38));\n // expected output: -1\n```"},"cosh":{"name":"### cosh(x)","description":"Math.cosh() 函数返回数值的双曲余弦函数","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| x | number | 是 | - | - | 数值。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n console.log(Math.cosh(0));\n // expected output: 1.0\n\n console.log(Math.cosh(1));\n // expected output: 1.5430806348152437\n\n console.log(Math.cosh(-1));\n // expected output: 1.5430806348152437\n```"},"sinh":{"name":"### sinh(x)","description":"Math.sinh() 函数返回一个数字 (单位为角度) 的双曲正弦值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| x | number | 是 | - | - | 任意数字 (单位为度). | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n console.log(Math.sinh(0));\n // expected output: 0.0\n\n console.log(Math.sinh(1));\n // expected output: 1.1752011936438014\n```"},"tanh":{"name":"### tanh(x)","description":"Math.tanh() 函数将会返回一个数的双曲正切函数值","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| x | number | 是 | - | - | 待计算的数字。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n console.log(Math.tanh(-1));\n // expected output: -0.7615941559557649\n\n console.log(Math.tanh(0));\n // expected output: 0.0\n\n console.log(Math.tanh(1));\n // expected output: 0.7615941559557649\n```"},"acosh":{"name":"### acosh(x)","description":"Math.acosh() 函数返回一个数的反双曲余弦值","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| x | number | 是 | - | - | 一个数字。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n console.log(Math.acosh(1));\n // expected output: 0\n // #ifdef APP-ANDROID\n console.log(Math.acosh(NaN));\n // #endif\n // expected output: NaN\n\n console.log(Math.acosh(2));\n // expected output: 1.3169578969248166\n\n console.log(Math.acosh(2.5));\n // expected output: 1.566799236972411\n```"},"asinh":{"name":"### asinh(x)","description":"Math.asinh() 返回一个数值的反双曲正弦值","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| x | number | 是 | - | - | 一个数值。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n // #ifdef APP-ANDROID\n console.log(Math.asinh(NaN));\n // #endif\n // expected output: NaN\n\n console.log(Math.asinh(1));\n // expected output: 0.881373587019543\n\n console.log(Math.asinh(0));\n // expected output: 0\n\n console.log(Math.asinh(-1));\n // expected output: -0.881373587019543\n\n console.log(Math.asinh(2));\n // expected output: 1.4436354751788103\n```"},"atanh":{"name":"### atanh(x)","description":"Math.atanh() 函数返回一个数值反双曲正切值","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| x | number | 是 | - | - | 一个数值 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n // #ifdef APP-ANDROID\n console.log(Math.atanh(NaN));\n // #endif\n // expected output: NaN\n\n console.log(Math.atanh(0));\n // expected output: 0\n```"},"hypot":{"name":"### hypot(...values)","description":"Math.hypot() 函数返回所有参数的平方和的平方根","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| values | number[\\] | 是 | - | - | 任意个数字。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"trunc":{"name":"### trunc(x)","description":"Math.trunc() 方法会将数字的小数部分去掉,只保留整数部分。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| x | number | 是 | - | - | 任意数字 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n console.log(Math.trunc(13.37));\n // expected output: 13\n\n console.log(Math.trunc(42.84));\n // expected output: 42\n\n console.log(Math.trunc(0.123));\n // expected output: 0\n```"},"fround":{"name":"### fround(x)","description":"Math.fround() 可以将任意的数字转换为离它最近的单精度浮点数形式的数字。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| x | number | 是 | - | - | 一个 Number。若参数为非数字类型,则会被转投成数字。无法转换时,设置成NaN。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | 3.9 | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n // #ifdef APP-ANDROID\n console.log(Math.fround(NaN));\n // #endif\n // expected output: NaN\n\n console.log(Math.fround(1.5));\n // expected output: 1.5\n\n console.log(Math.fround(1.337));\n // expected output: 1.3370000123977661\n```"},"cbrt":{"name":"### cbrt(x)","description":"Math.cbrt() 函数返回任意数字的立方根。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| x | number | 是 | - | - | 任意数字。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"}},"Promise":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.buildInObject.Promise)","Constructor":{"name":"### Constructor(fn)","description":"创建一个新的 Promise 对象。该构造函数主要用于封装还没有添加 promise 支持的函数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| fn | (resolve: (value: T) => void, reject: (reason?: any) => void) => void | 是 | - | - | 在构造函数中执行的 function。 | \n","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.9 | 4.11 | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.9 | 3.9 | 4.31 | 4.31 | - | - |","itemType":"method","test":"```uts\n // 常规方式\n let p = new Promise<number>((resolve, reject) => {\n let success = true;\n setTimeout(() => {\n if (success) {\n resolve(2024)\n } else {\n let error = new Error(\"something going wrong\")\n reject(error)\n }\n }, 10);\n });\n p.then((res : number) => {\n console.log(res) // 2024\n })\n\n // 单个函数\n let p1 = new Promise<any | null>((resolve : (value : any | null) => void) => {\n setTimeout(function () {\n resolve(null)\n }, 10);\n })\n p1.then((res : any | null) => {\n console.log(res) // null\n })\n\n // 指定函数类型\n let p2 = new Promise((resolve : (value : string) => void, reject : (error : any | null) => void) => {\n setTimeout(function () {\n reject(null)\n }, 10);\n })\n p2.then()\n .catch((error : any | null) => {\n console.log(error) // null\n })\n```"},"Constructor_1":{"name":"### Constructor(fn)","description":"创建一个新的 Promise 对象。该构造函数主要用于封装还没有添加 promise 支持的函数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| fn | (resolve: (value: T) => void) => void | 是 | - | - | 在构造函数中执行的 function。 | \n","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.9 | 4.11 | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.9 | 3.9 | 4.31 | 4.31 | - | - |","itemType":"method","test":"```uts\n // 常规方式\n let p = new Promise<number>((resolve, reject) => {\n let success = true;\n setTimeout(() => {\n if (success) {\n resolve(2024)\n } else {\n let error = new Error(\"something going wrong\")\n reject(error)\n }\n }, 10);\n });\n p.then((res : number) => {\n console.log(res) // 2024\n })\n\n // 单个函数\n let p1 = new Promise<any | null>((resolve : (value : any | null) => void) => {\n setTimeout(function () {\n resolve(null)\n }, 10);\n })\n p1.then((res : any | null) => {\n console.log(res) // null\n })\n\n // 指定函数类型\n let p2 = new Promise((resolve : (value : string) => void, reject : (error : any | null) => void) => {\n setTimeout(function () {\n reject(null)\n }, 10);\n })\n p2.then()\n .catch((error : any | null) => {\n console.log(error) // null\n })\n```"},"then":{"name":"### then()","description":"将一个兑现处理器和拒绝处理器附加到 Promise 上,并返回一个新的 Promise,解决为调用处理器得到的返回值,或者如果 Promise 没有被处理(即相关处理器 onFulfilled 或 onRejected 不是函数),则以原始敲定值解决。","param":"","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Promise\\<T> | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.9 | 4.11 | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.9 | 3.9 | 4.31 | 4.31 | - | - |","itemType":"method","test":"```uts\n let p = new Promise<string>((reslove, reject) => {\n setTimeout(function () {\n reslove(\"hello world\")\n }, 13);\n })\n\n p.then(\n (res : string) : Promise<string> => {\n console.log(res) // \"hello world\"\n let p0 = new Promise<string>((reslove, reject) => {\n var success = true;\n setTimeout(function () {\n success = true;\n if (success) {\n reslove(res + \" 2024\")\n } else {\n reject(\"first then p0 reject message\")\n }\n }, 8);\n })\n return p0;\n },\n (err : any | null) : void => {\n throw new Error(\"first then throw error\")\n }\n )\n .catch(\n (err) : string => {\n return \"first catch return message\"\n }\n )\n .then(\n (res) => {\n console.log(res) // \"hello world 2024\"\n }\n )\n .catch(\n (err) => {\n console.log(err, \"this is seconded catch\")\n }\n )\n .finally(() => {\n console.log(\"finally\") // \"finally\"\n })\n```"},"then_1":{"name":"### then(onFulfilled, onRejected?)","description":"将一个兑现处理器和拒绝处理器附加到 Promise 上,并返回一个新的 Promise,解决为调用处理器得到的返回值,或者如果 Promise 没有被处理(即相关处理器 onFulfilled 或 onRejected 不是函数),则以原始敲定值解决。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| onFulfilled | () => any | 是 | - | - | 一个在此 Promise 对象被兑现时异步执行的函数。它的返回值将成为 then() 返回的 Promise 对象的兑现值。 |\n| onRejected | (...args?: any) => any | 否 | - | - | 一个在此 Promise 对象被拒绝时异步执行的函数。它的返回值将成为 catch() 返回的 Promise 对象的兑现值。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Promise\\<R> | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.9 | 4.11 | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.9 | 3.9 | 4.31 | 4.31 | - | - |","itemType":"method","test":"```uts\n let p = new Promise<string>((reslove, reject) => {\n setTimeout(function () {\n reslove(\"hello world\")\n }, 13);\n })\n\n p.then(\n (res : string) : Promise<string> => {\n console.log(res) // \"hello world\"\n let p0 = new Promise<string>((reslove, reject) => {\n var success = true;\n setTimeout(function () {\n success = true;\n if (success) {\n reslove(res + \" 2024\")\n } else {\n reject(\"first then p0 reject message\")\n }\n }, 8);\n })\n return p0;\n },\n (err : any | null) : void => {\n throw new Error(\"first then throw error\")\n }\n )\n .catch(\n (err) : string => {\n return \"first catch return message\"\n }\n )\n .then(\n (res) => {\n console.log(res) // \"hello world 2024\"\n }\n )\n .catch(\n (err) => {\n console.log(err, \"this is seconded catch\")\n }\n )\n .finally(() => {\n console.log(\"finally\") // \"finally\"\n })\n```"},"then_2":{"name":"### then(onFulfilled, onRejected?)","description":"将一个兑现处理器和拒绝处理器附加到 Promise 上,并返回一个新的 Promise,解决为调用处理器得到的返回值,或者如果 Promise 没有被处理(即相关处理器 onFulfilled 或 onRejected 不是函数),则以原始敲定值解决。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| onFulfilled | () => Promise\\<any> | 是 | - | - | 一个在此 Promise 对象被兑现时异步执行的函数。它的返回值将成为 then() 返回的 Promise 对象的兑现值。 |\n| onRejected | (...args?: any) => any | 否 | - | - | 一个在此 Promise 对象被拒绝时异步执行的函数。它的返回值将成为 catch() 返回的 Promise 对象的兑现值。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Promise\\<R> | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.9 | 4.11 | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.9 | 3.9 | 4.31 | 4.31 | - | - |","itemType":"method","test":"```uts\n let p = new Promise<string>((reslove, reject) => {\n setTimeout(function () {\n reslove(\"hello world\")\n }, 13);\n })\n\n p.then(\n (res : string) : Promise<string> => {\n console.log(res) // \"hello world\"\n let p0 = new Promise<string>((reslove, reject) => {\n var success = true;\n setTimeout(function () {\n success = true;\n if (success) {\n reslove(res + \" 2024\")\n } else {\n reject(\"first then p0 reject message\")\n }\n }, 8);\n })\n return p0;\n },\n (err : any | null) : void => {\n throw new Error(\"first then throw error\")\n }\n )\n .catch(\n (err) : string => {\n return \"first catch return message\"\n }\n )\n .then(\n (res) => {\n console.log(res) // \"hello world 2024\"\n }\n )\n .catch(\n (err) => {\n console.log(err, \"this is seconded catch\")\n }\n )\n .finally(() => {\n console.log(\"finally\") // \"finally\"\n })\n```"},"then_3":{"name":"### then(onFulfilled, onRejected?)","description":"将一个兑现处理器和拒绝处理器附加到 Promise 上,并返回一个新的 Promise,解决为调用处理器得到的返回值,或者如果 Promise 没有被处理(即相关处理器 onFulfilled 或 onRejected 不是函数),则以原始敲定值解决。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| onFulfilled | (res: T) => any | 是 | - | - | 一个在此 Promise 对象被兑现时异步执行的函数。它的返回值将成为 then() 返回的 Promise 对象的兑现值。 |\n| onRejected | (...args?: any) => any | 否 | - | - | 一个在此 Promise 对象被拒绝时异步执行的函数。它的返回值将成为 catch() 返回的 Promise 对象的兑现值。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Promise\\<R> | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.9 | 4.11 | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.9 | 3.9 | 4.31 | 4.31 | - | - |","itemType":"method","test":"```uts\n let p = new Promise<string>((reslove, reject) => {\n setTimeout(function () {\n reslove(\"hello world\")\n }, 13);\n })\n\n p.then(\n (res : string) : Promise<string> => {\n console.log(res) // \"hello world\"\n let p0 = new Promise<string>((reslove, reject) => {\n var success = true;\n setTimeout(function () {\n success = true;\n if (success) {\n reslove(res + \" 2024\")\n } else {\n reject(\"first then p0 reject message\")\n }\n }, 8);\n })\n return p0;\n },\n (err : any | null) : void => {\n throw new Error(\"first then throw error\")\n }\n )\n .catch(\n (err) : string => {\n return \"first catch return message\"\n }\n )\n .then(\n (res) => {\n console.log(res) // \"hello world 2024\"\n }\n )\n .catch(\n (err) => {\n console.log(err, \"this is seconded catch\")\n }\n )\n .finally(() => {\n console.log(\"finally\") // \"finally\"\n })\n```"},"then_4":{"name":"### then(onFulfilled, onRejected?)","description":"将一个兑现处理器和拒绝处理器附加到 Promise 上,并返回一个新的 Promise,解决为调用处理器得到的返回值,或者如果 Promise 没有被处理(即相关处理器 onFulfilled 或 onRejected 不是函数),则以原始敲定值解决。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| onFulfilled | (res: T) => Promise\\<any> | 是 | - | - | 一个在此 Promise 对象被兑现时异步执行的函数。它的返回值将成为 then() 返回的 Promise 对象的兑现值。 |\n| onRejected | (...args?: any) => any | 否 | - | - | 一个在此 Promise 对象被拒绝时异步执行的函数。它的返回值将成为 catch() 返回的 Promise 对象的兑现值。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Promise\\<R> | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.9 | 4.11 | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.9 | 3.9 | 4.31 | 4.31 | - | - |","itemType":"method","test":"```uts\n let p = new Promise<string>((reslove, reject) => {\n setTimeout(function () {\n reslove(\"hello world\")\n }, 13);\n })\n\n p.then(\n (res : string) : Promise<string> => {\n console.log(res) // \"hello world\"\n let p0 = new Promise<string>((reslove, reject) => {\n var success = true;\n setTimeout(function () {\n success = true;\n if (success) {\n reslove(res + \" 2024\")\n } else {\n reject(\"first then p0 reject message\")\n }\n }, 8);\n })\n return p0;\n },\n (err : any | null) : void => {\n throw new Error(\"first then throw error\")\n }\n )\n .catch(\n (err) : string => {\n return \"first catch return message\"\n }\n )\n .then(\n (res) => {\n console.log(res) // \"hello world 2024\"\n }\n )\n .catch(\n (err) => {\n console.log(err, \"this is seconded catch\")\n }\n )\n .finally(() => {\n console.log(\"finally\") // \"finally\"\n })\n```"},"catch":{"name":"### catch()","description":"将一个拒绝处理回调函数附加到 Promise 上,并返回一个新的 Promise,如果回调被调用,则解决为回调的返回值,如果 Promise 被兑现,解决为其原始兑现值。","param":"","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Promise\\<T> | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.9 | 4.11 | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.9 | 3.9 | 4.31 | 4.31 | - | - |","itemType":"method","test":"```uts\n let p = Promise.reject()\n p.then()\n .catch((res : any | null) => {\n console.log(res) // null\n })\n\n // catch 指定返回值\n new Promise<string>((resolve, reject) => {\n setTimeout(() => {\n reject(\"2024\")\n }, 12)\n })\n .then()\n .catch((res : any | null) : string => {\n console.log(res!) // \"2024\"\n return \"hello world\"\n })\n .then((res) => {\n console.log(res) // \"hello world\"\n })\n\n // catch 返回Promise\n new Promise<string>((resolve, reject) => {\n setTimeout(() => {\n reject(\"2024\")\n }, 12)\n })\n .then()\n .catch((res : any | null) : Promise<number> => {\n console.log(res!) // \"2024\"\n let p = new Promise<number>((resolve, reject) => {\n resolve(1)\n })\n return p\n })\n .then((res) => {\n console.log(res) // 1\n })\n```"},"catch_1":{"name":"### catch(onRejected)","description":"将一个拒绝处理回调函数附加到 Promise 上,并返回一个新的 Promise,如果回调被调用,则解决为回调的返回值,如果 Promise 被兑现,解决为其原始兑现值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| onRejected | () => any | 是 | - | - | 一个在此 Promise 对象被拒绝时异步执行的函数。它的返回值将成为 catch() 返回的 Promise 对象的兑现值。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Promise\\<R> | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.9 | 4.11 | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.9 | 3.9 | 4.31 | 4.31 | - | - |","itemType":"method","test":"```uts\n let p = Promise.reject()\n p.then()\n .catch((res : any | null) => {\n console.log(res) // null\n })\n\n // catch 指定返回值\n new Promise<string>((resolve, reject) => {\n setTimeout(() => {\n reject(\"2024\")\n }, 12)\n })\n .then()\n .catch((res : any | null) : string => {\n console.log(res!) // \"2024\"\n return \"hello world\"\n })\n .then((res) => {\n console.log(res) // \"hello world\"\n })\n\n // catch 返回Promise\n new Promise<string>((resolve, reject) => {\n setTimeout(() => {\n reject(\"2024\")\n }, 12)\n })\n .then()\n .catch((res : any | null) : Promise<number> => {\n console.log(res!) // \"2024\"\n let p = new Promise<number>((resolve, reject) => {\n resolve(1)\n })\n return p\n })\n .then((res) => {\n console.log(res) // 1\n })\n```"},"catch_2":{"name":"### catch(onRejected)","description":"将一个拒绝处理回调函数附加到 Promise 上,并返回一个新的 Promise,如果回调被调用,则解决为回调的返回值,如果 Promise 被兑现,解决为其原始兑现值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| onRejected | () => Promise\\<any> | 是 | - | - | 一个在此 Promise 对象被拒绝时异步执行的函数。它的返回值将成为 catch() 返回的 Promise 对象的兑现值。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Promise\\<R> | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.9 | 4.11 | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.9 | 3.9 | 4.31 | 4.31 | - | - |","itemType":"method","test":"```uts\n let p = Promise.reject()\n p.then()\n .catch((res : any | null) => {\n console.log(res) // null\n })\n\n // catch 指定返回值\n new Promise<string>((resolve, reject) => {\n setTimeout(() => {\n reject(\"2024\")\n }, 12)\n })\n .then()\n .catch((res : any | null) : string => {\n console.log(res!) // \"2024\"\n return \"hello world\"\n })\n .then((res) => {\n console.log(res) // \"hello world\"\n })\n\n // catch 返回Promise\n new Promise<string>((resolve, reject) => {\n setTimeout(() => {\n reject(\"2024\")\n }, 12)\n })\n .then()\n .catch((res : any | null) : Promise<number> => {\n console.log(res!) // \"2024\"\n let p = new Promise<number>((resolve, reject) => {\n resolve(1)\n })\n return p\n })\n .then((res) => {\n console.log(res) // 1\n })\n```"},"catch_3":{"name":"### catch(onRejected)","description":"将一个拒绝处理回调函数附加到 Promise 上,并返回一个新的 Promise,如果回调被调用,则解决为回调的返回值,如果 Promise 被兑现,解决为其原始兑现值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| onRejected | (res?: any) => any | 是 | - | - | 一个在此 Promise 对象被拒绝时异步执行的函数。它的返回值将成为 catch() 返回的 Promise 对象的兑现值。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Promise\\<R> | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.9 | 4.11 | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.9 | 3.9 | 4.31 | 4.31 | - | - |","itemType":"method","test":"```uts\n let p = Promise.reject()\n p.then()\n .catch((res : any | null) => {\n console.log(res) // null\n })\n\n // catch 指定返回值\n new Promise<string>((resolve, reject) => {\n setTimeout(() => {\n reject(\"2024\")\n }, 12)\n })\n .then()\n .catch((res : any | null) : string => {\n console.log(res!) // \"2024\"\n return \"hello world\"\n })\n .then((res) => {\n console.log(res) // \"hello world\"\n })\n\n // catch 返回Promise\n new Promise<string>((resolve, reject) => {\n setTimeout(() => {\n reject(\"2024\")\n }, 12)\n })\n .then()\n .catch((res : any | null) : Promise<number> => {\n console.log(res!) // \"2024\"\n let p = new Promise<number>((resolve, reject) => {\n resolve(1)\n })\n return p\n })\n .then((res) => {\n console.log(res) // 1\n })\n```"},"catch_4":{"name":"### catch(onRejected)","description":"将一个拒绝处理回调函数附加到 Promise 上,并返回一个新的 Promise,如果回调被调用,则解决为回调的返回值,如果 Promise 被兑现,解决为其原始兑现值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| onRejected | (res?: any) => Promise\\<any> | 是 | - | - | 一个在此 Promise 对象被拒绝时异步执行的函数。它的返回值将成为 catch() 返回的 Promise 对象的兑现值。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Promise\\<R> | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.9 | 4.11 | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.9 | 3.9 | 4.31 | 4.31 | - | - |","itemType":"method","test":"```uts\n let p = Promise.reject()\n p.then()\n .catch((res : any | null) => {\n console.log(res) // null\n })\n\n // catch 指定返回值\n new Promise<string>((resolve, reject) => {\n setTimeout(() => {\n reject(\"2024\")\n }, 12)\n })\n .then()\n .catch((res : any | null) : string => {\n console.log(res!) // \"2024\"\n return \"hello world\"\n })\n .then((res) => {\n console.log(res) // \"hello world\"\n })\n\n // catch 返回Promise\n new Promise<string>((resolve, reject) => {\n setTimeout(() => {\n reject(\"2024\")\n }, 12)\n })\n .then()\n .catch((res : any | null) : Promise<number> => {\n console.log(res!) // \"2024\"\n let p = new Promise<number>((resolve, reject) => {\n resolve(1)\n })\n return p\n })\n .then((res) => {\n console.log(res) // 1\n })\n```"},"finally":{"name":"### finally()","description":"将一个处理器附加到 Promise 上,并返回一个新的 Promise,当原始 Promise 被解决时解决。无论 Promise 是否被兑现还是被拒绝,处理器都会在 Promise 敲定时被调用。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| | (...args?: any) => any | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Promise\\<T> | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.9 | 4.11 | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.9 | 3.9 | 4.31 | 4.31 | - | - |","itemType":"method","test":"```uts\n Promise.resolve(2)\n .finally(() => {\n console.log(\"finally\")\n })\n .then((res) => {\n console.log(res) // 2\n })\n\n Promise.reject(3)\n .finally(() => {\n console.log(\"finally\")\n })\n .catch((res) => {\n console.log(res) // 3\n })\n\n Promise.resolve(2)\n .finally(() : number => {\n console.log(\"finally\")\n return 88\n })\n .then((res) => {\n console.log(res) // 2\n })\n\n Promise.reject(3).finally(() => {\n throw new Error(\"99\")\n })\n .catch((res) => {\n console.log((res as Error).message) // \"99\";\n })\n\n console.log(\"start\");\n Promise.reject(4).finally(() : Promise<number> => {\n return new Promise((resolve, reject) => {\n setTimeout(() => {\n resolve(20)\n }, 1000)\n })\n })\n .catch((res) => {\n console.log(res) // 4\n })\n```"},"resolve":{"name":"### resolve()","description":"返回一个新的 Promise 对象,该对象以给定的值兑现。","param":"","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Promise\\<void> | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.9 | 4.11 | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.9 | 3.9 | 4.31 | 4.31 | - | - |","itemType":"method","test":"```uts\n // resolve array\n Promise.resolve([1, 2, 3])\n .then((res) => {\n console.log(res) // [1, 2, 3]\n })\n\n // resolve string\n Promise.resolve(\"成功\")\n .then((res) => {\n console.log(res) // \"成功\";\n })\n\n // resolve null\n Promise.resolve()\n .then((res) => {\n // console.log(res) // null;\n })\n\n // resolve promise\n const original = Promise.resolve(33)\n const cast = Promise.resolve(original)\n cast.then((res) => {\n console.log(res) // 33;\n })\n // 注:此处飘红是编译器误报,实际可以判等\n console.log(original === cast) // true\n```"},"resolve_1":{"name":"### resolve(value)","description":"返回一个新的 Promise 对象,该对象以给定的值兑现。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| value | T \\| null | 是 | - | - | 一个兑现的值。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Promise\\<T> | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.9 | 4.11 | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.9 | 3.9 | 4.31 | 4.31 | - | - |","itemType":"method","test":"```uts\n // resolve array\n Promise.resolve([1, 2, 3])\n .then((res) => {\n console.log(res) // [1, 2, 3]\n })\n\n // resolve string\n Promise.resolve(\"成功\")\n .then((res) => {\n console.log(res) // \"成功\";\n })\n\n // resolve null\n Promise.resolve()\n .then((res) => {\n // console.log(res) // null;\n })\n\n // resolve promise\n const original = Promise.resolve(33)\n const cast = Promise.resolve(original)\n cast.then((res) => {\n console.log(res) // 33;\n })\n // 注:此处飘红是编译器误报,实际可以判等\n console.log(original === cast) // true\n```"},"resolve_2":{"name":"### resolve(value)","description":"返回一个新的 Promise 对象,该对象以给定的值兑现。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| value | Promise\\<T> \\| null | 是 | - | - | 一个 Promise。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Promise\\<T> | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.9 | 4.11 | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.9 | 3.9 | 4.31 | 4.31 | - | - |","itemType":"method","test":"```uts\n // resolve array\n Promise.resolve([1, 2, 3])\n .then((res) => {\n console.log(res) // [1, 2, 3]\n })\n\n // resolve string\n Promise.resolve(\"成功\")\n .then((res) => {\n console.log(res) // \"成功\";\n })\n\n // resolve null\n Promise.resolve()\n .then((res) => {\n // console.log(res) // null;\n })\n\n // resolve promise\n const original = Promise.resolve(33)\n const cast = Promise.resolve(original)\n cast.then((res) => {\n console.log(res) // 33;\n })\n // 注:此处飘红是编译器误报,实际可以判等\n console.log(original === cast) // true\n```"},"reject":{"name":"### reject(value?)","description":"返回一个新的 Promise 对象,该对象以给定的原因拒绝。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| value | any \\| null | 否 | - | - | 一个拒绝的原因。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Promise\\<never> | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.9 | 4.11 | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.9 | 3.9 | 4.31 | 4.31 | - | - |","itemType":"method","test":"```uts\n // reject array\n Promise.reject([1, 2, 3])\n .catch((err) => {\n console.log(err) // [1, 2, 3]\n })\n\n // reject error\n Promise.reject(new Error(\"this is reject error message\"))\n .catch((err) => {\n console.log((err as Error).message) // \"this is reject error message\";\n })\n\n // reject null\n Promise.reject()\n .catch((err) => {\n console.log(err) // null;\n })\n\n // reject promise\n const original = Promise.reject(33)\n const cast = Promise.reject(original)\n cast.catch((err) => {\n console.log((err as Promise<any>) === original) // true;\n })\n console.log(original === cast) // false\n```"},"all":{"name":"### all(arr)","description":"接受一个 Promise 可迭代对象作为输入,并返回单个 Promise。返回的 Promise 在所有输入的 Promise 都兑现时(包括传入的可迭代对象为空时)被兑现,其值为一个包含所有兑现值的数组。如果输入的任何 Promise 被拒绝,返回的 Promise 也会被拒绝,并返回第一个拒绝的原因。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| arr | Array\\<Promise\\>\\<Promise\\<T>> | 是 | - | - | 一个 Promise 数组。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Promise\\<Array\\<T>> | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.9 | 4.11 | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.9 | 3.9 | 4.31 | 4.31 | - | - |","itemType":"method","test":"```uts\n let p0 = new Promise<string>((resolve, reject) => {\n setTimeout(function () {\n resolve(\"1\");\n }, 10);\n })\n\n let p1 = new Promise<string>((resolve, reject) => {\n setTimeout(function () {\n resolve(\"2\");\n }, 10);\n })\n\n let p2 = new Promise<string>((resolve, reject) => {\n setTimeout(function () {\n resolve(\"3\");\n }, 10);\n })\n\n let p3 = new Promise<string>((resolve, reject) => {\n setTimeout(function () {\n let error = new Error(\"p3 reject reason\")\n reject(error);\n }, 10);\n })\n // resolve\n Promise.all([p0, p1, p2])\n .then((res) => {\n console.log(res) // [\"1\", \"2\", \"3\"]\n })\n\n // reject\n Promise.all([p1, p2, p3])\n .then()\n .catch((error) => {\n console.log(error);\n console.log((error as Error).message) // \"p3 reject reason\";\n })\n```"},"race":{"name":"### race(arr)","description":"接受一个 Promise 可迭代对象作为输入,并返回单个 Promise。返回的 Promise 与第一个敲定的 Promise 的最终状态保持一致。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| arr | Array\\<Promise\\>\\<Promise\\<T>> | 是 | - | - | 一个 Promise 数组。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Promise\\<T> | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.9 | 4.11 | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.9 | 3.9 | 4.31 | 4.31 | - | - |","itemType":"method","test":"```uts\n let p0 = new Promise<string | null>((resolve, reject) => {\n setTimeout(function () {\n resolve(\"fast\");\n }, 10);\n })\n\n let p1 = new Promise<string | null>((resolve, reject) => {\n setTimeout(function () {\n resolve(\"slow\");\n }, 15);\n })\n\n let p2 = new Promise<string | null>((resolve, reject) => {\n setTimeout(function () {\n reject(null)\n }, 12);\n })\n\n // test for resolve\n Promise.race([p0, p1])\n .then((res) => {\n console.log(\"test for race resolve ===> \", res);\n console.log(res) // \"fast\";\n })\n\n // test for reject \n Promise.race([p1, p2])\n .then()\n .catch((error) => {\n console.log(\"test for race reject ===> \", error);\n console.log(error) // null;\n })\n```"},"any":{"name":"### any(arr)","description":"接受一个 Promise 可迭代对象作为输入,并返回单个 Promise。返回的 Promise 在任何输入的 Promise 兑现时兑现,其值为第一个兑现的值。如果所有输入的 Promise 都被拒绝(包括传入的可迭代对象为空时),返回的 Promise 将以带有一个包含拒绝原因的数组的 AggregateError 拒绝。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| arr | Array\\<Promise\\>\\<Promise\\<T>> | 是 | - | - | 一个 Promise 数组。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Promise\\<T> | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.9 | 4.11 | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.9 | 3.9 | 4.31 | 4.31 | - | - |","itemType":"method","test":"```uts\n let p0 = new Promise<string | null>((resolve, reject) => {\n setTimeout(function () {\n resolve(\"1\");\n }, 10);\n })\n\n let p1 = new Promise<string | null>((resolve, reject) => {\n setTimeout(function () {\n resolve(null);\n }, 15);\n })\n\n let p2 = new Promise<string | null>((resolve, reject) => {\n setTimeout(function () {\n reject(null)\n }, 10);\n })\n\n let p3 = new Promise<string | null>((resolve, reject) => {\n setTimeout(function () {\n reject(\"error\");\n }, 12);\n })\n\n // test for resolve\n Promise.any([p0, p1, p2])\n .then((res) => {\n console.log(res)\n console.log(res) // \"1\";\n })\n\n // test for reject\n Promise.any([p2, p3])\n .then()\n .catch(\n (error : any | null) => {\n console.log(\"test for promise.any error ==> \", error);\n // #ifdef APP-IOS\n console.log((error as UTSPromiseAggregateError).name) // \"AggregateError\";\n console.log((error as UTSPromiseAggregateError).message) // \"All promises were rejected\";\n console.log((error as UTSPromiseAggregateError).errors) // [null, \"error\"];\n // #endif\n\n // #ifdef APP-ANDROID\n console.log((error as UTSPromiseAggregateError).name) // \"AggregateError\";\n console.log((error as UTSPromiseAggregateError).message) // \"All promises were rejected\";\n console.log((error as UTSPromiseAggregateError).errors) // [null, \"error\"];\n // #endif\n })\n```"},"allSettled":{"name":"### allSettled(arr)","description":"接受一个 Promise 可迭代对象作为输入,并返回单个 Promise。返回的 Promise 在所有输入的 Promise 都敲定时兑现(包括传入的可迭代对象为空时),其值为一个描述每个 Promise 结果的对象数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| arr | Array\\<Promise\\>\\<Promise\\<T>> | 是 | - | - | 一个 Promise 数组。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Promise\\<Array\\<PromiseSettledResult\\<T>>> | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.9 | 4.11 | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.9 | 3.9 | 4.31 | 4.31 | - | - |","itemType":"method","test":"```uts\n let p0 = new Promise<string | null>((resolve, reject) => {\n setTimeout(function () {\n resolve(\"1\");\n }, 10);\n })\n\n let p1 = new Promise<string | null>((resolve, reject) => {\n setTimeout(function () {\n resolve(null);\n }, 10);\n })\n\n let p2 = new Promise<string | null>((resolve, reject) => {\n setTimeout(function () {\n reject(null)\n }, 10);\n })\n\n let p3 = new Promise<string | null>((resolve, reject) => {\n setTimeout(function () {\n let error = new Error(\"p3 reject reason\")\n reject(error);\n }, 10);\n })\n\n Promise.allSettled([p0, p1, p2, p3])\n .then((res) => {\n console.log(res);\n let statusArr : string[] = []\n res.forEach((item, index : number) => {\n statusArr.add(item.status)\n })\n console.log(statusArr) // [\"fulfilled\", \"fulfilled\", \"rejected\", \"rejected\"]\n })\n```"}},"RegExp":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.buildInObject.RegExp)","flags":{"name":"### flags","description":"返回一个字符串,由当前正则表达式对象的标志组成。此属性是一个只读属性<br/>此字符串中的字符按以下顺序排序和连接:<br/><br/> - \"g\" for global<br/> - \"i\" for ignoreCase<br/> - \"m\" for multiline<br/> - \"u\" for unicode<br/> - \"y\" for sticky<br/><br/>如果没有设置标志,则该值为空字符串。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"prop","test":"```uts\n const regex1 = new RegExp('foo', 'ig');\n console.log(regex1.flags);\n // expected output: \"gi\"\n\n const regex2 = new RegExp('bar', 'myu');\n console.log(regex2.flags);\n // expected output: \"muy\"\n\n const regex3 = new RegExp('bar');\n console.log(regex3.flags);\n // expected output: \"\"\n```"},"dotAll":{"name":"### dotAll","description":"表明是否在正则表达式中一起使用\"s\"修饰符(引入/s 修饰符,使得。可以匹配任意单个字符)。dotAll 是一个只读的属性,属于单个正则表达式实例。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"prop","test":"```uts\n const regex1 = new RegExp('foo', 's');\n console.log(regex1.dotAll);\n // expected output: true\n\n const regex2 = new RegExp('bar');\n console.log(regex2.dotAll);\n // expected output: false\n```"},"hasIndices":{"name":"### hasIndices","description":"指示 d 标志是否与正则表达式一起使用。只读的。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"prop","test":"```uts\n const regex1 = new RegExp('foo', 'd');\n console.log(regex1.hasIndices);\n // expected output: true\n\n const regex2 = new RegExp('bar');\n console.log(regex2.hasIndices);\n // expected output: false\n```"},"sticky":{"name":"### sticky","description":"搜索是否具有粘性(仅从正则表达式的 lastIndex 属性表示的索引处搜索)。sticky 是正则表达式对象的只读属性。默认为false。只读的。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"prop","test":"```uts\n const str1 = 'table football';\n const regex1 = new RegExp('foo', 'y');\n regex1.lastIndex = 6;\n\n console.log(regex1.sticky);\n // expected output: true\n let ret = regex1.test(str1)\n console.log(ret);\n // expected output: true \n\n regex1.lastIndex = 0;\n console.log(regex1.test(str1));\n```"},"unicode":{"name":"### unicode","description":"表明正则表达式带有\"u\" 标志。 unicode 是正则表达式独立实例的只读属性。unicode 的值是 Boolean,并且如果使用了 \"u\" 标志则为 true;否则为 false。\"u\" 标志开启了多种 Unicode 相关的特性。使用 \"u\" 标志,任何 Unicode 代码点的转义都会被解释。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"prop"},"source":{"name":"### source","description":"返回一个值为当前正则表达式对象的模式文本的字符串,该字符串不会包含正则字面量两边的斜杠以及任何的标志字符。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"prop","test":"```uts\n const regex1 = new RegExp('foo', 'ig');\n console.log(regex1.source);\n // expected output: \"foo\"\n\n const regex2 = new RegExp('bar');\n console.log(regex2.source);\n // expected output: \"bar\"\n\n const regex3 = /\\w+/gi;\n console.log(regex3.source);\n // expected output: \"\\\\w+\"\n\n const regex4 = new RegExp('\\\\d+', 'ig');\n console.log(regex4.source);\n // expected output: \"\\\\d+\"\n```"},"global":{"name":"### global","description":"表明正则表达式是否使用了 \"g\" 标志。global 是一个正则表达式实例的只读属性。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"prop","test":"```uts\n const regex1 = new RegExp('foo', 'g');\n console.log(regex1.global);\n // expected output: true\n\n const regex2 = new RegExp('bar');\n console.log(regex2.global);\n // expected output: false\n```"},"ignoreCase":{"name":"### ignoreCase","description":"表明正则表达式是否使用了 \"i\" 标志。ignoreCase 是正则表达式实例的只读属性。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"prop","test":"```uts\n const regex1 = new RegExp('foo', 'i');\n console.log(regex1.ignoreCase);\n // expected output: true\n\n const regex2 = new RegExp('bar');\n console.log(regex2.ignoreCase);\n // expected output: false\n```"},"multiline":{"name":"### multiline","description":"表明正则表达式是否使用了 \"m\" 标志。multiline 是正则表达式实例的一个只读属性。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"prop","test":"```uts\n const regex1 = new RegExp('foo', 'm');\n console.log(regex1.multiline);\n // expected output: true\n\n const regex2 = new RegExp('bar');\n console.log(regex2.multiline);\n // expected output: false\n```"},"lastIndex":{"name":"### lastIndex","description":"正则表达式的一个可读可写的整型属性,用来指定下一次匹配的起始索引。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"prop","test":"```uts\n const regex = /ab/g;\n const str = 'ab ab ab';\n\n const result1 = regex.exec(str)!;\n console.log(result1.index);\n const ret1 = regex.lastIndex\n console.log(ret1);\n // expected output: \n // result1.index: 0\n // regex.lastIndex: 2\n\n const result2 = regex.exec(str)!;\n console.log(result2.index);\n let ret2 = regex.lastIndex\n console.log(ret2);\n // expected output: \n // result2.index: 3\n // regex.lastIndex: 5\n\n const result3 = regex.exec(str)!;\n console.log(result3.index);\n let ret3 = regex.lastIndex\n console.log(ret3);\n // expected output: \n // result3.index: 6\n // regex.lastIndex: 8\n\n```"},"exec":{"name":"### exec(string)","description":"在一个指定字符串中执行一个搜索匹配。返回一个结果数组或 null。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| string | string | 是 | - | - | 要匹配正则表达式的字符串。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| RegExpExecArray \\| null | 如果匹配失败,exec() 方法返回 null,并将正则表达式的 lastIndex 重置为 0。如果匹配成功,exec() 方法返回一个数组,并更新正则表达式对象的 lastIndex 属性。完全匹配成功的文本将作为返回数组的第一项,从第二项起,后续每项都对应一个匹配的捕获组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const pattern1 = new RegExp('hello');\n const result1 = pattern1.exec('hello world')!;\n console.log(result1[0]) //'hello'\n console.log(result1.index) //0\n```"},"test":{"name":"### test(string)","description":"执行一个检索,用来查看正则表达式与指定的字符串是否匹配。返回 true 或 false。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| string | string | 是 | - | - | 用来与正则表达式匹配的字符串。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 如果正则表达式与指定的字符串匹配,返回true;否则false。如果正则表达式设置了全局标志,test() 的执行会改变正则表达式 lastIndex属性。连续的执行test()方法,后续的执行将会从 lastIndex 处开始匹配字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method","test":"```uts\n const str = 'table football';\n const regex = new RegExp('foo*');\n const globalRegex = new RegExp('foo*', 'g');\n\n console.log(regex.test(str));\n // expected output: true\n\n console.log(globalRegex.lastIndex);\n // expected output: 0\n\n console.log(globalRegex.test(str));\n // expected output: true\n\n console.log(globalRegex.lastIndex);\n // expected output: 9\n\n console.log(globalRegex.test(str));\n // expected output: false\n\n```"},"Constructor":{"name":"### Constructor(pattern)","description":"用于创建正则表达式对象,该对象用于将文本与一个模式匹配。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| pattern | RegExp \\| string | 是 | - | - | 正则表达式的文本,也可以是另一个 RegExp 对象或文字。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| RegExp | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"Constructor_1":{"name":"### Constructor(pattern, flags?)","description":"用于创建正则表达式对象,该对象用于将文本与一个模式匹配。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| pattern | string | 是 | - | - | 正则表达式的文本,也可以是另一个 RegExp 对象或文字。 |\n| flags | string | 否 | - | - | 如果指定,flags 是包含要添加的标志的字符串。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| RegExp | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"}},"Error":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.buildInObject.Error)"},"Console":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.buildInObject.Console)","assert":{"name":"### assert(condition?, ...data)","description":"如果断言为 false,则将一个错误消息写入控制台。如果断言是 true,没有任何反应。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| condition | boolean | 否 | - | - | - |\n| data | (any \\| null)[\\] | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"clear":{"name":"### clear()","description":"console.clear() 方法清空控制台,但前提是该控制台允许清空。","param":"","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"count":{"name":"### count(label?)","description":"console.count() 方法会记录调用 count() 的次数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| label | string | 否 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"countReset":{"name":"### countReset(label?)","description":"重置计数器。此函数有一个可选参数 label。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| label | string | 否 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"debug":{"name":"### debug(...data)","description":"在控制台打印 debug 日志","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| data | (any \\| null)[\\] | 是 | - | - | 要输出的对象列表。按传参的顺序把对象输出到控制台。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"dir":{"name":"### dir(item?, options?)","description":"console.dir() 方法可以显示指定 JavaScript 对象的属性列表,并以交互式的形式展现。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| item | any \\| null | 否 | - | - | |\n| options | any \\| null | 否 | - | - | | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"dirxml":{"name":"### dirxml(...data)","description":"显示一个明确的 XML/HTML 元素的包括所有后代元素的交互树。<br/>非标准: 该特性是非标准的,请尽量不要在生产环境中使用它!","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| data | (any \\| null)[\\] | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"error":{"name":"### error(...data)","description":"在控制台打印 error 日志","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| data | (any \\| null)[\\] | 是 | - | - | 要输出的对象列表。按传参的顺序把对象输出到控制台。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"group":{"name":"### group(...data)","description":"console.group() 方法在控制台上创建一个新的分组。随后输出到控制台上的内容都会被添加一个缩进,表示该内容属于当前分组,直到调用 console.groupEnd() 之后,当前分组结束。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| data | (any \\| null)[\\] | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"groupCollapsed":{"name":"### groupCollapsed(...data)","description":"console.groupCollapsed() 方法在控制台上创建一个新的分组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| data | (any \\| null)[\\] | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"groupEnd":{"name":"### groupEnd()","description":"在控制台中退出一格缩进 (结束分组).","param":"","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"info":{"name":"### info(...data)","description":"在控制台打印 info 日志","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| data | (any \\| null)[\\] | 是 | - | - | 要输出的对象列表。按传参的顺序把对象输出到控制台。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"log":{"name":"### log(...data)","description":"在控制台打印 log 日志","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| data | (any \\| null)[\\] | 是 | - | - | 要输出的对象列表。按传参的顺序把对象输出到控制台。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"table":{"name":"### table(tabularData?, properties?)","description":"将数据以表格的形式显示。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| tabularData | any \\| null | 否 | - | - | |\n| properties | string[\\] | 否 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"time":{"name":"### time(label?)","description":"你可以启动一个计时器来跟踪某一个操作的占用时长。每一个计时器必须拥有唯一的名字,页面中最多能同时运行 10,000 个计时器。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| label | string | 否 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"timeEnd":{"name":"### timeEnd(label?)","description":"停止一个通过 console.time() 启动的计时器<br/>非标准: 该特性是非标准的,请尽量不要在生产环境中使用它!","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| label | string | 否 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"timeLog":{"name":"### timeLog(label?, ...data)","description":"在控制台输出计时器的值,该计时器必须已经通过 console.time() 启动。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| label | string | 否 | - | - | - |\n| data | (any \\| null)[\\] | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"timeStamp":{"name":"### timeStamp(label?)","description":"非标准: 该特性是非标准的,请尽量不要在生产环境中使用它!","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| label | string | 否 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"trace":{"name":"### trace(...data)","description":"向控制台 输出一个堆栈跟踪。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| data | (any \\| null)[\\] | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | x | x | x | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| x | x | - | - | - | - |","itemType":"method"},"warn":{"name":"### warn(...data)","description":"在控制台打印 warn 日志","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| data | (any \\| null)[\\] | 是 | - | - | 要输出的对象列表。按传参的顺序把对象输出到控制台。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 3.90 | 4.11 | x | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"}},"ArrayBuffer":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.buildInObject.ArrayBuffer)","byteLength":{"name":"### byteLength","description":"ArrayBuffer 实例的 byteLength 访问器属性返回该数组缓冲区的长度(以字节为单位)。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"slice":{"name":"### slice(begin?, end?)","description":"ArrayBuffer 实例的 slice() 方法返回一个新的 ArrayBuffer 实例,其包含原 ArrayBuffer 实例中从 begin 开始(包含)到 end 结束(不含)的所有字节的副本。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| begin | number | 否 | - | - | 可选,要开始提取的位置索引(从 0 开始),将被转换为整数。负数索引将会从缓冲区末尾开始计算——如果 start \\< 0,那么将会使用 start + buffer.length。 如果 start \\< -buffer.length 或省略了 start,则会使用 0。 如果 start >= buffer.length,则不会提取任何内容。 |\n| end | number | 否 | - | - | 可选,要结束提取的位置索引(从 0 开始),将被转换为整数。slice() 提取到但不包括 end。 负数索引将会从缓冲区末尾开始计算——如果 end \\< 0,那么将会使用 end + buffer.length。 如果 end \\< -buffer.length,则会使用 0。 如果 end >= buffer.length 或省略了 end,则会使用 buffer.length,则会导致直到末尾的所有元素都被提取。 如果标准化后的 end 位置在 start 位置之前,则不会提取任何内容。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| ArrayBuffer | 一个新的 ArrayBuffer 对象。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let buffer = new ArrayBuffer(16);\n let uint32 = new Uint32Array(buffer);\n uint32[3] = 42;\n console.log(uint32.toString()); // \"0,0,0,42\"\n\n let res = buffer.slice(8);\n let sliced = new Uint32Array(res);\n console.log(sliced[1]); // 42\n```"},"toByteBuffer":{"name":"### toByteBuffer()","description":"ArrayBuffer 实例的 toByteBuffer() 方法返回一个android原生ByteBuffer对象。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| ByteBuffer | android 原生ByteBuffer对象。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| x | 4.25 | x | x | x | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n var byteBuffer = ByteBuffer.allocate(100)\n byteBuffer.put(1)\n byteBuffer.put(2)\n var buffer = ArrayBuffer.fromByteBuffer(byteBuffer)\n console.log('arraybuffer_toByteBuffer', buffer)\n var int8 = new Int8Array(buffer)\n console.log(int8[0])//1\n console.log(int8[1])//2\n\n byteBuffer = buffer.toByteBuffer()\n console.log('arraybuffer_toByteBuffer', byteBuffer)\n\n byteBuffer.rewind()\n console.log(byteBuffer[0])//1\n console.log(byteBuffer[1])//2\n```"},"Constructor":{"name":"### Constructor(byteLength)","description":"构造函数创建一个以字节为单位的给定长度的新 ArrayBuffer","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| byteLength | number | 是 | - | - | 长度,单位字节 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| ArrayBuffer | ArrayBuffer | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method"},"isView":{"name":"### isView(arg)","description":"ArrayBuffer.isView() 静态方法用于确定传递的值是否是 ArrayBuffer 视图之一。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| arg | any | 是 | - | - | 需要检测的值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 如果 arg 是 ArrayBuffer 视图之一,则返回 true,例如类型化数组对象或者 DataView。否则返回 false。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n var arrayBuffer = new ArrayBuffer(16)\n var float64 = new Float64Array(arrayBuffer);\n var isView = ArrayBuffer.isView(float64)\n console.log(isView)//true\n\n var a = 1\n var isViewA = ArrayBuffer.isView(a)\n console.log(isViewA)//false\n```"},"fromByteBuffer":{"name":"### fromByteBuffer(byteBuffer)","description":"ArrayBuffer.fromByteBuffer() 静态方法用于将android 原生的ByteBuffer对象转换为ArrayBuffer","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| byteBuffer | ByteBuffer | 是 | - | - | android原生bytebuffer对象 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| ArrayBuffer | ArrayBuffer | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| x | 4.25 | x | x | x | x |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n var byteBuffer = ByteBuffer.allocate(100)\n byteBuffer.put(1)\n byteBuffer.put(2)\n var buffer = ArrayBuffer.fromByteBuffer(byteBuffer)\n console.log('arraybuffer_toByteBuffer', buffer)\n var int8 = new Int8Array(buffer)\n console.log(int8[0])//1\n console.log(int8[1])//2\n\n byteBuffer = buffer.toByteBuffer()\n console.log('arraybuffer_toByteBuffer', byteBuffer)\n\n byteBuffer.rewind()\n console.log(byteBuffer[0])//1\n console.log(byteBuffer[1])//2\n```"},"slice with Int16Array":{"test":"```uts\n let buffer = new ArrayBuffer(16);\n let int16 = new Int16Array(buffer);\n int16[4] = 42;\n console.log(int16.toString()); // \"0,0,0,0,42,0,0,0\"\n\n let res = buffer.slice(8, 12);\n let sliced = new Int16Array(res);\n console.log(sliced[0]); // 42\n```"}},"Float32Array":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.buildInObject.Float32Array)","length":{"name":"### length","description":"数组的长度","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"BYTES_PER_ELEMENT":{"name":"### BYTES_PER_ELEMENT","description":"数组中每个元素的字节大小。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"buffer":{"name":"### buffer","description":"数组引用的ArrayBuffer实例。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"byteLength":{"name":"### byteLength","description":"数组的字节长度。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"byteOffset":{"name":"### byteOffset","description":"数组的字节偏移量。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"copyWithin":{"name":"### copyWithin(target, start, end?)","description":"返回this对象,将数组中由start和end标识的部分复制到从位置target开始的相同数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| target | number | 是 | - | - | 如果target为负数,则视为length+target,其中length为数组的长度。 |\n| start | number | 是 | - | - | 如果start为负数,则视为length+start。如果省略end,则使用this对象的长度作为其默认值。 |\n| end | number | 否 | - | - | 如果未指定,默认使用this对象的长度。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| this | 修改后的类型化数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let float32 = new Float32Array(8);\n float32.set([1, 2, 3], 1);\n float32.copyWithin(3, 0, 3);\n console.log(float32.toString()); // 0,1,2,0,1,2,0,0\n```"},"every":{"name":"### every(predicate)","description":"确定数组的所有成员是否满足指定的测试。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, array: Float32Array) => any | 是 | - | - | 一个最多接受三个参数的函数。every方法对数组中的每个元素调用predicate函数,直到predicate返回一个可转换为布尔值false的值,或者直到数组结束。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 返回 true,除非 callbackFn 对类型化数组中的某个元素返回了假值(在这种情况下,立即返回 false)。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let result = new Float32Array([12, 5, 8, 130, 44]).every((value : number, _ : number, _a : Float32Array) : boolean => value < 40);\n console.log(result); // false\n```"},"fill":{"name":"### fill(value, start?, end?)","description":"将数组中的所有元素更改为静态值value,并返回修改后的数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| value | number | 是 | - | - | 用于填充数组部分的值。 |\n| start | number | 否 | - | - | 开始填充数组的索引。如果start为负数,则视为length+start,其中length为数组的长度。 |\n| end | number | 否 | - | - | 停止填充数组的索引。如果end为负数,则视为length+end。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| this | 修改后的类型化数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let float32_t1 = new Float32Array([1, 2, 3]).fill(4);\n console.log(float32_t1.toString()); // 4,4,4\n\n let float32_t2 = new Float32Array([1, 2, 3]).fill(4, 1);\n console.log(float32_t2.toString()); // 1,4,4\n\n\n let float32_t3 = new Float32Array([1, 2, 3]).fill(4, 1, 2);\n console.log(float32_t3.toString()); // 1,4,3\n\n let float32_t4 = new Float32Array([1, 2, 3]).fill(4, 1, 1);\n console.log(float32_t4.toString()); // 1,2,3\n\n let float32 = new Float32Array([1, 2, 3]).fill(4, -3, -2);\n console.log(float32.toString()); // 4,2,3\n```"},"filter":{"name":"### filter(predicate)","description":"返回满足回调函数中指定条件的数组元素。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, array: Float32Array) => any | 是 | - | - | 一个最多接受三个参数的函数。filter方法对数组中的每个元素调用predicate函数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Float32Array | 新的类型化数组,含有通过测试的元素 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let float32 = new Float32Array([12, 5, 8, 44]).filter((value : number, _ : number, _a : Float32Array) : boolean => value >= 10);\n console.log(float32.toString()); // 12,44\n```"},"find":{"name":"### find(predicate)","description":"返回数组中第一个满足条件的元素的值,否则返回undefined。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, obj: Float32Array) => boolean | 是 | - | - | 对数组中的每个元素调用一次predicate,直到找到一个使predicate返回true的元素为止。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number \\| null | 如果元素通过了测试,则为该元素,否则为undefined。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let float32 = new Float32Array([4, 5, 8, 12]);\n let res = float32.find((value : number, _ : number, _a : Float32Array) : boolean => value > 5);\n console.log(res); // 8\n```"},"findIndex":{"name":"### findIndex(predicate)","description":"返回数组中第一个满足条件的元素的索引,否则返回-1。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, obj: Float32Array) => boolean | 是 | - | - | 对数组中的每个元素调用一次predicate,直到找到一个使predicate返回true的元素为止。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 如果元素通过了测试,则为数组下标,否则为 -1。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let float32 = new Float32Array([4, 6, 8, 12]);\n let res1 = float32.findIndex((value : number, _ : number, _a : Float32Array) : boolean => value > 100);\n console.log(res1); // -1\n\n let ufloat32 = new Float32Array([4, 6, 7, 120]);\n let res = ufloat32.findIndex((value : number, _ : number, _a : Float32Array) : boolean => value > 100);\n console.log(res); // 3\n```"},"forEach":{"name":"### forEach(callbackfn)","description":"对数组的每个元素执行指定的操作。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (value: number, index: number, array: Float32Array) => void | 是 | - | - | 一个最多接受三个参数的函数。forEach方法对数组中的每个元素调用callbackfn函数。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n new Float32Array([0, 1, 2, 3]).forEach((value : number, index : number, _ : Float32Array) => {\n console.log(`a[${index}] = ${value}`);\n });\n```"},"indexOf":{"name":"### indexOf(searchElement, fromIndex?)","description":"返回数组中第一个出现的指定值的索引,如果不存在则返回-1。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| searchElement | number | 是 | - | - | 要在数组中查找的值。 |\n| fromIndex | number | 否 | - | - | 开始搜索的数组索引。如果省略,则从索引0开始搜索。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 数组中元素的第一个下标;没有找到则返回**-1** 。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let float32 = new Float32Array([2, 5, 9]);\n let res = float32.indexOf(2);\n console.log(res); // 0\n\n let res1 = float32.indexOf(7);\n console.log(res1); // -1\n\n\n let res2 = float32.indexOf(9, 2);\n console.log(res2); // 2\n\n\n let res3 = float32.indexOf(2, -1);\n console.log(res3); // -1\n\n\n let res4 = float32.indexOf(2, -3);\n console.log(res4); // 0\n```"},"join":{"name":"### join(separator?)","description":"将数组中所有元素连接成一个字符串。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| separator | string | 否 | - | - | 用于分隔数组元素的字符串。如果省略,则使用逗号分隔数组元素。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 所有元素连接后的字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let float32 = new Float32Array([1, 2, 3]);\n let res = float32.join();\n console.log(res); // 1,2,3\n\n let res1 = float32.join(\" / \");\n console.log(res1); // 1 / 2 / 3\n\n let res2 = float32.join(\"\");\n console.log(res2); // 123\n```"},"map":{"name":"### map(callbackfn)","description":"对数组的每个元素执行指定的操作,并返回包含执行结果的数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (value: number, index: number, array: Float32Array) => number | 是 | - | - | 一个最多接受三个参数的函数。map方法对数组中的每个元素调用callbackfn函数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Float32Array | 新的类型化数组 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let numbers = new Float32Array([1, 4, 9]);\n let doubles = numbers.map((value : number, _ : number, _a : Float32Array) : number => value * 2);\n console.log(doubles.toString()); // 2,8,18\n```"},"reduce":{"name":"### reduce(callbackfn)","description":"对数组的每个元素执行指定的累加操作。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number | 是 | - | - | 一个最多接受四个参数的函数。reduce方法对数组中的每个元素调用callbackfn函数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 由归约返回的结果。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let total = new Float32Array([0, 1, 2, 3]);\n let res1 = total.reduce((accumulator : number, currentValue : number, _ : number, _a : Float32Array) : number =>\n accumulator + currentValue\n );\n console.log(res1); // 6\n\n total = new Float32Array([0, 1, 2, 3]);\n let res2 = total.reduce((accumulator : number, currentValue : number, _ : number, _a : Float32Array) : number =>\n accumulator + currentValue, 8\n );\n console.log(res2); // 14\n```"},"reduceRight":{"name":"### reduceRight(callbackfn)","description":"对数组的每个元素执行指定的累加操作,从右向左处理。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number | 是 | - | - | 一个最多接受四个参数的函数。reduceRight方法从数组的最后一个元素向第一个元素逐个调用callbackfn函数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 由归约返回的结果。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let total = new Float32Array([0, 1, 2, 3]);\n let res = total.reduceRight((accumulator : number, currentValue : number, _ : number, _a : Float32Array) : number => accumulator + currentValue);\n console.log(res); // 6\n```"},"reverse":{"name":"### reverse()","description":"反转数组中的元素。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Float32Array | 翻转的数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let float32 = new Float32Array([1, 2, 3]);\n float32.reverse();\n console.log(float32.toString()); // 3,2,1\n```"},"set":{"name":"### set(array, offset?)","description":"设置一个值或数组的值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| array | ArrayLike\\<number> | 是 | - | - | 要设置的值或数组。 |\n| offset | number | 否 | - | - | 要写入值的当前数组中的索引。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let float32 = new Float32Array(8);\n var array = [1, 2, 3];\n float32.set(array, 1);\n console.log(float32.toString()); // 0,1,2,3,0,0,0,0\n\n let src = [1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4];\n let typed_dest = new Float32Array(16);\n typed_dest.set(src);\n console.log(typed_dest.toString()); // 1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4\n // console.log(typed_dest.toString()) // \"1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4\";\n\n let typed_src = new Float32Array(src);\n typed_dest = new Float32Array(16);\n typed_dest.set(typed_src);\n console.log(typed_dest.toString()); // 1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4\n```"},"slice":{"name":"### slice(start?, end?)","description":"返回数组的一部分。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| start | number | 否 | - | - | 指定部分的起始索引。 |\n| end | number | 否 | - | - | 指定部分的结束索引。不包括索引'end'处的元素。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Float32Array | 包含取出元素的新 typed array。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let float32 = new Float32Array([1, 2, 3]);\n let res = float32.slice(1);\n console.log(res.toString()); // 2,3\n\n let res1 = float32.slice(2);\n console.log(res1.toString()); // 3\n\n let res2 = float32.slice(-2);\n console.log(res2.toString()); // 2,3\n\n let res3 = float32.slice(0, 1);\n console.log(res3.toString()); // 1\n```"},"some":{"name":"### some(predicate)","description":"确定数组的任何元素是否满足指定的测试。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, array: Float32Array) => any | 是 | - | - | 一个最多接受三个参数的函数。some方法对数组中的每个元素调用predicate函数,直到predicate返回一个可转换为布尔值true的值,或者直到数组结束。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | true 如果 callback 函数以任一数组元素为参数调用时,返回 true; 否则,false. | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n const float32 = new Float32Array([-10, 20, -30, 40, -50]);\n const positives = new Float32Array([10, 20, 30, 40, 50]);\n\n console.log(float32.some((element : number, index : number, array : Float32Array) : boolean =>\n element < 0\n )); // true\n\n console.log(positives.some((element : number, index : number, array : Float32Array) : boolean =>\n element < 0\n )); // false\n```"},"sort":{"name":"### sort(compareFn?)","description":"对数组进行排序。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| compareFn | (a: number, b: number) => number | 否 | - | - | 用于确定元素顺序的函数。如果省略,则元素按升序排序。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| this | 排序后的类型化数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let numbers = new Float32Array([40, 1, 5]);\n numbers.sort();\n console.log(numbers.toString()); // 1,5,40\n\n let ret = numbers.toString()\n numbers.sort((a, b) : number => a - b);\n console.log(numbers.toString()); // 1,5,40\n\n```"},"subarray":{"name":"### subarray(begin?, end?)","description":"获取此数组的ArrayBuffer存储的新的Float32Array视图,引用从begin(包括)到end(不包括)的元素。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| begin | number | 否 | - | - | 开始数组的索引。 |\n| end | number | 否 | - | - | 结束数组的索引。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Float32Array | 一个新的 TypedArray 对象。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let buffer = new ArrayBuffer(16);\n let float32 = new Float32Array(buffer);\n float32.set([1, 2, 3]);\n console.log(float32.toString()); // 1,2,3,0\n\n let sub = float32.subarray(0, 4);\n console.log(sub.toString()); // 1,2,3,0\n```"},"toString":{"name":"### toString()","description":"返回数组的字符串表示形式。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 一个字符串,表示类型数组 (typed array) 的元素。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method"},"valueOf":{"name":"### valueOf()","description":"返回指定对象的原始值。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Iterator\\<Number> | 新的 Array Iterator 对象。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method"},"entries":{"name":"### entries()","description":"为数组中的每个条目返回一个键值对数组","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| IterableIterator\\<\\[number, number] | 数组条目的键值对迭代器 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let arr = new Float32Array([10, 20, 30, 40, 50]);\n let entries = arr.entries();\n let value1 = entries.next().value[1]\n let value2 = entries.next().value[1]\n console.log(value1); // 10\n console.log(value2); // 20\n```"},"includes":{"name":"### includes(searchElement, fromIndex?)","description":"确定数组是否包含某个元素,返回 true 或 false。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| searchElement | number | 是 | - | - | 要搜索的元素。 |\n| fromIndex | number | 否 | - | - | 开始搜索 searchElement 的数组位置。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 如果数组包含指定的元素则返回 true,否则返回 false。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let float32 = new Float32Array([1, 2, 3]);\n let res1 = float32.includes(2.0);\n console.log(res1); // true\n let res2 = float32.includes(4.0);\n console.log(res2); // false\n let res = float32.includes(3.0, 3);\n console.log(res); // false\n```"},"keys":{"name":"### keys()","description":"返回数组中的键列表","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| IterableIterator\\<number> | 数组键的迭代器 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let arr = new Float32Array([10, 20, 30, 40, 50]);\n let keys = arr.keys();\n let ret = keys.next().value\n console.log(ret); // 0\n```"},"values":{"name":"### values()","description":"返回数组中的值列表","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| IterableIterator\\<number> | 数组值的迭代器 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let arr = new Float32Array([1, 2, 3]);\n let values = arr.values().next().value;\n console.log(values); // 1\n```"},"Constructor":{"name":"### Constructor(length)","description":"初始化一个对象","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| length | number | 是 | - | - | 当使用非对象调用时,该参数将被视为指定类型化数组长度的数字。在内存中创建一个内部数组缓冲区,大小长度乘以 BYTES_PER_ELEMENT 字节,用 0 填充。省略所有参数,等同于使用 0 作为参数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Float32Array | 实例对象 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method"},"Constructor_1":{"name":"### Constructor(array)","description":"初始化一个对象","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| array | ArrayLike\\<number> \\| ArrayBufferLike | 是 | - | - | 当使用 TypedArray 子类的实例调用时,typedArray 会被拷贝到一个新的类型数组中。对于非 bigint TypeedArray 构造函数,typedArray 参数仅可以是非 bigint 类型(例如 Int32Array)。同样,对于 bigint TypedArray 构造函数(BigInt64Array 或 BigUint64Array),typedArray 参数仅可以是 bigint 类型。typedArray 中的每个值在拷贝到新数组之前都转换为构造函数的相应类型。新的类型化数组的长度与 typedArray 参数的长度相同。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Float32Array | 实例对象 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method"},"Constructor_2":{"name":"### Constructor(buffer, byteOffset?, length?)","description":"当使用 ArrayBuffer 实例以及可选的 byteOffset 和 length 参数调用时,将创建一个新的指定缓冲区的类型化数组视图。byteOffset 和 length 参数指定类型化数组视图将暴露的内存范围。如果忽略这两个参数,则是整个视图的所有 buffer;如果仅忽略 length,则是从 byteOffset 开始的 buffer 剩余部分的视图。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| buffer | [ArrayBufferLike](#arraybufferlike-values) | 是 | - | - | ArrayBuffer实例 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| byteLength | number | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"√\",\"4.25\",\"x\"]]}' /> | ArrayBuffer 实例的 byteLength 访问器属性返回该数组缓冲区的长度(以字节为单位)。 |\n| byteOffset | number | 否 | - | - | 可选,偏移量,单位字节 |\n| length | number | 否 | - | - | 可选,长度 | \n\n##### ArrayBufferLike 的方法 @arraybufferlike-values \n\n##### slice(begin ?: number, end ?: number) : ArrayBuffer; @slice\nArrayBuffer 实例的 slice() 方法返回一个新的 ArrayBuffer 实例,其包含原 ArrayBuffer 实例中从 begin 开始(包含)到 end 结束(不含)的所有字节的副本。\n###### slice 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| √ | 4.25 | x |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| begin | number | 否 | - | - | 可选,要开始提取的位置索引(从 0 开始),将被转换为整数。负数索引将会从缓冲区末尾开始计算——如果 start \\< 0,那么将会使用 start + buffer.length。 如果 start \\< -buffer.length 或省略了 start,则会使用 0。 如果 start >= buffer.length,则不会提取任何内容。 |\n| end | number | 否 | - | - | 可选,要结束提取的位置索引(从 0 开始),将被转换为整数。slice() 提取到但不包括 end。 负数索引将会从缓冲区末尾开始计算——如果 end \\< 0,那么将会使用 end + buffer.length。 如果 end \\< -buffer.length,则会使用 0。 如果 end >= buffer.length 或省略了 end,则会使用 buffer.length,则会导致直到末尾的所有元素都被提取。 如果标准化后的 end 位置在 start 位置之前,则不会提取任何内容。 | \n\n###### 返回值 \n\n| 类型 | 描述 |\n| :- | :- |\n| [ArrayBuffer](#arraybuffer-values) | 一个新的 ArrayBuffer 对象。 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| byteLength | number | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"√\",\"4.25\",\"x\"]]}' /> | ArrayBuffer 实例的 byteLength 访问器属性返回该数组缓冲区的长度(以字节为单位)。 |\n###### ArrayBuffer 的方法 @arraybuffer-values \n\n###### slice(begin ?: number, end ?: number) : ArrayBuffer; @slice\nArrayBuffer 实例的 slice() 方法返回一个新的 ArrayBuffer 实例,其包含原 ArrayBuffer 实例中从 begin 开始(包含)到 end 结束(不含)的所有字节的副本。\n###### slice 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| √ | 4.25 | x |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| begin | number | 否 | - | - | 可选,要开始提取的位置索引(从 0 开始),将被转换为整数。负数索引将会从缓冲区末尾开始计算——如果 start \\< 0,那么将会使用 start + buffer.length。 如果 start \\< -buffer.length 或省略了 start,则会使用 0。 如果 start >= buffer.length,则不会提取任何内容。 |\n| end | number | 否 | - | - | 可选,要结束提取的位置索引(从 0 开始),将被转换为整数。slice() 提取到但不包括 end。 负数索引将会从缓冲区末尾开始计算——如果 end \\< 0,那么将会使用 end + buffer.length。 如果 end \\< -buffer.length,则会使用 0。 如果 end >= buffer.length 或省略了 end,则会使用 buffer.length,则会导致直到末尾的所有元素都被提取。 如果标准化后的 end 位置在 start 位置之前,则不会提取任何内容。 | \n\n###### 返回值 \n\n| 类型 | 描述 |\n| :- | :- |\n| [ArrayBuffer](#arraybuffer-values) | 一个新的 ArrayBuffer 对象。 |\n \n\n###### toByteBuffer() : ByteBuffer; @tobytebuffer\nArrayBuffer 实例的 toByteBuffer() 方法返回一个android原生ByteBuffer对象。\n###### toByteBuffer 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| x | 4.25 | x |\n\n\n###### 返回值 \n\n| 类型 | 描述 |\n| :- | :- |\n| ByteBuffer | android 原生ByteBuffer对象。 |\n \n \n\n##### toByteBuffer() : ByteBuffer; @tobytebuffer\nArrayBuffer 实例的 toByteBuffer() 方法返回一个android原生ByteBuffer对象。\n###### toByteBuffer 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| x | 4.25 | x |\n\n\n###### 返回值 \n\n| 类型 | 描述 |\n| :- | :- |\n| ByteBuffer | android 原生ByteBuffer对象。 |\n \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Float32Array | 实例对象 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method"},"of":{"name":"### of(...items)","description":"从一组元素创建一个新数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| items | number[\\] | 是 | - | - | 要包含在新数组对象中的一组元素。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Float32Array | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n var float32Array = Float32Array.of(1, 2, 3)\n console.log(float32Array.toString()); // '1,2,3'\n```"},"from":{"name":"### from(arrayLike, mapfn?)","description":"从类似数组或可迭代对象创建数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| arrayLike | ArrayLike\\<number> | 是 | - | - | 要转换为数组的类似数组或可迭代对象。 |\n| mapfn | (v: number, k: number) => number | 否 | - | - | 可选参数。如果指定了该参数,则最后生成的类型数组会经过该函数的加工处理后再返回。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Float32Array | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n var float32Array = Float32Array.from([1, 2, 3], (v : number, _ : number) : number => v + v);\n console.log(float32Array.toString()); // '2,4,6'\n```"}},"Float64Array":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.buildInObject.Float64Array)","length":{"name":"### length","description":"数组的长度","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"BYTES_PER_ELEMENT":{"name":"### BYTES_PER_ELEMENT","description":"数组中每个元素的字节大小。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"buffer":{"name":"### buffer","description":"数组引用的ArrayBuffer实例。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"byteLength":{"name":"### byteLength","description":"数组的字节长度。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"byteOffset":{"name":"### byteOffset","description":"数组的字节偏移量。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"copyWithin":{"name":"### copyWithin(target, start, end?)","description":"返回this对象,将数组中由start和end标识的部分复制到从位置target开始的相同数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| target | number | 是 | - | - | 如果target为负数,则视为length+target,其中length为数组的长度。 |\n| start | number | 是 | - | - | 如果start为负数,则视为length+start。如果省略end,则使用this对象的长度作为其默认值。 |\n| end | number | 否 | - | - | 如果未指定,默认使用this对象的长度。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| this | 修改后的类型化数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let float64 = new Float64Array(8);\n float64.set([1, 2, 3], 1);\n float64.copyWithin(3, 0, 3);\n console.log(float64.toString()); // 0,1,2,0,1,2,0,0\n```"},"every":{"name":"### every(predicate)","description":"确定数组的所有成员是否满足指定的测试。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, array: Float64Array) => any | 是 | - | - | 一个最多接受三个参数的函数。every方法对数组中的每个元素调用predicate函数,直到predicate返回一个可转换为布尔值false的值,或者直到数组结束。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 返回 true,除非 callbackFn 对类型化数组中的某个元素返回了假值(在这种情况下,立即返回 false)。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let result = new Float64Array([-10, -20, -30, -40, -50]).every((value : number, _ : number, _a : Float64Array) : boolean => value < 0);\n console.log(result); // true\n```"},"fill":{"name":"### fill(value, start?, end?)","description":"将数组中的所有元素更改为静态值value,并返回修改后的数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| value | number | 是 | - | - | 用于填充数组部分的值。 |\n| start | number | 否 | - | - | 开始填充数组的索引。如果start为负数,则视为length+start,其中length为数组的长度。 |\n| end | number | 否 | - | - | 停止填充数组的索引。如果end为负数,则视为length+end。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| this | 修改后的类型化数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let float64_t1 = new Float64Array([1, 2, 3]).fill(4);\n console.log(float64_t1.toString()); // 4,4,4 \n\n let float64_t2 = new Float64Array([1, 2, 3]).fill(4, 1);\n console.log(float64_t2.toString()); // 1,4,4 \n\n let float64_t3 = new Float64Array([1, 2, 3]).fill(4, 1, 2);\n console.log(float64_t3.toString()); // 1,4,3 \n\n let float64_t4 = new Float64Array([1, 2, 3]).fill(4, 1, 1);\n console.log(float64_t4.toString()); // 1,2,3 \n\n let float64_t5 = new Float64Array([1, 2, 3]).fill(4, -3, -2);\n console.log(float64_t5.toString()); // 4,2,3\n```"},"filter":{"name":"### filter(predicate)","description":"返回满足回调函数中指定条件的数组元素。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, array: Float64Array) => any | 是 | - | - | 一个最多接受三个参数的函数。filter方法对数组中的每个元素调用predicate函数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Float64Array | 新的类型化数组,含有通过测试的元素 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let float64 = new Float64Array([12, 5, 8, 44]).filter((value : number, _ : number, _a : Float64Array) : boolean => value >= 10);\n console.log(float64.toString()); // 12,44\n```"},"find":{"name":"### find(predicate)","description":"返回数组中第一个满足条件的元素的值,否则返回undefined。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, obj: Float64Array) => boolean | 是 | - | - | 对数组中的每个元素调用一次predicate,直到找到一个使predicate返回true的元素为止。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number \\| null | 如果元素通过了测试,则为该元素,否则为undefined。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let float64 = new Float64Array([4, 5, 8, 12]);\n let res = float64.find((value : number, _ : number, _a : Float64Array) : boolean => value > 5);\n console.log(res); // 8\n```"},"findIndex":{"name":"### findIndex(predicate)","description":"返回数组中第一个满足条件的元素的索引,否则返回-1。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, obj: Float64Array) => boolean | 是 | - | - | 对数组中的每个元素调用一次predicate,直到找到一个使predicate返回true的元素为止。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 如果元素通过了测试,则为数组下标,否则为 -1。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let float64 = new Float64Array([4, 6, 8, 12]);\n let res = float64.findIndex((value : number, _ : number, _a : Float64Array) : boolean => value > 100);\n console.log(res); // -1\n\n let ufloat64 = new Float64Array([4, 6, 7, 120]);\n res = ufloat64.findIndex((value : number, _ : number, _a : Float64Array) : boolean => value > 100);\n console.log(res); // 3\n\n```"},"forEach":{"name":"### forEach(callbackfn)","description":"对数组的每个元素执行指定的操作。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (value: number, index: number, array: Float64Array) => void | 是 | - | - | 一个最多接受三个参数的函数。forEach方法对数组中的每个元素调用callbackfn函数。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n new Float64Array([0, 1, 2, 3]).forEach((value : number, index : number, _ : Float64Array) => {\n console.log(`a[${index}] = ${value}`);\n });\n```"},"indexOf":{"name":"### indexOf(searchElement, fromIndex?)","description":"返回数组中第一个出现的指定值的索引,如果不存在则返回-1。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| searchElement | number | 是 | - | - | 要在数组中查找的值。 |\n| fromIndex | number | 否 | - | - | 开始搜索的数组索引。如果省略,则从索引0开始搜索。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 数组中元素的第一个下标;没有找到则返回**-1** 。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let float64 = new Float64Array([2, 5, 9]);\n let res = float64.indexOf(2);\n console.log(res); // 0\n\n\n let res1 = float64.indexOf(7);\n console.log(res1); // -1\n\n let res2 = float64.indexOf(9, 2);\n console.log(res2); // 2\n\n\n let res3 = float64.indexOf(2, -1);\n console.log(res3); // -1\n\n\n let res4 = float64.indexOf(2, -3);\n console.log(res4); // 0\n```"},"join":{"name":"### join(separator?)","description":"将数组中所有元素连接成一个字符串。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| separator | string | 否 | - | - | 用于分隔数组元素的字符串。如果省略,则使用逗号分隔数组元素。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 所有元素连接后的字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let float64 = new Float64Array([1, 2, 3]);\n let res = float64.join();\n console.log(res); // 1,2,3\n\n\n let res1 = float64.join(\" / \");\n console.log(res1); // 1 / 2 / 3\n\n\n let res2 = float64.join(\"\");\n console.log(res2); // 123\n```"},"map":{"name":"### map(callbackfn)","description":"对数组的每个元素执行指定的操作,并返回包含执行结果的数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (value: number, index: number, array: Float64Array) => number | 是 | - | - | 一个最多接受三个参数的函数。map方法对数组中的每个元素调用callbackfn函数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Float64Array | 新的类型化数组 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let numbers = new Float64Array([1, 4, 9]);\n let doubles = numbers.map((value : number, _ : number, _a : Float64Array) : number => value * 2);\n console.log(numbers.toString()); // 1,4,9\n console.log(doubles.toString()); // 2,8,18\n```"},"reduce":{"name":"### reduce(callbackfn)","description":"对数组的每个元素执行指定的累加操作。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number | 是 | - | - | 一个最多接受四个参数的函数。reduce方法对数组中的每个元素调用callbackfn函数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 由归约返回的结果。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let total = new Float64Array([0, 1, 2, 3]);\n let res = total.reduce((accumulator : number, currentValue : number, _ : number, _a : Float64Array) : number => accumulator + currentValue);\n console.log(res); // 6\n\n\n total = new Float64Array([0, 1, 2, 3]);\n let res1 = total.reduce((accumulator : number, currentValue : number, _ : number, _a : Float64Array) : number => accumulator + currentValue, 8);\n console.log(res1); // 14\n```"},"reduceRight":{"name":"### reduceRight(callbackfn)","description":"对数组的每个元素执行指定的累加操作,从右向左处理。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number | 是 | - | - | 一个最多接受四个参数的函数。reduceRight方法从数组的最后一个元素向第一个元素逐个调用callbackfn函数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 由归约返回的结果。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let total = new Float64Array([0, 1, 2, 3]);\n let res = total.reduceRight((accumulator : number, currentValue : number, _ : number, _a : Float64Array) : number => accumulator + currentValue);\n console.log(res); // 6\n\n\n total = new Float64Array([0, 1, 2, 3]);\n let res1 = total.reduceRight((accumulator : number, currentValue : number, _ : number, _a : Float64Array) : number => accumulator + currentValue, 8);\n console.log(res1); // 14\n```"},"reverse":{"name":"### reverse()","description":"反转数组中的元素。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Float64Array | 翻转的数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let float64 = new Float64Array([1, 2, 3]);\n float64.reverse();\n console.log(float64.toString()); // 3,2,1\n```"},"set":{"name":"### set(array, offset?)","description":"设置一个值或数组的值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| array | ArrayLike\\<number> | 是 | - | - | 要设置的值或数组。 |\n| offset | number | 否 | - | - | 要写入值的当前数组中的索引。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let float64 = new Float64Array(8);\n var array = [1, 2, 3];\n float64.set(array, 1);\n console.log(float64.toString()); // 0,1,2,3,0,0,0,0\n```"},"slice":{"name":"### slice(start?, end?)","description":"返回数组的一部分。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| start | number | 否 | - | - | 指定部分的起始索引。 |\n| end | number | 否 | - | - | 指定部分的结束索引。不包括索引'end'处的元素。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Float64Array | 包含取出元素的新 typed array。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let float64 = new Float64Array([1, 2, 3]);\n let res = float64.slice(1);\n let ret1 = res.toString()\n console.log(ret1); // 2,3\n\n\n res = float64.slice(2);\n let ret2 = res.toString()\n console.log(ret2); // 3\n\n res = float64.slice(-2);\n let ret3 = res.toString()\n console.log(ret3); // 2,3 \n\n res = float64.slice(0, 1);\n let ret4 = res.toString()\n console.log(ret4); // 1\n\n const size = 1000;\n const initialFloat64Array = new Float64Array(size);\n for (let i = 0; i < size; ++i) {\n initialFloat64Array[i] = Math.random();\n }\n\n let arr : Float64Array;\n let new_arr : Float64Array;\n arr = new Float64Array(initialFloat64Array);\n new_arr = arr.slice(1, -1);\n let ret5 = true\n for (let i = 1; i < size - 1; ++i) {\n if (arr[i] !== new_arr[i - 1]) {\n ret5 = false\n break;\n }\n }\n console.log(ret5); // true;\n\n```"},"some":{"name":"### some(predicate)","description":"确定数组的任何元素是否满足指定的测试。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, array: Float64Array) => any | 是 | - | - | 一个最多接受三个参数的函数。some方法对数组中的每个元素调用predicate函数,直到predicate返回一个可转换为布尔值true的值,或者直到数组结束。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | true 如果 callback 函数以任一数组元素为参数调用时,返回 true; 否则,false. | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n const float64 = new Float64Array([-10, 20, -30, 40, -50]);\n const positives = new Float64Array([10, 20, 30, 40, 50]);\n\n console.log(float64.some((element : number, index : number, array : Float64Array) : boolean =>\n element < 0\n )); // true\n\n console.log(positives.some((element : number, index : number, array : Float64Array) : boolean =>\n element < 0\n )); // false\n```"},"sort":{"name":"### sort(compareFn?)","description":"对数组进行排序。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| compareFn | (a: number, b: number) => number | 否 | - | - | 用于确定元素顺序的函数。如果省略,则元素按升序排序。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| this | 排序后的类型化数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let numbers = new Float64Array([40, 1, 5]);\n numbers.sort();\n let ret = numbers.toString()\n console.log(ret); // 1,5,40\n\n numbers.sort((a, b) : number => a - b);\n console.log(numbers.toString()); // 1,5,40\n```"},"subarray":{"name":"### subarray(begin?, end?)","description":"获取此数组的ArrayBuffer存储的新的Float64Array视图,引用从begin(包括)到end(不包括)的元素。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| begin | number | 否 | - | - | 开始数组的索引。 |\n| end | number | 否 | - | - | 结束数组的索引。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Float64Array | 一个新的 TypedArray 对象。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let buffer = new ArrayBuffer(32);\n let float64 = new Float64Array(buffer);\n float64.set([1, 2, 3]);\n console.log(float64.toString()); // 1,2,3,0\n\n let sub = float64.subarray(0, 4);\n console.log(sub.toString()); // 1,2,3,0\n\n const size = 1000;\n const initialFloat64Array = new Float64Array(size);\n for (let i = 0; i < size; ++i) {\n initialFloat64Array[i] = Math.random();\n }\n let arr = new Float64Array(initialFloat64Array);\n let new_arr = arr.subarray(1, size - 1);\n let ret = true\n for (let i = 1; i < size - 1; ++i) {\n if (arr[i] !== new_arr[i - 1]) {\n ret = false\n break\n }\n }\n```"},"toString":{"name":"### toString()","description":"返回数组的字符串表示形式。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 一个字符串,表示类型数组 (typed array) 的元素。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method"},"valueOf":{"name":"### valueOf()","description":"返回指定对象的原始值。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Iterator\\<Number> | 新的 Array Iterator 对象。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method"},"entries":{"name":"### entries()","description":"为数组中的每个条目返回一个键值对数组","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| IterableIterator\\<\\[number, number] | 数组条目的键值对迭代器 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let arr = new Float64Array([10, 20, 30, 40, 50]);\n let entries = arr.entries();\n console.log(entries.next().value[1]); // 10\n console.log(entries.next().value[1]); // 20\n```"},"includes":{"name":"### includes(searchElement, fromIndex?)","description":"确定数组是否包含某个元素,返回 true 或 false。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| searchElement | number | 是 | - | - | 要搜索的元素。 |\n| fromIndex | number | 否 | - | - | 开始搜索 searchElement 的数组位置。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 如果数组包含指定的元素则返回 true,否则返回 false。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.23 | x | √ | √ | √ |\n","itemType":"method","test":"```uts\n let float64 = new Float64Array([1, 2, 3]);\n\n let res = float64.includes(2);\n console.log(res); // true\n\n res = float64.includes(4);\n console.log(res); // false\n\n res = float64.includes(3, 3);\n console.log(res); // false\n```"},"keys":{"name":"### keys()","description":"返回数组中的键列表","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| IterableIterator\\<number> | 数组键的迭代器 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let arr = new Float64Array([10, 20, 30, 40, 50]);\n let keys = arr.keys();\n let value = keys.next().value\n console.log(value); // 0\n console.log(keys.next().value); // 1\n console.log(keys.next().value); // 2\n console.log(keys.next().value); // 3\n console.log(keys.next().value); // 4\n```"},"values":{"name":"### values()","description":"返回数组中的值列表","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| IterableIterator\\<number> | 数组值的迭代器 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let arr = new Float64Array([1, 2, 3]);\n let values = arr.values();\n let value = values.next().value\n console.log(value); // 1\n console.log(values.next().value); // 2\n console.log(values.next().value); // 3\n```"},"Constructor":{"name":"### Constructor(length)","description":"初始化一个对象","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| length | number | 是 | - | - | 当使用非对象调用时,该参数将被视为指定类型化数组长度的数字。在内存中创建一个内部数组缓冲区,大小长度乘以 BYTES_PER_ELEMENT 字节,用 0 填充。省略所有参数,等同于使用 0 作为参数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Float64Array | 实例对象 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method"},"Constructor_1":{"name":"### Constructor(array)","description":"初始化一个对象","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| array | ArrayLike\\<number> \\| ArrayBufferLike | 是 | - | - | 当使用 TypedArray 子类的实例调用时,typedArray 会被拷贝到一个新的类型数组中。对于非 bigint TypeedArray 构造函数,typedArray 参数仅可以是非 bigint 类型(例如 Int32Array)。同样,对于 bigint TypedArray 构造函数(BigInt64Array 或 BigUint64Array),typedArray 参数仅可以是 bigint 类型。typedArray 中的每个值在拷贝到新数组之前都转换为构造函数的相应类型。新的类型化数组的长度与 typedArray 参数的长度相同。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Float64Array | 实例对象 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method"},"Constructor_2":{"name":"### Constructor(buffer, byteOffset?, length?)","description":"当使用 ArrayBuffer 实例以及可选的 byteOffset 和 length 参数调用时,将创建一个新的指定缓冲区的类型化数组视图。byteOffset 和 length 参数指定类型化数组视图将暴露的内存范围。如果忽略这两个参数,则是整个视图的所有 buffer;如果仅忽略 length,则是从 byteOffset 开始的 buffer 剩余部分的视图。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| buffer | [ArrayBufferLike](#arraybufferlike-values) | 是 | - | - | ArrayBuffer实例 |\n| byteOffset | number | 否 | - | - | 可选,偏移量,单位字节 |\n| length | number | 否 | - | - | 可选,长度 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Float64Array | 实例对象 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method"},"of":{"name":"### of(...items)","description":"从一组元素创建一个新数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| items | number[\\] | 是 | - | - | 要包含在新数组对象中的一组元素。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Float64Array | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n var float64Array = Float64Array.of(1, 2, 3)\n console.log(float64Array.toString()); // '1,2,3'\n```"},"from":{"name":"### from(arrayLike, mapfn?)","description":"从类似数组或可迭代对象创建数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| arrayLike | ArrayLike\\<number> | 是 | - | - | 要转换为数组的类似数组或可迭代对象。 |\n| mapfn | (v: number, k: number) => number | 否 | - | - | 可选参数。如果指定了该参数,则最后生成的类型数组会经过该函数的加工处理后再返回。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Float64Array | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n var float64Array = Float64Array.from([1, 2, 3], (v : number, _ : number) : number => v + v);\n console.log(float64Array.toString()); // '2,4,6'\n```"}},"Int8Array":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.buildInObject.Int8Array)","length":{"name":"### length","description":"数组的长度","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"BYTES_PER_ELEMENT":{"name":"### BYTES_PER_ELEMENT","description":"数组中每个元素的字节大小。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"buffer":{"name":"### buffer","description":"数组引用的ArrayBuffer实例。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"byteLength":{"name":"### byteLength","description":"数组的字节长度。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"byteOffset":{"name":"### byteOffset","description":"数组的字节偏移量。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"copyWithin":{"name":"### copyWithin(target, start, end?)","description":"返回this对象,将数组中由start和end标识的部分复制到从位置target开始的相同数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| target | number | 是 | - | - | 如果target为负数,则视为length+target,其中length为数组的长度。 |\n| start | number | 是 | - | - | 如果start为负数,则视为length+start。如果省略end,则使用this对象的长度作为其默认值。 |\n| end | number | 否 | - | - | 如果未指定,默认使用this对象的长度。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| this | 修改后的类型化数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let int8 = new Int8Array(8);\n int8.set([1, 2, 3], 1);\n int8.copyWithin(3, 0, 3);\n console.log(int8.toString()); // \"0,1,2,0,1,2,0,0\"\n```"},"every":{"name":"### every(predicate)","description":"确定数组的所有成员是否满足指定的测试。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, array: Int8Array) => any | 是 | - | - | 一个最多接受三个参数的函数。every方法对数组中的每个元素调用predicate函数,直到predicate返回一个可转换为布尔值false的值,或者直到数组结束。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 返回 true,除非 callbackFn 对类型化数组中的某个元素返回了假值(在这种情况下,立即返回 false)。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n // const isBelowThreshold = (currentValue: number, index: number, array:Int8Array): boolean => currentValue < 40; \n let result = new Int8Array([12, 5, 8, 130, 44]).every((value : number, _ : number, _a : Int8Array) : boolean =>\n value < 40\n );\n console.log(result); // false\n```"},"fill":{"name":"### fill(value, start?, end?)","description":"将数组中的所有元素更改为静态值value,并返回修改后的数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| value | number | 是 | - | - | 用于填充数组部分的值。 |\n| start | number | 否 | - | - | 开始填充数组的索引。如果start为负数,则视为length+start,其中length为数组的长度。 |\n| end | number | 否 | - | - | 停止填充数组的索引。如果end为负数,则视为length+end。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| this | 修改后的类型化数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let int8 = new Int8Array([1, 2, 3]).fill(4);\n console.log(int8.toString()); // \"4,4,4\"\n\n let int8_t1 = new Int8Array([1, 2, 3]).fill(4, 1);\n console.log(int8_t1.toString()); // \"1,4,4\"\n\n let int8_t2 = new Int8Array([1, 2, 3]).fill(4, 1, 2);\n console.log(int8_t2.toString()); // \"1,4,3\"\n\n let int8_t3 = new Int8Array([1, 2, 3]).fill(4, 1, 1);\n console.log(int8_t3.toString()); // \"1,2,3\"\n\n let int8_t4 = new Int8Array([1, 2, 3]).fill(4, -3, -2);\n console.log(int8_t4.toString()); // \"4,2,3\"\n```"},"filter":{"name":"### filter(predicate)","description":"返回满足回调函数中指定条件的数组元素。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, array: Int8Array) => any | 是 | - | - | 一个最多接受三个参数的函数。filter方法对数组中的每个元素调用predicate函数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Int8Array | 新的类型化数组,含有通过测试的元素 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n // const isBelowThreshold = (currentValue: number, index: number, _): boolean => currentValue >= 10;\n let int8 = new Int8Array([12, 5, 8, 44]).filter((value : number, _ : number, _a : Int8Array) : boolean =>\n value >= 10\n );\n console.log(int8.toString()); // \"12,44\"\n```"},"find":{"name":"### find(predicate)","description":"返回数组中第一个满足条件的元素的值,否则返回undefined。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, obj: Int8Array) => boolean | 是 | - | - | 对数组中的每个元素调用一次predicate,直到找到一个使predicate返回true的元素为止。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number \\| null | 如果元素通过了测试,则为该元素,否则为undefined。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let int8 = new Int8Array([4, 5, 8, 12]);\n let res = int8.find((value : number, _ : number, _a : Int8Array) : boolean => value > 5);\n console.log(res); // 8\n```"},"findIndex":{"name":"### findIndex(predicate)","description":"返回数组中第一个满足条件的元素的索引,否则返回-1。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, obj: Int8Array) => boolean | 是 | - | - | 对数组中的每个元素调用一次predicate,直到找到一个使predicate返回true的元素为止。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 如果元素通过了测试,则为数组下标,否则为 -1。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let int8 = new Int8Array([4, 6, 8, 12]);\n let res = int8.findIndex((value : number, _ : number, _a : Int8Array) : boolean => value > 100);\n console.log(res); // -1\n\n\n int8 = new Int8Array([4, 6, 7, 120]);\n let res1 = int8.findIndex((value : number, _ : number, _a : Int8Array) : boolean => value > 100);\n console.log(res1); // 3\n```"},"forEach":{"name":"### forEach(callbackfn)","description":"对数组的每个元素执行指定的操作。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (value: number, index: number, array: Int8Array) => void | 是 | - | - | 一个最多接受三个参数的函数。forEach方法对数组中的每个元素调用callbackfn函数。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n new Int8Array([0, 1, 2, 3]).forEach((value : number, index : number, _a : Int8Array) => {\n console.log(`a[${index}] = ${value}`);\n });\n```"},"indexOf":{"name":"### indexOf(searchElement, fromIndex?)","description":"返回数组中第一个出现的指定值的索引,如果不存在则返回-1。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| searchElement | number | 是 | - | - | 要在数组中查找的值。 |\n| fromIndex | number | 否 | - | - | 开始搜索的数组索引。如果省略,则从索引0开始搜索。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 数组中元素的第一个下标;没有找到则返回**-1** 。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let int8 = new Int8Array([2, 5, 9]);\n let res = int8.indexOf(2);\n console.log(res); // Output: 0\n\n\n let res1 = int8.indexOf(7);\n console.log(res1); // Output: -1\n\n\n let res2 = int8.indexOf(9, 2);\n console.log(res2); // Output: 2\n\n\n let res3 = int8.indexOf(2, -1);\n console.log(res3); // Output: -1\n\n\n let res4 = int8.indexOf(2, -3);\n console.log(res4); // Output: 0\n\n\n```"},"join":{"name":"### join(separator?)","description":"将数组中所有元素连接成一个字符串。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| separator | string | 否 | - | - | 用于分隔数组元素的字符串。如果省略,则使用逗号分隔数组元素。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 所有元素连接后的字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let int8 = new Int8Array([1, 2, 3]);\n let res = int8.join();\n console.log(res); // Output: \"1,2,3\"\n\n let res1 = int8.join(\" / \");\n console.log(res1); // Output: \"1 / 2 / 3\"\n\n\n let res2 = int8.join(\"\");\n console.log(res2); // Output: \"123\"\n```"},"map":{"name":"### map(callbackfn)","description":"对数组的每个元素执行指定的操作,并返回包含执行结果的数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (value: number, index: number, array: Int8Array) => number | 是 | - | - | 一个最多接受三个参数的函数。map方法对数组中的每个元素调用callbackfn函数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Int8Array | 新的类型化数组 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let numbers = new Int8Array([1, 4, 9]);\n let doubles = numbers.map((value : number, _ : number, _a : Int8Array) : number => value * 2);\n console.log(numbers.toString()); // Output: \"1,4,9\"\n console.log(doubles.toString()); // Output: \"2,8,18\"\n```"},"reduce":{"name":"### reduce(callbackfn)","description":"对数组的每个元素执行指定的累加操作。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number | 是 | - | - | 一个最多接受四个参数的函数。reduce方法对数组中的每个元素调用callbackfn函数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 由归约返回的结果。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let total = new Int8Array([0, 1, 2, 3]);\n let res = total.reduce((accumulator : number, currentValue : number, _ : number, _a : Int8Array) :\n number => accumulator + currentValue);\n console.log(res); // Output: 6\n\n\n total = new Int8Array([0, 1, 2, 3]);\n let res1 = total.reduce((accumulator : number, currentValue : number, _ : number, _a : Int8Array) : number =>\n accumulator + currentValue, 8);\n console.log(res1); // Output: 14\n```"},"reduceRight":{"name":"### reduceRight(callbackfn)","description":"对数组的每个元素执行指定的累加操作,从右向左处理。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number | 是 | - | - | 一个最多接受四个参数的函数。reduceRight方法从数组的最后一个元素向第一个元素逐个调用callbackfn函数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 由归约返回的结果。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let total = new Int8Array([0, 1, 2, 3]);\n let res = total.reduceRight((accumulator : number, currentValue : number, _ : number, _a : Int8Array) :\n number => accumulator + currentValue);\n console.log(res); // Output: 6\n\n total = new Int8Array([0, 1, 2, 3]);\n let res1 = total.reduceRight((accumulator : number, currentValue : number, _ : number, _a : Int8Array) :\n number => accumulator + currentValue, 8);\n console.log(res1); // Output: 14\n```"},"reverse":{"name":"### reverse()","description":"反转数组中的元素。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Int8Array | 翻转的数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let int8 = new Int8Array([1, 2, 3]);\n int8.reverse();\n console.log(int8.toString()); // Output: \"3,2,1\"\n```"},"set":{"name":"### set(array, offset?)","description":"设置一个值或数组的值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| array | ArrayLike\\<number> | 是 | - | - | 要设置的值或数组。 |\n| offset | number | 否 | - | - | 要写入值的当前数组中的索引。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let int8 = new Int8Array(8);\n var array = [1, 2, 3];\n int8.set(array, 1);\n console.log(int8.toString()); // \"0,1,2,3,0,0,0,0\"\n```"},"slice":{"name":"### slice(start?, end?)","description":"返回数组的一部分。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| start | number | 否 | - | - | 指定部分的起始索引。 |\n| end | number | 否 | - | - | 指定部分的结束索引。不包括索引'end'处的元素。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Int8Array | 包含取出元素的新 typed array。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let int8 = new Int8Array([1, 2, 3]);\n let res = int8.slice(1);\n console.log(res.toString()); // Output: \"2,3\"\n\n let res1 = int8.slice(2);\n console.log(res1.toString()); // Output: \"3\"\n\n let res2 = int8.slice(-2);\n console.log(res2.toString()); // Output: \"2,3\"\n\n let res3 = int8.slice(0, 1);\n console.log(res3.toString()); // Output: \"1\"\n```"},"some":{"name":"### some(predicate)","description":"确定数组的任何元素是否满足指定的测试。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, array: Int8Array) => any | 是 | - | - | 一个最多接受三个参数的函数。some方法对数组中的每个元素调用predicate函数,直到predicate返回一个可转换为布尔值true的值,或者直到数组结束。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | true 如果 callback 函数以任一数组元素为参数调用时,返回 true; 否则,false. | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n const int8 = new Int8Array([-10, 20, -30, 40, -50]);\n const positives = new Int8Array([10, 20, 30, 40, 50]);\n\n let res = int8.some((element : number, index : number, array : Int8Array) : boolean =>\n element < 0\n );\n console.log(res); // Output: true\n\n\n let res1 = positives.some((element : number, index : number, array : Int8Array) : boolean =>\n element < 0\n );\n console.log(res1); // Output: false\n```"},"sort":{"name":"### sort(compareFn?)","description":"对数组进行排序。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| compareFn | (a: number, b: number) => number | 否 | - | - | 用于确定元素顺序的函数。如果省略,则元素按升序排序。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| this | 排序后的类型化数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let numbers = new Int8Array([40, 1, 5]);\n numbers.sort();\n console.log(numbers.toString()); // Output: \"1,5,40\"\n let res = numbers.toString()\n\n numbers.sort((a, b) : number => a - b);\n console.log(numbers.toString()); // Output: \"1,5,40\"\n```"},"subarray":{"name":"### subarray(begin?, end?)","description":"获取此数组的ArrayBuffer存储的新的Int8Array视图,引用从begin(包括)到end(不包括)的元素。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| begin | number | 否 | - | - | 开始数组的索引。 |\n| end | number | 否 | - | - | 结束数组的索引。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Int8Array | 一个新的 TypedArray 对象。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let buffer = new ArrayBuffer(8);\n let int8 = new Int8Array(buffer);\n int8.set([1, 2, 3]);\n console.log(int8.toString()); // Output: \"1,2,3,0,0,0,0,0\"\n\n\n let sub = int8.subarray(0, 4);\n console.log(sub.toString()); // Output: \"1,2,3,0\"\n```"},"toString":{"name":"### toString()","description":"返回数组的字符串表示形式。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 一个字符串,表示类型数组 (typed array) 的元素。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method"},"valueOf":{"name":"### valueOf()","description":"返回指定对象的原始值。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Iterator\\<Number> | 新的 Array Iterator 对象。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method"},"entries":{"name":"### entries()","description":"为数组中的每个条目返回一个键值对数组","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| IterableIterator\\<\\[number, number] | 数组条目的键值对迭代器 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let arr = new Int8Array([10, 20, 30, 40, 50]);\n let entries = arr.entries();\n let ret1 = entries.next().value[1]\n let ret2 = entries.next().value[1]\n console.log(ret1); // Output: 10\n console.log(ret2); // Output: 20\n```"},"includes":{"name":"### includes(searchElement, fromIndex?)","description":"确定数组是否包含某个元素,返回 true 或 false。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| searchElement | number | 是 | - | - | 要搜索的元素。 |\n| fromIndex | number | 否 | - | - | 开始搜索 searchElement 的数组位置。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 如果数组包含指定的元素则返回 true,否则返回 false。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let int8 = new Int8Array([1, 2, 3]);\n let res = int8.includes(2);\n console.log(res); // Output: true\n\n let res1 = int8.includes(4);\n console.log(res1); // Output: false\n\n\n let res2 = int8.includes(3, 3);\n console.log(res2); // Output: false\n\n```"},"keys":{"name":"### keys()","description":"返回数组中的键列表","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| IterableIterator\\<number> | 数组键的迭代器 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let arr = new Int8Array([10, 20, 30, 40, 50]);\n let keys = arr.keys();\n let value1 = keys.next().value\n let value2 = keys.next().value\n let value3 = keys.next().value\n let value4 = keys.next().value\n let value5 = keys.next().value\n console.log(value1); // Output: 0\n console.log(value2); // Output: 1\n console.log(value3); // Output: 2\n console.log(value4); // Output: 3\n console.log(value5); // Output: 4\n```"},"values":{"name":"### values()","description":"返回数组中的值列表","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| IterableIterator\\<number> | 数组值的迭代器 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let arr = new Int8Array([1, 2, 3]);\n let values = arr.values();\n let value1 = values.next().value\n let value2 = values.next().value\n let value3 = values.next().value\n console.log(value1); // Output: 1\n console.log(value2); // Output: 2\n console.log(value3); // Output: 3\n```"},"Constructor":{"name":"### Constructor(length)","description":"初始化一个对象","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| length | number | 是 | - | - | 当使用非对象调用时,该参数将被视为指定类型化数组长度的数字。在内存中创建一个内部数组缓冲区,大小长度乘以 BYTES_PER_ELEMENT 字节,用 0 填充。省略所有参数,等同于使用 0 作为参数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Int8Array | 实例对象 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method"},"Constructor_1":{"name":"### Constructor(array)","description":"初始化一个对象","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| array | ArrayLike\\<number> \\| ArrayBufferLike | 是 | - | - | 当使用 TypedArray 子类的实例调用时,typedArray 会被拷贝到一个新的类型数组中。对于非 bigint TypeedArray 构造函数,typedArray 参数仅可以是非 bigint 类型(例如 Int32Array)。同样,对于 bigint TypedArray 构造函数(BigInt64Array 或 BigUint64Array),typedArray 参数仅可以是 bigint 类型。typedArray 中的每个值在拷贝到新数组之前都转换为构造函数的相应类型。新的类型化数组的长度与 typedArray 参数的长度相同。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Int8Array | 实例对象 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method"},"Constructor_2":{"name":"### Constructor(buffer, byteOffset?, length?)","description":"当使用 ArrayBuffer 实例以及可选的 byteOffset 和 length 参数调用时,将创建一个新的指定缓冲区的类型化数组视图。byteOffset 和 length 参数指定类型化数组视图将暴露的内存范围。如果忽略这两个参数,则是整个视图的所有 buffer;如果仅忽略 length,则是从 byteOffset 开始的 buffer 剩余部分的视图。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| buffer | [ArrayBufferLike](#arraybufferlike-values) | 是 | - | - | ArrayBuffer实例 |\n| byteOffset | number | 否 | - | - | 可选,偏移量,单位字节 |\n| length | number | 否 | - | - | 可选,长度 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Int8Array | 实例对象 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method"},"of":{"name":"### of(...items)","description":"从一组元素创建一个新数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| items | number[\\] | 是 | - | - | 要包含在新数组对象中的一组元素。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Int8Array | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n var array = Int8Array.of(1, 2, 3)\n console.log(array.toString()); // '1,2,3'\n```"},"from":{"name":"### from(arrayLike, mapfn?)","description":"从类似数组或可迭代对象创建数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| arrayLike | ArrayLike\\<number> | 是 | - | - | 要转换为数组的类似数组或可迭代对象。 |\n| mapfn | (v: number, k: number) => number | 否 | - | - | 可选参数。如果指定了该参数,则最后生成的类型数组会经过该函数的加工处理后再返回。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Int8Array | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n var array = Int8Array.from([1, 2, 3], (v : number, _ : number) : number => v + v);\n console.log(array.toString()); // '2,4,6'\n```"}},"Int16Array":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.buildInObject.Int16Array)","length":{"name":"### length","description":"数组的长度","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.23 | x | √ | √ | √ |\n","itemType":"prop"},"BYTES_PER_ELEMENT":{"name":"### BYTES_PER_ELEMENT","description":"数组中每个元素的字节大小。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"buffer":{"name":"### buffer","description":"数组引用的ArrayBuffer实例。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"byteLength":{"name":"### byteLength","description":"数组的字节长度。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"byteOffset":{"name":"### byteOffset","description":"数组的字节偏移量。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"copyWithin":{"name":"### copyWithin(target, start, end?)","description":"返回this对象,将数组中由start和end标识的部分复制到从位置target开始的相同数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| target | number | 是 | - | - | 如果target为负数,则视为length+target,其中length为数组的长度。 |\n| start | number | 是 | - | - | 如果start为负数,则视为length+start。如果省略end,则使用this对象的长度作为其默认值。 |\n| end | number | 否 | - | - | 如果未指定,默认使用this对象的长度。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| this | 修改后的类型化数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let int16 = new Int16Array(8);\n int16.set([1, 2, 3], 1);\n int16.copyWithin(3, 0, 3);\n console.log(int16.toString()); // \"0,1,2,0,1,2,0,0\"\n```"},"every":{"name":"### every(predicate)","description":"确定数组的所有成员是否满足指定的测试。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, array: Int16Array) => any | 是 | - | - | 一个最多接受三个参数的函数。every方法对数组中的每个元素调用predicate函数,直到predicate返回一个可转换为布尔值false的值,或者直到数组结束。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 返回 true,除非 callbackFn 对类型化数组中的某个元素返回了假值(在这种情况下,立即返回 false)。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let result = new Int16Array([12, 5, 8, 130, 44]).every((value, _, _a : Int16Array) : boolean => value < 40);\n console.log(result); // false\n```"},"fill":{"name":"### fill(value, start?, end?)","description":"将数组中的所有元素更改为静态值value,并返回修改后的数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| value | number | 是 | - | - | 用于填充数组部分的值。 |\n| start | number | 否 | - | - | 开始填充数组的索引。如果start为负数,则视为length+start,其中length为数组的长度。 |\n| end | number | 否 | - | - | 停止填充数组的索引。如果end为负数,则视为length+end。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| this | 修改后的类型化数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let int16_t1 = new Int16Array([1, 2, 3]).fill(4);\n console.log(int16_t1.toString()); // \"4,4,4\"\n\n let int16_t2 = new Int16Array([1, 2, 3]).fill(4, 1);\n console.log(int16_t2.toString()); // \"1,4,4\"\n\n let int16_t3 = new Int16Array([1, 2, 3]).fill(4, 1, 2);\n console.log(int16_t3.toString()); // \"1,4,3\"\n\n let int16_t4 = new Int16Array([1, 2, 3]).fill(4, 1, 1);\n console.log(int16_t4.toString()); // \"1,2,3\"\n\n let int16_t5 = new Int16Array([1, 2, 3]).fill(4, -3, -2);\n console.log(int16_t5.toString()); // \"4,2,3\"\n```"},"filter":{"name":"### filter(predicate)","description":"返回满足回调函数中指定条件的数组元素。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, array: Int16Array) => any | 是 | - | - | 一个最多接受三个参数的函数。filter方法对数组中的每个元素调用predicate函数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Int16Array | 新的类型化数组,含有通过测试的元素 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let int16 = new Int16Array([12, 5, 8, 44]).filter((value, _, _a : Int16Array) : boolean => value >= 10);\n console.log(int16.toString()); // \"12,44\"\n```"},"find":{"name":"### find(predicate)","description":"返回数组中第一个满足条件的元素的值,否则返回undefined。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, obj: Int16Array) => boolean | 是 | - | - | 对数组中的每个元素调用一次predicate,直到找到一个使predicate返回true的元素为止。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number \\| null | 如果元素通过了测试,则为该元素,否则为undefined。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let int16 = new Int16Array([4, 5, 8, 12]);\n let res = int16.find((value, _, _a : Int16Array) : boolean => value > 5);\n console.log(res); // 8\n```"},"findIndex":{"name":"### findIndex(predicate)","description":"返回数组中第一个满足条件的元素的索引,否则返回-1。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, obj: Int16Array) => boolean | 是 | - | - | 对数组中的每个元素调用一次predicate,直到找到一个使predicate返回true的元素为止。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 如果元素通过了测试,则为数组下标,否则为 -1。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let int16 = new Int16Array([4, 6, 8, 12]);\n let res = int16.findIndex((value, _, _a : Int16Array) : boolean => value > 100);\n console.log(res); // -1\n\n\n int16 = new Int16Array([4, 6, 7, 120]);\n let res1 = int16.findIndex((value, _, _a : Int16Array) : boolean => value > 100);\n console.log(res1); // 3\n```"},"forEach":{"name":"### forEach(callbackfn)","description":"对数组的每个元素执行指定的操作。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (value: number, index: number, array: Int16Array) => void | 是 | - | - | 一个最多接受三个参数的函数。forEach方法对数组中的每个元素调用callbackfn函数。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n new Int16Array([0, 1, 2, 3]).forEach((value, index, _ : Int16Array) => {\n console.log(`a[${index}] = ${value}`);\n });\n```"},"indexOf":{"name":"### indexOf(searchElement, fromIndex?)","description":"返回数组中第一个出现的指定值的索引,如果不存在则返回-1。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| searchElement | number | 是 | - | - | 要在数组中查找的值。 |\n| fromIndex | number | 否 | - | - | 开始搜索的数组索引。如果省略,则从索引0开始搜索。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 数组中元素的第一个下标;没有找到则返回**-1** 。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let int16 = new Int16Array([2, 5, 9]);\n let res = int16.indexOf(2);\n console.log(res); // 0\n\n\n let res1 = int16.indexOf(7);\n console.log(res1); // -1\n\n\n let res2 = int16.indexOf(9, 2);\n console.log(res2); // 2\n\n\n let res3 = int16.indexOf(2, -1);\n console.log(res3); // -1\n\n\n let res4 = int16.indexOf(2, -3);\n console.log(res4); // 0\n```"},"join":{"name":"### join(separator?)","description":"将数组中所有元素连接成一个字符串。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| separator | string | 否 | - | - | 用于分隔数组元素的字符串。如果省略,则使用逗号分隔数组元素。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 所有元素连接后的字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let int16 = new Int16Array([1, 2, 3]);\n let res = int16.join();\n console.log(res); // \"1,2,3\"\n\n let res1 = int16.join(\" / \");\n console.log(res1); // \"1 / 2 / 3\"\n\n let res2 = int16.join(\"\");\n console.log(res2); // \"123\"\n```"},"map":{"name":"### map(callbackfn)","description":"对数组的每个元素执行指定的操作,并返回包含执行结果的数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (value: number, index: number, array: Int16Array) => number | 是 | - | - | 一个最多接受三个参数的函数。map方法对数组中的每个元素调用callbackfn函数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Int16Array | 新的类型化数组 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let numbers = new Int16Array([1, 4, 9]);\n let doubles = numbers.map((value, _, _a : Int16Array) : number => value * 2);\n console.log(numbers.toString()); // \"1,4,9\"\n console.log(doubles.toString()); // \"2,8,18\"\n```"},"reduce":{"name":"### reduce(callbackfn)","description":"对数组的每个元素执行指定的累加操作。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number | 是 | - | - | 一个最多接受四个参数的函数。reduce方法对数组中的每个元素调用callbackfn函数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 由归约返回的结果。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let total = new Int16Array([0, 1, 2, 3]);\n let res = total.reduce((accumulator, currentValue, _, _a : Int16Array) : number => accumulator + currentValue);\n console.log(res); // 6\n\n\n total = new Int16Array([0, 1, 2, 3]);\n let res1 = total.reduce((accumulator, currentValue, _, _a : Int16Array) : number => accumulator + currentValue, 8);\n console.log(res1); // 14\n```"},"reduceRight":{"name":"### reduceRight(callbackfn)","description":"对数组的每个元素执行指定的累加操作,从右向左处理。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number | 是 | - | - | 一个最多接受四个参数的函数。reduceRight方法从数组的最后一个元素向第一个元素逐个调用callbackfn函数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 由归约返回的结果。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let total = new Int16Array([0, 1, 2, 3]);\n let res = total.reduceRight((accumulator, currentValue, _, _a : Int16Array) : number => accumulator + currentValue);\n console.log(res); // 6\n\n\n total = new Int16Array([0, 1, 2, 3]);\n let res1 = total.reduceRight((accumulator, currentValue, _, _a : Int16Array) : number => accumulator + currentValue, 8);\n console.log(res1); // 14\n```"},"reverse":{"name":"### reverse()","description":"反转数组中的元素。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Int16Array | 翻转的数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let int16 = new Int16Array([1, 2, 3]);\n int16.reverse();\n console.log(int16.toString()); // \"3,2,1\"\n```"},"set":{"name":"### set(array, offset?)","description":"设置一个值或数组的值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| array | ArrayLike\\<number> | 是 | - | - | 要设置的值或数组。 |\n| offset | number | 否 | - | - | 要写入值的当前数组中的索引。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let int16 = new Int16Array(8);\n var array = [1, 2, 3];\n int16.set(array, 1);\n console.log(int16.toString()); // \"0,1,2,3,0,0,0,0\"\n```"},"slice":{"name":"### slice(start?, end?)","description":"返回数组的一部分。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| start | number | 否 | - | - | 指定部分的起始索引。 |\n| end | number | 否 | - | - | 指定部分的结束索引。不包括索引'end'处的元素。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Int16Array | 包含取出元素的新 typed array。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let int16 = new Int16Array([1, 2, 3]);\n let res = int16.slice(1);\n console.log(res.toString()); // \"2,3\"\n\n\n let res1 = int16.slice(2);\n console.log(res1.toString()); // \"3\"\n\n\n let res2 = int16.slice(-2);\n console.log(res2.toString()); // \"2,3\"\n\n\n let res3 = int16.slice(0, 1);\n console.log(res3.toString()); // \"1\"\n```"},"some":{"name":"### some(predicate)","description":"确定数组的任何元素是否满足指定的测试。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, array: Int16Array) => any | 是 | - | - | 一个最多接受三个参数的函数。some方法对数组中的每个元素调用predicate函数,直到predicate返回一个可转换为布尔值true的值,或者直到数组结束。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | true 如果 callback 函数以任一数组元素为参数调用时,返回 true; 否则,false. | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n const int16 = new Int16Array([-10, 20, -30, 40, -50]);\n const positives = new Int16Array([10, 20, 30, 40, 50]);\n\n console.log(int16.some((element : number, index : number, array : Int16Array) : boolean => element < 0)); // true\n\n console.log(positives.some((element : number, index : number, array : Int16Array) : boolean => element < 0)); // false\n```"},"sort":{"name":"### sort(compareFn?)","description":"对数组进行排序。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| compareFn | (a: number, b: number) => number | 否 | - | - | 用于确定元素顺序的函数。如果省略,则元素按升序排序。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| this | 排序后的类型化数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let numbers = new Int16Array([40, 1, 5]);\n numbers.sort();\n console.log(numbers.toString()); // \"1,5,40\"\n let res = numbers.toString()\n\n\n numbers.sort((a, b) : number => a - b);\n console.log(numbers.toString()); // \"1,5,40\"\n```"},"subarray":{"name":"### subarray(begin?, end?)","description":"获取此数组的ArrayBuffer存储的新的Int16Array视图,引用从begin(包括)到end(不包括)的元素。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| begin | number | 否 | - | - | 开始数组的索引。 |\n| end | number | 否 | - | - | 结束数组的索引。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Int16Array | 一个新的 TypedArray 对象。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let buffer = new ArrayBuffer(16);\n let int16 = new Int16Array(buffer);\n int16.set([1, 2, 3]);\n let res = int16.toString()\n console.log(res); // \"1,2,3,0,0,0,0,0\"\n\n\n let sub = int16.subarray(0, 4);\n console.log(sub.toString()); // \"1,2,3,0\"\n```"},"toString":{"name":"### toString()","description":"返回数组的字符串表示形式。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 一个字符串,表示类型数组 (typed array) 的元素。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method"},"valueOf":{"name":"### valueOf()","description":"返回指定对象的原始值。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Iterator\\<Number> | 新的 Array Iterator 对象。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method"},"entries":{"name":"### entries()","description":"为数组中的每个条目返回一个键值对数组","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| IterableIterator\\<\\[number, number] | 数组条目的键值对迭代器 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let arr = new Int16Array([10, 20, 30, 40, 50]);\n let entries = arr.entries();\n let firstEntry = entries.next().value[1];\n console.log(firstEntry); // 10\n```"},"includes":{"name":"### includes(searchElement, fromIndex?)","description":"确定数组是否包含某个元素,返回 true 或 false。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| searchElement | number | 是 | - | - | 要搜索的元素。 |\n| fromIndex | number | 否 | - | - | 开始搜索 searchElement 的数组位置。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 如果数组包含指定的元素则返回 true,否则返回 false。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.23 | x | √ | √ | √ |\n","itemType":"method","test":"```uts\n let int16 = new Int16Array([1, 2, 3]);\n let res = int16.includes(2);\n console.log(res); // true\n\n\n let res1 = int16.includes(4);\n console.log(res1); // false\n\n\n let res2 = int16.includes(3, 3);\n console.log(res2); // false\n```"},"keys":{"name":"### keys()","description":"返回数组中的键列表","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| IterableIterator\\<number> | 数组键的迭代器 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let arr = new Int16Array([10, 20, 30, 40, 50]);\n let keys = arr.keys();\n let value1 = keys.next().value\n console.log(value1); // 0\n console.log(keys.next().value); // 1\n console.log(keys.next().value); // 2\n console.log(keys.next().value); // 3\n console.log(keys.next().value); // 4\n```"},"values":{"name":"### values()","description":"返回数组中的值列表","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| IterableIterator\\<number> | 数组值的迭代器 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let arr = new Int16Array([1, 2, 3]);\n let values = arr.values();\n let res = values.next().value\n console.log(res); // 1\n```"},"Constructor":{"name":"### Constructor(length)","description":"初始化一个对象","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| length | number | 是 | - | - | 当使用非对象调用时,该参数将被视为指定类型化数组长度的数字。在内存中创建一个内部数组缓冲区,大小长度乘以 BYTES_PER_ELEMENT 字节,用 0 填充。省略所有参数,等同于使用 0 作为参数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Int16Array | 实例对象 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.23 | x | √ | √ | √ |\n","itemType":"method"},"Constructor_1":{"name":"### Constructor(array)","description":"初始化一个对象","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| array | ArrayLike\\<number> \\| ArrayBufferLike | 是 | - | - | 当使用 TypedArray 子类的实例调用时,typedArray 会被拷贝到一个新的类型数组中。对于非 bigint TypeedArray 构造函数,typedArray 参数仅可以是非 bigint 类型(例如 Int32Array)。同样,对于 bigint TypedArray 构造函数(BigInt64Array 或 BigUint64Array),typedArray 参数仅可以是 bigint 类型。typedArray 中的每个值在拷贝到新数组之前都转换为构造函数的相应类型。新的类型化数组的长度与 typedArray 参数的长度相同。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Int16Array | 实例对象 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method"},"Constructor_2":{"name":"### Constructor(buffer, byteOffset?, length?)","description":"当使用 ArrayBuffer 实例以及可选的 byteOffset 和 length 参数调用时,将创建一个新的指定缓冲区的类型化数组视图。byteOffset 和 length 参数指定类型化数组视图将暴露的内存范围。如果忽略这两个参数,则是整个视图的所有 buffer;如果仅忽略 length,则是从 byteOffset 开始的 buffer 剩余部分的视图。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| buffer | [ArrayBufferLike](#arraybufferlike-values) | 是 | - | - | ArrayBuffer实例 |\n| byteOffset | number | 否 | - | - | 可选,偏移量,单位字节 |\n| length | number | 否 | - | - | 可选,长度 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Int16Array | 实例对象 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.23 | x | √ | √ | √ |\n","itemType":"method"},"of":{"name":"### of(...items)","description":"从一组元素创建一个新数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| items | number[\\] | 是 | - | - | 要包含在新数组对象中的一组元素。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Int16Array | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n var array = Int16Array.of(1, 2, 3)\n console.log(array.toString()); // '1,2,3'\n```"},"from":{"name":"### from(arrayLike, mapfn?)","description":"从类似数组或可迭代对象创建数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| arrayLike | ArrayLike\\<number> | 是 | - | - | 要转换为数组的类似数组或可迭代对象。 |\n| mapfn | (v: number, k: number) => number | 否 | - | - | 可选参数。如果指定了该参数,则最后生成的类型数组会经过该函数的加工处理后再返回。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Int16Array | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n var array = Int16Array.from([1, 2, 3], (v : number, _ : number) : number => v + v);\n console.log(array.toString()); // '2,4,6'\n```"}},"Int32Array":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.buildInObject.Int32Array)","length":{"name":"### length","description":"数组的长度","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.23 | x | √ | √ | √ |\n","itemType":"prop"},"BYTES_PER_ELEMENT":{"name":"### BYTES_PER_ELEMENT","description":"数组中每个元素的字节大小。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"buffer":{"name":"### buffer","description":"数组引用的ArrayBuffer实例。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"byteLength":{"name":"### byteLength","description":"数组的字节长度。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"byteOffset":{"name":"### byteOffset","description":"数组的字节偏移量。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"copyWithin":{"name":"### copyWithin(target, start, end?)","description":"返回this对象,将数组中由start和end标识的部分复制到从位置target开始的相同数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| target | number | 是 | - | - | 如果target为负数,则视为length+target,其中length为数组的长度。 |\n| start | number | 是 | - | - | 如果start为负数,则视为length+start。如果省略end,则使用this对象的长度作为其默认值。 |\n| end | number | 否 | - | - | 如果未指定,默认使用this对象的长度。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| this | 修改后的类型化数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n console.log(\"testCopyWith start\");\n let int32 = new Int32Array(8);\n int32.set([1, 2, 3], 1);\n console.log(int32.toString()); // \"0,1,2,0,0,0,0,0\"\n int32.copyWithin(3, 0, 3);\n console.log(int32.toString()); // \"0,1,2,0,1,2,0,0\"\n```"},"every":{"name":"### every(predicate)","description":"确定数组的所有成员是否满足指定的测试。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, array: Int32Array) => any | 是 | - | - | 一个最多接受三个参数的函数。every方法对数组中的每个元素调用predicate函数,直到predicate返回一个可转换为布尔值false的值,或者直到数组结束。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 返回 true,除非 callbackFn 对类型化数组中的某个元素返回了假值(在这种情况下,立即返回 false)。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let result = new Int32Array([12, 5, 8, 130, 44]).every((value : number, _ : number, _a : Int32Array) : boolean => value < 40);\n console.log(result); // false\n```"},"fill":{"name":"### fill(value, start?, end?)","description":"将数组中的所有元素更改为静态值value,并返回修改后的数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| value | number | 是 | - | - | 用于填充数组部分的值。 |\n| start | number | 否 | - | - | 开始填充数组的索引。如果start为负数,则视为length+start,其中length为数组的长度。 |\n| end | number | 否 | - | - | 停止填充数组的索引。如果end为负数,则视为length+end。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| this | 修改后的类型化数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let int32_t1 = new Int32Array([1, 2, 3]).fill(4);\n console.log(int32_t1.toString()); // \"4,4,4\"\n\n let int32_t2 = new Int32Array([1, 2, 3]).fill(4, 1);\n console.log(int32_t2.toString()); // \"1,4,4\"\n\n let int32_t3 = new Int32Array([1, 2, 3]).fill(4, 1, 2);\n console.log(int32_t3.toString()); // \"1,4,3\"\n\n let int32_t4 = new Int32Array([1, 2, 3]).fill(4, 1, 1);\n console.log(int32_t4.toString()); // \"1,2,3\"\n\n let int32_t5 = new Int32Array([1, 2, 3]).fill(4, -3, -2);\n console.log(int32_t5.toString()); // \"4,2,3\"\n```"},"filter":{"name":"### filter(predicate)","description":"返回满足回调函数中指定条件的数组元素。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, array: Int32Array) => any | 是 | - | - | 一个最多接受三个参数的函数。filter方法对数组中的每个元素调用predicate函数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Int32Array | 新的类型化数组,含有通过测试的元素 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let int32 = new Int32Array([12, 5, 8, 44]).filter((value : number, _ : number, _a : Int32Array) : boolean => value >= 10);\n console.log(int32.toString()); // \"12,44\"\n```"},"find":{"name":"### find(predicate)","description":"返回数组中第一个满足条件的元素的值,否则返回undefined。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, obj: Int32Array) => boolean | 是 | - | - | 对数组中的每个元素调用一次predicate,直到找到一个使predicate返回true的元素为止。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number \\| null | 如果元素通过了测试,则为该元素,否则为undefined。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let int32 = new Int32Array([4, 5, 8, 12]);\n let res = int32.find((value : number, _ : number, _a : Int32Array) : boolean => value > 5);\n console.log(res); // 8\n```"},"findIndex":{"name":"### findIndex(predicate)","description":"返回数组中第一个满足条件的元素的索引,否则返回-1。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, obj: Int32Array) => boolean | 是 | - | - | 对数组中的每个元素调用一次predicate,直到找到一个使predicate返回true的元素为止。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 如果元素通过了测试,则为数组下标,否则为 -1。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let int32_t1 = new Int32Array([4, 6, 8, 12]);\n let res1 = int32_t1.findIndex((value : number, _ : number, _a : Int32Array) : boolean => value > 100);\n console.log(res1); // -1\n\n let int32_t2 = new Int32Array([4, 6, 7, 120]);\n let res2 = int32_t2.findIndex((value : number, _ : number, _a : Int32Array) : boolean => value > 100);\n console.log(res2); // 3\n```"},"forEach":{"name":"### forEach(callbackfn)","description":"对数组的每个元素执行指定的操作。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (value: number, index: number, array: Int32Array) => void | 是 | - | - | 一个最多接受三个参数的函数。forEach方法对数组中的每个元素调用callbackfn函数。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n new Int32Array([0, 1, 2, 3]).forEach((value : number, index : number, _ : Int32Array) => {\n console.log(`a[${index}] = ${value}`);\n });\n```"},"indexOf":{"name":"### indexOf(searchElement, fromIndex?)","description":"返回数组中第一个出现的指定值的索引,如果不存在则返回-1。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| searchElement | number | 是 | - | - | 要在数组中查找的值。 |\n| fromIndex | number | 否 | - | - | 开始搜索的数组索引。如果省略,则从索引0开始搜索。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 数组中元素的第一个下标;没有找到则返回**-1** 。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let int32_t1 = new Int32Array([2, 5, 9]);\n let res1 = int32_t1.indexOf(2);\n console.log(res1); // 0\n\n let res2 = int32_t1.indexOf(7);\n console.log(res2); // -1\n\n let res3 = int32_t1.indexOf(9, 2);\n console.log(res3); // 2\n\n let res4 = int32_t1.indexOf(2, -1);\n console.log(res4); // -1\n\n let res5 = int32_t1.indexOf(2, -3);\n console.log(res5); // 0\n```"},"join":{"name":"### join(separator?)","description":"将数组中所有元素连接成一个字符串。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| separator | string | 否 | - | - | 用于分隔数组元素的字符串。如果省略,则使用逗号分隔数组元素。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 所有元素连接后的字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let int32_t1 = new Int32Array([1, 2, 3]);\n let res1 = int32_t1.join();\n console.log(res1); // \"1,2,3\"\n\n let res2 = int32_t1.join(\" / \");\n console.log(res2); // \"1 / 2 / 3\"\n\n let res3 = int32_t1.join(\"\");\n console.log(res3); // \"123\"\n```"},"map":{"name":"### map(callbackfn)","description":"对数组的每个元素执行指定的操作,并返回包含执行结果的数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (value: number, index: number, array: Int32Array) => number | 是 | - | - | 一个最多接受三个参数的函数。map方法对数组中的每个元素调用callbackfn函数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Int32Array | 新的类型化数组 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let numbers = new Int32Array([1, 4, 9]);\n let doubles = numbers.map((value : number, _ : number, _a : Int32Array) : number => value * 2);\n console.log(numbers.toString()); // \"1,4,9\"\n console.log(doubles.toString()); // \"2,8,18\"\n```"},"reduce":{"name":"### reduce(callbackfn)","description":"对数组的每个元素执行指定的累加操作。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number | 是 | - | - | 一个最多接受四个参数的函数。reduce方法对数组中的每个元素调用callbackfn函数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 由归约返回的结果。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let total_t1 = new Int32Array([0, 1, 2, 3]);\n let res1 = total_t1.reduce((accumulator : number, currentValue : number, _ : number, _a : Int32Array) : number =>\n accumulator + currentValue\n );\n console.log(res1); // 6\n\n let total_t2 = new Int32Array([0, 1, 2, 3]);\n let res2 = total_t2.reduce((accumulator : number, currentValue : number, _ : number, _a : Int32Array) : number =>\n accumulator + currentValue, 8\n );\n console.log(res2); // 14\n```"},"reduceRight":{"name":"### reduceRight(callbackfn)","description":"对数组的每个元素执行指定的累加操作,从右向左处理。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number | 是 | - | - | 一个最多接受四个参数的函数。reduceRight方法从数组的最后一个元素向第一个元素逐个调用callbackfn函数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 由归约返回的结果。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let total_t1 = new Int32Array([0, 1, 2, 3]);\n let res1 = total_t1.reduceRight((accumulator : number, currentValue : number, _ : number, _a : Int32Array) : number =>\n accumulator + currentValue\n );\n console.log(res1); // 6\n\n let total_t2 = new Int32Array([0, 1, 2, 3]);\n let res2 = total_t2.reduceRight((accumulator : number, currentValue : number, _ : number, _a : Int32Array) : number =>\n accumulator + currentValue, 8\n );\n console.log(res2); // 14\n```"},"reverse":{"name":"### reverse()","description":"反转数组中的元素。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Int32Array | 翻转的数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let int32 = new Int32Array([1, 2, 3]);\n int32.reverse();\n console.log(int32.toString()); // \"3,2,1\"\n```"},"set":{"name":"### set(array, offset?)","description":"设置一个值或数组的值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| array | ArrayLike\\<number> | 是 | - | - | 要设置的值或数组。 |\n| offset | number | 否 | - | - | 要写入值的当前数组中的索引。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let int32 = new Int32Array(8);\n var array = [1, 2, 3];\n int32.set(array, 1);\n console.log(int32.toString()); // \"0,1,2,3,0,0,0,0\"\n```"},"slice":{"name":"### slice(start?, end?)","description":"返回数组的一部分。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| start | number | 否 | - | - | 指定部分的起始索引。 |\n| end | number | 否 | - | - | 指定部分的结束索引。不包括索引'end'处的元素。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Int32Array | 包含取出元素的新 typed array。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let int32_t1 = new Int32Array([1, 2, 3]);\n let res1 = int32_t1.slice(1);\n console.log(res1.toString()); // \"2,3\"\n\n let res2 = int32_t1.slice(2);\n console.log(res2.toString()); // \"3\"\n\n let res3 = int32_t1.slice(-2);\n console.log(res3.toString()); // \"2,3\"\n\n let res4 = int32_t1.slice(0, 1);\n console.log(res4.toString()); // \"1\"\n```"},"some":{"name":"### some(predicate)","description":"确定数组的任何元素是否满足指定的测试。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, array: Int32Array) => any | 是 | - | - | 一个最多接受三个参数的函数。some方法对数组中的每个元素调用predicate函数,直到predicate返回一个可转换为布尔值true的值,或者直到数组结束。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | true 如果 callback 函数以任一数组元素为参数调用时,返回 true; 否则,false. | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n const int32 = new Int32Array([-10, 20, -30, 40, -50]);\n const positives = new Int32Array([10, 20, 30, 40, 50]);\n\n console.log(int32.some((element : number, index : number, array : Int32Array) : boolean => element < 0)); // true\n\n\n console.log(positives.some((element : number, index : number, array : Int32Array) : boolean => element < 0)); // false\n```"},"sort":{"name":"### sort(compareFn?)","description":"对数组进行排序。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| compareFn | (a: number, b: number) => number | 否 | - | - | 用于确定元素顺序的函数。如果省略,则元素按升序排序。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| this | 排序后的类型化数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let numbers_t1 = new Int32Array([40, 1, 5]);\n numbers_t1.sort();\n console.log(numbers_t1.toString()); // \"1,5,40\"\n\n let numbers_t2 = new Int32Array([40, 1, 5]);\n numbers_t2.sort((a, b) : number => a - b);\n console.log(numbers_t2.toString()); // \"1,5,40\"\n```"},"subarray":{"name":"### subarray(begin?, end?)","description":"获取此数组的ArrayBuffer存储的新的Int32Array视图,引用从begin(包括)到end(不包括)的元素。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| begin | number | 否 | - | - | 开始数组的索引。 |\n| end | number | 否 | - | - | 结束数组的索引。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Int32Array | 一个新的 TypedArray 对象。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let buffer = new ArrayBuffer(16);\n let int32 = new Int32Array(buffer);\n int32.set([1, 2, 3]);\n console.log(int32.toString()); // \"1,2,3,0\"\n\n let sub = int32.subarray(0, 4);\n console.log(sub.toString()); // \"1,2,3,0\"\n```"},"toString":{"name":"### toString()","description":"返回数组的字符串表示形式。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 一个字符串,表示类型数组 (typed array) 的元素。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method"},"valueOf":{"name":"### valueOf()","description":"返回指定对象的原始值。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Iterator\\<Number> | 新的 Array Iterator 对象。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method"},"entries":{"name":"### entries()","description":"为数组中的每个条目返回一个键值对数组","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| IterableIterator\\<\\[number, number] | 数组条目的键值对迭代器 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let arr = new Int32Array([10, 20, 30, 40, 50]);\n let entries = arr.entries();\n let entry = entries.next();\n console.log(entry.value[1]); // 10\n```"},"includes":{"name":"### includes(searchElement, fromIndex?)","description":"确定数组是否包含某个元素,返回 true 或 false。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| searchElement | number | 是 | - | - | 要搜索的元素。 |\n| fromIndex | number | 否 | - | - | 开始搜索 searchElement 的数组位置。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 如果数组包含指定的元素则返回 true,否则返回 false。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.23 | x | √ | √ | √ |\n","itemType":"method","test":"```uts\n let int32_t1 = new Int32Array([1, 2, 3]);\n let res1 = int32_t1.includes(2);\n console.log(res1); // true\n\n let res2 = int32_t1.includes(4);\n console.log(res2); // false\n\n let res3 = int32_t1.includes(3, 3);\n console.log(res3); // false\n```"},"keys":{"name":"### keys()","description":"返回数组中的键列表","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| IterableIterator\\<number> | 数组键的迭代器 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let arr = new Int32Array([10, 20, 30, 40, 50]);\n let keys = arr.keys();\n let key = keys.next();\n console.log(key.value); // 0\n```"},"values":{"name":"### values()","description":"返回数组中的值列表","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| IterableIterator\\<number> | 数组值的迭代器 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let arr = new Int32Array([1, 2, 3]);\n let values = arr.values();\n let value = values.next().value\n console.log(value); // 1\n```"},"Constructor":{"name":"### Constructor(length)","description":"初始化一个对象","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| length | number | 是 | - | - | 当使用非对象调用时,该参数将被视为指定类型化数组长度的数字。在内存中创建一个内部数组缓冲区,大小长度乘以 BYTES_PER_ELEMENT 字节,用 0 填充。省略所有参数,等同于使用 0 作为参数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Int32Array | 实例对象 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.23 | x | √ | √ | √ |\n","itemType":"method"},"Constructor_1":{"name":"### Constructor(array)","description":"初始化一个对象","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| array | ArrayLike\\<number> \\| ArrayBufferLike | 是 | - | - | 当使用 TypedArray 子类的实例调用时,typedArray 会被拷贝到一个新的类型数组中。对于非 bigint TypeedArray 构造函数,typedArray 参数仅可以是非 bigint 类型(例如 Int32Array)。同样,对于 bigint TypedArray 构造函数(BigInt64Array 或 BigUint64Array),typedArray 参数仅可以是 bigint 类型。typedArray 中的每个值在拷贝到新数组之前都转换为构造函数的相应类型。新的类型化数组的长度与 typedArray 参数的长度相同。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Int32Array | 实例对象 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method"},"Constructor_2":{"name":"### Constructor(buffer, byteOffset?, length?)","description":"当使用 ArrayBuffer 实例以及可选的 byteOffset 和 length 参数调用时,将创建一个新的指定缓冲区的类型化数组视图。byteOffset 和 length 参数指定类型化数组视图将暴露的内存范围。如果忽略这两个参数,则是整个视图的所有 buffer;如果仅忽略 length,则是从 byteOffset 开始的 buffer 剩余部分的视图。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| buffer | [ArrayBufferLike](#arraybufferlike-values) | 是 | - | - | ArrayBuffer实例 |\n| byteOffset | number | 否 | - | - | 可选,偏移量,单位字节 |\n| length | number | 否 | - | - | 可选,长度 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Int32Array | 实例对象 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.23 | x | √ | √ | √ |\n","itemType":"method"},"of":{"name":"### of(...items)","description":"从一组元素创建一个新数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| items | number[\\] | 是 | - | - | 要包含在新数组对象中的一组元素。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Int32Array | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n var array = Int32Array.of(1, 2, 3)\n console.log(array.toString()); // '1,2,3'\n```"},"from":{"name":"### from(arrayLike, mapfn?)","description":"从类似数组或可迭代对象创建数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| arrayLike | ArrayLike\\<number> | 是 | - | - | 要转换为数组的类似数组或可迭代对象。 |\n| mapfn | (v: number, k: number) => number | 否 | - | - | 可选参数。如果指定了该参数,则最后生成的类型数组会经过该函数的加工处理后再返回。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Int32Array | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n var array = Int32Array.from([1, 2, 3], (v : number, _ : number) : number => v + v);\n console.log(array.toString()); // '2,4,6'\n```"}},"Uint8Array":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.buildInObject.Uint8Array)","length":{"name":"### length","description":"数组的长度","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.23 | x | √ | √ | √ |\n","itemType":"prop"},"BYTES_PER_ELEMENT":{"name":"### BYTES_PER_ELEMENT","description":"数组中每个元素的字节大小。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"buffer":{"name":"### buffer","description":"数组引用的ArrayBuffer实例。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"byteLength":{"name":"### byteLength","description":"数组的字节长度。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"byteOffset":{"name":"### byteOffset","description":"数组的字节偏移量。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"copyWithin":{"name":"### copyWithin(target, start, end?)","description":"返回this对象,将数组中由start和end标识的部分复制到从位置target开始的相同数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| target | number | 是 | - | - | 如果target为负数,则视为length+target,其中length为数组的长度。 |\n| start | number | 是 | - | - | 如果start为负数,则视为length+start。如果省略end,则使用this对象的长度作为其默认值。 |\n| end | number | 否 | - | - | 如果未指定,默认使用this对象的长度。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| this | 修改后的类型化数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n console.log(\"testCopyWith 1\");\n let uint8 = new Uint8Array(8);\n uint8.set([1, 2, 3], 1);\n uint8.copyWithin(3, 0, 3);\n console.log(uint8.toString()); // \"0,1,2,0,1,2,0,0\"\n```"},"every":{"name":"### every(predicate)","description":"确定数组的所有成员是否满足指定的测试。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, array: Uint8Array) => any | 是 | - | - | 一个最多接受三个参数的函数。every方法对数组中的每个元素调用predicate函数,直到predicate返回一个可转换为布尔值false的值,或者直到数组结束。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 返回 true,除非 callbackFn 对类型化数组中的某个元素返回了假值(在这种情况下,立即返回 false)。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let result = new Uint8Array([12, 5, 8, 130, 44]).every((value : number, _ : number, _a : Uint8Array) : boolean =>\n value < 40);\n console.log(result); // false\n```"},"fill":{"name":"### fill(value, start?, end?)","description":"将数组中的所有元素更改为静态值value,并返回修改后的数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| value | number | 是 | - | - | 用于填充数组部分的值。 |\n| start | number | 否 | - | - | 开始填充数组的索引。如果start为负数,则视为length+start,其中length为数组的长度。 |\n| end | number | 否 | - | - | 停止填充数组的索引。如果end为负数,则视为length+end。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| this | 修改后的类型化数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint8_t1 = new Uint8Array([1, 2, 3]).fill(4);\n console.log(uint8_t1.toString()); // \"4,4,4\"\n\n let uint8_t2 = new Uint8Array([1, 2, 3]).fill(4, 1);\n console.log(uint8_t2.toString()); // \"1,4,4\"\n\n let uint8_t3 = new Uint8Array([1, 2, 3]).fill(4, 1, 2);\n console.log(uint8_t3.toString()); // \"1,4,3\"\n\n let uint8_t4 = new Uint8Array([1, 2, 3]).fill(4, 1, 1);\n console.log(uint8_t4.toString()); // \"1,2,3\"\n\n let uint8_t5 = new Uint8Array([1, 2, 3]).fill(4, -3, -2);\n console.log(uint8_t5.toString()); // \"4,2,3\"\n```"},"filter":{"name":"### filter(predicate)","description":"返回满足回调函数中指定条件的数组元素。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, array: Uint8Array) => any | 是 | - | - | 一个最多接受三个参数的函数。filter方法对数组中的每个元素调用predicate函数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Uint8Array | 新的类型化数组,含有通过测试的元素 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint8 = new Uint8Array([12, 5, 8, 44]).filter((value : number, _ : number, _a : Uint8Array) : boolean => value >= 10);\n console.log(uint8.toString()); // \"12,44\"\n```"},"find":{"name":"### find(predicate)","description":"返回数组中第一个满足条件的元素的值,否则返回undefined。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, obj: Uint8Array) => boolean | 是 | - | - | 对数组中的每个元素调用一次predicate,直到找到一个使predicate返回true的元素为止。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number \\| null | 如果元素通过了测试,则为该元素,否则为undefined。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint8 = new Uint8Array([4, 5, 8, 12]);\n let res = uint8.find((value : number, _ : number, _a : Uint8Array) : boolean => value > 5);\n console.log(res); // 8\n```"},"findIndex":{"name":"### findIndex(predicate)","description":"返回数组中第一个满足条件的元素的索引,否则返回-1。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, obj: Uint8Array) => boolean | 是 | - | - | 对数组中的每个元素调用一次predicate,直到找到一个使predicate返回true的元素为止。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 如果元素通过了测试,则为数组下标,否则为 -1。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint8_t1 = new Uint8Array([4, 6, 8, 12]);\n let res1 = uint8_t1.findIndex((value : number, _ : number, _a : Uint8Array) : boolean => value > 100);\n console.log(res1); // -1\n\n let uint8_t2 = new Uint8Array([4, 6, 7, 120]);\n let res2 = uint8_t2.findIndex((value : number, _ : number, _a : Uint8Array) : boolean => value > 100);\n console.log(res2); // 3\n```"},"forEach":{"name":"### forEach(callbackfn)","description":"对数组的每个元素执行指定的操作。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (value: number, index: number, array: Uint8Array) => void | 是 | - | - | 一个最多接受三个参数的函数。forEach方法对数组中的每个元素调用callbackfn函数。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n new Uint8Array([0, 1, 2, 3]).forEach((value : number, index : number, _ : Uint8Array) => {\n console.log(`a[${index}] = ${value}`);\n });\n```"},"indexOf":{"name":"### indexOf(searchElement, fromIndex?)","description":"返回数组中第一个出现的指定值的索引,如果不存在则返回-1。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| searchElement | number | 是 | - | - | 要在数组中查找的值。 |\n| fromIndex | number | 否 | - | - | 开始搜索的数组索引。如果省略,则从索引0开始搜索。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 数组中元素的第一个下标;没有找到则返回**-1** 。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint8_t1 = new Uint8Array([2, 5, 9]);\n let res1 = uint8_t1.indexOf(2);\n console.log(res1); // 0\n\n let res2 = uint8_t1.indexOf(7);\n console.log(res2); // -1\n\n let res3 = uint8_t1.indexOf(9, 2);\n console.log(res3); // 2\n\n let res4 = uint8_t1.indexOf(2, -1);\n console.log(res4); // -1\n\n let res5 = uint8_t1.indexOf(2, -3);\n console.log(res5); // 0\n```"},"join":{"name":"### join(separator?)","description":"将数组中所有元素连接成一个字符串。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| separator | string | 否 | - | - | 用于分隔数组元素的字符串。如果省略,则使用逗号分隔数组元素。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 所有元素连接后的字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint8_t1 = new Uint8Array([1, 2, 3]);\n let res1 = uint8_t1.join();\n console.log(res1); // \"1,2,3\"\n\n let res2 = uint8_t1.join(\" / \");\n console.log(res2); // \"1 / 2 / 3\"\n\n let res3 = uint8_t1.join(\"\");\n console.log(res3); // \"123\"\n```"},"map":{"name":"### map(callbackfn)","description":"对数组的每个元素执行指定的操作,并返回包含执行结果的数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (value: number, index: number, array: Uint8Array) => number | 是 | - | - | 一个最多接受三个参数的函数。map方法对数组中的每个元素调用callbackfn函数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Uint8Array | 新的类型化数组 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let numbers = new Uint8Array([1, 4, 9]);\n let doubles = numbers.map((value : number, _ : number, _a : Uint8Array) : number => value * 2);\n console.log(numbers.toString()); // \"1,4,9\"\n console.log(doubles.toString()); // \"2,8,18\"\n```"},"reduce":{"name":"### reduce(callbackfn)","description":"对数组的每个元素执行指定的累加操作。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number | 是 | - | - | 一个最多接受四个参数的函数。reduce方法对数组中的每个元素调用callbackfn函数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 由归约返回的结果。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint8_t1 = new Uint8Array([0, 1, 2, 3]);\n let res1 = uint8_t1.reduce((accumulator : number, currentValue : number, _ : number, _a : Uint8Array) : number =>\n accumulator + currentValue);\n console.log(res1); // 6\n\n let res2 = uint8_t1.reduce((accumulator : number, currentValue : number, _ : number, _a : Uint8Array) : number =>\n accumulator + currentValue, 8);\n console.log(res2); // 14\n```"},"reduceRight":{"name":"### reduceRight(callbackfn)","description":"对数组的每个元素执行指定的累加操作,从右向左处理。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number | 是 | - | - | 一个最多接受四个参数的函数。reduceRight方法从数组的最后一个元素向第一个元素逐个调用callbackfn函数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 由归约返回的结果。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint8_t1 = new Uint8Array([0, 1, 2, 3]);\n let res1 = uint8_t1.reduceRight((accumulator : number, currentValue : number, _ : number, _a : Uint8Array) : number =>\n accumulator + currentValue);\n console.log(res1); // 6\n\n let res2 = uint8_t1.reduceRight((accumulator : number, currentValue : number, _ : number, _a : Uint8Array) : number =>\n accumulator + currentValue, 8);\n console.log(res2); // 14\n```"},"reverse":{"name":"### reverse()","description":"反转数组中的元素。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Uint8Array | 翻转的数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint8 = new Uint8Array([1, 2, 3]);\n uint8.reverse();\n console.log(uint8.toString()); // \"3,2,1\"\n```"},"set":{"name":"### set(array, offset?)","description":"设置一个值或数组的值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| array | ArrayLike\\<number> | 是 | - | - | 要设置的值或数组。 |\n| offset | number | 否 | - | - | 要写入值的当前数组中的索引。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint8 = new Uint8Array(8);\n var array = [1, 2, 3];\n uint8.set(array, 1);\n console.log(uint8.toString()); // \"0,1,2,3,0,0,0,0\"\n```"},"slice":{"name":"### slice(start?, end?)","description":"返回数组的一部分。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| start | number | 否 | - | - | 指定部分的起始索引。 |\n| end | number | 否 | - | - | 指定部分的结束索引。不包括索引'end'处的元素。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Uint8Array | 包含取出元素的新 typed array。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint8_t1 = new Uint8Array([1, 2, 3]);\n let res1 = uint8_t1.slice(1);\n console.log(res1.toString()); // \"2,3\"\n\n let res2 = uint8_t1.slice(2);\n console.log(res2.toString()); // \"3\"\n\n let res3 = uint8_t1.slice(-2);\n console.log(res3.toString()); // \"2,3\"\n\n let res4 = uint8_t1.slice(0, 1);\n console.log(res4.toString()); // \"1\"\n```"},"some":{"name":"### some(predicate)","description":"确定数组的任何元素是否满足指定的测试。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, array: Uint8Array) => any | 是 | - | - | 一个最多接受三个参数的函数。some方法对数组中的每个元素调用predicate函数,直到predicate返回一个可转换为布尔值true的值,或者直到数组结束。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | true 如果 callback 函数以任一数组元素为参数调用时,返回 true; 否则,false. | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n const uint8_t1 = new Uint8Array([8, 20, 30, 40, 50]);\n const positives_t1 = new Uint8Array([10, 20, 30, 40, 50]);\n\n let res_t1 = uint8_t1.some((element : number, index : number, array : Uint8Array) : boolean =>\n element < 10\n );\n console.log('uint8_t1', res_t1); // true\n\n let res_t2 = positives_t1.some((element : number, index : number, array : Uint8Array) : boolean =>\n element < 0\n );\n console.log('positives_t1', res_t2); // false\n\n```"},"sort":{"name":"### sort(compareFn?)","description":"对数组进行排序。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| compareFn | (a: number, b: number) => number | 否 | - | - | 用于确定元素顺序的函数。如果省略,则元素按升序排序。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| this | 排序后的类型化数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let numbers_t1 = new Uint8Array([40, 1, 5]);\n numbers_t1.sort();\n console.log(numbers_t1.toString()); // \"1,5,40\"\n\n let numbers_t2 = new Uint8Array([40, 1, 5]);\n numbers_t2.sort((a, b) : number => a - b);\n console.log(numbers_t2.toString()); // \"1,5,40\"\n```"},"subarray":{"name":"### subarray(begin?, end?)","description":"获取此数组的ArrayBuffer存储的新的Uint8Array视图,引用从begin(包括)到end(不包括)的元素。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| begin | number | 否 | - | - | 开始数组的索引。 |\n| end | number | 否 | - | - | 结束数组的索引。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Uint8Array | 一个新的 TypedArray 对象。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let buffer = new ArrayBuffer(16);\n let uint8_t1 = new Uint8Array(buffer);\n uint8_t1.set([1, 2, 3]);\n console.log(uint8_t1.toString()); // \"1,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0\"\n\n let sub_t1 = uint8_t1.subarray(0, 4);\n console.log(sub_t1.toString()); // \"1,2,3,0\"\n```"},"toString":{"name":"### toString()","description":"返回数组的字符串表示形式。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 一个字符串,表示类型数组 (typed array) 的元素。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method"},"valueOf":{"name":"### valueOf()","description":"返回指定对象的原始值。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Iterator\\<Number> | 新的 Array Iterator 对象。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method"},"entries":{"name":"### entries()","description":"为数组中的每个条目返回一个键值对数组","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| IterableIterator\\<\\[number, number] | 数组条目的键值对迭代器 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let arr = new Uint8Array([10, 20, 30, 40, 50]);\n let entries = arr.entries();\n let entry = entries.next().value;\n console.log(entry[1]); // 10\n```"},"includes":{"name":"### includes(searchElement, fromIndex?)","description":"确定数组是否包含某个元素,返回 true 或 false。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| searchElement | number | 是 | - | - | 要搜索的元素。 |\n| fromIndex | number | 否 | - | - | 开始搜索 searchElement 的数组位置。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 如果数组包含指定的元素则返回 true,否则返回 false。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.23 | x | √ | √ | √ |\n","itemType":"method","test":"```uts\n let uint8_t1 = new Uint8Array([1, 2, 3]);\n let res1 = uint8_t1.includes(2);\n console.log(res1); // true\n\n let res2 = uint8_t1.includes(4);\n console.log(res2); // false\n\n let res3 = uint8_t1.includes(3, 3);\n console.log(res3); // false\n```"},"keys":{"name":"### keys()","description":"返回数组中的键列表","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| IterableIterator\\<number> | 数组键的迭代器 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let arr = new Uint8Array([10, 20, 30, 40, 50]);\n let keys = arr.keys();\n let value = keys.next().value\n console.log(value); // 0\n```"},"values":{"name":"### values()","description":"返回数组中的值列表","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| IterableIterator\\<number> | 数组值的迭代器 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let arr = new Uint8Array([1, 2, 3]);\n let values = arr.values();\n let value = values.next().value\n console.log(value); // 1\n```"},"Constructor":{"name":"### Constructor(length)","description":"初始化一个对象","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| length | number | 是 | - | - | 当使用非对象调用时,该参数将被视为指定类型化数组长度的数字。在内存中创建一个内部数组缓冲区,大小长度乘以 BYTES_PER_ELEMENT 字节,用 0 填充。省略所有参数,等同于使用 0 作为参数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Uint8Array | 实例对象 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.23 | x | √ | √ | √ |\n","itemType":"method"},"Constructor_1":{"name":"### Constructor(array)","description":"初始化一个对象","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| array | ArrayLike\\<number> \\| ArrayBufferLike | 是 | - | - | 当使用 TypedArray 子类的实例调用时,typedArray 会被拷贝到一个新的类型数组中。对于非 bigint TypeedArray 构造函数,typedArray 参数仅可以是非 bigint 类型(例如 Int32Array)。同样,对于 bigint TypedArray 构造函数(BigInt64Array 或 BigUint64Array),typedArray 参数仅可以是 bigint 类型。typedArray 中的每个值在拷贝到新数组之前都转换为构造函数的相应类型。新的类型化数组的长度与 typedArray 参数的长度相同。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Uint8Array | 实例对象 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method"},"Constructor_2":{"name":"### Constructor(buffer, byteOffset?, length?)","description":"当使用 ArrayBuffer 实例以及可选的 byteOffset 和 length 参数调用时,将创建一个新的指定缓冲区的类型化数组视图。byteOffset 和 length 参数指定类型化数组视图将暴露的内存范围。如果忽略这两个参数,则是整个视图的所有 buffer;如果仅忽略 length,则是从 byteOffset 开始的 buffer 剩余部分的视图。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| buffer | [ArrayBufferLike](#arraybufferlike-values) | 是 | - | - | ArrayBuffer实例 |\n| byteOffset | number | 否 | - | - | 可选,偏移量,单位字节 |\n| length | number | 否 | - | - | 可选,长度 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Uint8Array | 实例对象 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.23 | x | √ | √ | √ |\n","itemType":"method"},"of":{"name":"### of(...items)","description":"从一组元素创建一个新数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| items | number[\\] | 是 | - | - | 要包含在新数组对象中的一组元素。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Uint8Array | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n var array = Uint8Array.of(1, 2, 3)\n console.log(array.toString()); // '1,2,3'\n```"},"from":{"name":"### from(arrayLike, mapfn?)","description":"从类似数组或可迭代对象创建数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| arrayLike | ArrayLike\\<number> | 是 | - | - | 要转换为数组的类似数组或可迭代对象。 |\n| mapfn | (v: number, k: number) => number | 否 | - | - | 可选参数。如果指定了该参数,则最后生成的类型数组会经过该函数的加工处理后再返回。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Uint8Array | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n var s = new Set([1, 2, 3]);\n var unit8 = Uint8Array.from(s);\n console.log(unit8.toString()); // '1,2,3'\n```"}},"Uint8ClampedArray":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.buildInObject.Uint8ClampedArray)","length":{"name":"### length","description":"数组的长度","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.23 | x | √ | √ | √ |\n","itemType":"prop"},"BYTES_PER_ELEMENT":{"name":"### BYTES_PER_ELEMENT","description":"数组中每个元素的字节大小。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"buffer":{"name":"### buffer","description":"数组引用的ArrayBuffer实例。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"byteLength":{"name":"### byteLength","description":"数组的字节长度。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"byteOffset":{"name":"### byteOffset","description":"数组的字节偏移量。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"copyWithin":{"name":"### copyWithin(target, start, end?)","description":"返回this对象,将数组中由start和end标识的部分复制到从位置target开始的相同数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| target | number | 是 | - | - | 如果target为负数,则视为length+target,其中length为数组的长度。 |\n| start | number | 是 | - | - | 如果start为负数,则视为length+start。如果省略end,则使用this对象的长度作为其默认值。 |\n| end | number | 否 | - | - | 如果未指定,默认使用this对象的长度。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| this | 修改后的类型化数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n console.log(\"testCopyWith 1\");\n let uint8Clamped = new Uint8ClampedArray(8);\n uint8Clamped.set([1, 2, 3], 1);\n uint8Clamped.copyWithin(3, 0, 3);\n console.log(uint8Clamped.toString()); // \"0,1,2,0,1,2,0,0\"\n```"},"every":{"name":"### every(predicate)","description":"确定数组的所有成员是否满足指定的测试。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, array: Uint8ClampedArray) => any | 是 | - | - | 一个最多接受三个参数的函数。every方法对数组中的每个元素调用predicate函数,直到predicate返回一个可转换为布尔值false的值,或者直到数组结束。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 返回 true,除非 callbackFn 对类型化数组中的某个元素返回了假值(在这种情况下,立即返回 false)。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n // const isBelowThreshold = (currentValue: number, index: number, array:Uint8ClampedArray): boolean => currentValue < 40; \n let result = new Uint8ClampedArray([12, 5, 8, 130, 44]).every((value : number, _ : number, _a :\n Uint8ClampedArray) : boolean => value < 40);\n console.log(result); // false\n```"},"fill":{"name":"### fill(value, start?, end?)","description":"将数组中的所有元素更改为静态值value,并返回修改后的数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| value | number | 是 | - | - | 用于填充数组部分的值。 |\n| start | number | 否 | - | - | 开始填充数组的索引。如果start为负数,则视为length+start,其中length为数组的长度。 |\n| end | number | 否 | - | - | 停止填充数组的索引。如果end为负数,则视为length+end。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| this | 修改后的类型化数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint8Clamped_t1 = new Uint8ClampedArray([1, 2, 3]).fill(4);\n console.log(uint8Clamped_t1.toString()); // \"4,4,4\"\n\n let uint8Clamped_t2 = new Uint8ClampedArray([1, 2, 3]).fill(4, 1);\n console.log(uint8Clamped_t2.toString()); // \"1,4,4\"\n\n let uint8Clamped_t3 = new Uint8ClampedArray([1, 2, 3]).fill(4, 1, 2);\n console.log(uint8Clamped_t3.toString()); // \"1,4,3\"\n\n let uint8Clamped_t4 = new Uint8ClampedArray([1, 2, 3]).fill(4, 1, 1);\n console.log(uint8Clamped_t4.toString()); // \"1,2,3\"\n\n let uint8Clamped_t5 = new Uint8ClampedArray([1, 2, 3]).fill(4, -3, -2);\n console.log(uint8Clamped_t5.toString()); // \"4,2,3\"\n\n```"},"filter":{"name":"### filter(predicate)","description":"返回满足回调函数中指定条件的数组元素。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, array: Uint8ClampedArray) => any | 是 | - | - | 一个最多接受三个参数的函数。filter方法对数组中的每个元素调用predicate函数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Uint8ClampedArray | 新的类型化数组,含有通过测试的元素 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n // const isBelowThreshold = (currentValue: number, index: number, _): boolean => currentValue >= 10;\n\n let uint8Clamped = new Uint8ClampedArray([12, 5, 8, 44]).filter((value : number, _ : number, _a :\n Uint8ClampedArray) : boolean => value >= 10);\n console.log(uint8Clamped.toString()); // \"12,44\"\n```"},"find":{"name":"### find(predicate)","description":"返回数组中第一个满足条件的元素的值,否则返回undefined。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, obj: Uint8ClampedArray) => boolean | 是 | - | - | 对数组中的每个元素调用一次predicate,直到找到一个使predicate返回true的元素为止。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number \\| null | 如果元素通过了测试,则为该元素,否则为undefined。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint8Clamped = new Uint8ClampedArray([4, 5, 8, 12]);\n let res = uint8Clamped.find((value : number, _ : number, _a : Uint8ClampedArray) : boolean => value > 5);\n console.log(res); // 8\n```"},"findIndex":{"name":"### findIndex(predicate)","description":"返回数组中第一个满足条件的元素的索引,否则返回-1。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, obj: Uint8ClampedArray) => boolean | 是 | - | - | 对数组中的每个元素调用一次predicate,直到找到一个使predicate返回true的元素为止。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 如果元素通过了测试,则为数组下标,否则为 -1。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint8Clamped_t1 = new Uint8ClampedArray([4, 6, 8, 12]);\n let res1 = uint8Clamped_t1.findIndex((value : number, _ : number, _a : Uint8ClampedArray) : boolean => value > 100);\n console.log(res1); // -1\n\n let uint8Clamped_t2 = new Uint8ClampedArray([4, 6, 7, 120]);\n let res2 = uint8Clamped_t2.findIndex((value : number, _ : number, _a : Uint8ClampedArray) : boolean => value > 100);\n console.log(res2); // 3\n\n```"},"forEach":{"name":"### forEach(callbackfn)","description":"对数组的每个元素执行指定的操作。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (value: number, index: number, array: Uint8ClampedArray) => void | 是 | - | - | 一个最多接受三个参数的函数。forEach方法对数组中的每个元素调用callbackfn函数。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n new Uint8ClampedArray([0, 1, 2, 3]).forEach((value : number, index : number, _ : Uint8ClampedArray) => {\n console.log(`a[${index}] = ${value}`);\n });\n```"},"indexOf":{"name":"### indexOf(searchElement, fromIndex?)","description":"返回数组中第一个出现的指定值的索引,如果不存在则返回-1。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| searchElement | number | 是 | - | - | 要在数组中查找的值。 |\n| fromIndex | number | 否 | - | - | 开始搜索的数组索引。如果省略,则从索引0开始搜索。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 数组中元素的第一个下标;没有找到则返回**-1** 。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint8Clamped_t1 = new Uint8ClampedArray([2, 5, 9]);\n let res1 = uint8Clamped_t1.indexOf(2);\n console.log(res1); // 0\n\n let uint8Clamped_t2 = new Uint8ClampedArray([2, 5, 9]);\n let res2 = uint8Clamped_t2.indexOf(7);\n console.log(res2); // -1\n\n let uint8Clamped_t3 = new Uint8ClampedArray([2, 5, 9]);\n let res3 = uint8Clamped_t3.indexOf(9, 2);\n console.log(res3); // 2\n\n let uint8Clamped_t4 = new Uint8ClampedArray([2, 5, 9]);\n let res4 = uint8Clamped_t4.indexOf(2, -1);\n console.log(res4); // -1\n\n let uint8Clamped_t5 = new Uint8ClampedArray([2, 5, 9]);\n let res5 = uint8Clamped_t5.indexOf(2, -3);\n console.log(res5); // 0\n\n```"},"join":{"name":"### join(separator?)","description":"将数组中所有元素连接成一个字符串。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| separator | string | 否 | - | - | 用于分隔数组元素的字符串。如果省略,则使用逗号分隔数组元素。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 所有元素连接后的字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint8Clamped_t1 = new Uint8ClampedArray([1, 2, 3]);\n let res1 = uint8Clamped_t1.join();\n console.log(res1); // \"1,2,3\"\n\n let uint8Clamped_t2 = new Uint8ClampedArray([1, 2, 3]);\n let res2 = uint8Clamped_t2.join(\" / \");\n console.log(res2); // \"1 / 2 / 3\"\n\n let uint8Clamped_t3 = new Uint8ClampedArray([1, 2, 3]);\n let res3 = uint8Clamped_t3.join(\"\");\n console.log(res3); // \"123\"\n\n```"},"map":{"name":"### map(callbackfn)","description":"对数组的每个元素执行指定的操作,并返回包含执行结果的数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (value: number, index: number, array: Uint8ClampedArray) => number | 是 | - | - | 一个最多接受三个参数的函数。map方法对数组中的每个元素调用callbackfn函数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Uint8ClampedArray | 新的类型化数组 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let numbers = new Uint8ClampedArray([1, 4, 9]);\n let doubles = numbers.map((value : number, _ : number, _a : Uint8ClampedArray) : number => value * 2);\n console.log(numbers.toString()); // \"1,4,9\"\n console.log(doubles.toString()); // \"2,8,18\"\n```"},"reduce":{"name":"### reduce(callbackfn)","description":"对数组的每个元素执行指定的累加操作。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number | 是 | - | - | 一个最多接受四个参数的函数。reduce方法对数组中的每个元素调用callbackfn函数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 由归约返回的结果。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let total_t1 = new Uint8ClampedArray([0, 1, 2, 3]);\n let res1 = total_t1.reduce((accumulator : number, currentValue : number, _ : number, _a : Uint8ClampedArray) : number =>\n accumulator + currentValue);\n console.log(res1); // 6\n\n let total_t2 = new Uint8ClampedArray([0, 1, 2, 3]);\n let res2 = total_t2.reduce((accumulator : number, currentValue : number, _ : number, _a : Uint8ClampedArray) : number =>\n accumulator + currentValue, 8);\n console.log(res2); // 14\n\n```"},"reduceRight":{"name":"### reduceRight(callbackfn)","description":"对数组的每个元素执行指定的累加操作,从右向左处理。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number | 是 | - | - | 一个最多接受四个参数的函数。reduceRight方法从数组的最后一个元素向第一个元素逐个调用callbackfn函数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 由归约返回的结果。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let total_t1 = new Uint8ClampedArray([0, 1, 2, 3]);\n let res1 = total_t1.reduceRight((accumulator : number, currentValue : number, _ : number, _a : Uint8ClampedArray) : number =>\n accumulator + currentValue);\n console.log(res1); // 6\n\n let total_t2 = new Uint8ClampedArray([0, 1, 2, 3]);\n let res2 = total_t2.reduceRight((accumulator : number, currentValue : number, _ : number, _a : Uint8ClampedArray) : number =>\n accumulator + currentValue, 8);\n console.log(res2); // 14\n\n```"},"reverse":{"name":"### reverse()","description":"反转数组中的元素。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Uint8ClampedArray | 翻转的数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint8Clamped = new Uint8ClampedArray([1, 2, 3]);\n uint8Clamped.reverse();\n console.log(uint8Clamped.toString()); // \"3,2,1\"\n```"},"set":{"name":"### set(array, offset?)","description":"设置一个值或数组的值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| array | ArrayLike\\<number> | 是 | - | - | 要设置的值或数组。 |\n| offset | number | 否 | - | - | 要写入值的当前数组中的索引。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint8Clamped = new Uint8ClampedArray(8);\n var array = [1, 2, 3];\n uint8Clamped.set(array, 1);\n console.log(uint8Clamped.toString()); // \"0,1,2,3,0,0,0,0\"\n```"},"slice":{"name":"### slice(start?, end?)","description":"返回数组的一部分。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| start | number | 否 | - | - | 指定部分的起始索引。 |\n| end | number | 否 | - | - | 指定部分的结束索引。不包括索引'end'处的元素。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Uint8ClampedArray | 包含取出元素的新 typed array。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint8Clamped_t1 = new Uint8ClampedArray([1, 2, 3]);\n let res1 = uint8Clamped_t1.slice(1);\n console.log(res1.toString()); // \"2,3\"\n\n let res2 = uint8Clamped_t1.slice(2);\n console.log(res2.toString()); // \"3\"\n\n let res3 = uint8Clamped_t1.slice(-2);\n console.log(res3.toString()); // \"2,3\"\n\n let res4 = uint8Clamped_t1.slice(0, 1);\n console.log(res4.toString()); // \"1\"\n```"},"some":{"name":"### some(predicate)","description":"确定数组的任何元素是否满足指定的测试。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, array: Uint8ClampedArray) => any | 是 | - | - | 一个最多接受三个参数的函数。some方法对数组中的每个元素调用predicate函数,直到predicate返回一个可转换为布尔值true的值,或者直到数组结束。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | true 如果 callback 函数以任一数组元素为参数调用时,返回 true; 否则,false. | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n const uint8Clamped = new Uint8ClampedArray([8, 20, 30, 40, 50]);\n const positives = new Uint8ClampedArray([10, 20, 30, 40, 50]);\n\n console.log(uint8Clamped.some((element : number, index : number, array : Uint8ClampedArray) : boolean =>\n element < 10\n )); // true\n\n\n console.log(positives.some((element : number, index : number, array : Uint8ClampedArray) : boolean =>\n element < 0\n )); // false\n```"},"sort":{"name":"### sort(compareFn?)","description":"对数组进行排序。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| compareFn | (a: number, b: number) => number | 否 | - | - | 用于确定元素顺序的函数。如果省略,则元素按升序排序。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| this | 排序后的类型化数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint8Clamped_t1 = new Uint8ClampedArray([40, 1, 5]);\n uint8Clamped_t1.sort();\n let res1 = uint8Clamped_t1.toString();\n console.log(res1); // \"1,5,40\"\n\n uint8Clamped_t1.sort((a, b) : number => a - b);\n let res2 = uint8Clamped_t1.toString();\n console.log(res2); // \"1,5,40\"\n```"},"subarray":{"name":"### subarray(begin?, end?)","description":"获取此数组的ArrayBuffer存储的新的Uint8ClampedArray视图,引用从begin(包括)到end(不包括)的元素。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| begin | number | 否 | - | - | 开始数组的索引。 |\n| end | number | 否 | - | - | 结束数组的索引。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Uint8ClampedArray | 一个新的 TypedArray 对象。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let buffer = new ArrayBuffer(16);\n let uint8Clamped_t1 = new Uint8ClampedArray(buffer);\n uint8Clamped_t1.set([1, 2, 3]);\n let res1 = uint8Clamped_t1.toString();\n console.log(res1); // \"1,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0\"\n\n let sub = uint8Clamped_t1.subarray(0, 4);\n let res2 = sub.toString();\n console.log(res2); // \"1,2,3,0\"\n```"},"toString":{"name":"### toString()","description":"返回数组的字符串表示形式。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 一个字符串,表示类型数组 (typed array) 的元素。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method"},"valueOf":{"name":"### valueOf()","description":"返回指定对象的原始值。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Iterator\\<Number> | 新的 Array Iterator 对象。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method"},"entries":{"name":"### entries()","description":"为数组中的每个条目返回一个键值对数组","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| IterableIterator\\<\\[number, number] | 数组条目的键值对迭代器 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let arr = new Uint8ClampedArray([10, 20, 30, 40, 50]);\n let entries = arr.entries();\n let entry = entries.next().value;\n console.log(entry[1]); // 10\n```"},"includes":{"name":"### includes(searchElement, fromIndex?)","description":"确定数组是否包含某个元素,返回 true 或 false。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| searchElement | number | 是 | - | - | 要搜索的元素。 |\n| fromIndex | number | 否 | - | - | 开始搜索 searchElement 的数组位置。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 如果数组包含指定的元素则返回 true,否则返回 false。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.23 | x | √ | √ | √ |\n","itemType":"method","test":"```uts\n let uint8Clamped_t1 = new Uint8ClampedArray([1, 2, 3]);\n let res1 = uint8Clamped_t1.includes(2);\n console.log(res1); // true\n\n let uint8Clamped_t2 = new Uint8ClampedArray([1, 2, 3]);\n let res2 = uint8Clamped_t2.includes(4);\n console.log(res2); // false\n\n let uint8Clamped_t3 = new Uint8ClampedArray([1, 2, 3]);\n let res3 = uint8Clamped_t3.includes(3, 3);\n console.log(res3); // false\n\n```"},"keys":{"name":"### keys()","description":"返回数组中的键列表","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| IterableIterator\\<number> | 数组键的迭代器 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let arr = new Uint8ClampedArray([10, 20, 30, 40, 50]);\n let keys = arr.keys();\n let value = keys.next().value\n console.log(value); // 0\n```"},"values":{"name":"### values()","description":"返回数组中的值列表","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| IterableIterator\\<number> | 数组值的迭代器 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let arr = new Uint8ClampedArray([1, 2, 3]);\n let values = arr.values();\n let value = values.next().value\n console.log(value); // 1\n```"},"Constructor":{"name":"### Constructor(length)","description":"初始化一个对象","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| length | number | 是 | - | - | 当使用非对象调用时,该参数将被视为指定类型化数组长度的数字。在内存中创建一个内部数组缓冲区,大小长度乘以 BYTES_PER_ELEMENT 字节,用 0 填充。省略所有参数,等同于使用 0 作为参数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Uint8ClampedArray | 实例对象 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.23 | x | √ | √ | √ |\n","itemType":"method"},"Constructor_1":{"name":"### Constructor(array)","description":"初始化一个对象","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| array | ArrayLike\\<number> \\| ArrayBufferLike | 是 | - | - | 当使用 TypedArray 子类的实例调用时,typedArray 会被拷贝到一个新的类型数组中。对于非 bigint TypeedArray 构造函数,typedArray 参数仅可以是非 bigint 类型(例如 Int32Array)。同样,对于 bigint TypedArray 构造函数(BigInt64Array 或 BigUint64Array),typedArray 参数仅可以是 bigint 类型。typedArray 中的每个值在拷贝到新数组之前都转换为构造函数的相应类型。新的类型化数组的长度与 typedArray 参数的长度相同。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Uint8ClampedArray | 实例对象 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method"},"Constructor_2":{"name":"### Constructor(buffer, byteOffset?, length?)","description":"当使用 ArrayBuffer 实例以及可选的 byteOffset 和 length 参数调用时,将创建一个新的指定缓冲区的类型化数组视图。byteOffset 和 length 参数指定类型化数组视图将暴露的内存范围。如果忽略这两个参数,则是整个视图的所有 buffer;如果仅忽略 length,则是从 byteOffset 开始的 buffer 剩余部分的视图。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| buffer | [ArrayBufferLike](#arraybufferlike-values) | 是 | - | - | ArrayBuffer实例 |\n| byteOffset | number | 否 | - | - | 可选,偏移量,单位字节 |\n| length | number | 否 | - | - | 可选,长度 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Uint8ClampedArray | 实例对象 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.23 | x | √ | √ | √ |\n","itemType":"method"},"of":{"name":"### of(...items)","description":"从一组元素创建一个新数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| items | number[\\] | 是 | - | - | 要包含在新数组对象中的一组元素。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Uint8ClampedArray | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n var array = Uint8ClampedArray.of(1, 2, 3)\n console.log(array.toString()); // '1,2,3'\n```"},"from":{"name":"### from(arrayLike, mapfn?)","description":"从类似数组或可迭代对象创建数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| arrayLike | ArrayLike\\<number> | 是 | - | - | 要转换为数组的类似数组或可迭代对象。 |\n| mapfn | (v: number, k: number) => number | 否 | - | - | 可选参数。如果指定了该参数,则最后生成的类型数组会经过该函数的加工处理后再返回。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Uint8ClampedArray | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n var array = Uint8ClampedArray.from([1, 2, 3], (v : number, _ : number) : number => v + v);\n console.log(array.toString()); // '2,4,6'\n```"}},"Uint16Array":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.buildInObject.Uint16Array)","length":{"name":"### length","description":"数组的长度","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.23 | x | √ | √ | √ |\n","itemType":"prop"},"BYTES_PER_ELEMENT":{"name":"### BYTES_PER_ELEMENT","description":"数组中每个元素的字节大小。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"buffer":{"name":"### buffer","description":"数组引用的ArrayBuffer实例。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"byteLength":{"name":"### byteLength","description":"数组的字节长度。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"byteOffset":{"name":"### byteOffset","description":"数组的字节偏移量。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"copyWithin":{"name":"### copyWithin(target, start, end?)","description":"返回this对象,将数组中由start和end标识的部分复制到从位置target开始的相同数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| target | number | 是 | - | - | 如果target为负数,则视为length+target,其中length为数组的长度。 |\n| start | number | 是 | - | - | 如果start为负数,则视为length+start。如果省略end,则使用this对象的长度作为其默认值。 |\n| end | number | 否 | - | - | 如果未指定,默认使用this对象的长度。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| this | 修改后的类型化数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n console.log(\"testCopyWith 1\");\n let uint16 = new Uint16Array(8);\n uint16.set([1, 2, 3], 1);\n console.log(\"testCopyWith 2\");\n uint16.copyWithin(3, 0, 3);\n console.log(\"testCopyWith 3\");\n console.log(uint16.toString()); // \"0,1,2,0,1,2,0,0\"\n```"},"every":{"name":"### every(predicate)","description":"确定数组的所有成员是否满足指定的测试。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, array: Uint16Array) => any | 是 | - | - | 一个最多接受三个参数的函数。every方法对数组中的每个元素调用predicate函数,直到predicate返回一个可转换为布尔值false的值,或者直到数组结束。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 返回 true,除非 callbackFn 对类型化数组中的某个元素返回了假值(在这种情况下,立即返回 false)。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let result = new Uint16Array([12, 5, 8, 130, 44]).every((value : number, _ : number, _a : Uint16Array) :\n boolean => value < 40);\n console.log(result); // false\n```"},"fill":{"name":"### fill(value, start?, end?)","description":"将数组中的所有元素更改为静态值value,并返回修改后的数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| value | number | 是 | - | - | 用于填充数组部分的值。 |\n| start | number | 否 | - | - | 开始填充数组的索引。如果start为负数,则视为length+start,其中length为数组的长度。 |\n| end | number | 否 | - | - | 停止填充数组的索引。如果end为负数,则视为length+end。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| this | 修改后的类型化数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint16 = new Uint16Array([1, 2, 3]).fill(4);\n console.log(uint16.toString()); // \"4,4,4\"\n\n let uint16_t1 = new Uint16Array([1, 2, 3]).fill(4, 1);\n console.log(uint16_t1.toString()); // \"1,4,4\"\n\n let uint16_t2 = new Uint16Array([1, 2, 3]).fill(4, 1, 2);\n console.log(uint16_t2.toString()); // \"1,4,3\"\n\n let uint16_t3 = new Uint16Array([1, 2, 3]).fill(4, 1, 1);\n console.log(uint16_t3.toString()); // \"1,2,3\"\n\n let uint16_t4 = new Uint16Array([1, 2, 3]).fill(4, -3, -2);\n console.log(uint16_t4.toString()); // \"4,2,3\"\n```"},"filter":{"name":"### filter(predicate)","description":"返回满足回调函数中指定条件的数组元素。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, array: Uint16Array) => any | 是 | - | - | 一个最多接受三个参数的函数。filter方法对数组中的每个元素调用predicate函数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Uint16Array | 新的类型化数组,含有通过测试的元素 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint16 = new Uint16Array([12, 5, 8, 44]).filter((value : number, _ : number, _a : Uint16Array) :\n boolean => value >= 10);\n console.log(uint16.toString()); // \"12,44\"\n```"},"find":{"name":"### find(predicate)","description":"返回数组中第一个满足条件的元素的值,否则返回undefined。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, obj: Uint16Array) => boolean | 是 | - | - | 对数组中的每个元素调用一次predicate,直到找到一个使predicate返回true的元素为止。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number \\| null | 如果元素通过了测试,则为该元素,否则为undefined。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint16 = new Uint16Array([4, 5, 8, 12]);\n let res = uint16.find((value : number, _ : number, _a : Uint16Array) : boolean => value > 5);\n console.log(res); // 8\n```"},"findIndex":{"name":"### findIndex(predicate)","description":"返回数组中第一个满足条件的元素的索引,否则返回-1。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, obj: Uint16Array) => boolean | 是 | - | - | 对数组中的每个元素调用一次predicate,直到找到一个使predicate返回true的元素为止。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 如果元素通过了测试,则为数组下标,否则为 -1。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint16 = new Uint16Array([4, 6, 8, 12]);\n let res = uint16.findIndex((value : number, _ : number, _a : Uint16Array) : boolean => value > 100);\n console.log(res); // -1\n\n\n let uuint16 = new Uint16Array([4, 6, 7, 120]);\n let res1 = uuint16.findIndex((value : number, _ : number, _a : Uint16Array) : boolean => value > 100);\n console.log(res1); // 3\n```"},"forEach":{"name":"### forEach(callbackfn)","description":"对数组的每个元素执行指定的操作。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (value: number, index: number, array: Uint16Array) => void | 是 | - | - | 一个最多接受三个参数的函数。forEach方法对数组中的每个元素调用callbackfn函数。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n new Uint16Array([0, 1, 2, 3]).forEach((value : number, index : number, _a : Uint16Array) => {\n console.log(`a[${index}] = ${value}`);\n });\n```"},"indexOf":{"name":"### indexOf(searchElement, fromIndex?)","description":"返回数组中第一个出现的指定值的索引,如果不存在则返回-1。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| searchElement | number | 是 | - | - | 要在数组中查找的值。 |\n| fromIndex | number | 否 | - | - | 开始搜索的数组索引。如果省略,则从索引0开始搜索。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 数组中元素的第一个下标;没有找到则返回**-1** 。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint16 = new Uint16Array([2, 5, 9]);\n\n let res1 = uint16.indexOf(2);\n console.log(res1); // 0\n\n let res2 = uint16.indexOf(7);\n console.log(res2); // -1\n\n let res3 = uint16.indexOf(9, 2);\n console.log(res3); // 2\n\n let res4 = uint16.indexOf(2, -1);\n console.log(res4); // -1\n\n let res5 = uint16.indexOf(2, -3);\n console.log(res5); // 0\n```"},"join":{"name":"### join(separator?)","description":"将数组中所有元素连接成一个字符串。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| separator | string | 否 | - | - | 用于分隔数组元素的字符串。如果省略,则使用逗号分隔数组元素。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 所有元素连接后的字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint16 = new Uint16Array([1, 2, 3]);\n let res1 = uint16.join();\n console.log(res1); // \"1,2,3\"\n\n let res2 = uint16.join(\" / \");\n console.log(res2); // \"1 / 2 / 3\"\n\n let res3 = uint16.join(\"\");\n console.log(res3); // \"123\"\n```"},"map":{"name":"### map(callbackfn)","description":"对数组的每个元素执行指定的操作,并返回包含执行结果的数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (value: number, index: number, array: Uint16Array) => number | 是 | - | - | 一个最多接受三个参数的函数。map方法对数组中的每个元素调用callbackfn函数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Uint16Array | 新的类型化数组 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let numbers = new Uint16Array([1, 4, 9]);\n let doubles = numbers.map((value : number, _ : number, _a : Uint16Array) : number => value * 2);\n console.log(numbers.toString()); // \"1,4,9\"\n console.log(doubles.toString()); // \"2,8,18\"\n```"},"reduce":{"name":"### reduce(callbackfn)","description":"对数组的每个元素执行指定的累加操作。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number | 是 | - | - | 一个最多接受四个参数的函数。reduce方法对数组中的每个元素调用callbackfn函数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 由归约返回的结果。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let total = new Uint16Array([0, 1, 2, 3]);\n let res1 = total.reduce((accumulator : number, currentValue : number, _ : number, _a : Uint16Array) : number =>\n accumulator + currentValue\n );\n console.log(res1); // 6\n\n total = new Uint16Array([0, 1, 2, 3]);\n let res2 = total.reduce((accumulator : number, currentValue : number, _ : number, _a : Uint16Array) : number =>\n accumulator + currentValue, 8\n );\n console.log(res2); // 14\n```"},"reduceRight":{"name":"### reduceRight(callbackfn)","description":"对数组的每个元素执行指定的累加操作,从右向左处理。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number | 是 | - | - | 一个最多接受四个参数的函数。reduceRight方法从数组的最后一个元素向第一个元素逐个调用callbackfn函数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 由归约返回的结果。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let total = new Uint16Array([0, 1, 2, 3]);\n let res1 = total.reduceRight((accumulator : number, currentValue : number, _ : number, _a : Uint16Array) : number =>\n accumulator + currentValue\n );\n console.log(res1); // 6\n\n total = new Uint16Array([0, 1, 2, 3]);\n let res2 = total.reduceRight((accumulator : number, currentValue : number, _ : number, _a : Uint16Array) : number =>\n accumulator + currentValue, 8\n );\n console.log(res2); // 14\n```"},"reverse":{"name":"### reverse()","description":"反转数组中的元素。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Uint16Array | 翻转的数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint16 = new Uint16Array([1, 2, 3]);\n uint16.reverse();\n console.log(uint16.toString()); // \"3,2,1\"\n```"},"set":{"name":"### set(array, offset?)","description":"设置一个值或数组的值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| array | ArrayLike\\<number> | 是 | - | - | 要设置的值或数组。 |\n| offset | number | 否 | - | - | 要写入值的当前数组中的索引。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint16 = new Uint16Array(8);\n var array = [1, 2, 3];\n uint16.set(array, 1);\n console.log(uint16.toString()); // \"0,1,2,3,0,0,0,0\"\n```"},"slice":{"name":"### slice(start?, end?)","description":"返回数组的一部分。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| start | number | 否 | - | - | 指定部分的起始索引。 |\n| end | number | 否 | - | - | 指定部分的结束索引。不包括索引'end'处的元素。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Uint16Array | 包含取出元素的新 typed array。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint16 = new Uint16Array([1, 2, 3]);\n let res1 = uint16.slice(1);\n console.log(res1.toString()); // \"2,3\"\n\n let res2 = uint16.slice(2);\n console.log(res2.toString()); // \"3\"\n\n let res3 = uint16.slice(-2);\n console.log(res3.toString()); // \"2,3\"\n\n let res4 = uint16.slice(0, 1);\n console.log(res4.toString()); // \"1\"\n```"},"some":{"name":"### some(predicate)","description":"确定数组的任何元素是否满足指定的测试。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, array: Uint16Array) => any | 是 | - | - | 一个最多接受三个参数的函数。some方法对数组中的每个元素调用predicate函数,直到predicate返回一个可转换为布尔值true的值,或者直到数组结束。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | true 如果 callback 函数以任一数组元素为参数调用时,返回 true; 否则,false. | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n const uint16 = new Uint16Array([8, 20, 30, 40, 50]);\n const positives = new Uint16Array([10, 20, 30, 40, 50]);\n\n const res1 = uint16.some((element : number, index : number, array : Uint16Array) : boolean =>\n element < 10\n );\n console.log('uint16', res1); // true\n\n const res2 = positives.some((element : number, index : number, array : Uint16Array) : boolean =>\n element < 0\n );\n console.log('positives', res2); // false\n```"},"sort":{"name":"### sort(compareFn?)","description":"对数组进行排序。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| compareFn | (a: number, b: number) => number | 否 | - | - | 用于确定元素顺序的函数。如果省略,则元素按升序排序。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| this | 排序后的类型化数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let numbers = new Uint16Array([40, 1, 5]);\n numbers.sort();\n console.log(numbers.toString()); // \"1,5,40\"\n\n numbers.sort((a, b) : number => a - b);\n console.log(numbers.toString()); // \"1,5,40\"\n```"},"subarray":{"name":"### subarray(begin?, end?)","description":"获取此数组的ArrayBuffer存储的新的Uint16Array视图,引用从begin(包括)到end(不包括)的元素。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| begin | number | 否 | - | - | 开始数组的索引。 |\n| end | number | 否 | - | - | 结束数组的索引。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Uint16Array | 一个新的 TypedArray 对象。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let buffer = new ArrayBuffer(16);\n let uint16 = new Uint16Array(buffer);\n uint16.set([1, 2, 3]);\n console.log(uint16.toString()); // \"1,2,3,0,0,0,0,0\"\n\n let sub = uint16.subarray(0, 4);\n console.log(sub.toString()); // \"1,2,3,0\"\n```"},"toString":{"name":"### toString()","description":"返回数组的字符串表示形式。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 一个字符串,表示类型数组 (typed array) 的元素。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method"},"valueOf":{"name":"### valueOf()","description":"返回指定对象的原始值。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Iterator\\<Number> | 新的 Array Iterator 对象。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method"},"entries":{"name":"### entries()","description":"为数组中的每个条目返回一个键值对数组","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| IterableIterator\\<\\[number, number] | 数组条目的键值对迭代器 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let arr = new Uint16Array([10, 20, 30, 40, 50]);\n let entries = arr.entries();\n let entry = entries.next().value;\n console.log(entry[1]); // 10\n```"},"includes":{"name":"### includes(searchElement, fromIndex?)","description":"确定数组是否包含某个元素,返回 true 或 false。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| searchElement | number | 是 | - | - | 要搜索的元素。 |\n| fromIndex | number | 否 | - | - | 开始搜索 searchElement 的数组位置。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 如果数组包含指定的元素则返回 true,否则返回 false。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.23 | x | √ | √ | √ |\n","itemType":"method","test":"```uts\n let uint16 = new Uint16Array([1, 2, 3]);\n let res = uint16.includes(2);\n console.log(res); // true\n\n let res1 = uint16.includes(4);\n console.log(res1); // false\n\n let res2 = uint16.includes(3, 3);\n console.log(res2); // false\n```"},"keys":{"name":"### keys()","description":"返回数组中的键列表","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| IterableIterator\\<number> | 数组键的迭代器 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let arr = new Uint16Array([10, 20, 30, 40, 50]);\n let keys = arr.keys();\n let value = keys.next().value\n console.log(value); // 0\n```"},"values":{"name":"### values()","description":"返回数组中的值列表","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| IterableIterator\\<number> | 数组值的迭代器 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let arr = new Uint16Array([1, 2, 3]);\n let values = arr.values();\n let value = values.next().value\n console.log(value); // 1\n```"},"Constructor":{"name":"### Constructor(length)","description":"初始化一个对象","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| length | number | 是 | - | - | 当使用非对象调用时,该参数将被视为指定类型化数组长度的数字。在内存中创建一个内部数组缓冲区,大小长度乘以 BYTES_PER_ELEMENT 字节,用 0 填充。省略所有参数,等同于使用 0 作为参数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Uint16Array | 实例对象 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.23 | x | √ | √ | √ |\n","itemType":"method"},"Constructor_1":{"name":"### Constructor(array)","description":"初始化一个对象","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| array | ArrayLike\\<number> \\| ArrayBufferLike | 是 | - | - | 当使用 TypedArray 子类的实例调用时,typedArray 会被拷贝到一个新的类型数组中。对于非 bigint TypeedArray 构造函数,typedArray 参数仅可以是非 bigint 类型(例如 Int32Array)。同样,对于 bigint TypedArray 构造函数(BigInt64Array 或 BigUint64Array),typedArray 参数仅可以是 bigint 类型。typedArray 中的每个值在拷贝到新数组之前都转换为构造函数的相应类型。新的类型化数组的长度与 typedArray 参数的长度相同。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Uint16Array | 实例对象 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method"},"Constructor_2":{"name":"### Constructor(buffer, byteOffset?, length?)","description":"当使用 ArrayBuffer 实例以及可选的 byteOffset 和 length 参数调用时,将创建一个新的指定缓冲区的类型化数组视图。byteOffset 和 length 参数指定类型化数组视图将暴露的内存范围。如果忽略这两个参数,则是整个视图的所有 buffer;如果仅忽略 length,则是从 byteOffset 开始的 buffer 剩余部分的视图。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| buffer | [ArrayBufferLike](#arraybufferlike-values) | 是 | - | - | ArrayBuffer实例 |\n| byteOffset | number | 否 | - | - | 可选,偏移量,单位字节 |\n| length | number | 否 | - | - | 可选,长度 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Uint16Array | 实例对象 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.23 | x | √ | √ | √ |\n","itemType":"method"},"of":{"name":"### of(...items)","description":"从一组元素创建一个新数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| items | number[\\] | 是 | - | - | 要包含在新数组对象中的一组元素。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Uint16Array | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n var array = Uint16Array.of(1, 2, 3)\n console.log(array.toString()); // '1,2,3'\n```"},"from":{"name":"### from(arrayLike, mapfn?)","description":"从类似数组或可迭代对象创建数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| arrayLike | ArrayLike\\<number> | 是 | - | - | 要转换为数组的类似数组或可迭代对象。 |\n| mapfn | (v: number, k: number) => number | 否 | - | - | 可选参数。如果指定了该参数,则最后生成的类型数组会经过该函数的加工处理后再返回。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Uint16Array | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n var array = Uint16Array.from([1, 2, 3], (v : number, _ : number) : number => v + v);\n console.log(array.toString()); // '2,4,6'\n```"},"arrayBufferSlice":{"test":"```uts\n let buffer = new ArrayBuffer(16);\n let uint16 = new Uint16Array(buffer);\n uint16[4] = 42;\n console.log(uint16.toString()); // \"0,0,0,0,42,0,0,0\"\n\n let res = buffer.slice(8);\n let sliced = new Uint16Array(res);\n console.log(sliced[0]); // 42\n\n```"}},"Uint32Array":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.buildInObject.Uint32Array)","length":{"name":"### length","description":"数组的长度","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.23 | x | √ | √ | √ |\n","itemType":"prop"},"BYTES_PER_ELEMENT":{"name":"### BYTES_PER_ELEMENT","description":"数组中每个元素的字节大小。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"buffer":{"name":"### buffer","description":"数组引用的ArrayBuffer实例。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"byteLength":{"name":"### byteLength","description":"数组的字节长度。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"byteOffset":{"name":"### byteOffset","description":"数组的字节偏移量。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"copyWithin":{"name":"### copyWithin(target, start, end?)","description":"返回this对象,将数组中由start和end标识的部分复制到从位置target开始的相同数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| target | number | 是 | - | - | 如果target为负数,则视为length+target,其中length为数组的长度。 |\n| start | number | 是 | - | - | 如果start为负数,则视为length+start。如果省略end,则使用this对象的长度作为其默认值。 |\n| end | number | 否 | - | - | 如果未指定,默认使用this对象的长度。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| this | 修改后的类型化数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint32 = new Uint32Array(8);\n uint32.set([1, 2, 3], 1);\n uint32.copyWithin(3, 0, 3);\n let result2 = uint32.toString();\n console.log(result2); // \"0,1,2,0,1,2,0,0\"\n\n```"},"every":{"name":"### every(predicate)","description":"确定数组的所有成员是否满足指定的测试。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, array: Uint32Array) => any | 是 | - | - | 一个最多接受三个参数的函数。every方法对数组中的每个元素调用predicate函数,直到predicate返回一个可转换为布尔值false的值,或者直到数组结束。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 返回 true,除非 callbackFn 对类型化数组中的某个元素返回了假值(在这种情况下,立即返回 false)。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let result = new Uint32Array([12, 5, 8, 130, 44]).every((value : number, _ : number, _a : Uint32Array) : boolean => value < 40);\n console.log(result); // false\n```"},"fill":{"name":"### fill(value, start?, end?)","description":"将数组中的所有元素更改为静态值value,并返回修改后的数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| value | number | 是 | - | - | 用于填充数组部分的值。 |\n| start | number | 否 | - | - | 开始填充数组的索引。如果start为负数,则视为length+start,其中length为数组的长度。 |\n| end | number | 否 | - | - | 停止填充数组的索引。如果end为负数,则视为length+end。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| this | 修改后的类型化数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint32 = new Uint32Array([1, 2, 3]).fill(4);\n let result1 = uint32.toString();\n console.log(result1); // \"4,4,4\"\n\n uint32 = new Uint32Array([1, 2, 3]).fill(4, 1);\n let result2 = uint32.toString();\n console.log(result2); // \"1,4,4\"\n\n uint32 = new Uint32Array([1, 2, 3]).fill(4, 1, 2);\n let result3 = uint32.toString();\n console.log(result3); // \"1,4,3\"\n\n uint32 = new Uint32Array([1, 2, 3]).fill(4, 1, 1);\n let result4 = uint32.toString();\n console.log(result4); // \"1,2,3\"\n\n uint32 = new Uint32Array([1, 2, 3]).fill(4, -3, -2);\n let result5 = uint32.toString();\n console.log(result5); // \"4,2,3\"\n\n```"},"filter":{"name":"### filter(predicate)","description":"返回满足回调函数中指定条件的数组元素。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, array: Uint32Array) => any | 是 | - | - | 一个最多接受三个参数的函数。filter方法对数组中的每个元素调用predicate函数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Uint32Array | 新的类型化数组,含有通过测试的元素 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint32 = new Uint32Array([12, 5, 8, 44]).filter((value : number, _ : number, _a : Uint32Array) : boolean => value >= 10);\n console.log(uint32.toString()); // \"12,44\"\n```"},"find":{"name":"### find(predicate)","description":"返回数组中第一个满足条件的元素的值,否则返回undefined。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, obj: Uint32Array) => boolean | 是 | - | - | 对数组中的每个元素调用一次predicate,直到找到一个使predicate返回true的元素为止。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number \\| null | 如果元素通过了测试,则为该元素,否则为undefined。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint32 = new Uint32Array([4, 5, 8, 12]);\n let res = uint32.find((value : number, _ : number, _a : Uint32Array) : boolean => value > 5);\n console.log(res); // 8\n```"},"findIndex":{"name":"### findIndex(predicate)","description":"返回数组中第一个满足条件的元素的索引,否则返回-1。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, obj: Uint32Array) => boolean | 是 | - | - | 对数组中的每个元素调用一次predicate,直到找到一个使predicate返回true的元素为止。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 如果元素通过了测试,则为数组下标,否则为 -1。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint32 = new Uint32Array([4, 6, 8, 12]);\n\n let res1 = uint32.findIndex((value : number, _ : number, _a : Uint32Array) : boolean => value > 100);\n console.log(res1); // -1\n\n let res2 = new Uint32Array([4, 6, 7, 120]).findIndex((value : number, _ : number, _a : Uint32Array) : boolean => value > 100);\n console.log(res2); // 3\n\n```"},"forEach":{"name":"### forEach(callbackfn)","description":"对数组的每个元素执行指定的操作。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (value: number, index: number, array: Uint32Array) => void | 是 | - | - | 一个最多接受三个参数的函数。forEach方法对数组中的每个元素调用callbackfn函数。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n new Uint32Array([0, 1, 2, 3]).forEach((value : number, index : number, _a : Uint32Array) => {\n console.log(`a[${index}] = ${value}`);\n });\n```"},"indexOf":{"name":"### indexOf(searchElement, fromIndex?)","description":"返回数组中第一个出现的指定值的索引,如果不存在则返回-1。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| searchElement | number | 是 | - | - | 要在数组中查找的值。 |\n| fromIndex | number | 否 | - | - | 开始搜索的数组索引。如果省略,则从索引0开始搜索。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 数组中元素的第一个下标;没有找到则返回**-1** 。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint32 = new Uint32Array([2, 5, 9]);\n\n let res1 = uint32.indexOf(2);\n console.log(res1); // 0\n\n let res2 = uint32.indexOf(7);\n console.log(res2); // -1\n\n let res3 = uint32.indexOf(9, 2);\n console.log(res3); // 2\n\n let res4 = uint32.indexOf(2, -1);\n console.log(res4); // -1\n\n let res5 = uint32.indexOf(2, -3);\n console.log(res5); // 0\n\n```"},"join":{"name":"### join(separator?)","description":"将数组中所有元素连接成一个字符串。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| separator | string | 否 | - | - | 用于分隔数组元素的字符串。如果省略,则使用逗号分隔数组元素。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 所有元素连接后的字符串。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint32 = new Uint32Array([1, 2, 3]);\n\n let res1 = uint32.join();\n console.log(res1); // \"1,2,3\"\n\n let res2 = uint32.join(\" / \");\n console.log(res2); // \"1 / 2 / 3\"\n\n let res3 = uint32.join(\"\");\n console.log(res3); // \"123\"\n\n```"},"map":{"name":"### map(callbackfn)","description":"对数组的每个元素执行指定的操作,并返回包含执行结果的数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (value: number, index: number, array: Uint32Array) => number | 是 | - | - | 一个最多接受三个参数的函数。map方法对数组中的每个元素调用callbackfn函数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Uint32Array | 新的类型化数组 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let numbers = new Uint32Array([1, 4, 9]);\n let doubles = numbers.map((value : number, _ : number, _a : Uint32Array) : number => value * 2);\n console.log(numbers.toString()); // \"1,4,9\"\n console.log(doubles.toString()); // \"2,8,18\"\n```"},"reduce":{"name":"### reduce(callbackfn)","description":"对数组的每个元素执行指定的累加操作。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number | 是 | - | - | 一个最多接受四个参数的函数。reduce方法对数组中的每个元素调用callbackfn函数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 由归约返回的结果。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let total = new Uint32Array([0, 1, 2, 3]);\n\n let res1 = total.reduce((accumulator : number, currentValue : number, _ : number, _a : Uint32Array) : number => accumulator + currentValue);\n console.log(res1); // 6\n\n total = new Uint32Array([0, 1, 2, 3]);\n let res2 = total.reduce((accumulator : number, currentValue : number, _ : number, _a : Uint32Array) : number => accumulator + currentValue, 8);\n console.log(res2); // 14\n\n```"},"reduceRight":{"name":"### reduceRight(callbackfn)","description":"对数组的每个元素执行指定的累加操作,从右向左处理。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackfn | (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number | 是 | - | - | 一个最多接受四个参数的函数。reduceRight方法从数组的最后一个元素向第一个元素逐个调用callbackfn函数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 由归约返回的结果。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let total = new Uint32Array([0, 1, 2, 3]);\n\n let res1 = total.reduceRight((accumulator : number, currentValue : number, _ : number, _a : Uint32Array) : number => accumulator + currentValue);\n console.log(res1); // 6\n\n total = new Uint32Array([0, 1, 2, 3]);\n let res2 = total.reduceRight((accumulator : number, currentValue : number, _ : number, _a : Uint32Array) : number => accumulator + currentValue, 8);\n console.log(res2); // 14\n\n```"},"reverse":{"name":"### reverse()","description":"反转数组中的元素。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Uint32Array | 翻转的数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint32 = new Uint32Array([1, 2, 3]);\n uint32.reverse();\n console.log(uint32.toString()); // \"3,2,1\"\n```"},"set":{"name":"### set(array, offset?)","description":"设置一个值或数组的值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| array | ArrayLike\\<number> | 是 | - | - | 要设置的值或数组。 |\n| offset | number | 否 | - | - | 要写入值的当前数组中的索引。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint32 = new Uint32Array(8);\n var array = [1, 2, 3];\n uint32.set(array, 1);\n console.log(uint32.toString()); // \"0,1,2,3,0,0,0,0\"\n```"},"slice":{"name":"### slice(start?, end?)","description":"返回数组的一部分。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| start | number | 否 | - | - | 指定部分的起始索引。 |\n| end | number | 否 | - | - | 指定部分的结束索引。不包括索引'end'处的元素。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Uint32Array | 包含取出元素的新 typed array。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let uint32 = new Uint32Array([1, 2, 3]);\n\n let res1 = uint32.slice(1);\n let res1String = res1.toString();\n console.log(res1String); // \"2,3\"\n\n let res2 = uint32.slice(2);\n let res2String = res2.toString();\n console.log(res2String); // \"3\"\n\n let res3 = uint32.slice(-2);\n let res3String = res3.toString();\n console.log(res3String); // \"2,3\"\n\n let res4 = uint32.slice(0, 1);\n let res4String = res4.toString();\n console.log(res4String); // \"1\"\n\n```"},"some":{"name":"### some(predicate)","description":"确定数组的任何元素是否满足指定的测试。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| predicate | (value: number, index: number, array: Uint32Array) => any | 是 | - | - | 一个最多接受三个参数的函数。some方法对数组中的每个元素调用predicate函数,直到predicate返回一个可转换为布尔值true的值,或者直到数组结束。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | true 如果 callback 函数以任一数组元素为参数调用时,返回 true; 否则,false. | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n const uint32 = new Uint32Array([8, 20, 30, 40, 50]);\n const positives = new Uint32Array([10, 20, 30, 40, 50]);\n\n let result1 = uint32.some((element : number, index : number, array : Uint32Array) : boolean =>\n element < 10\n );\n console.log(result1); // true\n\n let result2 = positives.some((element : number, index : number, array : Uint32Array) : boolean =>\n element < 0\n );\n console.log(result2); // false\n```"},"sort":{"name":"### sort(compareFn?)","description":"对数组进行排序。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| compareFn | (a: number, b: number) => number | 否 | - | - | 用于确定元素顺序的函数。如果省略,则元素按升序排序。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| this | 排序后的类型化数组。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let numbers = new Uint32Array([40, 1, 5]);\n let numbersString = numbers.toString();\n console.log(numbersString); // \"1,5,40\"\n\n numbers.sort((a, b) : number => a - b);\n let sortedString = numbers.toString();\n console.log(sortedString); // \"1,5,40\"\n```"},"subarray":{"name":"### subarray(begin?, end?)","description":"获取此数组的ArrayBuffer存储的新的Uint32Array视图,引用从begin(包括)到end(不包括)的元素。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| begin | number | 否 | - | - | 开始数组的索引。 |\n| end | number | 否 | - | - | 结束数组的索引。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Uint32Array | 一个新的 TypedArray 对象。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let buffer = new ArrayBuffer(16);\n let uint32 = new Uint32Array(buffer);\n uint32.set([1, 2, 3]);\n let uint32String = uint32.toString();\n console.log(uint32String); // \"1,2,3,0\"\n\n let sub = uint32.subarray(0, 4);\n let subString = sub.toString();\n console.log(subString); // \"1,2,3,0\"\n```"},"toString":{"name":"### toString()","description":"返回数组的字符串表示形式。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 一个字符串,表示类型数组 (typed array) 的元素。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method"},"valueOf":{"name":"### valueOf()","description":"返回指定对象的原始值。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Iterator\\<Number> | 新的 Array Iterator 对象。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method"},"entries":{"name":"### entries()","description":"为数组中的每个条目返回一个键值对数组","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| IterableIterator\\<\\[number, number] | 数组条目的键值对迭代器 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let arr = new Uint32Array([10, 20, 30, 40, 50]);\n let entries = arr.entries();\n let entry = entries.next().value;\n console.log(entry[1]); // 10\n```"},"includes":{"name":"### includes(searchElement, fromIndex?)","description":"确定数组是否包含某个元素,返回 true 或 false。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| searchElement | number | 是 | - | - | 要搜索的元素。 |\n| fromIndex | number | 否 | - | - | 开始搜索 searchElement 的数组位置。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 如果数组包含指定的元素则返回 true,否则返回 false。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.23 | x | √ | √ | √ |\n","itemType":"method","test":"```uts\n let uint32 = new Uint32Array([1, 2, 3]);\n\n let res1 = uint32.includes(2);\n console.log(res1); // true\n\n let res2 = uint32.includes(4);\n console.log(res2); // false\n\n let res3 = uint32.includes(3, 3);\n console.log(res3); // false\n\n```"},"keys":{"name":"### keys()","description":"返回数组中的键列表","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| IterableIterator\\<number> | 数组键的迭代器 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let arr = new Uint32Array([10, 20, 30, 40, 50]);\n let keys = arr.keys();\n let value = keys.next().value\n console.log(value); // 0\n```"},"values":{"name":"### values()","description":"返回数组中的值列表","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| IterableIterator\\<number> | 数组值的迭代器 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n let arr = new Uint32Array([1, 2, 3]);\n let values = arr.values();\n let value = values.next().value;\n console.log(value); // 1\n```"},"Constructor":{"name":"### Constructor(length)","description":"初始化一个对象","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| length | number | 是 | - | - | 当使用非对象调用时,该参数将被视为指定类型化数组长度的数字。在内存中创建一个内部数组缓冲区,大小长度乘以 BYTES_PER_ELEMENT 字节,用 0 填充。省略所有参数,等同于使用 0 作为参数。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Uint32Array | 实例对象 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.23 | x | √ | √ | √ |\n","itemType":"method"},"Constructor_1":{"name":"### Constructor(array)","description":"初始化一个对象","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| array | ArrayLike\\<number> \\| ArrayBufferLike | 是 | - | - | 当使用 TypedArray 子类的实例调用时,typedArray 会被拷贝到一个新的类型数组中。对于非 bigint TypeedArray 构造函数,typedArray 参数仅可以是非 bigint 类型(例如 Int32Array)。同样,对于 bigint TypedArray 构造函数(BigInt64Array 或 BigUint64Array),typedArray 参数仅可以是 bigint 类型。typedArray 中的每个值在拷贝到新数组之前都转换为构造函数的相应类型。新的类型化数组的长度与 typedArray 参数的长度相同。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Uint32Array | 实例对象 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method"},"Constructor_2":{"name":"### Constructor(buffer, byteOffset?, length?)","description":"当使用 ArrayBuffer 实例以及可选的 byteOffset 和 length 参数调用时,将创建一个新的指定缓冲区的类型化数组视图。byteOffset 和 length 参数指定类型化数组视图将暴露的内存范围。如果忽略这两个参数,则是整个视图的所有 buffer;如果仅忽略 length,则是从 byteOffset 开始的 buffer 剩余部分的视图。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| buffer | [ArrayBufferLike](#arraybufferlike-values) | 是 | - | - | ArrayBuffer实例 |\n| byteOffset | number | 否 | - | - | 可选,偏移量,单位字节 |\n| length | number | 否 | - | - | 可选,长度 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Uint32Array | 实例对象 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.23 | x | √ | √ | √ |\n","itemType":"method"},"of":{"name":"### of(...items)","description":"从一组元素创建一个新数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| items | number[\\] | 是 | - | - | 要包含在新数组对象中的一组元素。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Uint32Array | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n var array = Uint32Array.of(1, 2, 3)\n console.log(array.toString()); // '1,2,3'\n```"},"from":{"name":"### from(arrayLike, mapfn?)","description":"从类似数组或可迭代对象创建数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| arrayLike | ArrayLike\\<number> | 是 | - | - | 要转换为数组的类似数组或可迭代对象。 |\n| mapfn | (v: number, k: number) => number | 否 | - | - | 可选参数。如果指定了该参数,则最后生成的类型数组会经过该函数的加工处理后再返回。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Uint32Array | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n var array = Uint32Array.from([1, 2, 3], (v : number, _ : number) : number => v + v);\n console.log(array.toString()); // '2,4,6'\n```"}},"DataView":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.buildInObject.DataView)","buffer":{"name":"### buffer","description":"ArrayBuffer 是引用该缓冲区的视图。在构造时会被固定,因此该属性只读。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"byteLength":{"name":"### byteLength","description":"视图的长度(以字节为单位)。在构造时会被固定,因此该属性只读。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"byteOffset":{"name":"### byteOffset","description":"至 ArrayBuffer 的视图开始位置的字节偏移量。在构造时会被固定,因此该属性只读。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"prop"},"getFloat32":{"name":"### getFloat32(byteOffset, littleEndian?)","description":"获取指定字节偏移处的 Float32 值。没有对齐约束;多字节值可以从任何偏移处获取。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| byteOffset | number | 是 | - | - | 从视图开始检索值的位置。 |\n| littleEndian | boolean | 否 | - | - | 如果为 false 或未定义,则读取大端值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 返回指定位置的 Float32 值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n // Create an ArrayBuffer with a size in bytes\n let buffer = new ArrayBuffer(16);\n let view = new DataView(buffer);\n view.setFloat32(1, 3);\n let ret = view.getFloat32(1);\n console.log(ret); // 3\n```"},"getFloat64":{"name":"### getFloat64(byteOffset, littleEndian?)","description":"获取指定字节偏移处的 Float64 值。没有对齐约束;多字节值可以从任何偏移处获取。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| byteOffset | number | 是 | - | - | 从视图开始检索值的位置。 |\n| littleEndian | boolean | 否 | - | - | 如果为 false 或未定义,则读取大端值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 返回指定位置的 Float64 值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n // Create an ArrayBuffer with a size in bytes\n let buffer = new ArrayBuffer(16);\n let view = new DataView(buffer);\n view.setFloat64(1, Math.PI);\n let ret = view.getFloat64(1);\n console.log(ret); // 3.141592653589793\n```"},"getInt8":{"name":"### getInt8(byteOffset)","description":"获取指定字节偏移处的 Int8 值。没有对齐约束;多字节值可以从任何偏移处获取。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| byteOffset | number | 是 | - | - | 从视图开始检索值的位置。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 返回指定位置的 Int8 值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n // Create an ArrayBuffer with a size in bytes\n let buffer = new ArrayBuffer(16);\n let view = new DataView(buffer);\n view.setInt8(1, 127); // Max signed 8-bit integer\n let ret = view.getInt8(1)\n console.log(ret)//127\n```"},"getInt16":{"name":"### getInt16(byteOffset, littleEndian?)","description":"获取指定字节偏移处的 Int16 值。没有对齐约束;多字节值可以从任何偏移处获取。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| byteOffset | number | 是 | - | - | 从视图开始检索值的位置。 |\n| littleEndian | boolean | 否 | - | - | 如果为 false 或未定义,则读取大端值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 返回指定位置的 Int16 值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n // Create an ArrayBuffer with a size in bytes\n let buffer = new ArrayBuffer(16);\n let view = new DataView(buffer);\n view.setInt16(1, 32767); // Max signed 16-bit integer\n let ret = view.getInt16(1);\n console.log(ret); // 32767\n```"},"getInt32":{"name":"### getInt32(byteOffset, littleEndian?)","description":"获取指定字节偏移处的 Int32 值。没有对齐约束;多字节值可以从任何偏移处获取。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| byteOffset | number | 是 | - | - | 从视图开始检索值的位置。 |\n| littleEndian | boolean | 否 | - | - | 如果为 false 或未定义,则读取大端值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 返回指定位置的 Int32 值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n // Create an ArrayBuffer with a size in bytes\n let buffer = new ArrayBuffer(16);\n let view = new DataView(buffer);\n view.setInt32(1, 2147483647); // Max signed 32-bit integer\n let ret = view.getInt32(1);\n console.log(ret); // 2147483647\n```"},"getUint8":{"name":"### getUint8(byteOffset)","description":"获取指定字节偏移处的 Uint8 值。没有对齐约束;多字节值可以从任何偏移处获取。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| byteOffset | number | 是 | - | - | 从视图开始检索值的位置。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 返回指定位置的 Uint8 值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n // Create an ArrayBuffer with a size in bytes\n let buffer = new ArrayBuffer(16);\n let view = new DataView(buffer);\n view.setUint8(1, 255); // Max unsigned 8-bit integer\n let ret = view.getUint8(1);\n console.log(ret); // 255\n```"},"getUint16":{"name":"### getUint16(byteOffset, littleEndian?)","description":"获取指定字节偏移处的 Uint16 值。没有对齐约束;多字节值可以从任何偏移处获取。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| byteOffset | number | 是 | - | - | 从视图开始检索值的位置。 |\n| littleEndian | boolean | 否 | - | - | 如果为 false 或未定义,则读取大端值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 返回指定位置的 Uint16 值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n // Create an ArrayBuffer with a size in bytes\n let buffer = new ArrayBuffer(16);\n let view = new DataView(buffer);\n view.setUint16(1, 65535); // Max unsigned 16-bit integer\n let ret = view.getUint16(1);\n console.log(ret); // 65535\n```"},"getUint32":{"name":"### getUint32(byteOffset, littleEndian?)","description":"获取指定字节偏移处的 Uint32 值。没有对齐约束;多字节值可以从任何偏移处获取。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| byteOffset | number | 是 | - | - | 从视图开始检索值的位置。 |\n| littleEndian | boolean | 否 | - | - | 如果为 false 或未定义,则读取大端值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 返回指定位置的 Uint32 值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n // Create an ArrayBuffer with a size in bytes\n let buffer = new ArrayBuffer(16);\n let view = new DataView(buffer);\n view.setUint32(1, 4294967295); // Max unsigned 32-bit integer\n let ret = view.getUint32(1);\n console.log(ret); // 4294967295\n```"},"setFloat32":{"name":"### setFloat32(byteOffset, value, littleEndian?)","description":"在指定的字节偏移处存储一个 Float32 值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| byteOffset | number | 是 | - | - | 从视图开始设置值的位置。 |\n| value | number | 是 | - | - | 要设置的值。 |\n| littleEndian | boolean | 否 | - | - | 如果为 false 或未定义,则写入大端值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| void | 无返回值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n // Create an ArrayBuffer with a size in bytes\n let buffer = new ArrayBuffer(16);\n let view = new DataView(buffer);\n view.setFloat32(1, 3);\n let ret = view.getFloat32(1);\n console.log(ret); // 3\n```"},"setFloat64":{"name":"### setFloat64(byteOffset, value, littleEndian?)","description":"在指定的字节偏移处存储一个 Float64 值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| byteOffset | number | 是 | - | - | 从视图开始设置值的位置。 |\n| value | number | 是 | - | - | 要设置的值。 |\n| littleEndian | boolean | 否 | - | - | 如果为 false 或未定义,则写入大端值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| void | 无返回值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n // Create an ArrayBuffer with a size in bytes\n let buffer = new ArrayBuffer(16);\n let view = new DataView(buffer);\n view.setFloat64(1, Math.PI);\n let ret = view.getFloat64(1);\n console.log(ret); // 3.141592653589793\n```"},"setInt8":{"name":"### setInt8(byteOffset, value)","description":"在指定的字节偏移处存储一个 Int8 值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| byteOffset | number | 是 | - | - | 从视图开始设置值的位置。 |\n| value | number | 是 | - | - | 要设置的值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| void | 无返回值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n // Create an ArrayBuffer with a size in bytes\n let buffer = new ArrayBuffer(16);\n let view = new DataView(buffer);\n view.setInt8(1, 127); // Max signed 8-bit integer\n let ret = view.getInt8(1)\n console.log(ret)//127\n```"},"setInt16":{"name":"### setInt16(byteOffset, value, littleEndian?)","description":"在指定的字节偏移处存储一个 Int16 值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| byteOffset | number | 是 | - | - | 从视图开始设置值的位置。 |\n| value | number | 是 | - | - | 要设置的值。 |\n| littleEndian | boolean | 否 | - | - | 如果为 false 或未定义,则写入大端值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| void | 无返回值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n // Create an ArrayBuffer with a size in bytes\n let buffer = new ArrayBuffer(16);\n let view = new DataView(buffer);\n view.setInt16(1, 32767); // Max signed 16-bit integer\n let ret = view.getInt16(1);\n console.log(ret); // 32767\n```"},"setInt32":{"name":"### setInt32(byteOffset, value, littleEndian?)","description":"在指定的字节偏移处存储一个 Int32 值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| byteOffset | number | 是 | - | - | 从视图开始设置值的位置。 |\n| value | number | 是 | - | - | 要设置的值。 |\n| littleEndian | boolean | 否 | - | - | 如果为 false 或未定义,则写入大端值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| void | 无返回值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n // Create an ArrayBuffer with a size in bytes\n let buffer = new ArrayBuffer(16);\n let view = new DataView(buffer);\n view.setInt32(1, 2147483647); // Max signed 32-bit integer\n let ret = view.getInt32(1);\n console.log(ret); // 2147483647\n```"},"setUint8":{"name":"### setUint8(byteOffset, value)","description":"在指定的字节偏移处存储一个 Uint8 值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| byteOffset | number | 是 | - | - | 从视图开始设置值的位置。 |\n| value | number | 是 | - | - | 要设置的值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| void | 无返回值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n // Create an ArrayBuffer with a size in bytes\n let buffer = new ArrayBuffer(16);\n let view = new DataView(buffer);\n view.setUint8(1, 255); // Max unsigned 8-bit integer\n let ret = view.getUint8(1);\n console.log(ret); // 255\n```"},"setUint16":{"name":"### setUint16(byteOffset, value, littleEndian?)","description":"在指定的字节偏移处存储一个 Uint16 值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| byteOffset | number | 是 | - | - | 从视图开始设置值的位置。 |\n| value | number | 是 | - | - | 要设置的值。 |\n| littleEndian | boolean | 否 | - | - | 如果为 false 或未定义,则写入大端值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| void | 无返回值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n // Create an ArrayBuffer with a size in bytes\n let buffer = new ArrayBuffer(16);\n let view = new DataView(buffer);\n view.setUint16(1, 65535); // Max unsigned 16-bit integer\n let ret = view.getUint16(1);\n console.log(ret); // 65535\n```"},"setUint32":{"name":"### setUint32(byteOffset, value, littleEndian?)","description":"在指定的字节偏移处存储一个 Uint32 值。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| byteOffset | number | 是 | - | - | 从视图开始设置值的位置。 |\n| value | number | 是 | - | - | 要设置的值。 |\n| littleEndian | boolean | 否 | - | - | 如果为 false 或未定义,则写入大端值。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| void | 无返回值。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method","test":"```uts\n // Create an ArrayBuffer with a size in bytes\n let buffer = new ArrayBuffer(16);\n let view = new DataView(buffer);\n view.setUint32(1, 4294967295); // Max unsigned 32-bit integer\n let ret = view.getUint32(1);\n console.log(ret); // 4294967295\n```"},"Constructor":{"name":"### Constructor(buffer, byteOffset?, byteLength?)","description":"当使用 ArrayBuffer 实例以及可选的 byteOffset 和 length 参数调用时,将创建一个新的指定缓冲区的DataView视图。byteOffset 和 length 参数指定视图将暴露的内存范围。如果忽略这两个参数,则是整个视图的所有 buffer;如果仅忽略 length,则是从 byteOffset 开始的 buffer 剩余部分的视图。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| buffer | [ArrayBufferLike & { BYTES_PER_ELEMENT ?: never; }](#arraybufferlike-values) | 是 | - | - | ArrayBuffer实例 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| byteLength | number | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"√\",\"4.25\",\"x\"]]}' /> | ArrayBuffer 实例的 byteLength 访问器属性返回该数组缓冲区的长度(以字节为单位)。 |\n@| BYTES_PER_ELEMENT | any | 否 | - | - | - |\n| byteOffset | number | 否 | - | - | 可选,偏移量,单位字节 |\n| byteLength | number | 否 | - | - | 长度 | \n\n##### ArrayBufferLike & { BYTES_PER_ELEMENT ?: never; } 的方法 @arraybufferlike-values \n\n##### slice(begin ?: number, end ?: number) : ArrayBuffer; @slice\nArrayBuffer 实例的 slice() 方法返回一个新的 ArrayBuffer 实例,其包含原 ArrayBuffer 实例中从 begin 开始(包含)到 end 结束(不含)的所有字节的副本。\n###### slice 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| √ | 4.25 | x |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| begin | number | 否 | - | - | 可选,要开始提取的位置索引(从 0 开始),将被转换为整数。负数索引将会从缓冲区末尾开始计算——如果 start \\< 0,那么将会使用 start + buffer.length。 如果 start \\< -buffer.length 或省略了 start,则会使用 0。 如果 start >= buffer.length,则不会提取任何内容。 |\n| end | number | 否 | - | - | 可选,要结束提取的位置索引(从 0 开始),将被转换为整数。slice() 提取到但不包括 end。 负数索引将会从缓冲区末尾开始计算——如果 end \\< 0,那么将会使用 end + buffer.length。 如果 end \\< -buffer.length,则会使用 0。 如果 end >= buffer.length 或省略了 end,则会使用 buffer.length,则会导致直到末尾的所有元素都被提取。 如果标准化后的 end 位置在 start 位置之前,则不会提取任何内容。 | \n\n###### 返回值 \n\n| 类型 | 描述 |\n| :- | :- |\n| [ArrayBuffer](#arraybuffer-values) | 一个新的 ArrayBuffer 对象。 |\n \n\n##### toByteBuffer() : ByteBuffer; @tobytebuffer\nArrayBuffer 实例的 toByteBuffer() 方法返回一个android原生ByteBuffer对象。\n###### toByteBuffer 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| x | 4.25 | x |\n\n\n###### 返回值 \n\n| 类型 | 描述 |\n| :- | :- |\n| ByteBuffer | android 原生ByteBuffer对象。 |\n \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| DataView | 实例对象 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.25 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.25 | √ | x | x | - | - |","itemType":"method"}},"TextEncoder":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.buildInObject.TextEncoder)","encoding":{"name":"### encoding","description":"返回 \"utf-8\".","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.31 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.31 | √ | x | x | - | - |","itemType":"prop"},"encode":{"name":"### encode(input?)","description":"TextEncoder.encode() 方法接受一个字符串作为输入,返回一个对参数中给定的文本的编码后的 Uint8Array,编码的方法通过 TextEncoder 对象指定。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| input | string | 否 | - | - | 一个包含了将要编码的文本。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Uint8Array | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.31 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.31 | √ | x | x | - | - |","itemType":"method","test":"```uts\n const encoder = new TextEncoder()\n const int8 = encoder.encode(\"€\");\n console.log(int8); // Uint8Array(3) [226, 130, 172]\n```"}},"TextDecoder":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.buildInObject.TextDecoder)","encoding":{"name":"### encoding","description":"只读属性 TextDecoder.encoding 返回一个字符串,其中包含了指定的解码器的解码算法的名称。","param":"","returnValue":"","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.31 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.31 | √ | x | x | - | - |","itemType":"prop"},"decode":{"name":"### decode(input)","description":"TextDecoder.decode() 方法返回一个字符串,其包含作为参数传递的缓冲区解码后的文本。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| input | [ArrayBuffer](#arraybuffer-values) | 是 | - | - | ArrayBuffer。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| string | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.31 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.31 | √ | x | x | - | - |","itemType":"method","test":"```uts\n var utf8decoder = new TextDecoder(); // default 'utf-8' or 'utf8'\n\n var u8arr = Uint8Array.of(240, 160, 174, 183);\n var i8arr = Int8Array.of(-16, -96, -82, -73);\n\n console.log(utf8decoder.decode(u8arr)) // '𠮷'\n console.log(utf8decoder.decode(i8arr)) // '𠮷'\n\n utf8decoder = new TextDecoder(\"gbk\"); // default 'utf-8' or 'utf8'\n console.log(utf8decoder.decode(u8arr)) // '馉';\n console.log(utf8decoder.decode(i8arr)) // '馉'\n\n utf8decoder = new TextDecoder(\"utf-8\");\n var arraybuffer = new ArrayBuffer(4)\n var dataView = new DataView(arraybuffer)\n dataView.setInt8(0, -16)\n dataView.setInt8(1, -96)\n dataView.setInt8(2, -82)\n dataView.setInt8(3, -73)\n console.log(utf8decoder.decode(dataView)) // '𠮷';\n\n```"},"decode_1":{"name":"### decode(input)","description":"TextDecoder.decode() 方法返回一个字符串,其包含作为参数传递的缓冲区解码后的文本。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| input | DataView | 是 | - | - | DataView。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| string | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.31 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.31 | √ | x | x | - | - |","itemType":"method"},"decode_2":{"name":"### decode(input)","description":"TextDecoder.decode() 方法返回一个字符串,其包含作为参数传递的缓冲区解码后的文本。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| input | TypedArray | 是 | - | - | Float32Array,Float64Array,Int8Array,Int16Array,Int32Array,Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array 的实例 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| string | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.31 | x | √ | √ | √ |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.31 | √ | x | x | - | - |","itemType":"method"}},"UTSHarmony":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.platformObject.UTSHarmony)","devicePX2px":{"name":"### devicePX2px(px)","description":"物理像素转换为页面的px像素","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| px | number | 是 | - | - | | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| number | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| - | - | - | - | - | 4.31 |","itemType":"method"},"exit":{"name":"### exit()","description":"退出应用","param":"","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| - | - | - | - | - | 4.31 |","itemType":"method"},"getCurrentWindow":{"name":"### getCurrentWindow()","description":"获取当前原生窗口对象","param":"","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| window.default.Window \\| null \\| null | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| - | - | - | - | - | 4.31 |","itemType":"method"},"getUIAbilityContext":{"name":"### getUIAbilityContext()","description":"获取应用的UIAbilityContext","param":"","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| common.UIAbilityContext | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| - | - | - | - | - | 4.31 |","itemType":"method"},"onAppAbilityCreate":{"name":"### onAppAbilityCreate(callback)","description":"监听应用EntryAbility生命周期onCreate","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callback | (want: Want, launchParam: AbilityConstant.LaunchParam) => void | 是 | - | - | | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| - | - | - | - | - | 4.31 |","itemType":"method"},"onAppAbilityNewWant":{"name":"### onAppAbilityNewWant(callback)","description":"监听应用EntryAbility生命周期onNewWant","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callback | (want: Want, launchParam: AbilityConstant.LaunchParam) => void | 是 | - | - | | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| - | - | - | - | - | 4.31 |","itemType":"method"},"onAppAbilityShare":{"name":"### onAppAbilityShare(callback)","description":"监听应用EntryAbility生命周期onShare","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callback | (wantParam: Record\\<string, any>) => void | 是 | - | - | | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| - | - | - | - | - | 4.31 |","itemType":"method"},"onAppAbilityWindowStageCreate":{"name":"### onAppAbilityWindowStageCreate(callback)","description":"监听应用EntryAbility生命周期onWindowStageCreate","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callback | (windowStage: window__default.WindowStage) => void | 是 | - | - | | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| - | - | - | - | - | 4.31 |","itemType":"method"},"requestSystemPermission":{"name":"### requestSystemPermission(permissions, success?, fail?)","description":"请求系统权限","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| permissions | string[\\] | 是 | - | - | - |\n| success | (allRight: boolean, grantedList: Array\\<string\\>) => void | 否 | - | - | - |\n| fail | (doNotAskAgain: boolean, grantedList: Array\\<string\\>) => void | 否 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| - | - | - | - | - | 4.31 |","itemType":"method"}},"UTSAndroid":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.platformObject.UTSAndroid)","onAppConfigChange":{"name":"### onAppConfigChange(callback)","description":"监听 App配置发生变化, 对应 android原生 onAppConfigChange","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callback | (res: [UTSJSONObject](/uts/buildin-object-api/utsjsonobject.md)) => void | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"offAppConfigChange":{"name":"### offAppConfigChange(callback?)","description":"onAppConfigChange 对应的反注册函数","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callback | (res: [UTSJSONObject](/uts/buildin-object-api/utsjsonobject.md)) => void | 否 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"onAppTrimMemory":{"name":"### onAppTrimMemory(callback?)","description":"注册监听 App 内存不足时的系统回调函数 对应原生的API: onTrimMemory","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callback | (res: Number) => void | 否 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"offAppTrimMemory":{"name":"### offAppTrimMemory(callback?)","description":"onAppTrimMemory 对应的反注册函数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callback | (res: Number) => void | 否 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"onAppActivityPause":{"name":"### onAppActivityPause(callback)","description":"注册监听 activity onPause事件","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callback | () => void | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"offAppActivityPause":{"name":"### offAppActivityPause(callback?)","description":"onAppActivityPause 对应的反注册函数","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callback | () => void | 否 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"onAppActivityResume":{"name":"### onAppActivityResume(callback)","description":"注册监听 activity onResume事件","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callback | () => void | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"offAppActivityResume":{"name":"### offAppActivityResume(callback?)","description":"onAppActivityResume 对应的反注册函数","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callback | () => void | 否 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"onAppActivityDestroy":{"name":"### onAppActivityDestroy(callback)","description":"注册监听 activity onDestroy事件","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callback | () => void | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"offAppActivityDestroy":{"name":"### offAppActivityDestroy(callback?)","description":"onAppActivityDestroy 对应的反注册函数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callback | () => void | 否 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"onAppActivityResult":{"name":"### onAppActivityResult(callback)","description":"注册监听 activity onAppActivityResult 函数","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callback | (requestCode: Int, resultCode: Int, data: any) => void | 是 | - | - | 用于监听的响应函数 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"offAppActivityResult":{"name":"### offAppActivityResult(callback?)","description":"onAppActivityResult 对应的反注册函数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callback | (requestCode: Int, resultCode: Int, data: any) => void | 否 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"onAppActivityBack":{"name":"### onAppActivityBack(callback)","description":"注册监听 activity onAppActivityBack 函数","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callback | () => void | 是 | - | - | 用于监听的响应函数 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"offAppActivityBack":{"name":"### offAppActivityBack(callback?)","description":"取消注册监听 activity onAppActivityBack 函数","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callback | () => void | 否 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"getAppContext":{"name":"### getAppContext()","description":"获取当前应用Application上下文,对应android平台 Context.getApplicationContext 函数实现","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Context \\| null | 当前应用程序 上下文实例对象 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"getUniActivity":{"name":"### getUniActivity()","description":"获取当前应用 栈顶的 Activity实例,对应android平台 getActivity 函数实现","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Activity \\| null | 当前应用栈顶的 Activity实例 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"getTopPageActivity":{"name":"### getTopPageActivity()","description":"获取与当前页面绑定的activity对象,需要注意的是:当页面对象未与activity建立绑定关系时,可能为null","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Activity \\| null | 当前页面绑定的activity示例 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.0 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 4.0 | - | - | - | - |","itemType":"method"},"getResourcePath":{"name":"### getResourcePath(resourceName)","description":"获取资源文件的原生路径。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| resourceName | string | 是 | - | - | 资源文件相对于工程的绝对路径, 如:“/static/logo.png” | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 该资源在原生目录下的路径 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | √ | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"getJavaClass":{"name":"### getJavaClass(input)","description":"获取对象的jvm class实例","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| input | any | 是 | - | - | 任意不为空对象 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Class | 传入对象所对应的class实例 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.0 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 4.0 | - | - | - | - |","itemType":"method"},"getAppCachePath":{"name":"### getAppCachePath()","description":"获取app 临时目录。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string \\| null | 返回app临时目录路径。存放在该文件可能会在应用退出后被清理 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.99 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.99 | √ | - | - | - | - |","itemType":"method"},"exit":{"name":"### exit()","description":"退出当前应用","param":"","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"getDispatcher":{"name":"### getDispatcher(threadName?)","description":"获取一个任务分发器实例","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| threadName | string\\|null | 否 | - | - | 任务组名称,可能为:<br/>main: ui thread / dom: 仅uni-app x环境生效,uni-app 环境会自动切换到 ui<br/>io : io thread<br/>匿名线程 null 或者 '': 来源线程,如果来源线程不支持任务分发,则会在当前线程执行执行. 这个场景下要求第一个参数必须是线程环境 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| [UTSTaskDispatcher](#utstaskdispatcher-values) | \n\n\n\n##### UTSTaskDispatcher 的方法 @utstaskdispatcher-values \n\n##### async(action:(action:any\\|null)=>void,param?:any\\|null): void @async\n在当前任务分发器 异步执行任务\n###### async 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| - | - | - |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| action | (action?: any) => void | 是 | - | - | 任务函数 |\n| param | any | 否 | - | - | 任务函数需要的参数 | \n\n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"getAppId":{"name":"### getAppId()","description":"获取当前运行的app的AppId。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 当前运行的app的AppId。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"getOsTheme":{"name":"### getOsTheme()","description":"获取当前系统主题样式","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 系统主题样式 \"dark\":暗色模式 \"light\":亮色模式 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"isUniMp":{"name":"### isUniMp()","description":"获取当前运行环境是否是unimp。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 是否是unimp。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"getAppName":{"name":"### getAppName()","description":"获取manifest.json 中配置的应用名称","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 应用名称。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"getAppVersion":{"name":"### getAppVersion()","description":"获取manifest.json 中配置的应用版本信息","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| UTSJSONObject | 应用版本信息 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"getInnerVersion":{"name":"### getInnerVersion()","description":"获取引擎版本号。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 引擎版本号。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"isUniAppX":{"name":"### isUniAppX()","description":"获取当前是否是uniapp x 环境","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | uniapp x 环境 true, uniapp 环境: false。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"rpx2px":{"name":"### rpx2px(rpx)","description":"","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| rpx | number | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 返回对应的逻辑像素值 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"rpx2px_1":{"name":"### rpx2px(rpx)","description":"页面的rpx像素转换为页面的px像素","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| rpx | number | 是 | - | - | 待转换的rpx | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 转换后的px | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.95 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.95 | 3.95 | - | - | - | - |","itemType":"method"},"isPrivacyAgree":{"name":"### isPrivacyAgree()","description":"当前应用是否已取得用户同意隐私协议","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | true 用户已同意 false 用户未同意 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"setPrivacyAgree":{"name":"### setPrivacyAgree(state)","description":"设置当前应用是否已取得用户同意隐私协议","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| state | boolean | 是 | - | - | true 用户已同意 false 用户未同意 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"resetPrivacyAgree":{"name":"### resetPrivacyAgree()","description":"重置当前应用至用户未同意隐私协议","param":"","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"requestSystemPermission":{"name":"### requestSystemPermission(context, requestPermission, success, fail, shallUnCheck?)","description":"请求系统权限","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| context | Activity | 是 | - | - | - |\n| requestPermission | Array\\<string\\>\\<string> | 是 | - | - | 期望请求的权限 |\n| success | (allRight: boolean, grantedList: Array\\<string\\>) => void | 是 | - | - | - |\n| fail | (doNotAskAgain: boolean, grantedList: Array\\<string\\>) => void | 是 | - | - | - |\n| shallUnCheck | boolean | 否 | false | - | 是否需要本地错误检查,需要HBuilder X 4.25 之后版本 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"checkSystemPermissionGranted":{"name":"### checkSystemPermissionGranted(context, requestPermission)","description":"检查当前应用是否已经具备指定权限","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| context | Activity | 是 | - | - | - |\n| requestPermission | Array\\<string\\>\\<string> | 是 | - | - | 期望具备的权限 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 请求的权限列表中是否已经具备 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"gotoSystemPermissionActivity":{"name":"### gotoSystemPermissionActivity(context, requestPermission)","description":"跳转至系统权限手动设备列表","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| context | Activity | 是 | - | - | - |\n| requestPermission | Array\\<string\\>\\<string> | 是 | - | - | 期望请求的权限 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"getSystemPermissionDenied":{"name":"### getSystemPermissionDenied(context, requestPermission)","description":"获取当前应用不具备的权限列表","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| context | Activity | 是 | - | - | - |\n| requestPermission | Array\\<string\\>\\<string> | 是 | - | - | 期望请求的权限 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Array\\<string> | 请求的权限列表中已经被禁用的部分 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"devicePX2px":{"name":"### devicePX2px(devicePX)","description":"物理像素转换为页面的px像素","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| devicePX | number | 是 | - | - | 待转换的物理像素 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 转换后的页面px | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.95 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.95 | 3.95 | - | - | - | - |","itemType":"method"},"convert2AbsFullPath":{"name":"### convert2AbsFullPath(inputPath)","description":"将文件的项目相对地址转换为 运行期对应的绝对地址<br/>eg.<br/> 'static/logo.png' -> '/storage/sdcard/0/apps/com.xxxx/files/logo.png'<br/>","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| inputPath | string | 是 | - | - | 待转换的文件相对路径 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 转换后文件绝对路径 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.90 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.90 | √ | - | - | - | - |","itemType":"method"},"getFileProviderUri":{"name":"### getFileProviderUri(file)","description":"将应用的私有文件 通过内置的FileProvider转换为外部应用可以访问的Uri<br/>","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| file | [File](#file-values) | 是 | - | - | 待转换的私有文件 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| name | string | 是 | - | - | The name of the `File`. |\n@| lastModified | number | 是 | - | - | The last modified date of the `File`. |\n@| size | number | 是 | - | - | The total size of the `Blob` in bytes. |\n@| type | string | 是 | - | - | The content-type of the `Blob`. | \n\n##### File 的方法 @file-values \n\n##### arrayBuffer(): Promise\\<ArrayBuffer>; @arraybuffer\nReturns a promise that fulfills with an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) containing a copy of\nthe `Blob` data.\n###### arrayBuffer 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| - | - | - |\n\n\n###### 返回值 \n\n| 类型 |\n| :- |\n| Promise\\<[ArrayBuffer](#arraybuffer-values)> |\n \n\n##### slice(start?: number, end?: number, type?: string): Blob; @slice\nCreates and returns a new `Blob` containing a subset of this `Blob` objects\ndata. The original `Blob` is not altered.\n###### slice 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| - | - | - |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| start | number | 否 | - | - | The starting index. |\n| end | number | 否 | - | - | The ending index. |\n| type | string | 否 | - | - | The content-type for the new `Blob` | \n\n###### 返回值 \n\n| 类型 |\n| :- |\n| Blob |\n \n\n##### text(): Promise\\<string>; @text\nReturns a promise that fulfills with the contents of the `Blob` decoded as a\nUTF-8 string.\n###### text 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| - | - | - |\n\n\n###### 返回值 \n\n| 类型 |\n| :- |\n| Promise\\<string> |\n \n\n##### stream(): WebReadableStream; @stream\nReturns a new `ReadableStream` that allows the content of the `Blob` to be read.\n###### stream 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| - | - | - |\n\n\n###### 返回值 \n\n| 类型 | 描述 |\n| :- | :- |\n| [ReadableStream\\<R>](#readablestream-values) | This Streams API interface represents a readable stream of byte data. |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| locked | boolean | 是 | - | - | - |\n###### ReadableStream\\<R> 的方法 @readablestream-values \n\n###### cancel(reason?: any): Promise\\<void>; @cancel\n\n###### cancel 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| - | - | - |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| reason | any | 否 | - | - | - | \n\n###### 返回值 \n\n| 类型 |\n| :- |\n| Promise\\<void> |\n \n\n###### getReader(): ReadableStreamDefaultReader\\<R>; @getreader\n\n###### getReader 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| - | - | - |\n\n\n###### 返回值 \n\n| 类型 |\n| :- |\n| [ReadableStreamDefaultReader\\<R>](#readablestreamdefaultreader-values) |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| closed | Promise\\<any> | 是 | - | - | - |\n###### ReadableStreamDefaultReader\\<R> 的方法 @readablestreamdefaultreader-values \n\n###### read(): Promise\\<ReadableStreamDefaultReadResult\\<R>>; @read\n\n###### read 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| - | - | - |\n\n\n###### 返回值 \n\n| 类型 |\n| :- |\n| Promise\\<[ReadableStreamDefaultReadValueResult\\<T>](#readablestreamdefaultreadvalueresult-values) \\| [ReadableStreamDefaultReadDoneResult](#readablestreamdefaultreaddoneresult-values)> |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| done | boolean | 是 | - | - | - |\n@| value | T | 是 | - | - | - |\n###### ReadableStreamDefaultReadDoneResult 的属性值 @readablestreamdefaultreaddoneresult-values \n\n| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| done | boolean | 是 | - | - | - |\n| value | any | 否 | - | - | - |\n \n\n###### releaseLock(): void; @releaselock\n\n###### releaseLock 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| - | - | - |\n\n\n\n###### cancel(reason?: any): Promise\\<void>; @cancel\n\n###### cancel 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| - | - | - |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| reason | any | 否 | - | - | - | \n\n###### 返回值 \n\n| 类型 |\n| :- |\n| Promise\\<void> |\n \n \n\n###### pipeThrough\\<T>(transform: ReadableWritablePair\\<T, R>, options?: StreamPipeOptions): ReadableStream\\<T>; @pipethrough\n\n###### pipeThrough 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| - | - | - |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| transform | ReadableWritablePair | 是 | - | - | - |\n| options | **StreamPipeOptions** | 否 | - | - | - |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| preventAbort | boolean | 否 | - | - | - |\n@| preventCancel | boolean | 否 | - | - | - |\n@| preventClose | boolean | 否 | - | - | Pipes this readable stream to a given writable stream destination.<br/>The way in which the piping process behaves under various error<br/>conditions can be customized with a number of passed options. It<br/>returns a promise that fulfills when the piping process completes<br/>successfully, or rejects if any errors were encountered.<br/><br/>Piping a stream will lock it for the duration of the pipe, preventing<br/>any other consumer from acquiring a reader.<br/><br/>Errors and closures of the source and destination streams propagate<br/>as follows:<br/><br/>An error in this source readable stream will abort destination,<br/>unless preventAbort is truthy. The returned promise will be rejected<br/>with the source's error, or with any error that occurs during<br/>aborting the destination.<br/><br/>An error in destination will cancel this source readable stream,<br/>unless preventCancel is truthy. The returned promise will be rejected<br/>with the destination's error, or with any error that occurs during<br/>canceling the source.<br/><br/>When this source readable stream closes, destination will be closed,<br/>unless preventClose is truthy. The returned promise will be fulfilled<br/>once this process completes, unless an error is encountered while<br/>closing the destination, in which case it will be rejected with that<br/>error.<br/><br/>If destination starts out closed or closing, this source readable<br/>stream will be canceled, unless preventCancel is true. The returned<br/>promise will be rejected with an error indicating piping to a closed<br/>stream failed, or with any error that occurs during canceling the<br/>source.<br/><br/>The signal option can be set to an AbortSignal to allow aborting an<br/>ongoing pipe operation via the corresponding AbortController. In this<br/>case, this source readable stream will be canceled, and destination<br/>aborted, unless the respective options preventCancel or preventAbort<br/>are set. |\n@| signal | [AbortSignal](#abortsignal-values) | 否 | - | - | The listener will be removed when the given AbortSignal object's `abort()` method is called. |\n@@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@@| :- | :- | :- | :- | :-: | :- |\n@@| aborted | boolean | 是 | - | - | Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise. |\n@@| reason | any | 是 | - | - | - | \n\n###### AbortSignal 的方法 @abortsignal-values \n\n###### (this: AbortSignal, event: Event) => any @onabort\n\n###### onabort 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| - | - | - |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| this | [AbortSignal](#abortsignal-values) | 是 | - | - | - |\n| event | [Event](#event-values) | 是 | - | - | - |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| bubbles | boolean | 是 | - | - | This is not used in Node.js and is provided purely for completeness. |\n@| cancelable | boolean | 是 | - | - | True if the event was created with the cancelable option |\n@| composed | boolean | 是 | - | - | This is not used in Node.js and is provided purely for completeness. |\n@| currentTarget | [EventTarget](#eventtarget-values) | 否 | - | - | Alias for event.target. |\n@| defaultPrevented | boolean | 是 | - | - | Is true if cancelable is true and event.preventDefault() has been called. |\n@| eventPhase | 2 | 是 | - | - | This is not used in Node.js and is provided purely for completeness. |\n@| isTrusted | boolean | 是 | - | - | The `AbortSignal` \"abort\" event is emitted with `isTrusted` set to `true`. The value is `false` in all other cases. |\n@| returnValue | boolean | 是 | - | - | This is not used in Node.js and is provided purely for completeness. |\n@| srcElement | [EventTarget](#eventtarget-values) | 否 | - | - | Alias for event.target. |\n@| target | [EventTarget](#eventtarget-values) | 否 | - | - | The `EventTarget` dispatching the event |\n@| timeStamp | number | 是 | - | - | The millisecond timestamp when the Event object was created. |\n@| type | string | 是 | - | - | Returns the type of event, e.g. \"click\", \"hashchange\", or \"submit\". | \n\n###### EventTarget 的方法 @eventtarget-values \n\n###### addEventListener( type: string, listener: EventListener \\| EventListenerObject, options?: AddEventListenerOptions \\| boolean, ): void; @addeventlistener\nAdds a new handler for the `type` event. Any given `listener` is added only once per `type` and per `capture` option value.\n\nIf the `once` option is true, the `listener` is removed after the next time a `type` event is dispatched.\n\nThe `capture` option is not used by Node.js in any functional way other than tracking registered event listeners per the `EventTarget` specification.\nSpecifically, the `capture` option is used as part of the key when registering a `listener`.\nAny individual `listener` may be added once with `capture = false`, and once with `capture = true`.\n###### addEventListener 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| - | - | - |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| type | string | 是 | - | - | - |\n| listener | EventListener \\| [EventListenerObject](#eventlistenerobject-values) | 是 | - | - | - |\n| options | **AddEventListenerOptions** \\| boolean | 否 | - | - | - |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| once | boolean | 否 | - | - | When `true`, the listener is automatically removed when it is first invoked. Default: `false`. |\n@| passive | boolean | 否 | - | - | When `true`, serves as a hint that the listener will not call the `Event` object's `preventDefault()` method. Default: false. |\n@| signal | [AbortSignal](#abortsignal-values) | 否 | - | - | The listener will be removed when the given AbortSignal object's `abort()` method is called. |\n@| capture | boolean | 否 | - | - | Not directly used by Node.js. Added for API completeness. Default: `false`. | \n\n##### EventListenerObject 的方法 @eventlistenerobject-values \n\n##### handleEvent(object: Event): void; @handleevent\n\n###### handleEvent 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| - | - | - |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| object | [Event](#event-values) | 是 | - | - | - | \n\n\n\n###### dispatchEvent(event: Event): boolean; @dispatchevent\nDispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.\n###### dispatchEvent 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| - | - | - |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| event | [Event](#event-values) | 是 | - | - | - | \n\n###### 返回值 \n\n| 类型 |\n| :- |\n| boolean |\n \n\n###### removeEventListener( type: string, listener: EventListener \\| EventListenerObject, options?: EventListenerOptions \\| boolean, ): void; @removeeventlistener\nRemoves the event listener in target's event listener list with the same type, callback, and options.\n###### removeEventListener 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| - | - | - |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| type | string | 是 | - | - | - |\n| listener | EventListener \\| [EventListenerObject](#eventlistenerobject-values) | 是 | - | - | - |\n| options | **EventListenerOptions** \\| boolean | 否 | - | - | - |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| capture | boolean | 否 | - | - | Not directly used by Node.js. Added for API completeness. Default: `false`. | \n\n\n##### Event 的方法 @event-values \n\n##### () => void @cancelbubble\nAlias for event.stopPropagation(). This is not used in Node.js and is provided purely for completeness.\n###### cancelBubble 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| - | - | - |\n\n\n\n##### composedPath(): \\[EventTarget?] @composedpath\nReturns an array containing the current EventTarget as the only entry or empty if the event is not being dispatched. This is not used in Node.js and is provided purely for completeness.\n###### composedPath 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| - | - | - |\n\n\n###### 返回值 \n\n| 类型 |\n| :- |\n| any |\n \n\n##### preventDefault(): void; @preventdefault\nSets the `defaultPrevented` property to `true` if `cancelable` is `true`.\n###### preventDefault 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| - | - | - |\n\n\n\n##### stopImmediatePropagation(): void; @stopimmediatepropagation\nStops the invocation of event listeners after the current one completes.\n###### stopImmediatePropagation 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| - | - | - |\n\n\n\n##### stopPropagation(): void; @stoppropagation\nThis is not used in Node.js and is provided purely for completeness.\n###### stopPropagation 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| - | - | - |\n\n\n\n###### 返回值 \n\n| 类型 |\n| :- |\n| any |\n \n\n###### throwIfAborted(): void; @throwifaborted\n\n###### throwIfAborted 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| - | - | - |\n\n\n\n###### addEventListener( type: string, listener: EventListener \\| EventListenerObject, options?: AddEventListenerOptions \\| boolean, ): void; @addeventlistener\nAdds a new handler for the `type` event. Any given `listener` is added only once per `type` and per `capture` option value.\n\nIf the `once` option is true, the `listener` is removed after the next time a `type` event is dispatched.\n\nThe `capture` option is not used by Node.js in any functional way other than tracking registered event listeners per the `EventTarget` specification.\nSpecifically, the `capture` option is used as part of the key when registering a `listener`.\nAny individual `listener` may be added once with `capture = false`, and once with `capture = true`.\n###### addEventListener 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| - | - | - |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| type | string | 是 | - | - | - |\n| listener | EventListener \\| [EventListenerObject](#eventlistenerobject-values) | 是 | - | - | - |\n| options | [AddEventListenerOptions](#addeventlisteneroptions-values) \\| boolean | 否 | - | - | - | \n\n\n###### dispatchEvent(event: Event): boolean; @dispatchevent\nDispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.\n###### dispatchEvent 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| - | - | - |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| event | [Event](#event-values) | 是 | - | - | - | \n\n###### 返回值 \n\n| 类型 |\n| :- |\n| boolean |\n \n\n###### removeEventListener( type: string, listener: EventListener \\| EventListenerObject, options?: EventListenerOptions \\| boolean, ): void; @removeeventlistener\nRemoves the event listener in target's event listener list with the same type, callback, and options.\n###### removeEventListener 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| - | - | - |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| type | string | 是 | - | - | - |\n| listener | EventListener \\| [EventListenerObject](#eventlistenerobject-values) | 是 | - | - | - |\n| options | [EventListenerOptions](#eventlisteneroptions-values) \\| boolean | 否 | - | - | - | \n\n\n###### 返回值 \n\n| 类型 |\n| :- |\n| ReadableStream |\n \n\n###### pipeTo(destination: WritableStream\\<R>, options?: StreamPipeOptions): Promise\\<void>; @pipeto\n\n###### pipeTo 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| - | - | - |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| destination | [WritableStream\\<W>](#writablestream-values) | 是 | - | - | This Streams API interface provides a standard abstraction for writing streaming data to a destination, known as a sink. This object comes with built-in back pressure and queuing. |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| locked | boolean | 是 | - | - | - |\n| options | [StreamPipeOptions](#streampipeoptions-values) | 否 | - | - | - | \n\n##### WritableStream\\<W> 的方法 @writablestream-values \n\n##### abort(reason?: any): Promise\\<void>; @abort\n\n###### abort 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| - | - | - |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| reason | any | 否 | - | - | - | \n\n###### 返回值 \n\n| 类型 |\n| :- |\n| Promise\\<void> |\n \n\n##### close(): Promise\\<void>; @close\n\n###### close 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| - | - | - |\n\n\n###### 返回值 \n\n| 类型 |\n| :- |\n| Promise\\<void> |\n \n\n##### getWriter(): WritableStreamDefaultWriter\\<W>; @getwriter\n\n###### getWriter 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| - | - | - |\n\n\n###### 返回值 \n\n| 类型 | 描述 |\n| :- | :- |\n| [WritableStreamDefaultWriter\\<W>](#writablestreamdefaultwriter-values) | This Streams API interface is the object returned by<br/>WritableStream.getWriter() and once created locks the \\< writer to the<br/>WritableStream ensuring that no other streams can write to the underlying<br/>sink. |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| closed | Promise\\<any> | 是 | - | - | - |\n@| desiredSize | number | 否 | - | - | |\n@| ready | Promise\\<any> | 是 | - | - | - |\n###### WritableStreamDefaultWriter\\<W> 的方法 @writablestreamdefaultwriter-values \n\n###### abort(reason?: any): Promise\\<void>; @abort\n\n###### abort 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| - | - | - |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| reason | any | 否 | - | - | - | \n\n###### 返回值 \n\n| 类型 |\n| :- |\n| Promise\\<void> |\n \n\n###### close(): Promise\\<void>; @close\n\n###### close 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| - | - | - |\n\n\n###### 返回值 \n\n| 类型 |\n| :- |\n| Promise\\<void> |\n \n\n###### releaseLock(): void; @releaselock\n\n###### releaseLock 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| - | - | - |\n\n\n\n###### write(chunk?: W): Promise\\<void>; @write\n\n###### write 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| - | - | - |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| chunk | any | 否 | - | - | - | \n\n###### 返回值 \n\n| 类型 |\n| :- |\n| Promise\\<void> |\n \n \n\n###### 返回值 \n\n| 类型 |\n| :- |\n| Promise\\<void> |\n \n\n###### tee(): \\[ReadableStream\\<R>, ReadableStream\\<R>] @tee\n\n###### tee 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| - | - | - |\n\n\n###### 返回值 \n\n| 类型 |\n| :- |\n| any |\n \n\n###### values(options?: { preventCancel?: boolean }): AsyncIterableIterator\\<R>; @values\n\n###### values 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| - | - | - |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| options | [{ preventCancel?: boolean; }](#preventcancel-values) | 否 | - | - | - |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| preventCancel | boolean | 否 | - | - | - | \n\n###### 返回值 \n\n| 类型 |\n| :- |\n| AsyncIterableIterator\\<R> |\n \n \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Uri | 转换后的Uri | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 3.99 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 3.99 | 3.99 | - | - | - | - |","itemType":"method"},"getExtApiProvider":{"name":"### getExtApiProvider(service, providerName)","description":"获取指定service的指定provider实现<br/>","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| service | string | 是 | - | - | 指定的服务名称 |\n| providerName | string | 是 | - | - | 指定provider名称 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| T \\| null | 指定 provider 实例 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.14 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.14 | 4.14 | - | - | - | - |","itemType":"method"},"onPrivacyAgreeChange":{"name":"### onPrivacyAgreeChange(callback)","description":"注册监听隐私协议更改回调<br/>","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callback | (option: [PrivacyOption](#privacyoption-values)) => void | 是 | - | - | 回调方法 | \n\n##### PrivacyOption 的属性值 @privacyoption-values \n\n| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| isAgree | boolean | 是 | - | - | 是否同意用户隐私协议 |\n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | 4.18 | - | - | - | - |","itemType":"method"},"offPrivacyAgreeChange":{"name":"### offPrivacyAgreeChange(callback)","description":"onPrivacyAgreeChange对应的反注册函数<br/>","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callback | (option: [PrivacyOption](#privacyoption-values)) => void | 是 | - | - | onPrivacyAgreeChange中传入的callback | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | 4.18 | - | - | - | - |","itemType":"method"},"onActivityCallback":{"name":"### onActivityCallback(callback, pageRoute?)","description":"注册监听activity回调方法<br/>","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callback | IUniActivityCallback | 是 | - | - | 回调方法,[查看具体子类实现](https://doc.dcloud.net.cn/uni-app-x/uts/utsactivitycallback.html) |\n| pageRoute | string\\|null | 否 | - | - | [页面的路由地址route](https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html#getcurrentpages),注意如果是tabBar页面,请传'tabBar'字符串 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | 4.18 | - | - | - | - |","itemType":"method"},"offActivityCallback":{"name":"### offActivityCallback(callback)","description":"onActivityCallback对应的反注册函数。<br/>","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callback | IUniActivityCallback | 是 | - | - | onActivityCallback传入的callback | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | 4.18 | - | - | - | - |","itemType":"method"},"getAppTheme":{"name":"### getAppTheme()","description":"获取app主题","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 值域为 dark \\| light \\| auto | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | 4.18 | - | - | - | - |","itemType":"method"},"getGenericType":{"name":"### getGenericType()","description":"获取类型T 对应的 java.lang.reflect.Type 对象<br/>","param":"","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| Type | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.02 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.02 | 4.02 | - | - | - | - |","itemType":"method"},"getGenericClassName":{"name":"### getGenericClassName()","description":"获取类型 T 对应的 class name","param":"","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| string | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.02 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.02 | 4.02 | - | - | - | - |","itemType":"method"}},"UTSiOS":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.platformObject.UTSiOS)","getCurrentViewController":{"name":"### getCurrentViewController()","description":"获取当前 app 显示的 UIViewController。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| UIViewController | 当前 app 显示的 UIViewController | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.11 | x | √ | - |\n","itemType":"method"},"getKeyWindow":{"name":"### getKeyWindow()","description":"获取当前app的keyWindow。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| UIWindow | 当前app的keyWindow. | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.11 | x | √ | - |\n","itemType":"method"},"colorWithString":{"name":"### colorWithString(value)","description":"获取指定的颜色。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| value | string | 是 | - | - | 需要转换的代表色值的字符串,支持一下格式:精简写法的十六进制 如:#f00,十六进制 如:#ff0000,RGB 如:rgb(255, 0, 0),RGBA 如:rgba(255, 0, 0, 0.5),色值关键字,如: red | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| UIColor | UIColor 实例对象 注:如转换失败 默认会返回 黑色 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.11 | x | √ | - |\n","itemType":"method"},"getResourcePath":{"name":"### getResourcePath(resourceName)","description":"获取H5资源文件的原生路径。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| resourceName | string | 是 | - | - | H5资源文件相对于工程的绝对路径, 如:“/static/logo.png” | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 该资源在原生目录下的路径 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.11 | x | √ | - |\n","itemType":"method"},"isSimulator":{"name":"### isSimulator()","description":"是否是模拟器。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 当前是模拟器 true, 当前是真机:false | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.11 | x | √ | - |\n","itemType":"method"},"getDeviceId":{"name":"### getDeviceId()","description":"获取设备 deviceId。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 当前设备的 deviceId | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.11 | x | √ | - |\n","itemType":"method"},"getModel":{"name":"### getModel()","description":"获取设备型号。","param":"","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| string | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.11 | x | √ | - |\n","itemType":"method"},"getUserAgent":{"name":"### getUserAgent()","description":"获取当前应用的 UserAgent。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 当前应用的 UserAgent。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.11 | x | √ | - |\n","itemType":"method"},"getAppId":{"name":"### getAppId()","description":"获取当前运行的app的AppId。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 当前运行的app的AppId。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.11 | x | √ | - |\n","itemType":"method"},"getDataPath":{"name":"### getDataPath()","description":"获取当前运行app的dataPath","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 当前运行app的dataPath。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.11 | x | √ | - |\n","itemType":"method"},"isUniMp":{"name":"### isUniMp()","description":"获取当前运行环境是否是unimp。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 是否是unimp。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.11 | x | √ | - |\n","itemType":"method"},"getAppName":{"name":"### getAppName()","description":"获取manifest.json 中配置的应用名称","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 应用名称。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.11 | x | √ | - |\n","itemType":"method"},"getAppVersion":{"name":"### getAppVersion()","description":"获取manifest.json 中配置的应用版本名称。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 应用版本名称。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.11 | x | √ | - |\n","itemType":"method"},"getAppVersionCode":{"name":"### getAppVersionCode()","description":"获取manifest.json 中配置的应用版本号。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 应用版本号。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.11 | x | √ | - |\n","itemType":"method"},"getOsLanguage":{"name":"### getOsLanguage()","description":"获取操作系统设置的语言。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | os language。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.11 | x | √ | - |\n","itemType":"method"},"getAppWgtVersion":{"name":"### getAppWgtVersion()","description":"获取应用资源(wgt)的版本名称。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 应用资源(wgt)的版本名称。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.11 | x | √ | - |\n","itemType":"method"},"getInnerVersion":{"name":"### getInnerVersion()","description":"获取引擎版本号。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 引擎版本号。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.11 | x | √ | - |\n","itemType":"method"},"getSystemSetting":{"name":"### getSystemSetting()","description":"获取系统设置信息。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| Map\\<string, any> | 系统设置信息。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.11 | x | √ | - |\n","itemType":"method"},"getOsTheme":{"name":"### getOsTheme()","description":"获取系统当前主题。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 系统当前主题信息。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.18 | x | √ | - |\n","itemType":"method"},"onOsThemeChange":{"name":"### onOsThemeChange(callback)","description":"监听系统主题变化(需要调用取消监听避免内存泄露)。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callback | (theme: string) => void | 是 | - | - | 监听函数 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 监听id。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.18 | x | √ | - |\n","itemType":"method"},"offOsThemeChange":{"name":"### offOsThemeChange(callbackId)","description":"取消监听系统主题变化。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackId | number | 是 | - | - | 监听id | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.18 | x | √ | - |\n","itemType":"method"},"getAppTheme":{"name":"### getAppTheme()","description":"获取App当前主题。","param":"","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | App当前主题信息。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.18 | x | √ | - |\n","itemType":"method"},"setAppTheme":{"name":"### setAppTheme(theme)","description":"设置App当前主题。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| theme | string | 是 | - | - | 要设置的主题信息 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| void | App当前主题信息。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.18 | x | √ | - |\n","itemType":"method"},"onAppThemeChange":{"name":"### onAppThemeChange(callback)","description":"监听app theme变化(需要调用取消监听避免内存泄露)。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callback | (theme: string) => void | 是 | - | - | 监听函数 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| number | 监听id。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.18 | x | √ | - |\n","itemType":"method"},"offAppThemeChange":{"name":"### offAppThemeChange(callbackId)","description":"取消监听app theme变化。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| callbackId | number | 是 | - | - | 监听id | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.18 | x | √ | - |\n","itemType":"method"},"destroyInstance":{"name":"### destroyInstance(obj)","description":"销毁指定的原生实例对象。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| obj | AnyObject | 是 | - | - | 要销毁的对象。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.25 | x | 4.25 | - |\n","itemType":"method"},"convert2AbsFullPath":{"name":"### convert2AbsFullPath(inputPath)","description":"将文件的项目相对地址转换为运行期对应的绝对地址<br/>","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| inputPath | string | 是 | - | - | 待转换的文件相对路径 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| string | 转换后文件绝对路径 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.11 | x | 4.11 | - |\n","itemType":"method"}},"UTSiOSHookProxy":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.platformObject.UTSiOSHookProxy)","onCreate":{"name":"### onCreate()","description":"uts 插件创建时的回调。<br/>此回调的准确时机对应于 OC 类的 load() 函数调用时机。","param":"","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.11 | x | 3.97 | - |\n","itemType":"method"},"applicationDidFinishLaunchingWithOptions":{"name":"### applicationDidFinishLaunchingWithOptions(application?, launchOptions?)","description":"应用正常启动时 (不包括已在后台转到前台的情况)的回调函数。<br/>可以在此回调函数做一些初始化操作,比如初始依赖的SDK等。注意:不要在此回调函数里做耗时操作,以免影响 app 的启动速度。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| application | UIApplication | 否 | - | - | App 的 UIApplicationDelegate 对象。 |\n| launchOptions | Map\\<UIApplication.LaunchOptionsKey, any> | 否 | - | - | 启动参数。默认值为 null (用户通过点击 push 通知启动应用时,该参数内会包含通知的信息) | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 返回一个 boolean 值,正常返回true。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.11 | x | 3.97 | - |\n","itemType":"method"},"didRegisterForRemoteNotifications":{"name":"### didRegisterForRemoteNotifications(deviceToken?)","description":"远程通知注册成功时的回调函数。<br/>可以在此函数里将 deviceToken 发送给服务端。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| deviceToken | Data | 否 | - | - | 设备的推送令牌 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.18 | x | 3.97 | - |\n","itemType":"method"},"didFailToRegisterForRemoteNotifications":{"name":"### didFailToRegisterForRemoteNotifications(error?)","description":"远程通知注册失败时的回调函数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| error | NSError | 否 | - | - | 失败的原因。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.18 | x | 3.97 | - |\n","itemType":"method"},"didReceiveRemoteNotification":{"name":"### didReceiveRemoteNotification(userInfo?)","description":"应用收到远程通知时的回调函数。(iOS 10.0之后废弃)<br/>当应用在前台运行中,收到远程通知时(不会弹出系统通知界面),会回调这个方法;当应用在后台状态时,点击push消息启动应用,也会回调这个方法;当应用完全没有启动时,点击push消息启动应用,就不会回调这个方法。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| userInfo | Map\\<AnyHashable, any> | 否 | - | - | 收到的远程通知信息。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.18 | x | 3.97 | - |\n","itemType":"method"},"didReceiveLocalNotification":{"name":"### didReceiveLocalNotification(notification?)","description":"应用收到本地通知时的回调函数。(iOS 10.0之后废弃)","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| notification | UILocalNotification | 否 | - | - | 接收到的本地通知 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.18 | x | 3.97 | - |\n","itemType":"method"},"applicationHandleOpenURL":{"name":"### applicationHandleOpenURL(application?, url?)","description":"通过 url scheme 方式唤起 app 时的回调函数。(iOS9 之前的系统回调此方法,iOS9 之后的系统请使用 applicationOpenURLOptions)","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| application | UIApplication | 否 | - | - | App 的 UIApplicationDelegate 对象。 |\n| url | URL | 否 | - | - | 要打开的URL资源。该资源可以是网络资源或文件。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 如果成功处理请求,则为true;如果尝试打开URL资源失败,则为false。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.11 | x | 3.97 | - |\n","itemType":"method"},"applicationOpenURLOptions":{"name":"### applicationOpenURLOptions(app?, url?, options?)","description":"通过 url scheme 方式唤起 app 时的回调函数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| app | UIApplication | 否 | - | - | - |\n| url | URL | 否 | - | - | 要打开的URL资源。该资源可以是网络资源或文件。 |\n| options | Map\\<UIApplication.OpenURLOptionsKey, any> | 否 | - | - | URL处理选项的字典, 默认值为 null 。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | 如果成功处理请求,则为true;如果尝试打开URL资源失败,则为false。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.11 | x | 3.97 | - |\n","itemType":"method"},"applicationWillResignActive":{"name":"### applicationWillResignActive(application?)","description":"当应用从活动状态主动变为非活动状态的时的回调函数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| application | UIApplication | 否 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.11 | x | 3.97 | - |\n","itemType":"method"},"applicationDidBecomeActive":{"name":"### applicationDidBecomeActive(application?)","description":"应用完全激活时的回调函数。<br/>应用程序冷启动或者从后台转到前台后都会完全激活应用程序。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| application | UIApplication | 否 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.11 | x | 3.97 | - |\n","itemType":"method"},"applicationDidEnterBackground":{"name":"### applicationDidEnterBackground(application?)","description":"应用程序进入后台时的回调函数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| application | UIApplication | 否 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.11 | x | 3.97 | - |\n","itemType":"method"},"applicationWillEnterForeground":{"name":"### applicationWillEnterForeground(application?)","description":"当应用在后台状态,将要进入到前台运行时的回调函数。<br/>应用程序冷启动时不会回调此方法。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| application | UIApplication | 否 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.11 | x | 3.97 | - |\n","itemType":"method"},"applicationMain":{"name":"### applicationMain(argc, argv)","description":"应用程序的 main 函数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| argc | Int32 | 是 | - | - | - |\n| argv | UnsafeMutablePointer\\<UnsafeMutablePointer\\<CChar> \\| null> | 是 | - | - | - | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.11 | x | 3.97 | - |\n","itemType":"method"},"applicationContinueUserActivityRestorationHandler":{"name":"### applicationContinueUserActivityRestorationHandler(application?, userActivity?, restorationHandler?)","description":"当应用程序接收到与用户活动相关的数据时调用此方法,例如,当用户使用 Universal Link 唤起应用时。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| application | UIApplication | 否 | - | - | App 的 UIApplicationDelegate 对象。 |\n| userActivity | NSUserActivity | 否 | - | - | 包含与用户正在执行的任务相关联的数据的活动对象。使用这些数据来继续用户在iOS应用中的活动。 |\n| restorationHandler | (res?: any) => void | 否 | - | - | 需要执行的回调,该回调是可选的,默认值为 null。 | \n","returnValue":"**返回值** \n\n| 类型 | 描述 |\n| :- | :- |\n| boolean | true表示你的应用处理了这个活动,false表示让iOS知道你的应用没有处理这个活动。 | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | x | 4.11 | x | 3.97 | - |\n","itemType":"method"}},"UTSAndroidHookProxy":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.platformObject.UTSAndroidHookProxy)"},"UniActivityCallback":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.platformObject.UniActivityCallback)","onAttachFragment":{"name":"### onAttachFragment(params, fragment)","description":"对应原生 Activity 的 [onAttachFragment](https://developer.android.com/reference/android/app/Activity#onAttachFragment(android.app.Fragment)) 函数,此方法在 Fragment 被附加到 Activity 时被调用,以处理相关联的逻辑。<br/>注意第一个参数为自定义参数 UniActivityParams,第二个参数 fragment 表示被附加的 Fragment 实例。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| fragment | Fragment | 是 | - | - | 被附加的 Fragment 实例 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onUserInteraction":{"name":"### onUserInteraction(params)","description":"对应原生 Activity 的 [onUserInteraction](https://developer.android.com/reference/android/app/Activity#onUserInteraction()) 函数,该方法在用户与设备进行交互时被调用,用于处理用户交互前的逻辑。<br/>注意第一个参数为自定义参数 UniActivityParams。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onUserLeaveHint":{"name":"### onUserLeaveHint(params)","description":"对应原生 Activity 的 [onUserLeaveHint](https://developer.android.com/reference/android/app/Activity#onUserLeaveHint()) 函数,此方法在用户即将离开应用且返回到上一级活动(通过按Home键等操作造成的)时被调用,用于处理用户即将离开应用前的逻辑。<br/>注意第一个参数为自定义参数 UniActivityParams。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onActivityResult":{"name":"### onActivityResult(params, requestCode, resultCode, data)","description":"对应原生 Activity 的 [onActivityResult](https://developer.android.com/reference/android/app/Activity#onActivityResult(int,%20int,%20android.content.Intent)) 函数,此方法在从另一个活动返回数据时被调用,用于处理返回数据前的逻辑。<br/>注意第一个参数为自定义参数 UniActivityParams,第二和第三个参数分别代表请求代码和结果代码,第四个参数 data 为返回的数据。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| requestCode | Int | 是 | - | - | 请求代码 |\n| resultCode | Int | 是 | - | - | 结果代码 |\n| data | Intent \\| null | 是 | - | - | 返回的数据 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onRequestPermissionsResult":{"name":"### onRequestPermissionsResult(params, requestCode, permissions, grantResults)","description":"对应原生 Activity 的 \\[onRequestPermissionsResult](https://developer.android.com/reference/android/app/Activity#onRequestPermissionsResult(int,%20java.lang.String[],%20int[]) 函数,此方法在用户响应权限请求后被调用,用于处理权限请求结果前的逻辑。<br/>注意第一个参数为自定义参数 UniActivityParams,第二个参数 requestCode 为请求代码,第三个参数 permissions 为请求的权限数组,第四个参数 grantResults 为权限请求结果数组。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| requestCode | Int | 是 | - | - | 请求代码 |\n| permissions | MutableList\\<String> | 是 | - | - | 请求的权限 |\n| grantResults | IntArray | 是 | - | - | 权限请求结果 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onApplyThemeResource":{"name":"### onApplyThemeResource(params, theme, resid, first)","description":"对应原生 Activity 的 [onApplyThemeResource](https://developer.android.com/reference/android/app/Activity#onApplyThemeResource(android.content.res.Resources.Theme,%20int,%20boolean)) 函数,此方法在应用主题资源时被调用,用于处理主题资源应用前的逻辑。<br/>注意第一个参数为自定义参数 UniActivityParams,第二个参数 theme 为要应用的主题资源,第三个参数 resid 为资源ID,第四个参数 first 标示是否为首次应用。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| theme | Resources.Theme | 是 | - | - | 要应用的主题资源 |\n| resid | Int | 是 | - | - | 资源ID |\n| first | Boolean | 是 | - | - | 是否为首次应用 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onCreateView":{"name":"### onCreateView(params, parent, name, context, attrs)","description":"对应原生 Activity 的 [onCreateView](https://developer.android.com/reference/android/app/Activity#onCreateView(android.view.View,%20java.lang.String,%20android.content.Context,%20android.util.AttributeSet))函数,此方法在视图创建时被调用,用于处理视图创建前的逻辑。<br/>注意第一个参数为自定义参数 UniActivityParams,后续参数分别为 parent 视图的父视图,name 视图名称,context 视图的上下文环境及 attrs 视图的属性集。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| parent | View \\| null | 是 | - | - | 父视图 |\n| name | string | 是 | - | - | 视图名称 |\n| context | Context | 是 | - | - | 上下文环境 |\n| attrs | AttributeSet | 是 | - | - | 属性集 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onTitleChanged":{"name":"### onTitleChanged(params, title, color)","description":"对应原生 Activity [onTitleChanged](https://developer.android.com/reference/android/app/Activity#onTitleChanged(java.lang.CharSequence,%20int)) 函数,注意第一个参数为自定义参数 UniActivityParams。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| title | string | 是 | - | - | 新的标题字符 |\n| color | Int | 是 | - | - | 新的标题颜色 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onChildTitleChanged":{"name":"### onChildTitleChanged(params, childActivity, title)","description":"对应原生 Activity [onChildTitleChanged](https://developer.android.com/reference/android/app/Activity#onChildTitleChanged(android.app.Activity,%20java.lang.CharSequence)) 函数,注意第一个参数为自定义参数 UniActivityParams。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| childActivity | Activity | 是 | - | - | 子Activity的实例 |\n| title | string | 是 | - | - | 新的子Activity标题字符 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onContextMenuClosed":{"name":"### onContextMenuClosed(params, menu)","description":"对应原生 Activity [onContextMenuClosed](https://developer.android.com/reference/android/app/Activity#onContextMenuClosed(android.view.Menu)) 函数,注意第一个参数为自定义参数 UniActivityParams。<br/>当上下文菜单被关闭时调用,可用于执行菜单关闭后的操作。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| menu | Menu | 是 | - | - | 关闭的菜单 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onCreateContextMenu":{"name":"### onCreateContextMenu(params, menu, v, menuInfo)","description":"对应原生 Activity [onCreateContextMenu](https://developer.android.com/reference/android/app/Activity#onCreateContextMenu(android.view.ContextMenu,%20android.view.View,%20android.view.ContextMenu.ContextMenuInfo)) 函数,注意第一个参数为自定义参数 UniActivityParams。<br/>当创建上下文菜单时调用,可用于定制上下文菜单的内容。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| menu | ContextMenu | 是 | - | - | 要创建的上下文菜单 |\n| v | View | 是 | - | - | 与上下文菜单相关联的视图 |\n| menuInfo | ContextMenu.ContextMenuInfo \\| null | 是 | - | - | 关联上下文菜单的附加信息,可为空 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onOptionsMenuClosed":{"name":"### onOptionsMenuClosed(params, menu)","description":"对应原生 Activity [onOptionsMenuClosed](https://developer.android.com/reference/android/app/Activity#onOptionsMenuClosed(android.view.Menu)) 函数,注意第一个参数为自定义参数 UniActivityParams。<br/>当选项菜单被关闭时调用。可用于执行菜单关闭后的操作。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| menu | Menu | 是 | - | - | 关闭的菜单 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPrepareNavigateUpTaskStack":{"name":"### onPrepareNavigateUpTaskStack(params, builder)","description":"对应原生 Activity [onPrepareNavigateUpTaskStack](https://developer.android.com/reference/android/app/Activity#onPrepareNavigateUpTaskStack(android.app.TaskStackBuilder)) 函数,注意第一个参数为自定义参数 UniActivityParams。<br/>此方法在用户从当前 Activity 导航到应用的祖先 Activity 时调用,以准备返回栈。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| builder | TaskStackBuilder | 是 | - | - | 返回栈建造者,用于构造导航返回栈 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onProvideAssistData":{"name":"### onProvideAssistData(params, data)","description":"对应原生 Activity [onProvideAssistData](https://developer.android.com/reference/android/app/Activity#onProvideAssistData(android.os.Bundle)) 函数,注意第一个参数为自定义参数 UniActivityParams。<br/>此方法在构建辅助数据时被调用,比如在使用 Google Now 时展示有关当前 Activity 的信息。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| data | Bundle | 是 | - | - | 提供辅助数据的 Bundle | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onProvideAssistContent":{"name":"### onProvideAssistContent(params, outContent)","description":"对应原生 Activity [onProvideAssistContent](https://developer.android.com/reference/android/app/Activity#onProvideAssistContent(android.app.assist.AssistContent)) 函数,注意第一个参数为自定义参数 UniActivityParams。<br/>此方法允许Activity提供有关其当前在屏幕上显示的内容的附加信息,这有助于提升语音搜索等辅助功能的体验。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| outContent | AssistContent | 是 | - | - | 通过这个参数,Activity可以提供有关其内容的结构化信息。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreAttachFragment":{"name":"### onPreAttachFragment(params, fragment)","description":"对应原生 Activity [onAttachFragment](https://developer.android.com/reference/android/app/Activity#onAttachFragment(android.app.Fragment)) 函数,该方法在Fragment与Activity建立关联时调用。本方法的调用时机在super.onAttachFragment()之前,它允许您在Fragment完全附加到Activity之前进行必要的设置或初始化。<br/>提在super方法之前调用","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| fragment | Fragment | 是 | - | - | 即将附加的Fragment对象。这允许Activity在Fragment完全附加之前与之交互。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreUserInteraction":{"name":"### onPreUserInteraction(params)","description":"对应原生 Activity [onUserInteraction](https://developer.android.com/reference/android/app/Activity#onUserInteraction()) 函数。<br/>在用户与设备进行交互时被调用,例如触摸屏幕或按键。开发者可以覆盖此方法以执行特定操作,如取消自动隐藏的导航控件等。<br/>在super方法之前调用","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreUserLeaveHint":{"name":"### onPreUserLeaveHint(params)","description":"对应原生 Activity [onUserLeaveHint](https://developer.android.com/reference/android/app/Activity#onUserLeaveHint()) 函数。<br/>当用户即将离开当前Activity时被调用,通常是因为用户按了 \"Home\" 键或最近任务键。可以覆盖此方法来实现特定的暂停、保存状态或资源释放操作。<br/>在super方法之前调用","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreActivityResult":{"name":"### onPreActivityResult(params, requestCode, resultCode, data)","description":"对应原生 Activity [onActivityResult](https://developer.android.com/reference/android/app/Activity#onActivityResult(int,%20int,%20android.content.Intent)) 函数。<br/>当一个启动的Activity返回结果时调用。在super方法之前调用。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| requestCode | Int | 是 | - | - | 请求代码,标识发送请求的Activity |\n| resultCode | Int | 是 | - | - | 结果代码,表明操作是否成功或取消 |\n| data | Intent \\| null | 是 | - | - | 含返回数据的Intent对象或null | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreApplyThemeResource":{"name":"### onPreApplyThemeResource(params, theme, resid, first)","description":"对应原生 Activity [onApplyThemeResource](https://developer.android.com/reference/android/app/Activity#onApplyThemeResource(android.content.res.Resources.Theme,int,boolean)) 函数。<br/>在super方法之前调用","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数, 包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| theme | Resources.Theme | 是 | - | - | 当前 Activity 即将应用的主题资源 |\n| resid | Int | 是 | - | - | 用于应用主题的资源ID |\n| first | Boolean | 是 | - | - | 是否为第一次应用该主题 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreCreateView":{"name":"### onPreCreateView(params, parent, name, context, attrs)","description":"对应原生 Activity [onCreateView](https://developer.android.com/reference/android/app/Activity#onCreateView(android.view.View,java.lang.String,android.content.Context,android.util.AttributeSet)) 函数。<br/>在super方法之前调用","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数, 包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| parent | View \\| null | 是 | - | - | 即将创建视图的父视图 |\n| name | [String](#string-values) | 是 | - | - | 视图的标识名 |\n| context | Context | 是 | - | - | 视图创建时的上下文 |\n| attrs | AttributeSet | 是 | - | - | 视图的属性集 | \n\n##### String 的方法 @string-values \n\n##### at(index: number): T \\| undefined; @at\nTakes an integer value and returns the item at that index,\nallowing for positive and negative integers.\nNegative integers count back from the last item in the array.\n###### at 兼容性 \n| Web | Android | iOS |\n| :- | :- | :- |\n| - | - | - |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| index | number | 是 | - | - | - | \n\n###### 返回值 \n\n| 类型 |\n| :- |\n| T \\| any |\n \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreTitleChanged":{"name":"### onPreTitleChanged(params, title, color)","description":"对应原生 Activity [onTitleChanged](https://developer.android.com/reference/android/app/Activity#onTitleChanged(java.lang.CharSequence,%20int)) 函数,<br/>在super方法之前调用","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值。 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| title | [String](#string-values) | 是 | - | - | 即将设置的新标题。 |\n| color | Int | 是 | - | - | 标题的颜色。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreChildTitleChanged":{"name":"### onPreChildTitleChanged(params, childActivity, title)","description":"对应原生 Activity [onChildTitleChanged](https://developer.android.com/reference/android/app/Activity#onChildTitleChanged(android.app.Activity,%20java.lang.CharSequence)) 函数,<br/>在super方法之前调用","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值。 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| childActivity | Activity | 是 | - | - | 标题变更的子Activity。 |\n| title | [String](#string-values) | 是 | - | - | 即将设置的新标题。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreContextMenuClosed":{"name":"### onPreContextMenuClosed(params, menu)","description":"对应原生 Activity [onContextMenuClosed](https://developer.android.com/reference/android/app/Activity#onContextMenuClosed(android.view.Menu)) 函数,<br/>在super方法之前调用","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值。 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| menu | Menu | 是 | - | - | 引发上下文菜单关闭事件的菜单。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreCreateContextMenu":{"name":"### onPreCreateContextMenu(params, menu, v, menuInfo)","description":"对应原生 Activity [onCreateContextMenu](https://developer.android.com/reference/android/app/Activity#onCreateContextMenu(android.view.ContextMenu,%20android.view.View,%20android.view.ContextMenu.ContextMenuInfo)) 函数,<br/>在 super 方法之前调用,注意第一个参数为自定义参数 UniActivityParams。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值。 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| menu | ContextMenu | 是 | - | - | 要创建的上下文菜单。 |\n| v | View | 是 | - | - | 引发上下文菜单的视图。 |\n| menuInfo | ContextMenu.ContextMenuInfo \\| null | 是 | - | - | 与上下文菜单关联的上下文菜单信息,如果没有则为 null。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreOptionsMenuClosed":{"name":"### onPreOptionsMenuClosed(params, menu)","description":"对应原生 Activity [onOptionsMenuClosed](https://developer.android.com/reference/android/app/Activity#onOptionsMenuClosed(android.view.Menu)) 函数,<br/>在 super 方法之前调用,注意第一个参数为自定义参数 UniActivityParams。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数, 包括页面路由地址与方法返回值。 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| menu | Menu | 是 | - | - | 被关闭的选项菜单。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPrePrepareNavigateUpTaskStack":{"name":"### onPrePrepareNavigateUpTaskStack(params, builder)","description":"对应原生 Activity [onPrepareNavigateUpTaskStack](https://developer.android.com/reference/android/app/Activity#onPrepareNavigateUpTaskStack(android.app.TaskStackBuilder)) 函数,<br/>在 super 方法之前调用,注意第一个参数为自定义参数 UniActivityParams。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数, 包括页面路由地址与方法返回值。 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| builder | TaskStackBuilder | 是 | - | - | 用于构建向上导航任务栈的 TaskStackBuilder 实例。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreProvideAssistData":{"name":"### onPreProvideAssistData(params, data)","description":"对应原生 Activity [onProvideAssistData](https://developer.android.com/reference/android/app/Activity#onProvideAssistData(android.os.Bundle)) 函数,<br/>在 super 方法之前调用,注意第一个参数为自定义参数 UniActivityParams。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数, 包括页面路由地址与方法返回值。 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| data | Bundle | 是 | - | - | 辅助数据的捆绑包。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreProvideAssistContent":{"name":"### onPreProvideAssistContent(params, outContent)","description":"对应原生 Activity [onProvideAssistContent](https://developer.android.com/reference/android/app/Activity#onProvideAssistContent(android.app.assist.AssistContent)) 函数,<br/>在 super 方法之前调用,注意第一个参数为自定义参数 UniActivityParams。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数, 包括页面路由地址与方法返回值。 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| outContent | AssistContent | 是 | - | - | 辅助内容的对象。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"}},"UniActivityComponentCallback":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.platformObject.UniActivityComponentCallback)","onConfigurationChanged":{"name":"### onConfigurationChanged(params, newConfig)","description":"对应原生 Activity [onConfigurationChanged](https://developer.android.com/reference/android/app/Activity#onConfigurationChanged(android.content.res.Configuration)) 函数,<br/>当设备配置(如屏幕大小、方向、语言等)发生改变时调用。开发者可以通过重写此方法来处理配置更改事件。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值。这允许开发者在处理配置更改时访问特定的环境信息。 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| newConfig | Configuration | 是 | - | - | 新的设备配置数据。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onLowMemory":{"name":"### onLowMemory(params)","description":"对应原生 Activity [onLowMemory](https://developer.android.com/reference/android/app/Activity#onLowMemory()) 函数,<br/>当系统运行在低内存环境下时调用。在这种情况下,开发者应当清除不必要的资源以帮助系统回收内存,减轻内存压力。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值。这提供了一个机会,让开发者能够在应用面临低内存情况时执行特定逻辑。 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onTrimMemory":{"name":"### onTrimMemory(params, level)","description":"对应原生 Activity [onTrimMemory](https://developer.android.com/reference/android/app/Activity#onTrimMemory(int)) 函数,<br/>当系统决定当前进程需要缩减内存使用时调用。开发者可以根据传递的内存级别清除不必要的资源以帮助系统管理内存。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值。这使得开发者能够基于应用的当前状态适当地响应内存清理需求。 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| level | Int | 是 | - | - | 提供了当前内存清理级别的指示,开发者可以根据这个级别确定清理资源的紧迫性。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreConfigurationChanged":{"name":"### onPreConfigurationChanged(params, newConfig)","description":"该方法是对原生 Activity [onConfigurationChanged](https://developer.android.com/reference/android/app/Activity#onConfigurationChanged(android.content.res.Configuration)) 函数的扩展,<br/>在 super 方法之前调用,注意第一个参数为自定义参数 UniActivityParams。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值。这为开发者提供了一个机会,让他们能够在配置更改生效之前对其进行预处理。 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| newConfig | Configuration | 是 | - | - | 提供了新的设备配置信息,允许开发者根据这些信息调整应用行为。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreLowMemory":{"name":"### onPreLowMemory(params)","description":"此方法在 Activity 的 [onLowMemory](https://developer.android.com/reference/android/app/Activity#onLowMemory()) 方法被触发之前调用,<br/>允许开发者在系统通知内存不足之前执行自定义逻辑。这可以用于积极地释放资源或减少内存使用,以避免应用被系统杀死。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值。它们可以被用来做出更加上下文相关的响应。 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreTrimMemory":{"name":"### onPreTrimMemory(params, level)","description":"此方法在 Activity 的 [onTrimMemory](https://developer.android.com/reference/android/app/Activity#onTrimMemory(int)) 方法被触发之前调用,<br/>允许开发者在系统建议应用减少内存使用之前预先采取措施。这里的处理可以根据传递的内存级别清除缓存或其他不必要的资源。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值。使用这些信息,可以选择性地进行内存优化。 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| level | Int | 是 | - | - | 系统传递的当前内存清理级别的枚举值。开发者可以基于这个级别来调整他们的内存管理策略。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"}},"UniActivityKeyEventCallback":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.platformObject.UniActivityKeyEventCallback)","onKeyDown":{"name":"### onKeyDown(params, keyCode, event)","description":"此方法对应 Android Activity 的 [onKeyDown](https://developer.android.com/reference/android/app/Activity#onKeyDown(int,%20android.view.KeyEvent)) 函数,<br/>在用户按下键盘键(例如返回键、菜单键等)时调用。可以用于自定义按键事件的响应逻辑。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值。这些参数为开发者提供了当前活动上下文以及任何先前操作的结果。 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| keyCode | Int | 是 | - | - | 表明被按下的键的键码。 |\n| event | KeyEvent \\| null | 是 | - | - | 提供了关于按键事件的详细信息,包括按键的动作和代码。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onKeyLongPress":{"name":"### onKeyLongPress(params, keyCode, event)","description":"此方法对应 Android Activity 的 [onKeyLongPress](https://developer.android.com/reference/android/app/Activity#onKeyLongPress(int,%20android.view.KeyEvent)) 函数,<br/>在用户长按键盘键时调用。这通常用于执行按键的二级功能。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值。这样,开发者可以利用设置的返回参数执行上下文相关的操作。 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| keyCode | Int | 是 | - | - | 表明长按的键的键码。 |\n| event | KeyEvent \\| null | 是 | - | - | 提供关于长按键事件的额外信息,允许开发者根据需要来响应事件。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onKeyUp":{"name":"### onKeyUp(params, keyCode, event)","description":"此方法对应 Android Activity 的 [onKeyUp](https://developer.android.com/reference/android/app/Activity#onKeyUp(int,%20android.view.KeyEvent)) 函数,<br/>在用户松开键盘键时调用。可以用于处理按键抬起事件。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值。这些参数为开发者提供当前上下文及函数调用的相关结果。 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| keyCode | Int | 是 | - | - | 表示松开的键的键码。 |\n| event | KeyEvent \\| null | 是 | - | - | 提供了关于按键事件的详细信息,包含按键的动作和代码等。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onKeyMultiple":{"name":"### onKeyMultiple(params, keyCode, repeatCount, event)","description":"此方法对应 Android Activity 的 [onKeyMultiple](https://developer.android.com/reference/android/app/Activity#onKeyMultiple(int,%20int,%20android.view.KeyEvent)) 函数,<br/>在用户进行多个按键事件时调用(例如,当用户按住某个键时会连续触发此事件)。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值。可以用来执行基于当前应用状态的操作。 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| keyCode | Int | 是 | - | - | 表示重复按下的键的键码。 |\n| repeatCount | Int | 是 | - | - | 表明此键的重复次数。 |\n| event | KeyEvent \\| null | 是 | - | - | 提供按键事件的详细信息。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreKeyDown":{"name":"### onPreKeyDown(params, keyCode, event)","description":"在 Android Activity 的 [onKeyDown](https://developer.android.com/reference/android/app/Activity#onKeyDown(int,%20android.view.KeyEvent)) 方法触发之前调用,<br/>允许开发者在标准按键处理流程之前执行自定义逻辑。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值。便于开发者获取上下文信息和返回的数据。 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| keyCode | Int | 是 | - | - | 按下的键的键码。 |\n| event | KeyEvent \\| null | 是 | - | - | 提供按键事件的详细信息。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreKeyLongPress":{"name":"### onPreKeyLongPress(params, keyCode, event)","description":"在 Android Activity 的 [onKeyLongPress](https://developer.android.com/reference/android/app/Activity#onKeyLongPress(int,%20android.view.KeyEvent)) 方法触发之前调用,<br/>允许开发者在标准长按处理流程之前执行自定义逻辑。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值。开发者可以利用这些返回值进行进一步处理。 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| keyCode | Int | 是 | - | - | 长按的键的键码。 |\n| event | KeyEvent \\| null | 是 | - | - | 提供长按键事件的详细信息。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreKeyUp":{"name":"### onPreKeyUp(params, keyCode, event)","description":"在 Android Activity 的 [onKeyUp](https://developer.android.com/reference/android/app/Activity#onKeyUp(int,%20android.view.KeyEvent)) 方法触发之前调用,<br/>允许开发者在标准按键抬起处理流程之前执行自定义逻辑。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值。便于开发者获取和处理返回的数据。 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| keyCode | Int | 是 | - | - | 松开的键的键码。 |\n| event | KeyEvent \\| null | 是 | - | - | 提供按键抬起事件的详细信息。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreKeyMultiple":{"name":"### onPreKeyMultiple(params, keyCode, repeatCount, event)","description":"在 Android Activity 的 [onKeyMultiple](https://developer.android.com/reference/android/app/Activity#onKeyMultiple(int,%20int,%20android.view.KeyEvent)) 方法触发之前调用,<br/>允许开发者在处理多个按键事件之前执行自定义逻辑。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值。开发者可以根据这些返回值对按键事件进行处理。 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| keyCode | Int | 是 | - | - | 表示触发多次的键的键码。 |\n| repeatCount | Int | 是 | - | - | 按键重复的次数。 |\n| event | KeyEvent \\| null | 是 | - | - | 提供多个按键事件的详细信息。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"}},"UniActivityLifeCycleCallback":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.platformObject.UniActivityLifeCycleCallback)","onCreate":{"name":"### onCreate(params, savedInstanceState)","description":"此方法对应 Android Activity 的 [onCreate](https://developer.android.com/reference/android/app/Activity#onCreate(android.os.Bundle)) 函数,<br/>当Activity正在被创建时调用。这个回调提供了一种方法来执行任何初始化——创建视图、绑定数据等操作。<br/>注意,由于注册时机的问题,首页无法回调此方法","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值,这些参数为开发者提供了当前上下文及函数调用的相关结果。 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| savedInstanceState | Bundle \\| null | 是 | - | - | 如果Activity在之前被销毁,现在正在重新创建,这个Bundle将包含上次保存的状态数据。如果Activity是首次创建,则为null。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreCreate":{"name":"### onPreCreate(params, savedInstanceState)","description":"在 Android Activity 的 [onCreate](https://developer.android.com/reference/android/app/Activity#onCreate(android.os.Bundle)) 方法触发之前调用,<br/>允许开发者在 Activity 创建之前执行自定义逻辑。<br/>注意,由于注册时机的问题,首页无法回调此方法","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值。这些参数为开发者提供了当前的上下文信息和方法调用的结果。 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| savedInstanceState | Bundle \\| null | 是 | - | - | 如果 Activity 正在重新创建,则此参数包含之前保存的状态信息。 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onStart":{"name":"### onStart(params)","description":"对应原生 Activity 的 [onStart](https://developer.android.com/reference/android/app/Activity#onStart()) 函数,当Activity即将对用户可见时调用。<br/>注意,由于注册时机的问题,首页无法回调此方法","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreStart":{"name":"### onPreStart(params)","description":"在 Android Activity 的 [onStart](https://developer.android.com/reference/android/app/Activity#onStart()) 方法触发之前调用,<br/>允许开发者在 Activity 开始之前执行自定义逻辑。<br/>注意,由于注册时机的问题,首页无法回调此方法","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值。这些参数为开发者提供了进行操作所需的上下文信息。 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onRestart":{"name":"### onRestart(params)","description":"对应原生 Activity 的 [onRestart](https://developer.android.com/reference/android/app/Activity#onRestart()) 函数,当Activity在停止后重新启动前调用。<br/>注意第一个参数为自定义参数 UniActivityParams。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreRestart":{"name":"### onPreRestart(params)","description":"对应原生 Activity 的 [onRestart](https://developer.android.com/reference/android/app/Activity#onRestart()) 函数,在super方法之前调用。此为在 Activity 重启前额外的准备步骤,提供了自定义操作的机会。<br/>在 super 方法之前调用,注意第一个参数为自定义参数 UniActivityParams。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数, 包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onResume":{"name":"### onResume(params)","description":"对应原生 Activity 的 [onResume](https://developer.android.com/reference/android/app/Activity#onResume()) 函数,在 Activity 准备和用户进行交互时调用。此时 Activity 处于运行状态的顶层。<br/>注意第一个参数为自定义参数 UniActivityParams。<br/>注意,由于注册时机的问题,首页首次无法回调此方法","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数, 包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreResume":{"name":"### onPreResume(params)","description":"在 Android Activity 的 [onResume](https://developer.android.com/reference/android/app/Activity#onResume()) 方法触发之前调用,<br/>允许开发者在 Activity 恢复之前执行自定义逻辑。<br/>注意,由于注册时机的问题,首页首次无法回调此方法","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值。借助这些参数,开发者可以对 Activity 的恢复行为进行定制。 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPause":{"name":"### onPause(params)","description":"对应原生 Activity 的 [onPause](https://developer.android.com/reference/android/app/Activity#onPause()) 函数,当 Activity 开始进入不活动状态(即用户即将离开此 Activity)时调用。此时应当暂停正在进行的操作和更新 UI 数据。<br/>注意第一个参数为自定义参数 UniActivityParams。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数, 包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPrePause":{"name":"### onPrePause(params)","description":"在 Android Activity 的 [onPause](https://developer.android.com/reference/android/app/Activity#onPause()) 方法触发之前调用,<br/>允许开发者在 Activity 暂停之前执行自定义逻辑。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值。这些参数提供了进行必要操作所需的上下文。 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onStop":{"name":"### onStop(params)","description":"对应原生 Activity 的 [onStop](https://developer.android.com/reference/android/app/Activity#onStop()) 函数,在 Activity 即将停止时被调用,这通常是因为 Activity 即将被销毁,或因为用户切换到了另一个 Activity。在此阶段,应保存数据或进行清理工作。<br/>注意第一个参数为自定义参数 UniActivityParams。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数, 包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreStop":{"name":"### onPreStop(params)","description":"在 Android Activity 的 [onStop](https://developer.android.com/reference/android/app/Activity#onStop()) 方法触发之前调用,<br/>允许开发者在 Activity 停止之前执行自定义逻辑。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值。利用这些返回参数,开发者可以优化 Activity 的停止过程。 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onDestroy":{"name":"### onDestroy(params)","description":"在 Android Activity 的 [onDestroy](https://developer.android.com/reference/android/app/Activity#onDestroy()) 方法触发时调用,<br/>允许开发者在 Activity 销毁之前执行自定义逻辑或清理资源。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值。这些参数为开发者提供了当前的上下文信息和方法调用的结果。 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreDestroy":{"name":"### onPreDestroy(params)","description":"在 Android Activity 的 [onDestroy](https://developer.android.com/reference/android/app/Activity#onDestroy()) 方法触发之前调用,<br/>允许开发者在 Activity 销毁之前执行自定义逻辑。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值。这为开发者提供了一个机会,在 Activity 销毁之前做必要的资源释放与保存。 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"}},"UniActivityWindowCallback":{"tutorial":"\n### 参见\n[相关 Bug](https://issues.dcloud.net.cn/?mid=uts.platformObject.UniActivityWindowCallback)","onDetachedFromWindow":{"name":"### onDetachedFromWindow(params)","description":"对应原生 Activity 的 [onDetachedFromWindow](https://developer.android.com/reference/android/view/View#onDetachedFromWindow()) 函数,当 Activity 的窗口从窗口管理器中移除时调用。这是进行最后清理的好时机。<br/>注意第一个参数为自定义参数 UniActivityParams。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数, 包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onContentChanged":{"name":"### onContentChanged(params)","description":"对应原生 Activity 的 [onContentChanged](https://developer.android.com/reference/android/app/Activity#onContentChanged()) 函数,当 Activity 的内容视图更改时调用。这可以作为响应内容更改并更新 UI 的适当时机。<br/>注意第一个参数为自定义参数 UniActivityParams。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数, 包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onWindowAttributesChanged":{"name":"### onWindowAttributesChanged(params, attrs)","description":"对应原生 Activity 的 [onWindowAttributesChanged](https://developer.android.com/reference/android/view/Window.Callback#onWindowAttributesChanged(android.view.WindowManager.LayoutParams)) 函数,当当前窗口属性更改时调用,如大小、透明度等。<br/>注意第一个参数为自定义参数 UniActivityParams,第二个参数 attrs 为窗口参数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数, 包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| attrs | WindowManager.LayoutParams | 是 | - | - | 新的窗口属性 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onWindowFocusChanged":{"name":"### onWindowFocusChanged(params, hasFocus)","description":"对应原生 Activity 的 [onWindowFocusChanged](https://developer.android.com/reference/android/app/Activity#onWindowFocusChanged(boolean)) 函数,当 Activity 的窗口焦点发生变化时调用,如获得或失去焦点。<br/>注意第一个参数为自定义参数 UniActivityParams,第二个参数 hasFocus 指示窗口是否获得了焦点。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数, 包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| hasFocus | Boolean | 是 | - | - | 窗口是否获得了焦点 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onAttachedToWindow":{"name":"### onAttachedToWindow(params)","description":"对应原生 Activity 的 [onAttachedToWindow](https://developer.android.com/reference/android/view/View#onAttachedToWindow()) 函数,当 Activity 的窗口被添加到窗口管理器时调用。这标志着 Activity 可以开始与用户交互。<br/>注意第一个参数为自定义参数 UniActivityParams。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数, 包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPanelClosed":{"name":"### onPanelClosed(params, featureId, menu)","description":"对应原生 Activity 的 [onPanelClosed](https://developer.android.com/reference/android/app/Activity#onPanelClosed(int,%20android.view.Menu)) 函数,当菜单面板被关闭时调用,可以在这里做一些清理工作。<br/>注意第一个参数为自定义参数 UniActivityParams,第二个参数 featureId 为面板编号,第三个参数 menu 为面板的菜单。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数, 包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| featureId | Int | 是 | - | - | 面板编号 |\n| menu | Menu | 是 | - | - | 面板的菜单 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onSearchRequested":{"name":"### onSearchRequested(params)","description":"对应原生 Activity 的 [onSearchRequested](https://developer.android.com/reference/android/app/Activity#onSearchRequested()) 函数,当用户请求搜索操作时调用。您可以在这里启动一个搜索界面。<br/>注意第一个参数为自定义参数 UniActivityParams。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数, 包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onWindowStartingActionMode":{"name":"### onWindowStartingActionMode(params, callback)","description":"对应原生 Activity 的 [onWindowStartingActionMode](https://developer.android.com/reference/android/app/Activity#onWindowStartingActionMode(android.view.ActionMode.Callback)) 函数,当窗口开始进入操作模式时调用,如选择文本操作。<br/>注意第一个参数为自定义参数 UniActivityParams,第二个参数 callback 为操作模式回调。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数, 包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| callback | ActionMode.Callback \\| null | 是 | - | - | 操作模式的回调 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onWindowStartingActionMode_1":{"name":"### onWindowStartingActionMode(params, callback, type)","description":"对应原生 Activity 的 [onWindowStartingActionMode](https://developer.android.com/reference/android/app/Activity#onWindowStartingActionMode(android.view.ActionMode.Callback,%20int)) 函数,使用特定类型时调用。例如,浮动或类型化的操作模式。<br/>注意第一个参数为自定义参数 UniActivityParams,第二个参数 callback 为操作模式回调,第三个参数 type 为操作模式类型。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数, 包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| callback | ActionMode.Callback \\| null | 是 | - | - | 操作模式的回调 |\n| type | Int | 是 | - | - | 操作模式的类型 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onActionModeFinished":{"name":"### onActionModeFinished(params, mode)","description":"对应原生 Activity 的 [onActionModeFinished](https://developer.android.com/reference/android/app/Activity#onActionModeFinished(android.view.ActionMode)) 函数,当操作模式结束时调用。可以在此处执行清理工作。<br/>注意第一个参数为自定义参数 UniActivityParams,第二个参数 mode 为结束的操作模式。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数, 包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| mode | ActionMode \\| null | 是 | - | - | 结束的操作模式 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onActionModeStarted":{"name":"### onActionModeStarted(params, mode)","description":"对应原生 Activity 的 [onActionModeStarted](https://developer.android.com/reference/android/app/Activity#onActionModeStarted(android.view.ActionMode)) 函数,当操作模式开始时调用。可以在此处进行初始化工作。<br/>注意第一个参数为自定义参数 UniActivityParams,第二个参数 mode 为开始的操作模式。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数, 包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| mode | ActionMode \\| null | 是 | - | - | 开始的操作模式 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onProvideKeyboardShortcuts":{"name":"### onProvideKeyboardShortcuts(params, data, menu, deviceId)","description":"对应原生 Activity 的 [onProvideKeyboardShortcuts](https://developer.android.com/reference/android/app/Activity#onProvideKeyboardShortcuts(java.util.List,%20android.view.Menu,%20int)) 函数,当用户请求显示键盘快捷方式帮助时调用。可以在此处提供快捷方式信息。<br/>注意第一个参数为自定义参数 UniActivityParams,第二个参数 data 为键盘快捷方式群组的列表,第三个参数 menu 为相关联的菜单(如果有),第四个参数 deviceId 为请求快捷方式的设备ID。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数, 包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| data | MutableList\\<KeyboardShortcutGroup> \\| null | 是 | - | - | 键盘快捷方式群组的列表 |\n| menu | Menu \\| null | 是 | - | - | 相关联的菜单 |\n| deviceId | Int | 是 | - | - | 设备ID | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPointerCaptureChanged":{"name":"### onPointerCaptureChanged(params, hasCapture)","description":"对应原生 Activity 的 [onPointerCaptureChanged](https://developer.android.com/reference/android/app/Activity#onPointerCaptureChanged(boolean)) 函数,当指针捕获状态更改时调用。可以在此处更新 UI 或状态来响应捕获状态的变化。<br/>注意第一个参数为自定义参数 UniActivityParams,第二个参数 hasCapture 指示是否启用了指针捕获。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数, 包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| hasCapture | Boolean | 是 | - | - | 是否启用了指针捕获 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreDetachedFromWindow":{"name":"### onPreDetachedFromWindow(params)","description":"对应原生 Activity 的 [onDetachedFromWindow](https://developer.android.com/reference/android/view/View#onDetachedFromWindow()) 函数,此方法在super.onDetachedFromWindow() 调用之前被调用,用于处理 Activity 的窗口从窗口管理器中即将移除前的逻辑。<br/>注意第一个参数为自定义参数 UniActivityParams。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreContentChanged":{"name":"### onPreContentChanged(params)","description":"对应原生 Activity 的 [onContentChanged](https://developer.android.com/reference/android/app/Activity#onContentChanged()) 函数,此方法在super.onContentChanged() 调用之前被调用,用于处理 Activity 内容更改前的逻辑。<br/>注意第一个参数为自定义参数 UniActivityParams。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreWindowAttributesChanged":{"name":"### onPreWindowAttributesChanged(params, attrs)","description":"对应原生 Activity 的 [onWindowAttributesChanged](https://developer.android.com/reference/android/view/Window.Callback#onWindowAttributesChanged(android.view.WindowManager.LayoutParams)) 函数,此方法在super.onWindowAttributesChanged() 调用之前被调用,用于处理窗口属性更改前的逻辑。<br/>注意第一个参数为自定义参数 UniActivityParams,第二个参数 attrs 为窗口属性参数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| attrs | WindowManager.LayoutParams | 是 | - | - | 窗口属性 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreWindowFocusChanged":{"name":"### onPreWindowFocusChanged(params, hasFocus)","description":"对应原生 Activity 的 [onWindowFocusChanged](https://developer.android.com/reference/android/app/Activity#onWindowFocusChanged(boolean)) 函数,此方法在super.onWindowFocusChanged() 调用之前被调用,用于处理窗口焦点更改前的逻辑。<br/>注意第一个参数为自定义参数 UniActivityParams,第二个参数 hasFocus 表示是否获得焦点。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| hasFocus | Boolean | 是 | - | - | 窗口是否获得焦点 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreAttachedToWindow":{"name":"### onPreAttachedToWindow(params)","description":"对应原生 Activity 的 [onAttachedToWindow](https://developer.android.com/reference/android/view/View#onAttachedToWindow()) 函数,此方法在super.onAttachedToWindow() 调用之前被调用,用于处理窗口附加到窗口管理器前的逻辑。<br/>注意第一个参数为自定义参数 UniActivityParams。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPrePanelClosed":{"name":"### onPrePanelClosed(params, featureId, menu)","description":"对应原生 Activity 的 [onPanelClosed](https://developer.android.com/reference/android/app/Activity#onPanelClosed(int,%20android.view.Menu)) 函数,此方法在super.onPanelClosed() 调用之前被调用,用于处理面板关闭前的逻辑。<br/>注意第一个参数为自定义参数 UniActivityParams,第二个参数 featureId 表示面板的特征标识,第三个参数 menu 表示关闭的面板的菜单。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| featureId | Int | 是 | - | - | 面板的特征标识 |\n| menu | Menu | 是 | - | - | 面板的菜单 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreSearchRequested":{"name":"### onPreSearchRequested(params)","description":"对应原生 Activity 的 [onSearchRequested](https://developer.android.com/reference/android/app/Activity#onSearchRequested()) 函数,此方法在super.onSearchRequested() 调用之前被调用,用于处理搜索请求前的逻辑。<br/>注意第一个参数为自定义参数 UniActivityParams。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreWindowStartingActionMode":{"name":"### onPreWindowStartingActionMode(params, callback)","description":"对应原生 Activity 的 [onWindowStartingActionMode](https://developer.android.com/reference/android/app/Activity#onWindowStartingActionMode(android.view.ActionMode.Callback)) 函数,此方法在super.onWindowStartingActionMode() 调用之前被调用,用于处理窗口开始操作模式前的逻辑。<br/>注意第一个参数为自定义参数 UniActivityParams,第二个参数 callback 为操作模式的回调函数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| callback | ActionMode.Callback \\| null | 是 | - | - | 操作模式的回调函数 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreWindowStartingActionMode_1":{"name":"### onPreWindowStartingActionMode(params, callback)","description":"对应原生 Activity 的 [onWindowStartingActionMode](https://developer.android.com/reference/android/app/Activity#onWindowStartingActionMode(android.view.ActionMode.Callback)) 函数,此方法在super.onWindowStartingActionMode() 调用之前被调用,用于处理窗口开始操作模式前的逻辑。<br/>注意第一个参数为自定义参数 UniActivityParams,第二个参数 callback 为操作模式的回调函数。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| callback | ActionMode.Callback \\| null | 是 | - | - | 操作模式的回调函数 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreWindowStartingActionMode_2":{"name":"### onPreWindowStartingActionMode(params, callback, type)","description":"对应原生 Activity 的 [onWindowStartingActionMode](https://developer.android.com/reference/android/app/Activity#onWindowStartingActionMode(android.view.ActionMode.Callback,%20int)) 函数,此方法在super.onWindowStartingActionMode() 调用之前被调用,用于处理特定类型操作模式开始前的逻辑。<br/>注意第一个参数为自定义参数 UniActivityParams,第二个参数 callback 为操作模式的回调函数,第三个参数 type 为操作模式的类型。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| callback | ActionMode.Callback \\| null | 是 | - | - | 操作模式的回调函数 |\n| type | Int | 是 | - | - | 操作模式的类型 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreActionModeFinished":{"name":"### onPreActionModeFinished(params, mode)","description":"对应原生 Activity 的 [onActionModeFinished](https://developer.android.com/reference/android/app/Activity#onActionModeFinished(android.view.ActionMode)) 函数,此方法在super.onActionModeFinished() 调用之前被调用,用于处理操作模式结束前的逻辑。<br/>注意第一个参数为自定义参数 UniActivityParams,第二个参数 mode 表示结束的操作模式。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| mode | ActionMode \\| null | 是 | - | - | 结束的操作模式 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreActionModeStarted":{"name":"### onPreActionModeStarted(params, mode)","description":"对应原生 Activity 的 [onActionModeStarted](https://developer.android.com/reference/android/app/Activity#onActionModeStarted(android.view.ActionMode)) 函数,此方法在super.onActionModeStarted() 调用之前被调用,用于处理操作模式开始前的逻辑。<br/>注意第一个参数为自定义参数 UniActivityParams,第二个参数 mode 表示开始的操作模式。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| mode | ActionMode \\| null | 是 | - | - | 开始的操作模式 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPreProvideKeyboardShortcuts":{"name":"### onPreProvideKeyboardShortcuts(params, data, menu, deviceId)","description":"对应原生 Activity 的 [onProvideKeyboardShortcuts](https://developer.android.com/reference/android/app/Activity#onProvideKeyboardShortcuts(java.util.List,%20android.view.Menu,%20int)) 函数,此方法在super.onProvideKeyboardShortcuts() 调用之前被调用,用于处理提供键盘快捷方式前的逻辑。<br/>注意第一个参数为自定义参数 UniActivityParams,第二个参数 data 为键盘快捷键列表,第三个参数 menu 为菜单(如果有),第四个参数 deviceId 为设备ID。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| data | MutableList\\<KeyboardShortcutGroup> \\| null | 是 | - | - | 键盘快捷键列表 |\n| menu | Menu \\| null | 是 | - | - | 菜单 |\n| deviceId | Int | 是 | - | - | 设备ID | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"onPrePointerCaptureChanged":{"name":"### onPrePointerCaptureChanged(params, hasCapture)","description":"对应原生 Activity 的 [onPointerCaptureChanged](https://developer.android.com/reference/android/app/Activity#onPointerCaptureChanged(boolean)) 函数,此方法在super.onPointerCaptureChanged() 调用之前被调用,用于处理指针捕获状态改变前的逻辑。<br/>注意第一个参数为自定义参数 UniActivityParams,第二个参数 hasCapture 表示是否捕获了输入指针。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| hasCapture | Boolean | 是 | - | - | 是否捕获了输入指针 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"dispatchKeyEvent":{"name":"### dispatchKeyEvent(params, event)","description":"对应原生 Activity 的 [dispatchKeyEvent](https://developer.android.com/reference/android/app/Activity#dispatchKeyEvent(android.view.KeyEvent)) 函数<br/>注意第一个参数为自定义参数 UniActivityParams,第二个参数 event 为按键事件。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| event | KeyEvent \\| null | 是 | - | - | 按键事件 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"},"dispatchPreKeyEvent":{"name":"### dispatchPreKeyEvent(params, event)","description":"对应原生 Activity 的 [dispatchKeyEvent](https://developer.android.com/reference/android/app/Activity#dispatchKeyEvent(android.view.KeyEvent)) 函数,此方法在super.dispatchKeyEvent() 调用之前被调用,用于处理按键事件分发前的逻辑。<br/>在super方法之前调用,注意第一个参数为自定义参数 UniActivityParams。","param":"**参数** \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| params | **UniActivityParams** | 是 | - | - | 统一返回参数,包括页面路由地址与方法返回值 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| pageRoute | string | 是 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 页面路由地址 |\n@| result | any | 否 | - | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"-\",\"4.18\",\"x\"]]}' /> | 如果对应的方法有返回值,会将返回值赋给result,默认null |\n| event | KeyEvent \\| null | 是 | - | - | 按键事件 | \n","returnValue":"**返回值** \n\n| 类型 |\n| :- |\n| void | \n","compatibility":"**兼容性** \n\n| Web uni-app x | Android uni-app x | iOS uni-app x | Android uni-app | iOS uni-app | Web uni-app |\n| :- | :- | :- | :- | :- | :- |\n| - | 4.18 | x | x | x | - |\n\n**UTS 插件兼容性** \n| Android uni-app x UTS 插件 | Android uni-app UTS 插件 | iOS uni-app x UTS 插件 | iOS uni-app UTS 插件 | Harmony uni-app x UTS 插件 | Harmony uni-app UTS 插件 |\n| :- | :- | :- | :- | :- | :- |\n| 4.18 | x | - | - | - | - |","itemType":"method"}}}