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

!12062 格式修改

Merge pull request !12062 from LiAn/master
...@@ -45,7 +45,7 @@ static getDisplayCountry(country: string, locale: string, sentenceCase?: boolean ...@@ -45,7 +45,7 @@ static getDisplayCountry(country: string, locale: string, sentenceCase?: boolean
以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md) 以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | ---------------------------------------- | | ------ | ---------------------- |
| 890001 | Unspported para value. | | 890001 | Unspported para value. |
**示例:** **示例:**
...@@ -84,7 +84,7 @@ static getDisplayLanguage(language: string, locale: string, sentenceCase?: boole ...@@ -84,7 +84,7 @@ static getDisplayLanguage(language: string, locale: string, sentenceCase?: boole
以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md) 以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | ---------------------------------------- | | ------ | ---------------------- |
| 890001 | Unspported para value. | | 890001 | Unspported para value. |
**示例:** **示例:**
...@@ -115,7 +115,7 @@ static getSystemLanguages(): Array<string> ...@@ -115,7 +115,7 @@ static getSystemLanguages(): Array<string>
以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md) 以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | ---------------------------------------- | | ------ | ---------------------- |
| 890001 | Unspported para value. | | 890001 | Unspported para value. |
**示例:** **示例:**
...@@ -137,9 +137,9 @@ static getSystemCountries(language: string): Array<string> ...@@ -137,9 +137,9 @@ static getSystemCountries(language: string): Array<string>
**参数:** **参数:**
| 参数名 | 类型 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| -------- | ------ | ----- | | -------- | ------ | ---- | ----- |
| language | string | 语言ID。 | | language | string | 是 | 语言ID。 |
**返回值:** **返回值:**
...@@ -152,7 +152,7 @@ static getSystemCountries(language: string): Array<string> ...@@ -152,7 +152,7 @@ static getSystemCountries(language: string): Array<string>
以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md) 以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | ---------------------------------------- | | ------ | ---------------------- |
| 890001 | Unspported para value. | | 890001 | Unspported para value. |
**示例:** **示例:**
...@@ -190,7 +190,7 @@ static isSuggested(language: string, region?: string): boolean ...@@ -190,7 +190,7 @@ static isSuggested(language: string, region?: string): boolean
以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md) 以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | ---------------------------------------- | | ------ | ---------------------- |
| 890001 | Unspported para value. | | 890001 | Unspported para value. |
**示例:** **示例:**
...@@ -221,7 +221,7 @@ static getSystemLanguage(): string ...@@ -221,7 +221,7 @@ static getSystemLanguage(): string
以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md) 以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | ---------------------------------------- | | ------ | ---------------------- |
| 890001 | Unspported para value. | | 890001 | Unspported para value. |
**示例:** **示例:**
...@@ -247,16 +247,16 @@ static setSystemLanguage(language: string): void ...@@ -247,16 +247,16 @@ static setSystemLanguage(language: string): void
**参数:** **参数:**
| 参数名 | 类型 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| -------- | ------ | ----- | | -------- | ------ | ---- | ----- |
| language | string | 语言ID。 | | language | string | 是 | 语言ID。 |
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md) 以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | ---------------------------------------- | | ------ | ---------------------- |
| 890001 | Unspported para value. | | 890001 | Unspported para value. |
**示例:** **示例:**
...@@ -287,7 +287,7 @@ static getSystemRegion(): string ...@@ -287,7 +287,7 @@ static getSystemRegion(): string
以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md) 以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | ---------------------------------------- | | ------ | ---------------------- |
| 890001 | Unspported para value. | | 890001 | Unspported para value. |
**示例:** **示例:**
...@@ -313,16 +313,16 @@ static setSystemRegion(region: string): void ...@@ -313,16 +313,16 @@ static setSystemRegion(region: string): void
**参数:** **参数:**
| 参数名 | 类型 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| ------ | ------ | ----- | | ------ | ------ | ---- | ----- |
| region | string | 地区ID。 | | region | string | 是 | 地区ID。 |
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md) 以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | ---------------------------------------- | | ------ | ---------------------- |
| 890001 | Unspported para value. | | 890001 | Unspported para value. |
**示例:** **示例:**
...@@ -353,7 +353,7 @@ static getSystemLocale(): string ...@@ -353,7 +353,7 @@ static getSystemLocale(): string
以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md) 以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | ---------------------------------------- | | ------ | ---------------------- |
| 890001 | Unspported para value. | | 890001 | Unspported para value. |
**示例:** **示例:**
...@@ -379,16 +379,16 @@ static setSystemLocale(locale: string): void ...@@ -379,16 +379,16 @@ static setSystemLocale(locale: string): void
**参数:** **参数:**
| 参数名 | 类型 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| ------ | ------ | --------------- | | ------ | ------ | ---- | --------------- |
| locale | string | 指定区域ID,例如zh-CN。 | | locale | string | 是 | 指定区域ID,例如zh-CN。 |
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md) 以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | ---------------------------------------- | | ------ | ---------------------- |
| 890001 | Unspported para value. | | 890001 | Unspported para value. |
**示例:** **示例:**
...@@ -419,7 +419,7 @@ static is24HourClock(): boolean ...@@ -419,7 +419,7 @@ static is24HourClock(): boolean
以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md) 以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | ---------------------------------------- | | ------ | ---------------------- |
| 890001 | Unspported para value. | | 890001 | Unspported para value. |
**示例:** **示例:**
...@@ -454,7 +454,7 @@ static set24HourClock(option: boolean): void ...@@ -454,7 +454,7 @@ static set24HourClock(option: boolean): void
以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md) 以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | ---------------------------------------- | | ------ | ---------------------- |
| 890001 | Unspported para value. | | 890001 | Unspported para value. |
**示例:** **示例:**
...@@ -491,7 +491,7 @@ static addPreferredLanguage(language: string, index?: number): void ...@@ -491,7 +491,7 @@ static addPreferredLanguage(language: string, index?: number): void
以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md) 以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | ---------------------------------------- | | ------ | ---------------------- |
| 890001 | Unspported para value. | | 890001 | Unspported para value. |
**示例:** **示例:**
...@@ -529,7 +529,7 @@ static removePreferredLanguage(index: number): void ...@@ -529,7 +529,7 @@ static removePreferredLanguage(index: number): void
以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md) 以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | ---------------------------------------- | | ------ | ---------------------- |
| 890001 | Unspported para value. | | 890001 | Unspported para value. |
**示例:** **示例:**
...@@ -562,7 +562,7 @@ static getPreferredLanguageList(): Array<string> ...@@ -562,7 +562,7 @@ static getPreferredLanguageList(): Array<string>
以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md) 以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | ---------------------------------------- | | ------ | ---------------------- |
| 890001 | Unspported para value. | | 890001 | Unspported para value. |
**示例:** **示例:**
...@@ -593,7 +593,7 @@ static getFirstPreferredLanguage(): string ...@@ -593,7 +593,7 @@ static getFirstPreferredLanguage(): string
以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md) 以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | ---------------------------------------- | | ------ | ---------------------- |
| 890001 | Unspported para value. | | 890001 | Unspported para value. |
**示例:** **示例:**
...@@ -624,7 +624,7 @@ static getAppPreferredLanguage(): string ...@@ -624,7 +624,7 @@ static getAppPreferredLanguage(): string
以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md) 以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | ---------------------------------------- | | ------ | ---------------------- |
| 890001 | Unspported para value. | | 890001 | Unspported para value. |
**示例:** **示例:**
...@@ -659,7 +659,7 @@ static setUsingLocalDigit(flag: boolean): void ...@@ -659,7 +659,7 @@ static setUsingLocalDigit(flag: boolean): void
以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md) 以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | ---------------------------------------- | | ------ | ---------------------- |
| 890001 | Unspported para value. | | 890001 | Unspported para value. |
**示例:** **示例:**
...@@ -690,7 +690,7 @@ static getUsingLocalDigit(): boolean ...@@ -690,7 +690,7 @@ static getUsingLocalDigit(): boolean
以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md) 以下错误码的详细介绍请参见[ohos.i18n错误码](../errorcodes/errorcode-i18n.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | ---------------------------------------- | | ------ | ---------------------- |
| 890001 | Unspported para value. | | 890001 | Unspported para value. |
**示例:** **示例:**
...@@ -713,9 +713,9 @@ isRTL(locale: string): boolean ...@@ -713,9 +713,9 @@ isRTL(locale: string): boolean
**参数:** **参数:**
| 参数名 | 类型 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| ------ | ------ | ------- | | ------ | ------ | ---- | ------- |
| locale | string | 指定区域ID。 | | locale | string | 是 | 指定区域ID。 |
**返回值:** **返回值:**
...@@ -905,7 +905,7 @@ setFirstDayOfWeek(value: number): void ...@@ -905,7 +905,7 @@ setFirstDayOfWeek(value: number): void
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| ----- | ------ | ---- | --------------------- | | ----- | ------ | ---- | --------------------- |
| value | number | | 设置一周的起始日,1代表周日,7代表周六。 | | value | number | | 设置一周的起始日,1代表周日,7代表周六。 |
**示例:** **示例:**
```js ```js
...@@ -947,7 +947,7 @@ setMinimalDaysInFirstWeek(value: number): void ...@@ -947,7 +947,7 @@ setMinimalDaysInFirstWeek(value: number): void
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| ----- | ------ | ---- | ------------ | | ----- | ------ | ---- | ------------ |
| value | number | | 一年中第一周的最小天数。 | | value | number | | 一年中第一周的最小天数。 |
**示例:** **示例:**
```js ```js
...@@ -1153,7 +1153,7 @@ getLocationName(number: string, locale: string): string ...@@ -1153,7 +1153,7 @@ getLocationName(number: string, locale: string): string
**系统能力**:SystemCapability.Global.I18n **系统能力**:SystemCapability.Global.I18n
| 名称 | 参数类型 | 可读 | 可写 | 说明 | | 名称 | 类型 | 可读 | 可写 | 说明 |
| ---- | ------ | ---- | ---- | ---------------------------------------- | | ---- | ------ | ---- | ---- | ---------------------------------------- |
| type | string | 是 | 是 | 表示对电话号码格式化的类型,取值范围:"E164", "INTERNATIONAL", "NATIONAL", "RFC3966"。 | | type | string | 是 | 是 | 表示对电话号码格式化的类型,取值范围:"E164", "INTERNATIONAL", "NATIONAL", "RFC3966"。 |
...@@ -1164,7 +1164,7 @@ getLocationName(number: string, locale: string): string ...@@ -1164,7 +1164,7 @@ getLocationName(number: string, locale: string): string
**系统能力**:SystemCapability.Global.I18n **系统能力**:SystemCapability.Global.I18n
| 名称 | 参数类型 | 可读 | 可写 | 说明 | | 名称 | 类型 | 可读 | 可写 | 说明 |
| ------------- | ------ | ---- | ---- | ---------------------------------------- | | ------------- | ------ | ---- | ---- | ---------------------------------------- |
| unit | string | 是 | 是 | 单位的名称,如:"meter", "inch", "cup"等。 | | unit | string | 是 | 是 | 单位的名称,如:"meter", "inch", "cup"等。 |
| measureSystem | string | 是 | 是 | 单位的度量体系,取值包括:"SI", "US", "UK"。 | | measureSystem | string | 是 | 是 | 单位的度量体系,取值包括:"SI", "US", "UK"。 |
......
...@@ -21,9 +21,9 @@ import Intl from '@ohos.intl'; ...@@ -21,9 +21,9 @@ import Intl from '@ohos.intl';
### 属性 ### 属性
**系统能力**以下各项对应的系统能力均为SystemCapability.Global.I18n **系统能力**:SystemCapability.Global.I18n
| 名称 | 参数类型 | 可读 | 可写 | 说明 | | 名称 | 类型 | 可读 | 可写 | 说明 |
| --------------- | ------- | ---- | ---- | ---------------------------------------- | | --------------- | ------- | ---- | ---- | ---------------------------------------- |
| language | string | 是 | 否 | 与区域设置关联的语, 如:zh。 | | language | string | 是 | 否 | 与区域设置关联的语, 如:zh。 |
| script | string | 是 | 否 | 语言的书写方式,如:Hans。 | | script | string | 是 | 否 | 语言的书写方式,如:Hans。 |
...@@ -62,7 +62,7 @@ constructor(locale: string, options?: LocaleOptions) ...@@ -62,7 +62,7 @@ constructor(locale: string, options?: LocaleOptions)
**参数:** **参数:**
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| ------- | ------------- | ---- | ---------------------------- | | -------------------- | -------------------------------- | ---- | ---------------------------- |
| locale | string | 是 | 包含区域设置信息的字符串,包括语言以及可选的脚本和区域。 | | locale | string | 是 | 包含区域设置信息的字符串,包括语言以及可选的脚本和区域。 |
| options<sup>9+</sup> | [LocaleOptions](#localeoptions9) | 否 | 用于创建区域对象的选项。 | | options<sup>9+</sup> | [LocaleOptions](#localeoptions9) | 否 | 用于创建区域对象的选项。 |
...@@ -141,7 +141,7 @@ minimize(): Locale ...@@ -141,7 +141,7 @@ minimize(): Locale
**系统能力**:SystemCapability.Global.I18n **系统能力**:SystemCapability.Global.I18n
| 名称 | 参数类型 | 可读 | 可写 | 说明 | | 名称 | 类型 | 可读 | 可写 | 说明 |
| --------------- | ------- | ---- | ---- | ---------------------------------------- | | --------------- | ------- | ---- | ---- | ---------------------------------------- |
| calendar | string | 是 | 是 | 日历参数,如:"buddhist", "chinese", "coptic", "dangi", "ethioaa", "ethiopic", "gregory", "hebrew", "indian", "islamic", "islamic-umalqura", "islamic-tbla", "islamic-civil", "islamic-rgsa", "iso8601", "japanese", "persian", "roc", "islamicc"。 | | calendar | string | 是 | 是 | 日历参数,如:"buddhist", "chinese", "coptic", "dangi", "ethioaa", "ethiopic", "gregory", "hebrew", "indian", "islamic", "islamic-umalqura", "islamic-tbla", "islamic-civil", "islamic-rgsa", "iso8601", "japanese", "persian", "roc", "islamicc"。 |
| collation | string | 是 | 是 | 排序参数,取值包括:"big5han", "compat", "dict", "direct", "ducet", "emoji", "eor", "gb2312", "phonebk", "phonetic", "pinyin", "reformed ", "search", "searchjl", "standard", "stroke", "trad", "unihan", "zhuyin"。 | | collation | string | 是 | 是 | 排序参数,取值包括:"big5han", "compat", "dict", "direct", "ducet", "emoji", "eor", "gb2312", "phonebk", "phonetic", "pinyin", "reformed ", "search", "searchjl", "standard", "stroke", "trad", "unihan", "zhuyin"。 |
...@@ -179,7 +179,7 @@ constructor(locale: string | Array&lt;string&gt;, options?: DateTimeOptions) ...@@ -179,7 +179,7 @@ constructor(locale: string | Array&lt;string&gt;, options?: DateTimeOptions)
**参数:** **参数:**
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| ------- | ----------------------------------- | ---- | ---------------------------- | | -------------------- | ------------------------------------ | ---- | ---------------------------- |
| locale | string \| Array&lt;string&gt; | 是 | 包含区域设置信息的字符串,包括语言以及可选的脚本和区域。 | | locale | string \| Array&lt;string&gt; | 是 | 包含区域设置信息的字符串,包括语言以及可选的脚本和区域。 |
| options<sup>9+</sup> | [DateTimeOptions](#datetimeoptions9) | 否 | 用于创建时间日期格式化的选项。 | | options<sup>9+</sup> | [DateTimeOptions](#datetimeoptions9) | 否 | 用于创建时间日期格式化的选项。 |
...@@ -264,7 +264,7 @@ resolvedOptions(): DateTimeOptions ...@@ -264,7 +264,7 @@ resolvedOptions(): DateTimeOptions
**返回值:** **返回值:**
| 类型 | 说明 | | 类型 | 说明 |
| ----------------------------------- | ----------------------------- | | ------------------------------------ | ----------------------------- |
| [DateTimeOptions](#datetimeoptions9) | DateTimeFormat&nbsp;对象的格式化选项。 | | [DateTimeOptions](#datetimeoptions9) | DateTimeFormat&nbsp;对象的格式化选项。 |
**示例:** **示例:**
...@@ -280,7 +280,7 @@ resolvedOptions(): DateTimeOptions ...@@ -280,7 +280,7 @@ resolvedOptions(): DateTimeOptions
**系统能力**:SystemCapability.Global.I18n **系统能力**:SystemCapability.Global.I18n
| 名称 | 参数类型 | 可读 | 可写 | 说明 | | 名称 | 类型 | 可读 | 可写 | 说明 |
| --------------- | ------- | ---- | ---- | ---------------------------------------- | | --------------- | ------- | ---- | ---- | ---------------------------------------- |
| locale | string | 是 | 否 | 区域参数,&nbsp;如:zh-Hans-CN。 | | locale | string | 是 | 否 | 区域参数,&nbsp;如:zh-Hans-CN。 |
| dateStyle | string | 是 | 是 | 日期显示格式,取值包括:"long",&nbsp;"short",&nbsp;"medium",&nbsp;"full"。 | | dateStyle | string | 是 | 是 | 日期显示格式,取值包括:"long",&nbsp;"short",&nbsp;"medium",&nbsp;"full"。 |
...@@ -331,7 +331,7 @@ constructor(locale: string | Array&lt;string&gt;, options?: NumberOptions) ...@@ -331,7 +331,7 @@ constructor(locale: string | Array&lt;string&gt;, options?: NumberOptions)
**参数:** **参数:**
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| ------- | ------------------------------- | ---- | ---------------------------- | | -------------------- | -------------------------------- | ---- | ---------------------------- |
| locale | string \| Array&lt;string&gt; | 是 | 包含区域设置信息的字符串,包括语言以及可选的脚本和区域。 | | locale | string \| Array&lt;string&gt; | 是 | 包含区域设置信息的字符串,包括语言以及可选的脚本和区域。 |
| options<sup>9+</sup> | [NumberOptions](#numberoptions9) | 否 | 用于创建数字格式化的选项。 | | options<sup>9+</sup> | [NumberOptions](#numberoptions9) | 否 | 用于创建数字格式化的选项。 |
...@@ -380,7 +380,7 @@ resolvedOptions(): NumberOptions ...@@ -380,7 +380,7 @@ resolvedOptions(): NumberOptions
**返回值:** **返回值:**
| 类型 | 说明 | | 类型 | 说明 |
| ------------------------------- | --------------------------- | | -------------------------------- | --------------------------- |
| [NumberOptions](#numberoptions9) | NumberFormat&nbsp;对象的格式化选项。 | | [NumberOptions](#numberoptions9) | NumberFormat&nbsp;对象的格式化选项。 |
...@@ -395,9 +395,9 @@ resolvedOptions(): NumberOptions ...@@ -395,9 +395,9 @@ resolvedOptions(): NumberOptions
表示设备支持的能力。 表示设备支持的能力。
**系统能力**以下各项对应的系统能力均为SystemCapability.Global.I18n **系统能力**:SystemCapability.Global.I18n
| 名称 | 参数类型 | 可读 | 可写 | 说明 | | 名称 | 类型 | 可读 | 可写 | 说明 |
| ------------------------ | ------- | ---- | ---- | ---------------------------------------- | | ------------------------ | ------- | ---- | ---- | ---------------------------------------- |
| locale | string | 是 | 否 | 区域参数,&nbsp;如:"zh-Hans-CN"。 | | locale | string | 是 | 否 | 区域参数,&nbsp;如:"zh-Hans-CN"。 |
| currency | string | 是 | 是 | 货币单位,&nbsp;如:"EUR","CNY","USD"等。 | | currency | string | 是 | 是 | 货币单位,&nbsp;如:"EUR","CNY","USD"等。 |
...@@ -448,7 +448,7 @@ constructor(locale: string | Array&lt;string&gt;, options?: CollatorOptions) ...@@ -448,7 +448,7 @@ constructor(locale: string | Array&lt;string&gt;, options?: CollatorOptions)
**参数:** **参数:**
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| ------- | ----------------------------------- | ---- | ---------------------------- | | -------------------- | ------------------------------------ | ---- | ---------------------------- |
| locale | string \| Array&lt;string&gt; | 是 | 包含区域设置信息的字符串,包括语言以及可选的脚本和区域。 | | locale | string \| Array&lt;string&gt; | 是 | 包含区域设置信息的字符串,包括语言以及可选的脚本和区域。 |
| options<sup>9+</sup> | [CollatorOptions](#collatoroptions9) | 否 | 用于创建排序对象的选项。 | | options<sup>9+</sup> | [CollatorOptions](#collatoroptions9) | 否 | 用于创建排序对象的选项。 |
...@@ -497,7 +497,7 @@ resolvedOptions(): CollatorOptions ...@@ -497,7 +497,7 @@ resolvedOptions(): CollatorOptions
**返回值:** **返回值:**
| 类型 | 说明 | | 类型 | 说明 |
| ----------------------------------- | ----------------- | | ------------------------------------ | ----------------- |
| [CollatorOptions](#collatoroptions9) | 返回的Collator对象的属性。 | | [CollatorOptions](#collatoroptions9) | 返回的Collator对象的属性。 |
**示例:** **示例:**
...@@ -513,7 +513,7 @@ resolvedOptions(): CollatorOptions ...@@ -513,7 +513,7 @@ resolvedOptions(): CollatorOptions
**系统能力**:SystemCapability.Global.I18n **系统能力**:SystemCapability.Global.I18n
| 名称 | 参数类型 | 可读 | 可写 | 说明 | | 名称 | 类型 | 可读 | 可写 | 说明 |
| ----------------- | ------- | ---- | ---- | ---------------------------------------- | | ----------------- | ------- | ---- | ---- | ---------------------------------------- |
| localeMatcher | string | 是 | 是 | locale匹配算法,取值范围:"best&nbsp;fit",&nbsp;"lookup"。 | | localeMatcher | string | 是 | 是 | locale匹配算法,取值范围:"best&nbsp;fit",&nbsp;"lookup"。 |
| usage | string | 是 | 是 | 比较的用途,取值范围:"sort",&nbsp;"search"。 | | usage | string | 是 | 是 | 比较的用途,取值范围:"sort",&nbsp;"search"。 |
...@@ -552,7 +552,7 @@ constructor(locale: string | Array&lt;string&gt;, options?: PluralRulesOptions) ...@@ -552,7 +552,7 @@ constructor(locale: string | Array&lt;string&gt;, options?: PluralRulesOptions)
**参数:** **参数:**
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| ------- | ---------------------------------------- | ---- | ---------------------------- | | -------------------- | ---------------------------------------- | ---- | ---------------------------- |
| locale | string \| Array&lt;string&gt; | 是 | 包含区域设置信息的字符串,包括语言以及可选的脚本和区域。 | | locale | string \| Array&lt;string&gt; | 是 | 包含区域设置信息的字符串,包括语言以及可选的脚本和区域。 |
| options<sup>9+</sup> | [PluralRulesOptions](#pluralrulesoptions9) | 否 | 用于创建单复数对象的选项。 | | options<sup>9+</sup> | [PluralRulesOptions](#pluralrulesoptions9) | 否 | 用于创建单复数对象的选项。 |
...@@ -595,7 +595,7 @@ select(n: number): string ...@@ -595,7 +595,7 @@ select(n: number): string
**系统能力**:SystemCapability.Global.I18n **系统能力**:SystemCapability.Global.I18n
| 名称 | 参数类型 | 可读 | 可写 | 说明 | | 名称 | 类型 | 可读 | 可写 | 说明 |
| ------------------------ | ------ | ---- | ---- | ---------------------------------------- | | ------------------------ | ------ | ---- | ---- | ---------------------------------------- |
| localeMatcher | string | 是 | 是 | locale匹配算法,取值包括:"best&nbsp;fit",&nbsp;"lookup"。 | | localeMatcher | string | 是 | 是 | locale匹配算法,取值包括:"best&nbsp;fit",&nbsp;"lookup"。 |
| type | string | 是 | 是 | 排序的类型,取值包括:"cardinal",&nbsp;"ordinal"。 | | type | string | 是 | 是 | 排序的类型,取值包括:"cardinal",&nbsp;"ordinal"。 |
...@@ -634,7 +634,7 @@ constructor(locale: string | Array&lt;string&gt;, options?: RelativeTimeFormatIn ...@@ -634,7 +634,7 @@ constructor(locale: string | Array&lt;string&gt;, options?: RelativeTimeFormatIn
**参数:** **参数:**
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| ------- | ---------------------------------------- | ---- | ---------------------------- | | -------------------- | ---------------------------------------- | ---- | ---------------------------- |
| locale | string \| Array&lt;string&gt; | 是 | 包含区域设置信息的字符串,包括语言以及可选的脚本和区域。 | | locale | string \| Array&lt;string&gt; | 是 | 包含区域设置信息的字符串,包括语言以及可选的脚本和区域。 |
| options<sup>9+</sup> | [RelativeTimeFormatInputOptions](#relativetimeformatinputoptions9) | 否 | 用于创建相对时间格式化对象的选项。 | | options<sup>9+</sup> | [RelativeTimeFormatInputOptions](#relativetimeformatinputoptions9) | 否 | 用于创建相对时间格式化对象的选项。 |
...@@ -727,7 +727,7 @@ resolvedOptions(): RelativeTimeFormatResolvedOptions ...@@ -727,7 +727,7 @@ resolvedOptions(): RelativeTimeFormatResolvedOptions
**系统能力**:SystemCapability.Global.I18n **系统能力**:SystemCapability.Global.I18n
| 名称 | 参数类型 | 可读 | 可写 | 说明 | | 名称 | 类型 | 可读 | 可写 | 说明 |
| ------------- | ------ | ---- | ---- | ---------------------------------------- | | ------------- | ------ | ---- | ---- | ---------------------------------------- |
| localeMatcher | string | 是 | 是 | locale匹配算法,取值包括:"best&nbsp;fit",&nbsp;"lookup"。 | | localeMatcher | string | 是 | 是 | locale匹配算法,取值包括:"best&nbsp;fit",&nbsp;"lookup"。 |
| numeric | string | 是 | 是 | 输出消息的格式,取值包括:"always",&nbsp;"auto"。 | | numeric | string | 是 | 是 | 输出消息的格式,取值包括:"always",&nbsp;"auto"。 |
...@@ -740,7 +740,7 @@ resolvedOptions(): RelativeTimeFormatResolvedOptions ...@@ -740,7 +740,7 @@ resolvedOptions(): RelativeTimeFormatResolvedOptions
**系统能力**:SystemCapability.Global.I18n **系统能力**:SystemCapability.Global.I18n
| 名称 | 参数类型 | 可读 | 可写 | 说明 | | 名称 | 类型 | 可读 | 可写 | 说明 |
| --------------- | ------ | ---- | ---- | ---------------------------------------- | | --------------- | ------ | ---- | ---- | ---------------------------------------- |
| locale | string | 是 | 是 | 包含区域设置信息的字符串,包括语言以及可选的脚本和区域。 | | locale | string | 是 | 是 | 包含区域设置信息的字符串,包括语言以及可选的脚本和区域。 |
| numeric | string | 是 | 是 | 输出消息的格式,取值包括:"always",&nbsp;"auto"。 | | numeric | string | 是 | 是 | 输出消息的格式,取值包括:"always",&nbsp;"auto"。 |
......
# Web # Web
提供具有网页显示能力的Web组件。
> **说明:** > **说明:**
> >
> - 该组件从API Version 8开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 > - 该组件从API Version 8开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。
> - 示例效果请以真机运行为准,当前IDE预览器不支持。 > - 示例效果请以真机运行为准,当前IDE预览器不支持。
提供具有网页显示能力的Web组件。
## 需要权限 ## 需要权限
访问在线网页时需添加网络权限:ohos.permission.INTERNET,具体申请方式请参考[权限申请声明](../../security/accesstoken-guidelines.md) 访问在线网页时需添加网络权限:ohos.permission.INTERNET,具体申请方式请参考[权限申请声明](../../security/accesstoken-guidelines.md)
...@@ -27,7 +27,7 @@ Web(options: { src: ResourceStr, controller: WebController | WebviewController}) ...@@ -27,7 +27,7 @@ Web(options: { src: ResourceStr, controller: WebController | WebviewController})
| 参数名 | 参数类型 | 必填 | 参数描述 | | 参数名 | 参数类型 | 必填 | 参数描述 |
| ---------- | ---------------------------------------- | ---- | ------- | | ---------- | ---------------------------------------- | ---- | ------- |
| src | [ResourceStr](ts-types.md) | 是 | 网页资源地址。 | | src | [ResourceStr](ts-types.md) | 是 | 网页资源地址。 |
| controller | [WebController](#webcontroller) [WebviewController](../apis/js-apis-webview.md#webviewcontroller) | 是 | 控制器。 | | controller | [WebController](#webcontroller) \| [WebviewController<sup>9+</sup>](../apis/js-apis-webview.md#webviewcontroller) | 是 | 控制器。 |
**示例:** **示例:**
...@@ -88,7 +88,7 @@ Web(options: { src: ResourceStr, controller: WebController | WebviewController}) ...@@ -88,7 +88,7 @@ Web(options: { src: ResourceStr, controller: WebController | WebviewController})
## 属性 ## 属性
web组件的网络属性 通用属性仅支持[width](ts-universal-attributes-size.md#属性)[height](ts-universal-attributes-size.md#属性)[padding](ts-universal-attributes-size.md#属性)[margin](ts-universal-attributes-size.md#属性)[border](ts-universal-attributes-border.md#属性)
### domStorageAccess ### domStorageAccess
...@@ -672,10 +672,6 @@ webDebuggingAccess(webDebuggingAccess: boolean) ...@@ -672,10 +672,6 @@ webDebuggingAccess(webDebuggingAccess: boolean)
} }
``` ```
> **说明:**
>
> 通用属性仅支持[width](ts-universal-attributes-size.md#属性)、[height](ts-universal-attributes-size.md#属性)、[padding](ts-universal-attributes-size.md#属性)、[margin](ts-universal-attributes-size.md#属性)、[border](ts-universal-attributes-border.md#属性)。
## 事件 ## 事件
不支持通用事件。 不支持通用事件。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册