nwo
stringclasses 304
values | sha
stringclasses 304
values | path
stringlengths 9
214
| language
stringclasses 1
value | identifier
stringlengths 0
49
| docstring
stringlengths 1
34.2k
| function
stringlengths 8
59.4k
| ast_function
stringlengths 71
497k
| obf_function
stringlengths 8
39.4k
| url
stringlengths 102
324
| function_sha
stringlengths 40
40
| source
stringclasses 2
values |
|---|---|---|---|---|---|---|---|---|---|---|---|
openharmony/arkui_ace_engine
|
30c7d1ee12fbedf0fabece54291d75897e2ad44f
|
advanced_ui_component/treeview/source/treeview.ets
|
arkts
|
off
|
Destroy event.
@param type Registered Events.
@param callback Event callback.
@since 10
|
public off(type: TreeListenType, callback?: (callbackParam: CallbackParam) => void): void {
if (type === null) {
this._events = [];
}
if (Array.isArray(type)) {
for (let i: number = 0, l: number = type.length; i < l; i++) {
this.off((type as TreeListenType[])[i], callback);
}
}
let cbs: [(callbackParam: CallbackParam) => void] = this._events[type];
if (!cbs) {
return;
}
if (callback === null) {
this._events[type] = null;
}
let i: number = cbs.length;
while (i--) {
let cb: (callbackParam: CallbackParam) => void = cbs[i];
if (cb === callback) {
cbs.splice(i, 1);
break;
}
}
}
|
AST#method_declaration#Left public off AST#parameter_list#Left ( AST#parameter#Left type : AST#type_annotation#Left AST#primary_type#Left TreeListenType AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left callback ? : AST#type_annotation#Left AST#function_type#Left AST#parameter_list#Left ( AST#parameter#Left callbackParam : AST#type_annotation#Left AST#primary_type#Left CallbackParam AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right => AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right AST#function_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left type AST#expression#Right === AST#expression#Left AST#null_literal#Left null AST#null_literal#Right AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . _events AST#member_expression#Right = AST#expression#Left AST#array_literal#Left [ ] AST#array_literal#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#if_statement#Right AST#statement#Right AST#statement#Left AST#if_statement#Left if ( AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left Array AST#expression#Right . isArray AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left type AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#for_statement#Left for ( AST#variable_declaration#Left let AST#variable_declarator#Left i : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left 0 AST#expression#Right AST#variable_declarator#Right , AST#variable_declarator#Left l : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#member_expression#Left AST#expression#Left type AST#expression#Right . length AST#member_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#expression#Left AST#binary_expression#Left AST#expression#Left i AST#expression#Right < AST#expression#Left l AST#expression#Right AST#binary_expression#Right AST#expression#Right ; AST#expression#Left AST#update_expression#Left AST#expression#Left i AST#expression#Right ++ AST#update_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . off AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#subscript_expression#Left AST#expression#Left AST#parenthesized_expression#Left ( AST#expression#Left AST#as_expression#Left AST#expression#Left type AST#expression#Right as AST#type_annotation#Left AST#primary_type#Left AST#array_type#Left TreeListenType [ ] AST#array_type#Right AST#primary_type#Right AST#type_annotation#Right AST#as_expression#Right AST#expression#Right ) AST#parenthesized_expression#Right AST#expression#Right [ AST#expression#Left i AST#expression#Right ] AST#subscript_expression#Right AST#expression#Right , AST#expression#Left callback AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#for_statement#Right AST#statement#Right } AST#block_statement#Right AST#if_statement#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left cbs : AST#type_annotation#Left AST#primary_type#Left AST#tuple_type#Left [ AST#type_annotation#Left AST#function_type#Left AST#parameter_list#Left ( AST#parameter#Left callbackParam : AST#type_annotation#Left AST#primary_type#Left CallbackParam AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right => AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right AST#function_type#Right AST#type_annotation#Right ] AST#tuple_type#Right AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#subscript_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . _events AST#member_expression#Right AST#expression#Right [ AST#expression#Left type AST#expression#Right ] AST#subscript_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#if_statement#Left if ( AST#expression#Left AST#unary_expression#Left ! AST#expression#Left cbs AST#expression#Right AST#unary_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#return_statement#Left return ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#if_statement#Right AST#statement#Right AST#statement#Left AST#if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left callback AST#expression#Right === AST#expression#Left AST#null_literal#Left null AST#null_literal#Right AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#subscript_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . _events AST#member_expression#Right AST#expression#Right [ AST#expression#Left type AST#expression#Right ] AST#subscript_expression#Right AST#expression#Right AST#expression_statement#Right AST#statement#Right AST#ERROR#Left = AST#ERROR#Right AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#null_literal#Left null AST#null_literal#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#if_statement#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left i : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#member_expression#Left AST#expression#Left cbs AST#expression#Right . length AST#member_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#while_statement#Left while ( AST#expression#Left AST#update_expression#Left AST#expression#Left i AST#expression#Right -- AST#update_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left cb : AST#type_annotation#Left AST#function_type#Left AST#parameter_list#Left ( AST#parameter#Left callbackParam : AST#type_annotation#Left AST#primary_type#Left CallbackParam AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right => AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right AST#function_type#Right AST#type_annotation#Right = AST#expression#Left AST#subscript_expression#Left AST#expression#Left cbs AST#expression#Right [ AST#expression#Left i AST#expression#Right ] AST#subscript_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left cb AST#expression#Right === AST#expression#Left callback AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left cbs AST#expression#Right . splice AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left i AST#expression#Right , AST#expression#Left 1 AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right AST#statement#Left AST#break_statement#Left break ; AST#break_statement#Right AST#statement#Right } AST#block_statement#Right AST#if_statement#Right AST#statement#Right } AST#block_statement#Right AST#while_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
public off(type: TreeListenType, callback?: (callbackParam: CallbackParam) => void): void {
if (type === null) {
this._events = [];
}
if (Array.isArray(type)) {
for (let i: number = 0, l: number = type.length; i < l; i++) {
this.off((type as TreeListenType[])[i], callback);
}
}
let cbs: [(callbackParam: CallbackParam) => void] = this._events[type];
if (!cbs) {
return;
}
if (callback === null) {
this._events[type] = null;
}
let i: number = cbs.length;
while (i--) {
let cb: (callbackParam: CallbackParam) => void = cbs[i];
if (cb === callback) {
cbs.splice(i, 1);
break;
}
}
}
|
https://github.com/openharmony/arkui_ace_engine/blob/30c7d1ee12fbedf0fabece54291d75897e2ad44f/advanced_ui_component/treeview/source/treeview.ets#L850-L874
|
299cc0a35599ce80a60baeecb12dc4aad3609dcf
|
gitee
|
openharmony/applications_app_samples
|
a826ab0e75fe51d028c1c5af58188e908736b53b
|
code/BasicFeature/ApplicationModels/SystemRouter/harB/src/main/ets/components/MainPage.ets
|
arkts
|
MainPage
|
Copyright (C) 2024 Huawei Device Co., Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
|
@Component
export struct MainPage {
@State message: string = 'Hello World';
build() {
Row() {
Column() {
Text(this.message)
.fontSize(50)
.fontWeight(FontWeight.Bold)
}
.width($r('app.string.full_percent'))
}
.height($r('app.string.full_percent'))
}
}
|
AST#decorated_export_declaration#Left AST#decorator#Left @ Component AST#decorator#Right export struct MainPage AST#component_body#Left { AST#property_declaration#Left AST#decorator#Left @ State AST#decorator#Right message : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left 'Hello World' AST#expression#Right ; AST#property_declaration#Right AST#build_method#Left build ( ) AST#build_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Row ( ) AST#container_content_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Column ( ) AST#container_content_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Text ( AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . message AST#member_expression#Right AST#expression#Right ) AST#ui_component#Right AST#modifier_chain_expression#Left . fontSize ( AST#expression#Left 50 AST#expression#Right ) AST#modifier_chain_expression#Left . fontWeight ( AST#expression#Left AST#member_expression#Left AST#expression#Left FontWeight AST#expression#Right . Bold AST#member_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#container_content_body#Right AST#ui_component#Right AST#modifier_chain_expression#Left . width ( AST#expression#Left AST#resource_expression#Left $r ( AST#expression#Left 'app.string.full_percent' AST#expression#Right ) AST#resource_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#container_content_body#Right AST#ui_component#Right AST#modifier_chain_expression#Left . height ( AST#expression#Left AST#resource_expression#Left $r ( AST#expression#Left 'app.string.full_percent' AST#expression#Right ) AST#resource_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#build_body#Right AST#build_method#Right } AST#component_body#Right AST#decorated_export_declaration#Right
|
@Component
export struct MainPage {
@State message: string = 'Hello World';
build() {
Row() {
Column() {
Text(this.message)
.fontSize(50)
.fontWeight(FontWeight.Bold)
}
.width($r('app.string.full_percent'))
}
.height($r('app.string.full_percent'))
}
}
|
https://github.com/openharmony/applications_app_samples/blob/a826ab0e75fe51d028c1c5af58188e908736b53b/code/BasicFeature/ApplicationModels/SystemRouter/harB/src/main/ets/components/MainPage.ets#L16-L31
|
d8cd89793420f6b916113697d7c6d32bf74b2e9b
|
gitee
|
openharmony/applications_app_samples
|
a826ab0e75fe51d028c1c5af58188e908736b53b
|
code/UI/ListBeExchange/ListExchange/src/main/ets/common/commonConstants.ets
|
arkts
|
Copyright (c) 2025 Huawei Device Co., Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
|
export class CommonConstants {
// 初始化列表项高度
public static readonly LIST_ITEM_HEIGHT = 50;
// 初始化动画时间
public static readonly ANIMATE_DURATION = 300;
// 初始化列表项名称
public static readonly LIST_NAME = '标题1';
}
|
AST#export_declaration#Left export AST#class_declaration#Left class CommonConstants AST#class_body#Left { // 初始化列表项高度 AST#property_declaration#Left public static readonly LIST_ITEM_HEIGHT = AST#expression#Left 50 AST#expression#Right ; AST#property_declaration#Right // 初始化动画时间 AST#property_declaration#Left public static readonly ANIMATE_DURATION = AST#expression#Left 300 AST#expression#Right ; AST#property_declaration#Right // 初始化列表项名称 AST#property_declaration#Left public static readonly LIST_NAME = AST#expression#Left '标题1' AST#expression#Right ; AST#property_declaration#Right } AST#class_body#Right AST#class_declaration#Right AST#export_declaration#Right
|
export class CommonConstants {
public static readonly LIST_ITEM_HEIGHT = 50;
public static readonly ANIMATE_DURATION = 300;
public static readonly LIST_NAME = '标题1';
}
|
https://github.com/openharmony/applications_app_samples/blob/a826ab0e75fe51d028c1c5af58188e908736b53b/code/UI/ListBeExchange/ListExchange/src/main/ets/common/commonConstants.ets#L16-L23
|
cd43472dffae213a10f70b52f45cab3fecb98b16
|
gitee
|
|
openharmony/applications_app_samples
|
a826ab0e75fe51d028c1c5af58188e908736b53b
|
code/SystemFeature/Telephony/Message/entry/src/main/ets/model/DateTimeUtil.ets
|
arkts
|
fill
|
日期不足两位补充0
@param value-数据值
|
fill(value) {
return (value > 9 ? '' : '0') + value
}
|
AST#method_declaration#Left fill AST#parameter_list#Left ( AST#parameter#Left value AST#parameter#Right ) AST#parameter_list#Right AST#block_statement#Left { AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#parenthesized_expression#Left ( AST#expression#Left AST#conditional_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left value AST#expression#Right > AST#expression#Left 9 AST#expression#Right AST#binary_expression#Right AST#expression#Right ? AST#expression#Left '' AST#expression#Right : AST#expression#Left '0' AST#expression#Right AST#conditional_expression#Right AST#expression#Right ) AST#parenthesized_expression#Right AST#expression#Right + AST#expression#Left value AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
fill(value) {
return (value > 9 ? '' : '0') + value
}
|
https://github.com/openharmony/applications_app_samples/blob/a826ab0e75fe51d028c1c5af58188e908736b53b/code/SystemFeature/Telephony/Message/entry/src/main/ets/model/DateTimeUtil.ets#L41-L43
|
5866f6cde3bb3b4e2e3ba102cd26590b77d1e101
|
gitee
|
openharmony/update_update_app
|
0157b7917e2f48e914b5585991e8b2f4bc25108a
|
feature/ota/src/main/ets/manager/OtaUpdateManager.ets
|
arkts
|
getDownloadProgress
|
取升级进度
@return 升级进度
|
getDownloadProgress(): number {
return this._downloadProgress;
}
|
AST#method_declaration#Left getDownloadProgress AST#parameter_list#Left ( ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . _downloadProgress AST#member_expression#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
getDownloadProgress(): number {
return this._downloadProgress;
}
|
https://github.com/openharmony/update_update_app/blob/0157b7917e2f48e914b5585991e8b2f4bc25108a/feature/ota/src/main/ets/manager/OtaUpdateManager.ets#L250-L252
|
402896fa23f0e175585a2916b8b0fced31dd4268
|
gitee
|
openharmony-tpc/ohos_mpchart
|
4fb43a7137320ef2fee2634598f53d93975dfb4a
|
entry/src/main/ets/pages/scrollingCharts/data/Cosine.ets
|
arkts
|
Copyright (C) 2022 Huawei Device Co., Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
|
export default class Cosine {
public data: number[] = [
1.0, //#0
0.9998000066755178, //#1
0.9992001066967312, //#2
0.9982005400156222, //#3
0.996801706445518, //#4
0.9950041651292624, //#5
0.992808635283034, //#6
0.990215996129463, //#7
0.9872272839453933, //#8
0.9838436941753507, //#9
0.9800665802095645, //#10
0.9758974528426302, //#11
0.9713379796692108, //#12
0.9663899805862244, //#13
0.9610554379813293, //#14
0.9553364856027305, //#15
0.9492354109575819, //#16
0.9427546543970131, //#17
0.9358968081400203, //#18
0.9286646152366127, //#19
0.9210609684706269, //#20
0.913088909202652, //#21
0.904751626153523, //#22
0.8960524541288755, //#23
0.8869948726852646, //#24
0.8775825047383886, //#25
0.8678191299221538, //#26
0.8577086396867667, //#27
0.8472550780858032, //#28
0.8364626263965502, //#29
0.8253356014475525, //#30
0.8138784538919424, //#31
0.8020957664272419, //#32
0.7899922519623475, //#33
0.7775727517324336, //#34
0.7648422333625261, //#35
0.7518057888805234, //#36
0.7384686326804557, //#37
0.724836099436802, //#38
0.7109136419706951, //#39
0.6967068290688696, //#40
0.6822213432562266, //#41
0.667462978522903, //#42
0.6524376380067577, //#43
0.6371513316321991, //#44
0.6216101737063007, //#45
0.605820380473164, //#46
0.5897882676275087, //#47
0.5735202477884837, //#48
0.5570228279347097, //#49
0.54030260680158, //#50
0.5233662722418589, //#51
0.506220598550635, //#52
0.48887244375569844, //#53
0.47132874687442705, //#54
0.45359652513827653, //#55
0.4356828711859872, //#56
0.4175949502266283, //#57
0.3993399971736154, //#58
0.3809253137508472, //#59
0.36235826557211853, //#60
0.34364627919497903, //#61
0.3247968391502145, //#62
0.3058174849481404, //#63
0.2867158080629036, //#64
0.2674994488960003, //#65
0.2481760937202225, //#66
0.22875347160525775, //#67
0.2092393513261698, //#68
0.18964153825599847, //#69
0.16996787124372015, //#70
0.1502262194788189, //#71
0.1304244793437215, //#72
0.11057057125535577, //#73
0.09067243649709553, //#74
0.07073803404235907, //#75
0.050775337371132094, //#76
0.03079233128068804, //#77
0.01079700869178177, //#78
-0.009202632548406111, //#79
-0.02919859286529534, //#80
-0.04918287415662309, //#81
-0.06914748299157214, //#82
-0.08908443380803052, //#83
-0.10898575210670376, //#84
-0.12884347764080226, //#85
-0.1486496676000277, //#86
-0.16839639978758542, //#87
-0.18807577578895107, //#88
-0.20767992413112554, //#89
-0.22720100343111285, //#90
-0.24663120553236303, //#91
-0.2659627586279245, //#92
-0.28518793036905754, //#93
-0.3042990309580645, //#94
-0.32328841622410065, //#95
-0.3421484906807349, //#96
-0.3608717105640369, //#97
-0.37945058684997673, //#98
-0.39787768824992864, //#99
-0.4161456441830819, //#100
-0.43424725510755136, //#101
-0.4521750648543838, //#102
-0.469922010949154, //#103
-0.4874809948635857, //#104
-0.5048449932516255, //#105
-0.5220070607586818, //#106
-0.5389603327996688, //#107
-0.5556980283047446, //#108
-0.5722134524316421, //#109
-0.5884999992435129, //#110
-0.6045511543512081, //#111
-0.6203604975189423, //#112
-0.6359217052322976, //#113
-0.6512285532275404, //#114
-0.6662749189812381, //#115
-0.6810547841591839, //#116
-0.6955622370236441, //#117
-0.7097914747979706, //#118
-0.7237368059876295, //#119
-0.737392652656719, //#120
-0.7507535526590651, //#121
-0.7638141618230024, //#122
-0.7765692560889685, //#123
-0.7890137335990532, //#124
-0.8011426167376704, //#125
-0.8129510541225339, //#126
-0.824434322545142, //#127
-0.8355878288599945, //#128
-0.8464071118217855, //#129
-0.8568878438698396, //#130
-0.8670258328590743, //#131
-0.8768170237367994, //#132
-0.886257500164681, //#133
-0.8953434860852212, //#134
-0.9040713472321283, //#135
-0.912437592583972, //#136
-0.9204388757605422, //#137
-0.9280719963613548, //#138
-0.9353339012457665, //#139
-0.9422216857541875, //#140
-0.948732594869905, //#141
-0.9548640243210507, //#142
-0.960613521622273, //#143
-0.9659787870556967, //#144
-0.9709576745907774, //#145
-0.9755481927426838, //#146
-0.979748505368863, //#147
-0.9835569324034725, //#148
-0.9869719505293822, //#149
-0.98999219378748, //#150
-0.9926164541230362, //#151
-0.9948436818689081, //#152
-0.9966729861653926, //#153
-0.998103635316557, //#154
-0.9991350570829072, //#155
-0.9997668389102758, //#156
-0.9999987280948375, //#157
-0.9998306318841871, //#158
-0.9992626175144392, //#159
-0.9982949121833353, //#160
-0.996927902959367, //#161
-0.9951621366269541, //#162
-0.9929983194677395, //#163
-0.9904373169780857, //#164
-0.9874801535228883, //#165
-0.9841280119258453, //#166
-0.9803822329963435, //#167
-0.9762443149931541, //#168
-0.97171591302515, //#169
-0.9667988383892859, //#170
-0.9614950578461049, //#171
-0.9558066928330617, //#172
-0.9497360186159785, //#173
-0.9432854633789693, //#174
-0.9364576072532017, //#175
-0.9292551812848803, //#176
-0.9216810663428666, //#177
-0.9137382919663726, //#178
-0.9054300351531868, //#179
-0.8967596190889212, //#180
-0.887730511817783, //#181
-0.8783463248554058, //#182
-0.8686108117442946, //#183
-0.8585278665524617, //#184
-0.8481015223158543, //#185
-0.8373359494251967, //#186
-0.8262354539578933, //#187
-0.8148044759556579, //#188
-0.8030475876485598, //#189
-0.7909694916261961, //#190
-0.7785750189567227, //#191
-0.765869127254494, //#192
-0.7528568986970883, //#193
-0.7395435379925076, //#194
-0.725934370297368, //#195
-0.712034839086912, //#196
-0.6978505039776957, //#197
-0.6833870385038194, //#198
-0.6686502278475953, //#199
-0.653645966525555, //#200
-0.6383800725148856, //#201
-0.6228590159091549, //#202
-0.6070888244769085, //#203
-0.5910758060724219, //#204
-0.5748263656773369, //#205
-0.5583470028387585, //#206
-0.5416443090695284, //#207
-0.5247249652117124, //#208
-0.5075957387643578, //#209
-0.49026348117658924, //#210
-0.47273512510712556, //#211
-0.455017681651314, //#212
-0.4371182375367911, //#213
-0.4190439522888913, //#214
-0.4008020553669378, //#215
-0.3823998432725609, //#216
-0.3638446766311999, //#217
-0.34514397724795687, //#218
-0.3263052251389793, //#219
-0.3073359555395589, //#220
-0.2882437558901438, //#221
-0.26903626280146914, //#222
-0.2497211590000209, //#223
-0.230306170255053, //#224
-0.210799062288389, //#225
-0.19120763766824242, //#226
-0.17153973268829978, //#227
-0.1518032142333134, //#228
-0.13200597663245844, //#229
-0.11215593850171253, //#230
-0.09226103957652096, //#231
-0.07232923753601443, //#232
-0.052368504820049594, //#233
-0.032386825440345476, //#234
-0.012392191786991334, //#235
0.00760739856839673, //#236
0.027603946071591657, //#237
0.04758945238546438, //#238
0.06755592358920592, //#239
0.08749537337578304, //#240
0.10739982624634846, //#241
0.127261320700328, //#242
0.14707191241990855, //#243
0.16682367744765325, //#244
0.18650871535597274, //#245
0.2061191524071849, //#246
0.22564714470289873, //#247
0.24508488132146347, //#248
0.26442458744222685, //#249
0.28365852745535386, //#250
0.30277900805596175, //#251
0.32177838132133346, //#252
0.3406490477699788, //#253
0.35938345940131994, //#254
0.3779741227147856, //#255
0.39641360170710516, //#256
0.4146945208466053, //#257
0.43280956802331894, //#258
0.4507514974737259, //#259
0.4685131326789562, //#260
0.48608736923529655, //#261
0.5034671776958516, //#262
0.5206456063822237, //#263
0.5376157841650862, //#264
0.5543709232125382, //#265
0.5709043217051422, //#266
0.5872093665165563, //#267
0.6032795358586928, //#268
0.6191084018903404, //#269
0.6346896332882112, //#270
0.6500169977793795, //#271
0.6650843646341041, //#272
0.6798857071180334, //#273
0.6944151049028142, //#274
0.7086667464341395, //#275
0.7226349312562887, //#276
0.7363140722922291, //#277
0.749698698078368, //#278
0.7627834549530611, //#279
0.775563109198002, //#280
0.7880325491316352, //#281
0.8001867871537571, //#282
0.8120209617404855, //#283
0.8235303393888008, //#284
0.8347103165098803, //#285
0.8455564212704689, //#286
0.8560643153815497, //#287
0.866229795833598, //#288
0.8760487965777259, //#289
0.885517390152045, //#290
0.8946317892525951, //#291
0.9033883482482131, //#292
0.9117835646387336, //#293
0.9198140804559395, //#294
0.9274766836067025, //#295
0.934768309157775, //#296
0.9416860405617193, //#297
0.9482271108234865, //#298
0.9543889036071753, //#299
0.9601689542825289, //#300
0.9655649509107532, //#301
0.970574735169259, //#302
0.9751963032149611, //#303
0.9794278064857869, //#304
0.9832675524400757, //#305
0.9867140052335709, //#306
0.9897657863337365, //#307
0.9924216750711504, //#308
0.9946806091277554, //#309
0.9965416849617705, //#310
0.9980041581690963, //#311
0.9990674437810647, //#312
0.9997311164984192, //#313
0.9999949108614278, //#314
0.9998587213560639, //#315
0.9993226024562099, //#316
0.9983867686018685, //#317
0.9970515941133901, //#318
0.9953176130417491, //#319
0.9931855189549322, //#320
0.9906561646605199, //#321
0.987730561864576, //#322
0.9844098807669794, //#323
0.980695449593361, //#324
0.9765887540638312, //#325
0.9720914367987137, //#326
0.9672052966615201, //#327
0.9619322880394301, //#328
0.956274520061564, //#329
0.9502342557553608, //#330
0.9438139111413991, //#331
0.9370160542670232, //#332
0.9298434041791597, //#333
0.9222988298367378, //#334
0.914385348963146, //#335
0.9061061268391848, //#336
0.8974644750369997, //#337
0.8884638500954981, //#338
0.8791078521377839, //#339
0.8694002234311572, //#340
0.8593448468902616, //#341
0.8489457445239725, //#342
0.8382070758266503, //#343
0.8271331361144011, //#344
0.8157283548070109, //#345
0.8039972936562406, //#346
0.7919446449211889, //#347
0.779575229491455, //#348
0.7668939949588511, //#349
0.7539060136384351, //#350
0.7406164805396558, //#351
0.727030711288423, //#352
0.7131541400009316, //#353
0.6989923171100918, //#354
0.6845509071454342, //#355
0.6698356864673781, //#356
0.6548525409567681, //#357
0.6396074636606056, //#358
0.6241065523949136, //#359
0.6083560073056969, //#360
0.5923621283889708, //#361
0.5761313129708517, //#362
0.5596700531487165, //#363
0.5429849331944554, //#364
0.5260826269208558, //#365
0.5089698950121717, //#366
0.4916535823199446, //#367
0.4741406151251599, //#368
0.4564379983678321, //#369
0.43855281284512715, //#370
0.42049221237914375, //#371
0.4022634209554854, //#372
0.3838737298337676, //#373
0.36533049463121725, //#374
0.346641132380529, //#375
0.32781311856315715, //#376
0.3088539841192281, //#377
0.28977131243527066, //#378
0.2705727363109682, //#379
0.25126593490614646, //#380
0.23185863066921794, //#381
0.21235858624831114, //#382
0.1927736013863209, //#383
0.1731115098011213, //#384
0.15338017605218865, //#385
0.13358749239488882, //#386
0.11374137562368615, //#387
0.09384976390553743, //#388
0.07392061360473688, //#389
0.05396189610048263, //#390
0.03398159459843745, //#391
0.013987700937558934, //#392
-0.0060117876065233595, //#393
-0.026008871520305465, //#394
-0.04599555225210164, //#395
-0.0659638354113523, //#396
-0.08590573396626752, //#397
-0.10581327143852721, //#398
-0.12567848509376003, //#399
-0.14549342912652474, //#400
-0.16525064811995077, //#401
-0.18494176603177878, //#402
-0.20455890631685353, //#403
-0.22409422202143867, //#404
-0.2435398989220372, //#405
-0.26288815865111975, //#406
-0.2821312618085105, //#407
-0.3012615110571854, //#408
-0.32027125420224567, //#409
-0.3391528872518335, //#410
-0.3578988574587669, //#411
-0.37650166634167603, //#412
-0.39495387268443305, //#413
-0.4132480955126757, //#414
-0.4313770170462337, //#415
-0.44933338562627717, //#416
-0.46711001861601636, //#417
-0.48469980527379214, //#418
-0.5020957095974079, //#419
-0.5192907731385656, //#420
-0.5362781177862795, //#421
-0.5530509485181553, //#422
-0.5696025561184319, //#423
-0.5859263198617023, //#424
-0.602015710161236, //#425
-0.6178642911808461, //#426
-0.6334657234092563, //#427
-0.6488137661959366, //#428
-0.6639022802473945, //#429
-0.6787252300829233, //#430
-0.6932766864488242, //#431
-0.7075508286901373, //#432
-0.7215419470789324, //#433
-0.735244445098229, //#434
-0.7486528416806302, //#435
-0.7617617734007782, //#436
-0.7745659966207497, //#437
-0.787060389587538, //#438
-0.7992399544817796, //#439
-0.8110998194169068, //#440
-0.822635240387926, //#441
-0.8338416031690444, //#442
-0.8447144251593824, //#443
-0.8552493571760367, //#444
-0.8654421851937745, //#445
-0.8752888320306655, //#446
-0.8847853589789743, //#447
-0.8939279673806632, //#448
-0.9027130001468745, //#449
-0.9111369432207839, //#450
-0.9191964269832412, //#451
-0.9268882276006345, //#452
-0.9342092683144392, //#453
-0.9411566206719377, //#454
-0.9477275056976144, //#455
-0.9539192950047597, //#456
-0.959729511846838, //#457
-0.9651558321081987, //#458
-0.9701960852337338, //#459
-0.9748482550971108, //#460
-0.9791104808072335, //#461
-0.9829810574526074, //#462
-0.9864584367833128, //#463
-0.9895412278303127, //#464
-0.9922281974618472, //#465
-0.9945182708766922, //#466
-0.9964105320340856, //#467
-0.9979042240201477, //#468
-0.998998749350651, //#469
-0.9996936702100165, //#470
-0.9999887086264423, //#471
-0.9998837465830935, //#472
-0.9993788260653099, //#473
-0.9984741490438113, //#474
-0.9971700773939082, //#475
-0.99546713275075, //#476
-0.9933659963006688, //#477
-0.9908675085087004, //#478
-0.9879726687823952, //#479
-0.9846826350720495, //#480
-0.9809987234075198, //#481
-0.9769224073718046, //#482
-0.9724553175116033, //#483
-0.9675992406850901, //#484
-0.9623561193471611, //#485
-0.9567280507724435, //#486
-0.9507172862163743, //#487
-0.9443262300146881, //#488
-0.9375574386216696, //#489
-0.9304136195875602, //#490
-0.922897630475524, //#491
-0.915012477718608, //#492
-0.9067613154171548, //#493
-0.8981474440771456, //#494
-0.8891743092899825, //#495
-0.879845500354234, //#496
-0.8701647488398982, //#497
-0.8601359270957558, //#498
-0.8497630467004118, //#499
-0.8390502568576437, //#500
-0.8280018427366993, //#501
-0.8166222237582085, //#502
-0.8049159518263918, //#503
-0.7928877095082767, //#504
-0.7805423081606475, //#505
-0.767884686005479, //#506
-0.7549199061546221, //#507
-0.7416531545845351, //#508
-0.728089738061866, //#509
-0.7142350820207211, //#510
-0.7000947283924623, //#511
-0.6856743333889093, //#512
-0.6709796652398244, //#513
-0.6560166018855939, //#514
-0.640791128626021, //#515
-0.6253093357261775, //#516
-0.6095774159802665, //#517
-0.5936016622344745, //#518
-0.5773884648698012, //#519
-0.5609443092458755, //#520
-0.5442757731067793, //#521
-0.5273895239499172, //#522
-0.5102923163589844, //#523
-0.4929909893020995, //#524
-0.4754924633961832, //#525
-0.4578037381386771, //#526
-0.4399318891077101, //#527
-0.42188406513183174, //#528
-0.4036674854304451, //#529
-0.3852894367260835, //#530
-0.36675727032968475, //#531
-0.3480783992000305, //#532
-0.3292602949785258, //#533
-0.3103104850005053, //#534
-0.2912365492842617, //#535
-0.27204611749900054, //#536
-0.25274686591293494, //#537
-0.23334651432273967, //#538
-0.21385282296559432, //#539
-0.19427358941504982, //#540
-0.17461664546196007, //#541
-0.1548898539817267, //#542
-0.13510110578910986, //#543
-0.11525831648186291, //#544
-0.09536942327445402, //#545
-0.07544238182314085, //#546
-0.05548516304366845, //#547
-0.03550574992286332, //#548
-0.015512134325398927, //#549
0.004487686202989896, //#550
0.02448571163456509, //#551
0.04447394265963625, //#552
0.06444438388632431, //#553
0.08438904703875809, //#554
0.10429995415242439, //#555
0.1241691407653935, //#556
0.1439886591041436, //#557
0.16375058126270975, //#558
0.18344700237388564, //#559
0.20307004377121, //#560
0.2226118561404721, //#561
0.2420646226594768, //#562
0.2614205621248122, //#563
0.28067193206436947, //#564
0.29981103183437086, //#565
0.31883020569966475, //#566
0.3377218458960585, //#567
0.35647839567346157, //#568
0.3750923523186232, //#569
0.3935562701562553, //#570
0.41186276352733925, //#571
0.4300045097434266, //#572
0.44797425201575064, //#573
0.46576480235797824, //#574
0.4833690444614399, //#575
0.500779936541689, //#576
0.5179905141552499, //#577
0.5349938929854311, //#578
0.5517832715960851, //#579
0.5683519341522173, //#580
0.5846932531063534, //#581
0.6008006918495911, //#582
0.6166678073262762, //#583
0.6322882526112575, //#584
0.6476557794486876, //#585
0.6627642407513568, //#586
0.6776075930595586, //#587
0.6921798989585037, //#588
0.706475329453315, //#589
0.7204881663006553, //#590
0.7342128042960522, //#591
0.7476437535160088, //#592
0.7607756415139992, //#593
0.7736032154694754, //#594
0.7861213442890201, //#595
0.7983250206588106, //#596
0.8102093630475687, //#597
0.8217696176591981, //#598
0.8330011603343257, //#599
0.8438994983999891, //#600
0.854460272466728, //#601
0.8646792581723609, //#602
0.8745523678717522, //#603
0.8840756522718898, //#604
0.893245302011622, //#605
0.9020576491854215, //#606
0.910509168810565, //#607
0.9185964802371446, //#608
0.926316348500344, //#609
0.9336656856144409, //#610
0.9406415518080167, //#611
0.9472411566998794, //#612
0.95346186041523, //#613
0.9593011746416258, //#614
0.9647567636243177, //#615
0.9698264451005635, //#616
0.974508191172544, //#617
0.9788001291185322, //#618
0.9827005421419915, //#619
0.9862078700583026, //#620
0.989320709918845, //#621
0.9920378165721839, //#622
0.9943581031621368, //#623
0.9962806415625208, //#624
0.9978046627484086, //#625
0.9989295571037418, //#626
0.9996548746651802, //#627
0.9999803253020899, //#628
0.9999057788325965, //#629
0.9994312650756588, //#630
0.998556973839141, //#631
0.9972832548438884, //#632
0.9956106175838376, //#633
0.9935397311222164, //#634
0.9910714238239149, //#635
0.9882066830241357, //#636
0.9849466546334548, //#637
0.9812926426794514, //#638
0.9772461087850911, //#639
0.9728086715840686, //#640
0.9679821060733467, //#641
0.9627683429031486, //#642
0.9571694676046879, //#643
0.9511877197559462, //#644
0.9448254920858304, //#645
0.9380853295170695, //#646
0.9309699281482325, //#647
0.923482134175276, //#648
0.9156249427530513, //#649
0.9074014967972275, //#650
0.8988150857271101, //#651
0.8898691441498562, //#652
0.8805672504866153, //#653
0.8709131255411423, //#654
0.8609106310114581, //#655
0.8505637679451508, //#656
0.8398766751389367, //#657
0.8288536274831215, //#658
0.8174990342516223, //#659
0.8058174373382364, //#660
0.7938135094398614, //#661
0.7814920521873926, //#662
0.7688579942250473, //#663
0.7559163892388825, //#664
0.7426724139352946, //#665
0.7291313659703125, //#666
0.7152986618305073, //#667
0.7011798346663719, //#668
0.6867805320790326, //#669
0.6721065138611806, //#670
0.6571636496931266, //#671
0.6419579167948992, //#672
0.6264953975353273, //#673
0.610782276999062, //#674
0.5948248405125122, //#675
0.5786294711296829, //#676
0.5622026470789215, //#677
0.5455509391715946, //#678
0.52868100817373, //#679
0.5115996021416783, //#680
0.49431355372285585, //#681
0.4768297774226521, //#682
0.45915526683859303, //#683
0.44129709186286736, //#684
0.4232623958543345, //#685
0.4050583927811453, //#686
0.3866923643351191, //#687
0.36817165701903065, //#688
0.34950367920797243, //#689
0.3306958981859679, //#690
0.31175583715902044, //#691
0.2926910722457939, //#692
0.2735092294471269, //#693
0.2542179815955952, //#694
0.23482504528633993, //#695
0.21533817779039144, //#696
0.19576517395172216, //#697
0.17611386306927027, //#698
0.15639210576518112, //#699
0.13660779084051936, //#700
0.11676883211970907, //#701
0.0968831652849648, //#702
0.07695874470197908, //#703
0.057003540238136606, //#704
0.03702553407452759, //#705
0.017032717513035638, //#706
-0.002966912220222811, //#707
-0.022965355173828687, //#708
-0.0429546118710807, //#709
-0.06292668650982579, //#710
-0.08287359016081984, //#711
-0.10278734396333908, //#712
-0.12265998231676409, //#713
-0.1424835560668597, //#714
-0.1622501356854762, //#715
-0.18195181444240016, //#716
-0.20158071156808577, //#717
-0.2211289754060019, //#718
-0.2405887865533338, //#719
-0.2599523609887831, //#720
-0.2792119531862151, //#721
-0.2983598592129078, //#722
-0.3173884198111633, //#723
-0.33629002346204884, //#724
-0.3550571094300426, //#725
-0.37368217078736515, //#726
-0.39215775741678827, //#727
-0.4104764789917186, //#728
-0.4286310079323652, //#729
-0.446614082336808, //#730
-0.46441850888579467, //#731
-0.48203716572010397, //#732
-0.4994630052893251, //#733
-0.5166890571709126, //#734
-0.5337084308583907, //#735
-0.5505143185175893, //#736
-0.5670999977098123, //#737
-0.5834588340808463, //#738
-0.5995842840147351, //#739
-0.6154698972512584, //#740
-0.6311093194660693, //#741
-0.6464962948124537, //#742
-0.6616246684237019, //#743
-0.6764883888750848, //#744
-0.6910815106044541, //#745
-0.7053981962904975, //#746
-0.719432719187695, //#747
-0.7331794654170467, //#748
-0.7466329362116519//#749
]
}
|
AST#export_declaration#Left export default AST#class_declaration#Left class Cosine AST#class_body#Left { AST#property_declaration#Left public data : AST#type_annotation#Left AST#primary_type#Left AST#array_type#Left number [ ] AST#array_type#Right AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#array_literal#Left [ AST#expression#Left 1.0 AST#expression#Right , //#0 AST#expression#Left 0.9998000066755178 AST#expression#Right , //#1 AST#expression#Left 0.9992001066967312 AST#expression#Right , //#2 AST#expression#Left 0.9982005400156222 AST#expression#Right , //#3 AST#expression#Left 0.996801706445518 AST#expression#Right , //#4 AST#expression#Left 0.9950041651292624 AST#expression#Right , //#5 AST#expression#Left 0.992808635283034 AST#expression#Right , //#6 AST#expression#Left 0.990215996129463 AST#expression#Right , //#7 AST#expression#Left 0.9872272839453933 AST#expression#Right , //#8 AST#expression#Left 0.9838436941753507 AST#expression#Right , //#9 AST#expression#Left 0.9800665802095645 AST#expression#Right , //#10 AST#expression#Left 0.9758974528426302 AST#expression#Right , //#11 AST#expression#Left 0.9713379796692108 AST#expression#Right , //#12 AST#expression#Left 0.9663899805862244 AST#expression#Right , //#13 AST#expression#Left 0.9610554379813293 AST#expression#Right , //#14 AST#expression#Left 0.9553364856027305 AST#expression#Right , //#15 AST#expression#Left 0.9492354109575819 AST#expression#Right , //#16 AST#expression#Left 0.9427546543970131 AST#expression#Right , //#17 AST#expression#Left 0.9358968081400203 AST#expression#Right , //#18 AST#expression#Left 0.9286646152366127 AST#expression#Right , //#19 AST#expression#Left 0.9210609684706269 AST#expression#Right , //#20 AST#expression#Left 0.913088909202652 AST#expression#Right , //#21 AST#expression#Left 0.904751626153523 AST#expression#Right , //#22 AST#expression#Left 0.8960524541288755 AST#expression#Right , //#23 AST#expression#Left 0.8869948726852646 AST#expression#Right , //#24 AST#expression#Left 0.8775825047383886 AST#expression#Right , //#25 AST#expression#Left 0.8678191299221538 AST#expression#Right , //#26 AST#expression#Left 0.8577086396867667 AST#expression#Right , //#27 AST#expression#Left 0.8472550780858032 AST#expression#Right , //#28 AST#expression#Left 0.8364626263965502 AST#expression#Right , //#29 AST#expression#Left 0.8253356014475525 AST#expression#Right , //#30 AST#expression#Left 0.8138784538919424 AST#expression#Right , //#31 AST#expression#Left 0.8020957664272419 AST#expression#Right , //#32 AST#expression#Left 0.7899922519623475 AST#expression#Right , //#33 AST#expression#Left 0.7775727517324336 AST#expression#Right , //#34 AST#expression#Left 0.7648422333625261 AST#expression#Right , //#35 AST#expression#Left 0.7518057888805234 AST#expression#Right , //#36 AST#expression#Left 0.7384686326804557 AST#expression#Right , //#37 AST#expression#Left 0.724836099436802 AST#expression#Right , //#38 AST#expression#Left 0.7109136419706951 AST#expression#Right , //#39 AST#expression#Left 0.6967068290688696 AST#expression#Right , //#40 AST#expression#Left 0.6822213432562266 AST#expression#Right , //#41 AST#expression#Left 0.667462978522903 AST#expression#Right , //#42 AST#expression#Left 0.6524376380067577 AST#expression#Right , //#43 AST#expression#Left 0.6371513316321991 AST#expression#Right , //#44 AST#expression#Left 0.6216101737063007 AST#expression#Right , //#45 AST#expression#Left 0.605820380473164 AST#expression#Right , //#46 AST#expression#Left 0.5897882676275087 AST#expression#Right , //#47 AST#expression#Left 0.5735202477884837 AST#expression#Right , //#48 AST#expression#Left 0.5570228279347097 AST#expression#Right , //#49 AST#expression#Left 0.54030260680158 AST#expression#Right , //#50 AST#expression#Left 0.5233662722418589 AST#expression#Right , //#51 AST#expression#Left 0.506220598550635 AST#expression#Right , //#52 AST#expression#Left 0.48887244375569844 AST#expression#Right , //#53 AST#expression#Left 0.47132874687442705 AST#expression#Right , //#54 AST#expression#Left 0.45359652513827653 AST#expression#Right , //#55 AST#expression#Left 0.4356828711859872 AST#expression#Right , //#56 AST#expression#Left 0.4175949502266283 AST#expression#Right , //#57 AST#expression#Left 0.3993399971736154 AST#expression#Right , //#58 AST#expression#Left 0.3809253137508472 AST#expression#Right , //#59 AST#expression#Left 0.36235826557211853 AST#expression#Right , //#60 AST#expression#Left 0.34364627919497903 AST#expression#Right , //#61 AST#expression#Left 0.3247968391502145 AST#expression#Right , //#62 AST#expression#Left 0.3058174849481404 AST#expression#Right , //#63 AST#expression#Left 0.2867158080629036 AST#expression#Right , //#64 AST#expression#Left 0.2674994488960003 AST#expression#Right , //#65 AST#expression#Left 0.2481760937202225 AST#expression#Right , //#66 AST#expression#Left 0.22875347160525775 AST#expression#Right , //#67 AST#expression#Left 0.2092393513261698 AST#expression#Right , //#68 AST#expression#Left 0.18964153825599847 AST#expression#Right , //#69 AST#expression#Left 0.16996787124372015 AST#expression#Right , //#70 AST#expression#Left 0.1502262194788189 AST#expression#Right , //#71 AST#expression#Left 0.1304244793437215 AST#expression#Right , //#72 AST#expression#Left 0.11057057125535577 AST#expression#Right , //#73 AST#expression#Left 0.09067243649709553 AST#expression#Right , //#74 AST#expression#Left 0.07073803404235907 AST#expression#Right , //#75 AST#expression#Left 0.050775337371132094 AST#expression#Right , //#76 AST#expression#Left 0.03079233128068804 AST#expression#Right , //#77 AST#expression#Left 0.01079700869178177 AST#expression#Right , //#78 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.009202632548406111 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#79 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.02919859286529534 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#80 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.04918287415662309 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#81 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.06914748299157214 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#82 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.08908443380803052 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#83 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.10898575210670376 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#84 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.12884347764080226 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#85 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.1486496676000277 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#86 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.16839639978758542 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#87 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.18807577578895107 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#88 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.20767992413112554 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#89 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.22720100343111285 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#90 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.24663120553236303 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#91 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.2659627586279245 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#92 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.28518793036905754 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#93 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.3042990309580645 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#94 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.32328841622410065 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#95 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.3421484906807349 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#96 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.3608717105640369 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#97 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.37945058684997673 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#98 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.39787768824992864 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#99 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.4161456441830819 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#100 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.43424725510755136 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#101 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.4521750648543838 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#102 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.469922010949154 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#103 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.4874809948635857 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#104 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.5048449932516255 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#105 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.5220070607586818 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#106 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.5389603327996688 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#107 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.5556980283047446 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#108 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.5722134524316421 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#109 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.5884999992435129 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#110 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.6045511543512081 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#111 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.6203604975189423 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#112 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.6359217052322976 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#113 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.6512285532275404 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#114 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.6662749189812381 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#115 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.6810547841591839 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#116 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.6955622370236441 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#117 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.7097914747979706 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#118 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.7237368059876295 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#119 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.737392652656719 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#120 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.7507535526590651 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#121 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.7638141618230024 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#122 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.7765692560889685 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#123 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.7890137335990532 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#124 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.8011426167376704 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#125 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.8129510541225339 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#126 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.824434322545142 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#127 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.8355878288599945 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#128 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.8464071118217855 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#129 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.8568878438698396 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#130 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.8670258328590743 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#131 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.8768170237367994 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#132 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.886257500164681 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#133 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.8953434860852212 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#134 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9040713472321283 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#135 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.912437592583972 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#136 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9204388757605422 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#137 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9280719963613548 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#138 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9353339012457665 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#139 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9422216857541875 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#140 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.948732594869905 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#141 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9548640243210507 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#142 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.960613521622273 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#143 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9659787870556967 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#144 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9709576745907774 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#145 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9755481927426838 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#146 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.979748505368863 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#147 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9835569324034725 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#148 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9869719505293822 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#149 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.98999219378748 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#150 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9926164541230362 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#151 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9948436818689081 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#152 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9966729861653926 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#153 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.998103635316557 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#154 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9991350570829072 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#155 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9997668389102758 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#156 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9999987280948375 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#157 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9998306318841871 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#158 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9992626175144392 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#159 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9982949121833353 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#160 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.996927902959367 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#161 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9951621366269541 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#162 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9929983194677395 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#163 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9904373169780857 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#164 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9874801535228883 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#165 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9841280119258453 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#166 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9803822329963435 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#167 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9762443149931541 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#168 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.97171591302515 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#169 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9667988383892859 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#170 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9614950578461049 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#171 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9558066928330617 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#172 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9497360186159785 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#173 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9432854633789693 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#174 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9364576072532017 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#175 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9292551812848803 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#176 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9216810663428666 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#177 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9137382919663726 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#178 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9054300351531868 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#179 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.8967596190889212 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#180 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.887730511817783 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#181 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.8783463248554058 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#182 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.8686108117442946 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#183 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.8585278665524617 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#184 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.8481015223158543 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#185 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.8373359494251967 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#186 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.8262354539578933 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#187 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.8148044759556579 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#188 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.8030475876485598 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#189 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.7909694916261961 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#190 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.7785750189567227 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#191 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.765869127254494 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#192 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.7528568986970883 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#193 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.7395435379925076 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#194 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.725934370297368 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#195 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.712034839086912 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#196 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.6978505039776957 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#197 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.6833870385038194 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#198 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.6686502278475953 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#199 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.653645966525555 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#200 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.6383800725148856 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#201 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.6228590159091549 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#202 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.6070888244769085 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#203 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.5910758060724219 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#204 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.5748263656773369 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#205 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.5583470028387585 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#206 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.5416443090695284 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#207 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.5247249652117124 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#208 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.5075957387643578 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#209 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.49026348117658924 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#210 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.47273512510712556 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#211 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.455017681651314 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#212 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.4371182375367911 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#213 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.4190439522888913 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#214 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.4008020553669378 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#215 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.3823998432725609 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#216 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.3638446766311999 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#217 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.34514397724795687 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#218 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.3263052251389793 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#219 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.3073359555395589 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#220 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.2882437558901438 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#221 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.26903626280146914 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#222 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.2497211590000209 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#223 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.230306170255053 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#224 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.210799062288389 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#225 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.19120763766824242 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#226 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.17153973268829978 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#227 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.1518032142333134 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#228 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.13200597663245844 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#229 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.11215593850171253 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#230 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.09226103957652096 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#231 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.07232923753601443 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#232 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.052368504820049594 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#233 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.032386825440345476 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#234 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.012392191786991334 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#235 AST#expression#Left 0.00760739856839673 AST#expression#Right , //#236 AST#expression#Left 0.027603946071591657 AST#expression#Right , //#237 AST#expression#Left 0.04758945238546438 AST#expression#Right , //#238 AST#expression#Left 0.06755592358920592 AST#expression#Right , //#239 AST#expression#Left 0.08749537337578304 AST#expression#Right , //#240 AST#expression#Left 0.10739982624634846 AST#expression#Right , //#241 AST#expression#Left 0.127261320700328 AST#expression#Right , //#242 AST#expression#Left 0.14707191241990855 AST#expression#Right , //#243 AST#expression#Left 0.16682367744765325 AST#expression#Right , //#244 AST#expression#Left 0.18650871535597274 AST#expression#Right , //#245 AST#expression#Left 0.2061191524071849 AST#expression#Right , //#246 AST#expression#Left 0.22564714470289873 AST#expression#Right , //#247 AST#expression#Left 0.24508488132146347 AST#expression#Right , //#248 AST#expression#Left 0.26442458744222685 AST#expression#Right , //#249 AST#expression#Left 0.28365852745535386 AST#expression#Right , //#250 AST#expression#Left 0.30277900805596175 AST#expression#Right , //#251 AST#expression#Left 0.32177838132133346 AST#expression#Right , //#252 AST#expression#Left 0.3406490477699788 AST#expression#Right , //#253 AST#expression#Left 0.35938345940131994 AST#expression#Right , //#254 AST#expression#Left 0.3779741227147856 AST#expression#Right , //#255 AST#expression#Left 0.39641360170710516 AST#expression#Right , //#256 AST#expression#Left 0.4146945208466053 AST#expression#Right , //#257 AST#expression#Left 0.43280956802331894 AST#expression#Right , //#258 AST#expression#Left 0.4507514974737259 AST#expression#Right , //#259 AST#expression#Left 0.4685131326789562 AST#expression#Right , //#260 AST#expression#Left 0.48608736923529655 AST#expression#Right , //#261 AST#expression#Left 0.5034671776958516 AST#expression#Right , //#262 AST#expression#Left 0.5206456063822237 AST#expression#Right , //#263 AST#expression#Left 0.5376157841650862 AST#expression#Right , //#264 AST#expression#Left 0.5543709232125382 AST#expression#Right , //#265 AST#expression#Left 0.5709043217051422 AST#expression#Right , //#266 AST#expression#Left 0.5872093665165563 AST#expression#Right , //#267 AST#expression#Left 0.6032795358586928 AST#expression#Right , //#268 AST#expression#Left 0.6191084018903404 AST#expression#Right , //#269 AST#expression#Left 0.6346896332882112 AST#expression#Right , //#270 AST#expression#Left 0.6500169977793795 AST#expression#Right , //#271 AST#expression#Left 0.6650843646341041 AST#expression#Right , //#272 AST#expression#Left 0.6798857071180334 AST#expression#Right , //#273 AST#expression#Left 0.6944151049028142 AST#expression#Right , //#274 AST#expression#Left 0.7086667464341395 AST#expression#Right , //#275 AST#expression#Left 0.7226349312562887 AST#expression#Right , //#276 AST#expression#Left 0.7363140722922291 AST#expression#Right , //#277 AST#expression#Left 0.749698698078368 AST#expression#Right , //#278 AST#expression#Left 0.7627834549530611 AST#expression#Right , //#279 AST#expression#Left 0.775563109198002 AST#expression#Right , //#280 AST#expression#Left 0.7880325491316352 AST#expression#Right , //#281 AST#expression#Left 0.8001867871537571 AST#expression#Right , //#282 AST#expression#Left 0.8120209617404855 AST#expression#Right , //#283 AST#expression#Left 0.8235303393888008 AST#expression#Right , //#284 AST#expression#Left 0.8347103165098803 AST#expression#Right , //#285 AST#expression#Left 0.8455564212704689 AST#expression#Right , //#286 AST#expression#Left 0.8560643153815497 AST#expression#Right , //#287 AST#expression#Left 0.866229795833598 AST#expression#Right , //#288 AST#expression#Left 0.8760487965777259 AST#expression#Right , //#289 AST#expression#Left 0.885517390152045 AST#expression#Right , //#290 AST#expression#Left 0.8946317892525951 AST#expression#Right , //#291 AST#expression#Left 0.9033883482482131 AST#expression#Right , //#292 AST#expression#Left 0.9117835646387336 AST#expression#Right , //#293 AST#expression#Left 0.9198140804559395 AST#expression#Right , //#294 AST#expression#Left 0.9274766836067025 AST#expression#Right , //#295 AST#expression#Left 0.934768309157775 AST#expression#Right , //#296 AST#expression#Left 0.9416860405617193 AST#expression#Right , //#297 AST#expression#Left 0.9482271108234865 AST#expression#Right , //#298 AST#expression#Left 0.9543889036071753 AST#expression#Right , //#299 AST#expression#Left 0.9601689542825289 AST#expression#Right , //#300 AST#expression#Left 0.9655649509107532 AST#expression#Right , //#301 AST#expression#Left 0.970574735169259 AST#expression#Right , //#302 AST#expression#Left 0.9751963032149611 AST#expression#Right , //#303 AST#expression#Left 0.9794278064857869 AST#expression#Right , //#304 AST#expression#Left 0.9832675524400757 AST#expression#Right , //#305 AST#expression#Left 0.9867140052335709 AST#expression#Right , //#306 AST#expression#Left 0.9897657863337365 AST#expression#Right , //#307 AST#expression#Left 0.9924216750711504 AST#expression#Right , //#308 AST#expression#Left 0.9946806091277554 AST#expression#Right , //#309 AST#expression#Left 0.9965416849617705 AST#expression#Right , //#310 AST#expression#Left 0.9980041581690963 AST#expression#Right , //#311 AST#expression#Left 0.9990674437810647 AST#expression#Right , //#312 AST#expression#Left 0.9997311164984192 AST#expression#Right , //#313 AST#expression#Left 0.9999949108614278 AST#expression#Right , //#314 AST#expression#Left 0.9998587213560639 AST#expression#Right , //#315 AST#expression#Left 0.9993226024562099 AST#expression#Right , //#316 AST#expression#Left 0.9983867686018685 AST#expression#Right , //#317 AST#expression#Left 0.9970515941133901 AST#expression#Right , //#318 AST#expression#Left 0.9953176130417491 AST#expression#Right , //#319 AST#expression#Left 0.9931855189549322 AST#expression#Right , //#320 AST#expression#Left 0.9906561646605199 AST#expression#Right , //#321 AST#expression#Left 0.987730561864576 AST#expression#Right , //#322 AST#expression#Left 0.9844098807669794 AST#expression#Right , //#323 AST#expression#Left 0.980695449593361 AST#expression#Right , //#324 AST#expression#Left 0.9765887540638312 AST#expression#Right , //#325 AST#expression#Left 0.9720914367987137 AST#expression#Right , //#326 AST#expression#Left 0.9672052966615201 AST#expression#Right , //#327 AST#expression#Left 0.9619322880394301 AST#expression#Right , //#328 AST#expression#Left 0.956274520061564 AST#expression#Right , //#329 AST#expression#Left 0.9502342557553608 AST#expression#Right , //#330 AST#expression#Left 0.9438139111413991 AST#expression#Right , //#331 AST#expression#Left 0.9370160542670232 AST#expression#Right , //#332 AST#expression#Left 0.9298434041791597 AST#expression#Right , //#333 AST#expression#Left 0.9222988298367378 AST#expression#Right , //#334 AST#expression#Left 0.914385348963146 AST#expression#Right , //#335 AST#expression#Left 0.9061061268391848 AST#expression#Right , //#336 AST#expression#Left 0.8974644750369997 AST#expression#Right , //#337 AST#expression#Left 0.8884638500954981 AST#expression#Right , //#338 AST#expression#Left 0.8791078521377839 AST#expression#Right , //#339 AST#expression#Left 0.8694002234311572 AST#expression#Right , //#340 AST#expression#Left 0.8593448468902616 AST#expression#Right , //#341 AST#expression#Left 0.8489457445239725 AST#expression#Right , //#342 AST#expression#Left 0.8382070758266503 AST#expression#Right , //#343 AST#expression#Left 0.8271331361144011 AST#expression#Right , //#344 AST#expression#Left 0.8157283548070109 AST#expression#Right , //#345 AST#expression#Left 0.8039972936562406 AST#expression#Right , //#346 AST#expression#Left 0.7919446449211889 AST#expression#Right , //#347 AST#expression#Left 0.779575229491455 AST#expression#Right , //#348 AST#expression#Left 0.7668939949588511 AST#expression#Right , //#349 AST#expression#Left 0.7539060136384351 AST#expression#Right , //#350 AST#expression#Left 0.7406164805396558 AST#expression#Right , //#351 AST#expression#Left 0.727030711288423 AST#expression#Right , //#352 AST#expression#Left 0.7131541400009316 AST#expression#Right , //#353 AST#expression#Left 0.6989923171100918 AST#expression#Right , //#354 AST#expression#Left 0.6845509071454342 AST#expression#Right , //#355 AST#expression#Left 0.6698356864673781 AST#expression#Right , //#356 AST#expression#Left 0.6548525409567681 AST#expression#Right , //#357 AST#expression#Left 0.6396074636606056 AST#expression#Right , //#358 AST#expression#Left 0.6241065523949136 AST#expression#Right , //#359 AST#expression#Left 0.6083560073056969 AST#expression#Right , //#360 AST#expression#Left 0.5923621283889708 AST#expression#Right , //#361 AST#expression#Left 0.5761313129708517 AST#expression#Right , //#362 AST#expression#Left 0.5596700531487165 AST#expression#Right , //#363 AST#expression#Left 0.5429849331944554 AST#expression#Right , //#364 AST#expression#Left 0.5260826269208558 AST#expression#Right , //#365 AST#expression#Left 0.5089698950121717 AST#expression#Right , //#366 AST#expression#Left 0.4916535823199446 AST#expression#Right , //#367 AST#expression#Left 0.4741406151251599 AST#expression#Right , //#368 AST#expression#Left 0.4564379983678321 AST#expression#Right , //#369 AST#expression#Left 0.43855281284512715 AST#expression#Right , //#370 AST#expression#Left 0.42049221237914375 AST#expression#Right , //#371 AST#expression#Left 0.4022634209554854 AST#expression#Right , //#372 AST#expression#Left 0.3838737298337676 AST#expression#Right , //#373 AST#expression#Left 0.36533049463121725 AST#expression#Right , //#374 AST#expression#Left 0.346641132380529 AST#expression#Right , //#375 AST#expression#Left 0.32781311856315715 AST#expression#Right , //#376 AST#expression#Left 0.3088539841192281 AST#expression#Right , //#377 AST#expression#Left 0.28977131243527066 AST#expression#Right , //#378 AST#expression#Left 0.2705727363109682 AST#expression#Right , //#379 AST#expression#Left 0.25126593490614646 AST#expression#Right , //#380 AST#expression#Left 0.23185863066921794 AST#expression#Right , //#381 AST#expression#Left 0.21235858624831114 AST#expression#Right , //#382 AST#expression#Left 0.1927736013863209 AST#expression#Right , //#383 AST#expression#Left 0.1731115098011213 AST#expression#Right , //#384 AST#expression#Left 0.15338017605218865 AST#expression#Right , //#385 AST#expression#Left 0.13358749239488882 AST#expression#Right , //#386 AST#expression#Left 0.11374137562368615 AST#expression#Right , //#387 AST#expression#Left 0.09384976390553743 AST#expression#Right , //#388 AST#expression#Left 0.07392061360473688 AST#expression#Right , //#389 AST#expression#Left 0.05396189610048263 AST#expression#Right , //#390 AST#expression#Left 0.03398159459843745 AST#expression#Right , //#391 AST#expression#Left 0.013987700937558934 AST#expression#Right , //#392 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.0060117876065233595 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#393 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.026008871520305465 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#394 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.04599555225210164 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#395 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.0659638354113523 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#396 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.08590573396626752 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#397 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.10581327143852721 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#398 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.12567848509376003 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#399 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.14549342912652474 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#400 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.16525064811995077 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#401 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.18494176603177878 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#402 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.20455890631685353 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#403 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.22409422202143867 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#404 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.2435398989220372 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#405 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.26288815865111975 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#406 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.2821312618085105 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#407 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.3012615110571854 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#408 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.32027125420224567 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#409 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.3391528872518335 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#410 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.3578988574587669 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#411 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.37650166634167603 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#412 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.39495387268443305 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#413 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.4132480955126757 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#414 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.4313770170462337 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#415 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.44933338562627717 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#416 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.46711001861601636 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#417 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.48469980527379214 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#418 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.5020957095974079 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#419 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.5192907731385656 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#420 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.5362781177862795 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#421 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.5530509485181553 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#422 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.5696025561184319 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#423 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.5859263198617023 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#424 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.602015710161236 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#425 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.6178642911808461 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#426 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.6334657234092563 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#427 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.6488137661959366 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#428 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.6639022802473945 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#429 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.6787252300829233 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#430 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.6932766864488242 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#431 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.7075508286901373 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#432 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.7215419470789324 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#433 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.735244445098229 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#434 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.7486528416806302 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#435 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.7617617734007782 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#436 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.7745659966207497 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#437 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.787060389587538 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#438 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.7992399544817796 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#439 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.8110998194169068 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#440 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.822635240387926 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#441 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.8338416031690444 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#442 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.8447144251593824 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#443 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.8552493571760367 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#444 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.8654421851937745 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#445 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.8752888320306655 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#446 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.8847853589789743 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#447 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.8939279673806632 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#448 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9027130001468745 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#449 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9111369432207839 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#450 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9191964269832412 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#451 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9268882276006345 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#452 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9342092683144392 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#453 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9411566206719377 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#454 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9477275056976144 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#455 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9539192950047597 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#456 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.959729511846838 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#457 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9651558321081987 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#458 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9701960852337338 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#459 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9748482550971108 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#460 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9791104808072335 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#461 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9829810574526074 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#462 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9864584367833128 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#463 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9895412278303127 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#464 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9922281974618472 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#465 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9945182708766922 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#466 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9964105320340856 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#467 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9979042240201477 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#468 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.998998749350651 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#469 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9996936702100165 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#470 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9999887086264423 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#471 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9998837465830935 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#472 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9993788260653099 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#473 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9984741490438113 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#474 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9971700773939082 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#475 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.99546713275075 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#476 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9933659963006688 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#477 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9908675085087004 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#478 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9879726687823952 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#479 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9846826350720495 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#480 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9809987234075198 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#481 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9769224073718046 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#482 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9724553175116033 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#483 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9675992406850901 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#484 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9623561193471611 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#485 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9567280507724435 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#486 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9507172862163743 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#487 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9443262300146881 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#488 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9375574386216696 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#489 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9304136195875602 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#490 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.922897630475524 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#491 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.915012477718608 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#492 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.9067613154171548 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#493 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.8981474440771456 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#494 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.8891743092899825 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#495 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.879845500354234 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#496 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.8701647488398982 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#497 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.8601359270957558 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#498 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.8497630467004118 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#499 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.8390502568576437 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#500 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.8280018427366993 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#501 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.8166222237582085 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#502 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.8049159518263918 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#503 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.7928877095082767 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#504 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.7805423081606475 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#505 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.767884686005479 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#506 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.7549199061546221 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#507 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.7416531545845351 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#508 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.728089738061866 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#509 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.7142350820207211 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#510 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.7000947283924623 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#511 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.6856743333889093 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#512 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.6709796652398244 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#513 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.6560166018855939 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#514 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.640791128626021 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#515 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.6253093357261775 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#516 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.6095774159802665 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#517 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.5936016622344745 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#518 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.5773884648698012 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#519 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.5609443092458755 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#520 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.5442757731067793 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#521 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.5273895239499172 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#522 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.5102923163589844 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#523 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.4929909893020995 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#524 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.4754924633961832 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#525 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.4578037381386771 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#526 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.4399318891077101 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#527 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.42188406513183174 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#528 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.4036674854304451 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#529 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.3852894367260835 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#530 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.36675727032968475 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#531 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.3480783992000305 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#532 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.3292602949785258 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#533 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.3103104850005053 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#534 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.2912365492842617 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#535 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.27204611749900054 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#536 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.25274686591293494 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#537 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.23334651432273967 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#538 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.21385282296559432 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#539 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.19427358941504982 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#540 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.17461664546196007 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#541 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.1548898539817267 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#542 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.13510110578910986 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#543 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.11525831648186291 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#544 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.09536942327445402 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#545 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.07544238182314085 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#546 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.05548516304366845 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#547 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.03550574992286332 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#548 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.015512134325398927 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#549 AST#expression#Left 0.004487686202989896 AST#expression#Right , //#550 AST#expression#Left 0.02448571163456509 AST#expression#Right , //#551 AST#expression#Left 0.04447394265963625 AST#expression#Right , //#552 AST#expression#Left 0.06444438388632431 AST#expression#Right , //#553 AST#expression#Left 0.08438904703875809 AST#expression#Right , //#554 AST#expression#Left 0.10429995415242439 AST#expression#Right , //#555 AST#expression#Left 0.1241691407653935 AST#expression#Right , //#556 AST#expression#Left 0.1439886591041436 AST#expression#Right , //#557 AST#expression#Left 0.16375058126270975 AST#expression#Right , //#558 AST#expression#Left 0.18344700237388564 AST#expression#Right , //#559 AST#expression#Left 0.20307004377121 AST#expression#Right , //#560 AST#expression#Left 0.2226118561404721 AST#expression#Right , //#561 AST#expression#Left 0.2420646226594768 AST#expression#Right , //#562 AST#expression#Left 0.2614205621248122 AST#expression#Right , //#563 AST#expression#Left 0.28067193206436947 AST#expression#Right , //#564 AST#expression#Left 0.29981103183437086 AST#expression#Right , //#565 AST#expression#Left 0.31883020569966475 AST#expression#Right , //#566 AST#expression#Left 0.3377218458960585 AST#expression#Right , //#567 AST#expression#Left 0.35647839567346157 AST#expression#Right , //#568 AST#expression#Left 0.3750923523186232 AST#expression#Right , //#569 AST#expression#Left 0.3935562701562553 AST#expression#Right , //#570 AST#expression#Left 0.41186276352733925 AST#expression#Right , //#571 AST#expression#Left 0.4300045097434266 AST#expression#Right , //#572 AST#expression#Left 0.44797425201575064 AST#expression#Right , //#573 AST#expression#Left 0.46576480235797824 AST#expression#Right , //#574 AST#expression#Left 0.4833690444614399 AST#expression#Right , //#575 AST#expression#Left 0.500779936541689 AST#expression#Right , //#576 AST#expression#Left 0.5179905141552499 AST#expression#Right , //#577 AST#expression#Left 0.5349938929854311 AST#expression#Right , //#578 AST#expression#Left 0.5517832715960851 AST#expression#Right , //#579 AST#expression#Left 0.5683519341522173 AST#expression#Right , //#580 AST#expression#Left 0.5846932531063534 AST#expression#Right , //#581 AST#expression#Left 0.6008006918495911 AST#expression#Right , //#582 AST#expression#Left 0.6166678073262762 AST#expression#Right , //#583 AST#expression#Left 0.6322882526112575 AST#expression#Right , //#584 AST#expression#Left 0.6476557794486876 AST#expression#Right , //#585 AST#expression#Left 0.6627642407513568 AST#expression#Right , //#586 AST#expression#Left 0.6776075930595586 AST#expression#Right , //#587 AST#expression#Left 0.6921798989585037 AST#expression#Right , //#588 AST#expression#Left 0.706475329453315 AST#expression#Right , //#589 AST#expression#Left 0.7204881663006553 AST#expression#Right , //#590 AST#expression#Left 0.7342128042960522 AST#expression#Right , //#591 AST#expression#Left 0.7476437535160088 AST#expression#Right , //#592 AST#expression#Left 0.7607756415139992 AST#expression#Right , //#593 AST#expression#Left 0.7736032154694754 AST#expression#Right , //#594 AST#expression#Left 0.7861213442890201 AST#expression#Right , //#595 AST#expression#Left 0.7983250206588106 AST#expression#Right , //#596 AST#expression#Left 0.8102093630475687 AST#expression#Right , //#597 AST#expression#Left 0.8217696176591981 AST#expression#Right , //#598 AST#expression#Left 0.8330011603343257 AST#expression#Right , //#599 AST#expression#Left 0.8438994983999891 AST#expression#Right , //#600 AST#expression#Left 0.854460272466728 AST#expression#Right , //#601 AST#expression#Left 0.8646792581723609 AST#expression#Right , //#602 AST#expression#Left 0.8745523678717522 AST#expression#Right , //#603 AST#expression#Left 0.8840756522718898 AST#expression#Right , //#604 AST#expression#Left 0.893245302011622 AST#expression#Right , //#605 AST#expression#Left 0.9020576491854215 AST#expression#Right , //#606 AST#expression#Left 0.910509168810565 AST#expression#Right , //#607 AST#expression#Left 0.9185964802371446 AST#expression#Right , //#608 AST#expression#Left 0.926316348500344 AST#expression#Right , //#609 AST#expression#Left 0.9336656856144409 AST#expression#Right , //#610 AST#expression#Left 0.9406415518080167 AST#expression#Right , //#611 AST#expression#Left 0.9472411566998794 AST#expression#Right , //#612 AST#expression#Left 0.95346186041523 AST#expression#Right , //#613 AST#expression#Left 0.9593011746416258 AST#expression#Right , //#614 AST#expression#Left 0.9647567636243177 AST#expression#Right , //#615 AST#expression#Left 0.9698264451005635 AST#expression#Right , //#616 AST#expression#Left 0.974508191172544 AST#expression#Right , //#617 AST#expression#Left 0.9788001291185322 AST#expression#Right , //#618 AST#expression#Left 0.9827005421419915 AST#expression#Right , //#619 AST#expression#Left 0.9862078700583026 AST#expression#Right , //#620 AST#expression#Left 0.989320709918845 AST#expression#Right , //#621 AST#expression#Left 0.9920378165721839 AST#expression#Right , //#622 AST#expression#Left 0.9943581031621368 AST#expression#Right , //#623 AST#expression#Left 0.9962806415625208 AST#expression#Right , //#624 AST#expression#Left 0.9978046627484086 AST#expression#Right , //#625 AST#expression#Left 0.9989295571037418 AST#expression#Right , //#626 AST#expression#Left 0.9996548746651802 AST#expression#Right , //#627 AST#expression#Left 0.9999803253020899 AST#expression#Right , //#628 AST#expression#Left 0.9999057788325965 AST#expression#Right , //#629 AST#expression#Left 0.9994312650756588 AST#expression#Right , //#630 AST#expression#Left 0.998556973839141 AST#expression#Right , //#631 AST#expression#Left 0.9972832548438884 AST#expression#Right , //#632 AST#expression#Left 0.9956106175838376 AST#expression#Right , //#633 AST#expression#Left 0.9935397311222164 AST#expression#Right , //#634 AST#expression#Left 0.9910714238239149 AST#expression#Right , //#635 AST#expression#Left 0.9882066830241357 AST#expression#Right , //#636 AST#expression#Left 0.9849466546334548 AST#expression#Right , //#637 AST#expression#Left 0.9812926426794514 AST#expression#Right , //#638 AST#expression#Left 0.9772461087850911 AST#expression#Right , //#639 AST#expression#Left 0.9728086715840686 AST#expression#Right , //#640 AST#expression#Left 0.9679821060733467 AST#expression#Right , //#641 AST#expression#Left 0.9627683429031486 AST#expression#Right , //#642 AST#expression#Left 0.9571694676046879 AST#expression#Right , //#643 AST#expression#Left 0.9511877197559462 AST#expression#Right , //#644 AST#expression#Left 0.9448254920858304 AST#expression#Right , //#645 AST#expression#Left 0.9380853295170695 AST#expression#Right , //#646 AST#expression#Left 0.9309699281482325 AST#expression#Right , //#647 AST#expression#Left 0.923482134175276 AST#expression#Right , //#648 AST#expression#Left 0.9156249427530513 AST#expression#Right , //#649 AST#expression#Left 0.9074014967972275 AST#expression#Right , //#650 AST#expression#Left 0.8988150857271101 AST#expression#Right , //#651 AST#expression#Left 0.8898691441498562 AST#expression#Right , //#652 AST#expression#Left 0.8805672504866153 AST#expression#Right , //#653 AST#expression#Left 0.8709131255411423 AST#expression#Right , //#654 AST#expression#Left 0.8609106310114581 AST#expression#Right , //#655 AST#expression#Left 0.8505637679451508 AST#expression#Right , //#656 AST#expression#Left 0.8398766751389367 AST#expression#Right , //#657 AST#expression#Left 0.8288536274831215 AST#expression#Right , //#658 AST#expression#Left 0.8174990342516223 AST#expression#Right , //#659 AST#expression#Left 0.8058174373382364 AST#expression#Right , //#660 AST#expression#Left 0.7938135094398614 AST#expression#Right , //#661 AST#expression#Left 0.7814920521873926 AST#expression#Right , //#662 AST#expression#Left 0.7688579942250473 AST#expression#Right , //#663 AST#expression#Left 0.7559163892388825 AST#expression#Right , //#664 AST#expression#Left 0.7426724139352946 AST#expression#Right , //#665 AST#expression#Left 0.7291313659703125 AST#expression#Right , //#666 AST#expression#Left 0.7152986618305073 AST#expression#Right , //#667 AST#expression#Left 0.7011798346663719 AST#expression#Right , //#668 AST#expression#Left 0.6867805320790326 AST#expression#Right , //#669 AST#expression#Left 0.6721065138611806 AST#expression#Right , //#670 AST#expression#Left 0.6571636496931266 AST#expression#Right , //#671 AST#expression#Left 0.6419579167948992 AST#expression#Right , //#672 AST#expression#Left 0.6264953975353273 AST#expression#Right , //#673 AST#expression#Left 0.610782276999062 AST#expression#Right , //#674 AST#expression#Left 0.5948248405125122 AST#expression#Right , //#675 AST#expression#Left 0.5786294711296829 AST#expression#Right , //#676 AST#expression#Left 0.5622026470789215 AST#expression#Right , //#677 AST#expression#Left 0.5455509391715946 AST#expression#Right , //#678 AST#expression#Left 0.52868100817373 AST#expression#Right , //#679 AST#expression#Left 0.5115996021416783 AST#expression#Right , //#680 AST#expression#Left 0.49431355372285585 AST#expression#Right , //#681 AST#expression#Left 0.4768297774226521 AST#expression#Right , //#682 AST#expression#Left 0.45915526683859303 AST#expression#Right , //#683 AST#expression#Left 0.44129709186286736 AST#expression#Right , //#684 AST#expression#Left 0.4232623958543345 AST#expression#Right , //#685 AST#expression#Left 0.4050583927811453 AST#expression#Right , //#686 AST#expression#Left 0.3866923643351191 AST#expression#Right , //#687 AST#expression#Left 0.36817165701903065 AST#expression#Right , //#688 AST#expression#Left 0.34950367920797243 AST#expression#Right , //#689 AST#expression#Left 0.3306958981859679 AST#expression#Right , //#690 AST#expression#Left 0.31175583715902044 AST#expression#Right , //#691 AST#expression#Left 0.2926910722457939 AST#expression#Right , //#692 AST#expression#Left 0.2735092294471269 AST#expression#Right , //#693 AST#expression#Left 0.2542179815955952 AST#expression#Right , //#694 AST#expression#Left 0.23482504528633993 AST#expression#Right , //#695 AST#expression#Left 0.21533817779039144 AST#expression#Right , //#696 AST#expression#Left 0.19576517395172216 AST#expression#Right , //#697 AST#expression#Left 0.17611386306927027 AST#expression#Right , //#698 AST#expression#Left 0.15639210576518112 AST#expression#Right , //#699 AST#expression#Left 0.13660779084051936 AST#expression#Right , //#700 AST#expression#Left 0.11676883211970907 AST#expression#Right , //#701 AST#expression#Left 0.0968831652849648 AST#expression#Right , //#702 AST#expression#Left 0.07695874470197908 AST#expression#Right , //#703 AST#expression#Left 0.057003540238136606 AST#expression#Right , //#704 AST#expression#Left 0.03702553407452759 AST#expression#Right , //#705 AST#expression#Left 0.017032717513035638 AST#expression#Right , //#706 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.002966912220222811 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#707 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.022965355173828687 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#708 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.0429546118710807 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#709 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.06292668650982579 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#710 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.08287359016081984 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#711 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.10278734396333908 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#712 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.12265998231676409 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#713 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.1424835560668597 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#714 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.1622501356854762 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#715 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.18195181444240016 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#716 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.20158071156808577 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#717 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.2211289754060019 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#718 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.2405887865533338 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#719 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.2599523609887831 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#720 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.2792119531862151 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#721 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.2983598592129078 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#722 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.3173884198111633 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#723 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.33629002346204884 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#724 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.3550571094300426 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#725 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.37368217078736515 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#726 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.39215775741678827 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#727 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.4104764789917186 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#728 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.4286310079323652 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#729 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.446614082336808 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#730 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.46441850888579467 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#731 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.48203716572010397 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#732 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.4994630052893251 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#733 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.5166890571709126 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#734 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.5337084308583907 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#735 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.5505143185175893 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#736 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.5670999977098123 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#737 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.5834588340808463 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#738 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.5995842840147351 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#739 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.6154698972512584 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#740 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.6311093194660693 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#741 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.6464962948124537 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#742 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.6616246684237019 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#743 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.6764883888750848 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#744 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.6910815106044541 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#745 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.7053981962904975 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#746 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.719432719187695 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#747 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.7331794654170467 AST#expression#Right AST#unary_expression#Right AST#expression#Right , //#748 AST#expression#Left AST#unary_expression#Left - AST#expression#Left 0.7466329362116519 AST#expression#Right AST#unary_expression#Right AST#expression#Right //#749 ] AST#array_literal#Right AST#expression#Right AST#property_declaration#Right } AST#class_body#Right AST#class_declaration#Right AST#export_declaration#Right
|
export default class Cosine {
public data: number[] = [
1.0,
0.9998000066755178,
0.9992001066967312,
0.9982005400156222,
0.996801706445518,
0.9950041651292624,
0.992808635283034,
0.990215996129463,
0.9872272839453933,
0.9838436941753507,
0.9800665802095645, 0
0.9758974528426302, 1
0.9713379796692108, 2
0.9663899805862244, 3
0.9610554379813293, 4
0.9553364856027305, 5
0.9492354109575819, 6
0.9427546543970131, 7
0.9358968081400203, 8
0.9286646152366127, 9
0.9210609684706269, 0
0.913088909202652, 1
0.904751626153523, 2
0.8960524541288755, 3
0.8869948726852646, 4
0.8775825047383886, 5
0.8678191299221538, 6
0.8577086396867667, 7
0.8472550780858032, 8
0.8364626263965502, 9
0.8253356014475525, 0
0.8138784538919424, 1
0.8020957664272419, 2
0.7899922519623475, 3
0.7775727517324336, 4
0.7648422333625261, 5
0.7518057888805234, 6
0.7384686326804557, 7
0.724836099436802, 8
0.7109136419706951, 9
0.6967068290688696, 0
0.6822213432562266, 1
0.667462978522903, 2
0.6524376380067577, 3
0.6371513316321991, 4
0.6216101737063007, 5
0.605820380473164, 6
0.5897882676275087, 7
0.5735202477884837, 8
0.5570228279347097, 9
0.54030260680158, 0
0.5233662722418589, 1
0.506220598550635, 2
0.48887244375569844, 3
0.47132874687442705, 4
0.45359652513827653, 5
0.4356828711859872, 6
0.4175949502266283, 7
0.3993399971736154, 8
0.3809253137508472, 9
0.36235826557211853, 0
0.34364627919497903, 1
0.3247968391502145, 2
0.3058174849481404, 3
0.2867158080629036, 4
0.2674994488960003, 5
0.2481760937202225, 6
0.22875347160525775, 7
0.2092393513261698, 8
0.18964153825599847, 9
0.16996787124372015, 0
0.1502262194788189, 1
0.1304244793437215, 2
0.11057057125535577, 3
0.09067243649709553, 4
0.07073803404235907, 5
0.050775337371132094, 6
0.03079233128068804, 7
0.01079700869178177, 8
-0.009202632548406111, 9
-0.02919859286529534, 0
-0.04918287415662309, 1
-0.06914748299157214, 2
-0.08908443380803052, 3
-0.10898575210670376, 4
-0.12884347764080226, 5
-0.1486496676000277, 6
-0.16839639978758542, 7
-0.18807577578895107, 8
-0.20767992413112554, 9
-0.22720100343111285, 0
-0.24663120553236303, 1
-0.2659627586279245, 2
-0.28518793036905754, 3
-0.3042990309580645, 4
-0.32328841622410065, 5
-0.3421484906807349, 6
-0.3608717105640369, 7
-0.37945058684997673, 8
-0.39787768824992864, 9
-0.4161456441830819, 00
-0.43424725510755136, 01
-0.4521750648543838, 02
-0.469922010949154, 03
-0.4874809948635857, 04
-0.5048449932516255, 05
-0.5220070607586818, 06
-0.5389603327996688, 07
-0.5556980283047446, 08
-0.5722134524316421, 09
-0.5884999992435129, 10
-0.6045511543512081, 11
-0.6203604975189423, 12
-0.6359217052322976, 13
-0.6512285532275404, 14
-0.6662749189812381, 15
-0.6810547841591839, 16
-0.6955622370236441, 17
-0.7097914747979706, 18
-0.7237368059876295, 19
-0.737392652656719, 20
-0.7507535526590651, 21
-0.7638141618230024, 22
-0.7765692560889685, 23
-0.7890137335990532, 24
-0.8011426167376704, 25
-0.8129510541225339, 26
-0.824434322545142, 27
-0.8355878288599945, 28
-0.8464071118217855, 29
-0.8568878438698396, 30
-0.8670258328590743, 31
-0.8768170237367994, 32
-0.886257500164681, 33
-0.8953434860852212, 34
-0.9040713472321283, 35
-0.912437592583972, 36
-0.9204388757605422, 37
-0.9280719963613548, 38
-0.9353339012457665, 39
-0.9422216857541875, 40
-0.948732594869905, 41
-0.9548640243210507, 42
-0.960613521622273, 43
-0.9659787870556967, 44
-0.9709576745907774, 45
-0.9755481927426838, 46
-0.979748505368863, 47
-0.9835569324034725, 48
-0.9869719505293822, 49
-0.98999219378748, 50
-0.9926164541230362, 51
-0.9948436818689081, 52
-0.9966729861653926, 53
-0.998103635316557, 54
-0.9991350570829072, 55
-0.9997668389102758, 56
-0.9999987280948375, 57
-0.9998306318841871, 58
-0.9992626175144392, 59
-0.9982949121833353, 60
-0.996927902959367, 61
-0.9951621366269541, 62
-0.9929983194677395, 63
-0.9904373169780857, 64
-0.9874801535228883, 65
-0.9841280119258453, 66
-0.9803822329963435, 67
-0.9762443149931541, 68
-0.97171591302515, 69
-0.9667988383892859, 70
-0.9614950578461049, 71
-0.9558066928330617, 72
-0.9497360186159785, 73
-0.9432854633789693, 74
-0.9364576072532017, 75
-0.9292551812848803, 76
-0.9216810663428666, 77
-0.9137382919663726, 78
-0.9054300351531868, 79
-0.8967596190889212, 80
-0.887730511817783, 81
-0.8783463248554058, 82
-0.8686108117442946, 83
-0.8585278665524617, 84
-0.8481015223158543, 85
-0.8373359494251967, 86
-0.8262354539578933, 87
-0.8148044759556579, 88
-0.8030475876485598, 89
-0.7909694916261961, 90
-0.7785750189567227, 91
-0.765869127254494, 92
-0.7528568986970883, 93
-0.7395435379925076, 94
-0.725934370297368, 95
-0.712034839086912, 96
-0.6978505039776957, 97
-0.6833870385038194, 98
-0.6686502278475953, 99
-0.653645966525555, 00
-0.6383800725148856, 01
-0.6228590159091549, 02
-0.6070888244769085, 03
-0.5910758060724219, 04
-0.5748263656773369, 05
-0.5583470028387585, 06
-0.5416443090695284, 07
-0.5247249652117124, 08
-0.5075957387643578, 09
-0.49026348117658924, 10
-0.47273512510712556, 11
-0.455017681651314, 12
-0.4371182375367911, 13
-0.4190439522888913, 14
-0.4008020553669378, 15
-0.3823998432725609, 16
-0.3638446766311999, 17
-0.34514397724795687, 18
-0.3263052251389793, 19
-0.3073359555395589, 20
-0.2882437558901438, 21
-0.26903626280146914, 22
-0.2497211590000209, 23
-0.230306170255053, 24
-0.210799062288389, 25
-0.19120763766824242, 26
-0.17153973268829978, 27
-0.1518032142333134, 28
-0.13200597663245844, 29
-0.11215593850171253, 30
-0.09226103957652096, 31
-0.07232923753601443, 32
-0.052368504820049594, 33
-0.032386825440345476, 34
-0.012392191786991334, 35
0.00760739856839673, 36
0.027603946071591657, 37
0.04758945238546438, 38
0.06755592358920592, 39
0.08749537337578304, 40
0.10739982624634846, 41
0.127261320700328, 42
0.14707191241990855, 43
0.16682367744765325, 44
0.18650871535597274, 45
0.2061191524071849, 46
0.22564714470289873, 47
0.24508488132146347, 48
0.26442458744222685, 49
0.28365852745535386, 50
0.30277900805596175, 51
0.32177838132133346, 52
0.3406490477699788, 53
0.35938345940131994, 54
0.3779741227147856, 55
0.39641360170710516, 56
0.4146945208466053, 57
0.43280956802331894, 58
0.4507514974737259, 59
0.4685131326789562, 60
0.48608736923529655, 61
0.5034671776958516, 62
0.5206456063822237, 63
0.5376157841650862, 64
0.5543709232125382, 65
0.5709043217051422, 66
0.5872093665165563, 67
0.6032795358586928, 68
0.6191084018903404, 69
0.6346896332882112, 70
0.6500169977793795, 71
0.6650843646341041, 72
0.6798857071180334, 73
0.6944151049028142, 74
0.7086667464341395, 75
0.7226349312562887, 76
0.7363140722922291, 77
0.749698698078368, 78
0.7627834549530611, 79
0.775563109198002, 80
0.7880325491316352, 81
0.8001867871537571, 82
0.8120209617404855, 83
0.8235303393888008, 84
0.8347103165098803, 85
0.8455564212704689, 86
0.8560643153815497, 87
0.866229795833598, 88
0.8760487965777259, 89
0.885517390152045, 90
0.8946317892525951, 91
0.9033883482482131, 92
0.9117835646387336, 93
0.9198140804559395, 94
0.9274766836067025, 95
0.934768309157775, 96
0.9416860405617193, 97
0.9482271108234865, 98
0.9543889036071753, 99
0.9601689542825289, 00
0.9655649509107532, 01
0.970574735169259, 02
0.9751963032149611, 03
0.9794278064857869, 04
0.9832675524400757, 05
0.9867140052335709, 06
0.9897657863337365, 07
0.9924216750711504, 08
0.9946806091277554, 09
0.9965416849617705, 10
0.9980041581690963, 11
0.9990674437810647, 12
0.9997311164984192, 13
0.9999949108614278, 14
0.9998587213560639, 15
0.9993226024562099, 16
0.9983867686018685, 17
0.9970515941133901, 18
0.9953176130417491, 19
0.9931855189549322, 20
0.9906561646605199, 21
0.987730561864576, 22
0.9844098807669794, 23
0.980695449593361, 24
0.9765887540638312, 25
0.9720914367987137, 26
0.9672052966615201, 27
0.9619322880394301, 28
0.956274520061564, 29
0.9502342557553608, 30
0.9438139111413991, 31
0.9370160542670232, 32
0.9298434041791597, 33
0.9222988298367378, 34
0.914385348963146, 35
0.9061061268391848, 36
0.8974644750369997, 37
0.8884638500954981, 38
0.8791078521377839, 39
0.8694002234311572, 40
0.8593448468902616, 41
0.8489457445239725, 42
0.8382070758266503, 43
0.8271331361144011, 44
0.8157283548070109, 45
0.8039972936562406, 46
0.7919446449211889, 47
0.779575229491455, 48
0.7668939949588511, 49
0.7539060136384351, 50
0.7406164805396558, 51
0.727030711288423, 52
0.7131541400009316, 53
0.6989923171100918, 54
0.6845509071454342, 55
0.6698356864673781, 56
0.6548525409567681, 57
0.6396074636606056, 58
0.6241065523949136, 59
0.6083560073056969, 60
0.5923621283889708, 61
0.5761313129708517, 62
0.5596700531487165, 63
0.5429849331944554, 64
0.5260826269208558, 65
0.5089698950121717, 66
0.4916535823199446, 67
0.4741406151251599, 68
0.4564379983678321, 69
0.43855281284512715, 70
0.42049221237914375, 71
0.4022634209554854, 72
0.3838737298337676, 73
0.36533049463121725, 74
0.346641132380529, 75
0.32781311856315715, 76
0.3088539841192281, 77
0.28977131243527066, 78
0.2705727363109682, 79
0.25126593490614646, 80
0.23185863066921794, 81
0.21235858624831114, 82
0.1927736013863209, 83
0.1731115098011213, 84
0.15338017605218865, 85
0.13358749239488882, 86
0.11374137562368615, 87
0.09384976390553743, 88
0.07392061360473688, 89
0.05396189610048263, 90
0.03398159459843745, 91
0.013987700937558934, 92
-0.0060117876065233595, 93
-0.026008871520305465, 94
-0.04599555225210164, 95
-0.0659638354113523, 96
-0.08590573396626752, 97
-0.10581327143852721, 98
-0.12567848509376003, 99
-0.14549342912652474, 00
-0.16525064811995077, 01
-0.18494176603177878, 02
-0.20455890631685353, 03
-0.22409422202143867, 04
-0.2435398989220372, 05
-0.26288815865111975, 06
-0.2821312618085105, 07
-0.3012615110571854, 08
-0.32027125420224567, 09
-0.3391528872518335, 10
-0.3578988574587669, 11
-0.37650166634167603, 12
-0.39495387268443305, 13
-0.4132480955126757, 14
-0.4313770170462337, 15
-0.44933338562627717, 16
-0.46711001861601636, 17
-0.48469980527379214, 18
-0.5020957095974079, 19
-0.5192907731385656, 20
-0.5362781177862795, 21
-0.5530509485181553, 22
-0.5696025561184319, 23
-0.5859263198617023, 24
-0.602015710161236, 25
-0.6178642911808461, 26
-0.6334657234092563, 27
-0.6488137661959366, 28
-0.6639022802473945, 29
-0.6787252300829233, 30
-0.6932766864488242, 31
-0.7075508286901373, 32
-0.7215419470789324, 33
-0.735244445098229, 34
-0.7486528416806302, 35
-0.7617617734007782, 36
-0.7745659966207497, 37
-0.787060389587538, 38
-0.7992399544817796, 39
-0.8110998194169068, 40
-0.822635240387926, 41
-0.8338416031690444, 42
-0.8447144251593824, 43
-0.8552493571760367, 44
-0.8654421851937745, 45
-0.8752888320306655, 46
-0.8847853589789743, 47
-0.8939279673806632, 48
-0.9027130001468745, 49
-0.9111369432207839, 50
-0.9191964269832412, 51
-0.9268882276006345, 52
-0.9342092683144392, 53
-0.9411566206719377, 54
-0.9477275056976144, 55
-0.9539192950047597, 56
-0.959729511846838, 57
-0.9651558321081987, 58
-0.9701960852337338, 59
-0.9748482550971108, 60
-0.9791104808072335, 61
-0.9829810574526074, 62
-0.9864584367833128, 63
-0.9895412278303127, 64
-0.9922281974618472, 65
-0.9945182708766922, 66
-0.9964105320340856, 67
-0.9979042240201477, 68
-0.998998749350651, 69
-0.9996936702100165, 70
-0.9999887086264423, 71
-0.9998837465830935, 72
-0.9993788260653099, 73
-0.9984741490438113, 74
-0.9971700773939082, 75
-0.99546713275075, 76
-0.9933659963006688, 77
-0.9908675085087004, 78
-0.9879726687823952, 79
-0.9846826350720495, 80
-0.9809987234075198, 81
-0.9769224073718046, 82
-0.9724553175116033, 83
-0.9675992406850901, 84
-0.9623561193471611, 85
-0.9567280507724435, 86
-0.9507172862163743, 87
-0.9443262300146881, 88
-0.9375574386216696, 89
-0.9304136195875602, 90
-0.922897630475524, 91
-0.915012477718608, 92
-0.9067613154171548, 93
-0.8981474440771456, 94
-0.8891743092899825, 95
-0.879845500354234, 96
-0.8701647488398982, 97
-0.8601359270957558, 98
-0.8497630467004118, 99
-0.8390502568576437, 00
-0.8280018427366993, 01
-0.8166222237582085, 02
-0.8049159518263918, 03
-0.7928877095082767, 04
-0.7805423081606475, 05
-0.767884686005479, 06
-0.7549199061546221, 07
-0.7416531545845351, 08
-0.728089738061866, 09
-0.7142350820207211, 10
-0.7000947283924623, 11
-0.6856743333889093, 12
-0.6709796652398244, 13
-0.6560166018855939, 14
-0.640791128626021, 15
-0.6253093357261775, 16
-0.6095774159802665, 17
-0.5936016622344745, 18
-0.5773884648698012, 19
-0.5609443092458755, 20
-0.5442757731067793, 21
-0.5273895239499172, 22
-0.5102923163589844, 23
-0.4929909893020995, 24
-0.4754924633961832, 25
-0.4578037381386771, 26
-0.4399318891077101, 27
-0.42188406513183174, 28
-0.4036674854304451, 29
-0.3852894367260835, 30
-0.36675727032968475, 31
-0.3480783992000305, 32
-0.3292602949785258, 33
-0.3103104850005053, 34
-0.2912365492842617, 35
-0.27204611749900054, 36
-0.25274686591293494, 37
-0.23334651432273967, 38
-0.21385282296559432, 39
-0.19427358941504982, 40
-0.17461664546196007, 41
-0.1548898539817267, 42
-0.13510110578910986, 43
-0.11525831648186291, 44
-0.09536942327445402, 45
-0.07544238182314085, 46
-0.05548516304366845, 47
-0.03550574992286332, 48
-0.015512134325398927, 49
0.004487686202989896, 50
0.02448571163456509, 51
0.04447394265963625, 52
0.06444438388632431, 53
0.08438904703875809, 54
0.10429995415242439, 55
0.1241691407653935, 56
0.1439886591041436, 57
0.16375058126270975, 58
0.18344700237388564, 59
0.20307004377121, 60
0.2226118561404721, 61
0.2420646226594768, 62
0.2614205621248122, 63
0.28067193206436947, 64
0.29981103183437086, 65
0.31883020569966475, 66
0.3377218458960585, 67
0.35647839567346157, 68
0.3750923523186232, 69
0.3935562701562553, 70
0.41186276352733925, 71
0.4300045097434266, 72
0.44797425201575064, 73
0.46576480235797824, 74
0.4833690444614399, 75
0.500779936541689, 76
0.5179905141552499, 77
0.5349938929854311, 78
0.5517832715960851, 79
0.5683519341522173, 80
0.5846932531063534, 81
0.6008006918495911, 82
0.6166678073262762, 83
0.6322882526112575, 84
0.6476557794486876, 85
0.6627642407513568, 86
0.6776075930595586, 87
0.6921798989585037, 88
0.706475329453315, 89
0.7204881663006553, 90
0.7342128042960522, 91
0.7476437535160088, 92
0.7607756415139992, 93
0.7736032154694754, 94
0.7861213442890201, 95
0.7983250206588106, 96
0.8102093630475687, 97
0.8217696176591981, 98
0.8330011603343257, 99
0.8438994983999891, 00
0.854460272466728, 01
0.8646792581723609, 02
0.8745523678717522, 03
0.8840756522718898, 04
0.893245302011622, 05
0.9020576491854215, 06
0.910509168810565, 07
0.9185964802371446, 08
0.926316348500344, 09
0.9336656856144409, 10
0.9406415518080167, 11
0.9472411566998794, 12
0.95346186041523, 13
0.9593011746416258, 14
0.9647567636243177, 15
0.9698264451005635, 16
0.974508191172544, 17
0.9788001291185322, 18
0.9827005421419915, 19
0.9862078700583026, 20
0.989320709918845, 21
0.9920378165721839, 22
0.9943581031621368, 23
0.9962806415625208, 24
0.9978046627484086, 25
0.9989295571037418, 26
0.9996548746651802, 27
0.9999803253020899, 28
0.9999057788325965, 29
0.9994312650756588, 30
0.998556973839141, 31
0.9972832548438884, 32
0.9956106175838376, 33
0.9935397311222164, 34
0.9910714238239149, 35
0.9882066830241357, 36
0.9849466546334548, 37
0.9812926426794514, 38
0.9772461087850911, 39
0.9728086715840686, 40
0.9679821060733467, 41
0.9627683429031486, 42
0.9571694676046879, 43
0.9511877197559462, 44
0.9448254920858304, 45
0.9380853295170695, 46
0.9309699281482325, 47
0.923482134175276, 48
0.9156249427530513, 49
0.9074014967972275, 50
0.8988150857271101, 51
0.8898691441498562, 52
0.8805672504866153, 53
0.8709131255411423, 54
0.8609106310114581, 55
0.8505637679451508, 56
0.8398766751389367, 57
0.8288536274831215, 58
0.8174990342516223, 59
0.8058174373382364, 60
0.7938135094398614, 61
0.7814920521873926, 62
0.7688579942250473, 63
0.7559163892388825, 64
0.7426724139352946, 65
0.7291313659703125, 66
0.7152986618305073, 67
0.7011798346663719, 68
0.6867805320790326, 69
0.6721065138611806, 70
0.6571636496931266, 71
0.6419579167948992, 72
0.6264953975353273, 73
0.610782276999062, 74
0.5948248405125122, 75
0.5786294711296829, 76
0.5622026470789215, 77
0.5455509391715946, 78
0.52868100817373, 79
0.5115996021416783, 80
0.49431355372285585, 81
0.4768297774226521, 82
0.45915526683859303, 83
0.44129709186286736, 84
0.4232623958543345, 85
0.4050583927811453, 86
0.3866923643351191, 87
0.36817165701903065, 88
0.34950367920797243, 89
0.3306958981859679, 90
0.31175583715902044, 91
0.2926910722457939, 92
0.2735092294471269, 93
0.2542179815955952, 94
0.23482504528633993, 95
0.21533817779039144, 96
0.19576517395172216, 97
0.17611386306927027, 98
0.15639210576518112, 99
0.13660779084051936, 00
0.11676883211970907, 01
0.0968831652849648, 02
0.07695874470197908, 03
0.057003540238136606, 04
0.03702553407452759, 05
0.017032717513035638, 06
-0.002966912220222811, 07
-0.022965355173828687, 08
-0.0429546118710807, 09
-0.06292668650982579, 10
-0.08287359016081984, 11
-0.10278734396333908, 12
-0.12265998231676409, 13
-0.1424835560668597, 14
-0.1622501356854762, 15
-0.18195181444240016, 16
-0.20158071156808577, 17
-0.2211289754060019, 18
-0.2405887865533338, 19
-0.2599523609887831, 20
-0.2792119531862151, 21
-0.2983598592129078, 22
-0.3173884198111633, 23
-0.33629002346204884, 24
-0.3550571094300426, 25
-0.37368217078736515, 26
-0.39215775741678827, 27
-0.4104764789917186, 28
-0.4286310079323652, 29
-0.446614082336808, 30
-0.46441850888579467, 31
-0.48203716572010397, 32
-0.4994630052893251, 33
-0.5166890571709126, 34
-0.5337084308583907, 35
-0.5505143185175893, 36
-0.5670999977098123, 37
-0.5834588340808463, 38
-0.5995842840147351, 39
-0.6154698972512584, 40
-0.6311093194660693, 41
-0.6464962948124537, 42
-0.6616246684237019, 43
-0.6764883888750848, 44
-0.6910815106044541, 45
-0.7053981962904975, 46
-0.719432719187695, 47
-0.7331794654170467, 48
-0.746632936211651949
]
}
|
https://github.com/openharmony-tpc/ohos_mpchart/blob/4fb43a7137320ef2fee2634598f53d93975dfb4a/entry/src/main/ets/pages/scrollingCharts/data/Cosine.ets#L16-L769
|
2a0578397d522006b4d530a826a427cf7a299a27
|
gitee
|
|
harmonyos-cases/cases
|
eccdb71f1cee10fa6ff955e16c454c1b59d3ae13
|
CommonAppDevelopment/feature/customanimationtab/src/main/ets/view/CustomAnimationTabView.ets
|
arkts
|
testBuilder
|
功能说明: 本示例介绍使用List、Text等组件,以及animateTo等接口实现自定义Tab效果
推荐场景: 需要自定义动效的tab场景
核心组件:
1. CustomAnimationTab: 自定义动效tab构建组件
2. AnimationAttribute: 动效属性,可通过继承扩展动效属性
3. TabInfo: 设置TabBar的标题、TabContent以及TabBar样式的类
4. CustomAnimationTabController: 自定义动效Tab控制器,用于控制自定义动效Tab组件进行页签切换
5. IndicatorBarAttribute: 设置背景条属性
6. TabBarAttribute: 设置页签条属性
7. Scroller: 页签条滚动控制器
实现步骤:
1. 数据准备: 首先构建一个TabInfo数组,然后向其中传入对应的内容
@example
this.tabsInfo = [
new TabInfo(CustomAnimationTabConfigure.DEFAULT_BASE_TAB, wrapBuilder(baseBuilder), wrapBuilder(tabBar)),
new TabInfo(CustomAnimationTabConfigure.DEFAULT_UI_TAB, wrapBuilder(uiBuilder), wrapBuilder(tabBar)),
new TabInfo(CustomAnimationTabConfigure.DEFAULT_DYEFFECT_TAB, wrapBuilder(dyEffectBuilder), wrapBuilder(tabBar)),
new TabInfo(CustomAnimationTabConfigure.DEFAULT_THIRTYPARTY_TAB, wrapBuilder(thirdPartyBuilder), wrapBuilder(tabBar)),
new TabInfo(CustomAnimationTabConfigure.DEFAULT_NATIVE_TAB, wrapBuilder(nativeBuilder), wrapBuilder(tabBar)),
new TabInfo(CustomAnimationTabConfigure.DEFAULT_OTHER_TAB, wrapBuilder(otherBuilder), wrapBuilder(tabBar))
]
2. 动效属性准备: 创建动效属性AnimationAttribute对象,可以通过继承添加额外动效属性
@example
@State animationAttribute: MyAnimationAttribute = new MyAnimationAttribute(CustomAnimationTabConfigure.INDICATOR_WIDTH, $r("app.color.custom_animation_tab_indicator_color"));
3. 背景条配置: 背景条可以自行new IndicatorBarAttribute配置,也可以使用已有的背景条配置(目前支持两种: IndicatorBarAttribute.BACKGROUNDBAR和IndicatorBarAttribute.THINSTRIP)
@example
indicatorBarAttribute: IndicatorBarAttribute = new IndicatorBarAttribute(this.indicatorBar);
4. 页签条配置
@example
tabBarAttribute: TabBarAttribute = new TabBarAttribute(CustomAnimationTabConfigure.LIST_ITEM_WIDTH);
5. 自定义动效tab控制器配置
@example
tabController: CustomAnimationTabController = new CustomAnimationTabController();
6. 页签条滑动配置
@example
scroller: Scroller = new Scroller();
7. 构建自定义动效tab
@example
CustomAnimationTab({
animationAttribute: this.animationAttribute,
tabsInfo: this.tabsInfo,
indicatorBarAttribute: this.indicatorBarAttribute,
tabBarAttribute: this.tabBarAttribute,
tabController: this.tabController,
scroller: this.scroller
})
|
@Builder
function testBuilder() {
Column(){
}
.height("100%")
.width("100%")
.backgroundColor(Color.Gray)
}
|
AST#decorated_function_declaration#Left AST#decorator#Left @ Builder AST#decorator#Right function testBuilder AST#parameter_list#Left ( ) AST#parameter_list#Right AST#builder_function_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Column ( ) AST#container_content_body#Left { } AST#container_content_body#Right AST#ui_component#Right AST#modifier_chain_expression#Left . height ( AST#expression#Left "100%" AST#expression#Right ) AST#modifier_chain_expression#Left . width ( AST#expression#Left "100%" AST#expression#Right ) AST#modifier_chain_expression#Left . backgroundColor ( AST#expression#Left AST#member_expression#Left AST#expression#Left Color AST#expression#Right . Gray AST#member_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#builder_function_body#Right AST#decorated_function_declaration#Right
|
@Builder
function testBuilder() {
Column(){
}
.height("100%")
.width("100%")
.backgroundColor(Color.Gray)
}
|
https://github.com/harmonyos-cases/cases/blob/eccdb71f1cee10fa6ff955e16c454c1b59d3ae13/CommonAppDevelopment/feature/customanimationtab/src/main/ets/view/CustomAnimationTabView.ets#L85-L92
|
1933e2829602b3983e0ca2dd6d952aa38a6ab11e
|
gitee
|
openharmony/applications_app_samples
|
a826ab0e75fe51d028c1c5af58188e908736b53b
|
code/SystemFeature/FileManagement/MediaCollections/entry/src/main/ets/model/TypeConversion.ets
|
arkts
|
类型转换
|
export default class TypeConversionUtil {
/**
* Uint8Array 转 string
* @param arr Uint8Array
* @returns string
*/
static byteToString(arr: Uint8Array): string {
let str: string = ''
let _arr: Uint8Array = arr
for (let i = 0; i < _arr.length; i++) {
// 将数值转为二进制字符串
let binaryStr: string = _arr[i].toString(2)
let matchArray = binaryStr.match(new RegExp('/^1+?(?=0)/'))
if (matchArray && binaryStr.length == 8) {
let bytesLength: number = matchArray[0].length
let store: string = _arr[i].toString(2).slice(7 - bytesLength)
for (let j = 1; j < bytesLength; j++) {
store += _arr[j + i].toString(2).slice(2)
}
str += String.fromCharCode(Number.parseInt(store, 2))
i += bytesLength - 1
} else {
str += String.fromCharCode(_arr[i])
}
}
return str
}
/**
* string 转 Uint8Array
* @param str string
* @returns Uint8Array
*/
static stringToByte(str: string): Uint8Array {
let bytes: number[] = new Array()
let unicode: number
for (let i = 0; i < str.length; i++) {
unicode = str.charCodeAt(i)
if (unicode >= 0x010000 && unicode <= 0x10FFFF) {
bytes.push(((unicode >> 18) & 0x07) | 0xf0)
bytes.push(((unicode >> 12) & 0x3F) | 0x80)
bytes.push(((unicode >> 6) & 0x3f) | 0x80)
bytes.push((unicode & 0x3F) | 0x80)
} else if (unicode >= 0x000800 && unicode <= 0x00FFF) {
bytes.push(((unicode >> 12) & 0x07) | 0xf0)
bytes.push(((unicode >> 6) & 0x3F) | 0x80)
bytes.push((unicode & 0x3F) | 0x80)
} else if (unicode >= 0x000800 && unicode <= 0x0007FF) {
bytes.push(((unicode >> 6) & 0x3F) | 0x80)
bytes.push((unicode & 0x3F) | 0x80)
} else {
bytes.push(unicode & 0xFF)
}
}
return new Uint8Array(bytes)
}
/**
* uuid 转换
* 1.字母大写
* 2.去除符号:-
*/
static uuidChange(uuid: string): string {
let oldArr: string[] = uuid.split('')
let newArr: string[] = []
for (let i = 0; i < oldArr.length; i++) {
if (oldArr[i] === '-') {
continue
}
if (oldArr[i] >= 'a' && oldArr[i] <= 'z') {
oldArr[i] = oldArr[i].toUpperCase()
}
newArr.push(oldArr[i])
}
return newArr.join('')
}
}
|
AST#export_declaration#Left export default AST#class_declaration#Left class TypeConversionUtil AST#class_body#Left { /**
* Uint8Array 转 string
* @param arr Uint8Array
* @returns string
*/ AST#method_declaration#Left static byteToString AST#parameter_list#Left ( AST#parameter#Left arr : AST#type_annotation#Left AST#primary_type#Left Uint8Array AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left str : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left '' AST#expression#Right AST#variable_declarator#Right AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left _arr : AST#type_annotation#Left AST#primary_type#Left Uint8Array AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left arr AST#expression#Right AST#variable_declarator#Right AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#for_statement#Left for ( AST#variable_declaration#Left let AST#variable_declarator#Left i = AST#expression#Left 0 AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left i AST#expression#Right < AST#expression#Left _arr AST#expression#Right AST#binary_expression#Right AST#expression#Right . length AST#member_expression#Right AST#expression#Right ; AST#expression#Left AST#update_expression#Left AST#expression#Left i AST#expression#Right ++ AST#update_expression#Right AST#expression#Right ) AST#block_statement#Left { // 将数值转为二进制字符串 AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left binaryStr : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#subscript_expression#Left AST#expression#Left _arr AST#expression#Right [ AST#expression#Left i AST#expression#Right ] AST#subscript_expression#Right AST#expression#Right . toString AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left 2 AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left matchArray = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left binaryStr AST#expression#Right . match AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#call_expression#Left AST#expression#Left AST#new_expression#Left new AST#expression#Left RegExp AST#expression#Right AST#new_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left '/^1+?(?=0)/' AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left matchArray AST#expression#Right && AST#expression#Left binaryStr AST#expression#Right AST#binary_expression#Right AST#expression#Right . length AST#member_expression#Right AST#expression#Right == AST#expression#Left 8 AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left bytesLength : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#member_expression#Left AST#expression#Left AST#subscript_expression#Left AST#expression#Left matchArray AST#expression#Right [ AST#expression#Left 0 AST#expression#Right ] AST#subscript_expression#Right AST#expression#Right . length AST#member_expression#Right AST#expression#Right AST#variable_declarator#Right AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left store : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#subscript_expression#Left AST#expression#Left _arr AST#expression#Right [ AST#expression#Left i AST#expression#Right ] AST#subscript_expression#Right AST#expression#Right . toString AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left 2 AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right . slice AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left 7 AST#expression#Right - AST#expression#Left bytesLength AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#for_statement#Left for ( AST#variable_declaration#Left let AST#variable_declarator#Left j = AST#expression#Left 1 AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#expression#Left AST#binary_expression#Left AST#expression#Left j AST#expression#Right < AST#expression#Left bytesLength AST#expression#Right AST#binary_expression#Right AST#expression#Right ; AST#expression#Left AST#update_expression#Left AST#expression#Left j AST#expression#Right ++ AST#update_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left store += AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#subscript_expression#Left AST#expression#Left _arr AST#expression#Right [ AST#expression#Left AST#binary_expression#Left AST#expression#Left j AST#expression#Right + AST#expression#Left i AST#expression#Right AST#binary_expression#Right AST#expression#Right ] AST#subscript_expression#Right AST#expression#Right . toString AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left 2 AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right . slice AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left 2 AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#for_statement#Right AST#statement#Right AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left str += AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left String AST#expression#Right . fromCharCode AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left Number AST#expression#Right . parseInt AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left store AST#expression#Right , AST#expression#Left 2 AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right AST#expression_statement#Right AST#statement#Right AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left i += AST#expression#Left AST#binary_expression#Left AST#expression#Left bytesLength AST#expression#Right - AST#expression#Left 1 AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right else AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left str += AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left String AST#expression#Right . fromCharCode AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#subscript_expression#Left AST#expression#Left _arr AST#expression#Right [ AST#expression#Left i AST#expression#Right ] AST#subscript_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#if_statement#Right AST#statement#Right } AST#block_statement#Right AST#for_statement#Right AST#statement#Right AST#statement#Left AST#return_statement#Left return AST#expression#Left str AST#expression#Right AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right /**
* string 转 Uint8Array
* @param str string
* @returns Uint8Array
*/ AST#method_declaration#Left static stringToByte AST#parameter_list#Left ( AST#parameter#Left str : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left Uint8Array AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left bytes : AST#type_annotation#Left AST#primary_type#Left AST#array_type#Left number [ ] AST#array_type#Right AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#new_expression#Left new AST#expression#Left Array AST#expression#Right AST#new_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left unicode : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right AST#variable_declarator#Right AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#for_statement#Left for ( AST#variable_declaration#Left let AST#variable_declarator#Left i = AST#expression#Left 0 AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left i AST#expression#Right < AST#expression#Left str AST#expression#Right AST#binary_expression#Right AST#expression#Right . length AST#member_expression#Right AST#expression#Right ; AST#expression#Left AST#update_expression#Left AST#expression#Left i AST#expression#Right ++ AST#update_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left unicode = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left str AST#expression#Right . charCodeAt AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left i AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right AST#expression_statement#Right AST#statement#Right AST#statement#Left AST#if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left unicode AST#expression#Right >= AST#expression#Left 0x010000 AST#expression#Right AST#binary_expression#Right AST#expression#Right && AST#expression#Left AST#binary_expression#Left AST#expression#Left unicode AST#expression#Right <= AST#expression#Left 0x10FFFF AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left bytes AST#expression#Right . push AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#parenthesized_expression#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#parenthesized_expression#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left unicode AST#expression#Right >> AST#expression#Left 18 AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#parenthesized_expression#Right AST#expression#Right & AST#expression#Left 0x07 AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#parenthesized_expression#Right AST#expression#Right | AST#expression#Left 0xf0 AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right AST#statement#Right AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left bytes AST#expression#Right . push AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#parenthesized_expression#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#parenthesized_expression#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left unicode AST#expression#Right >> AST#expression#Left 12 AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#parenthesized_expression#Right AST#expression#Right & AST#expression#Left 0x3F AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#parenthesized_expression#Right AST#expression#Right | AST#expression#Left 0x80 AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right AST#statement#Right AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left bytes AST#expression#Right . push AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#parenthesized_expression#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#parenthesized_expression#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left unicode AST#expression#Right >> AST#expression#Left 6 AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#parenthesized_expression#Right AST#expression#Right & AST#expression#Left 0x3f AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#parenthesized_expression#Right AST#expression#Right | AST#expression#Left 0x80 AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right AST#statement#Right AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left bytes AST#expression#Right . push AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#parenthesized_expression#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left unicode AST#expression#Right & AST#expression#Left 0x3F AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#parenthesized_expression#Right AST#expression#Right | AST#expression#Left 0x80 AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right else AST#if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left unicode AST#expression#Right >= AST#expression#Left 0x000800 AST#expression#Right AST#binary_expression#Right AST#expression#Right && AST#expression#Left AST#binary_expression#Left AST#expression#Left unicode AST#expression#Right <= AST#expression#Left 0x00FFF AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left bytes AST#expression#Right . push AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#parenthesized_expression#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#parenthesized_expression#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left unicode AST#expression#Right >> AST#expression#Left 12 AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#parenthesized_expression#Right AST#expression#Right & AST#expression#Left 0x07 AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#parenthesized_expression#Right AST#expression#Right | AST#expression#Left 0xf0 AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right AST#statement#Right AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left bytes AST#expression#Right . push AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#parenthesized_expression#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#parenthesized_expression#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left unicode AST#expression#Right >> AST#expression#Left 6 AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#parenthesized_expression#Right AST#expression#Right & AST#expression#Left 0x3F AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#parenthesized_expression#Right AST#expression#Right | AST#expression#Left 0x80 AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right AST#statement#Right AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left bytes AST#expression#Right . push AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#parenthesized_expression#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left unicode AST#expression#Right & AST#expression#Left 0x3F AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#parenthesized_expression#Right AST#expression#Right | AST#expression#Left 0x80 AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right else AST#if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left unicode AST#expression#Right >= AST#expression#Left 0x000800 AST#expression#Right AST#binary_expression#Right AST#expression#Right && AST#expression#Left AST#binary_expression#Left AST#expression#Left unicode AST#expression#Right <= AST#expression#Left 0x0007FF AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left bytes AST#expression#Right . push AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#parenthesized_expression#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#parenthesized_expression#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left unicode AST#expression#Right >> AST#expression#Left 6 AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#parenthesized_expression#Right AST#expression#Right & AST#expression#Left 0x3F AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#parenthesized_expression#Right AST#expression#Right | AST#expression#Left 0x80 AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right AST#statement#Right AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left bytes AST#expression#Right . push AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#parenthesized_expression#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left unicode AST#expression#Right & AST#expression#Left 0x3F AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#parenthesized_expression#Right AST#expression#Right | AST#expression#Left 0x80 AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right else AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left bytes AST#expression#Right . push AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left unicode AST#expression#Right & AST#expression#Left 0xFF AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#if_statement#Right AST#if_statement#Right AST#if_statement#Right AST#statement#Right } AST#block_statement#Right AST#for_statement#Right AST#statement#Right AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#call_expression#Left AST#expression#Left AST#new_expression#Left new AST#expression#Left Uint8Array AST#expression#Right AST#new_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left bytes AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right /**
* uuid 转换
* 1.字母大写
* 2.去除符号:-
*/ AST#method_declaration#Left static uuidChange AST#parameter_list#Left ( AST#parameter#Left uuid : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left oldArr : AST#type_annotation#Left AST#primary_type#Left AST#array_type#Left string [ ] AST#array_type#Right AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left uuid AST#expression#Right . split AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left '' AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left newArr : AST#type_annotation#Left AST#primary_type#Left AST#array_type#Left string [ ] AST#array_type#Right AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#array_literal#Left [ ] AST#array_literal#Right AST#expression#Right AST#variable_declarator#Right AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#for_statement#Left for ( AST#variable_declaration#Left let AST#variable_declarator#Left i = AST#expression#Left 0 AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left i AST#expression#Right < AST#expression#Left oldArr AST#expression#Right AST#binary_expression#Right AST#expression#Right . length AST#member_expression#Right AST#expression#Right ; AST#expression#Left AST#update_expression#Left AST#expression#Left i AST#expression#Right ++ AST#update_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#subscript_expression#Left AST#expression#Left oldArr AST#expression#Right [ AST#expression#Left i AST#expression#Right ] AST#subscript_expression#Right AST#expression#Right === AST#expression#Left '-' AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#object_literal#Left { AST#ERROR#Left continue AST#ERROR#Right } AST#object_literal#Right AST#expression#Right AST#expression_statement#Right AST#statement#Right AST#if_statement#Right AST#statement#Right AST#statement#Left AST#if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#subscript_expression#Left AST#expression#Left oldArr AST#expression#Right [ AST#expression#Left i AST#expression#Right ] AST#subscript_expression#Right AST#expression#Right >= AST#expression#Left 'a' AST#expression#Right AST#binary_expression#Right AST#expression#Right && AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#subscript_expression#Left AST#expression#Left oldArr AST#expression#Right [ AST#expression#Left i AST#expression#Right ] AST#subscript_expression#Right AST#expression#Right <= AST#expression#Left 'z' AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#subscript_expression#Left AST#expression#Left AST#subscript_expression#Left AST#expression#Left oldArr AST#expression#Right [ AST#expression#Left i AST#expression#Right ] AST#subscript_expression#Right AST#expression#Right AST#ERROR#Left = oldArr AST#ERROR#Right [ AST#expression#Left i AST#expression#Right ] AST#subscript_expression#Right AST#expression#Right . toUpperCase AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#if_statement#Right AST#statement#Right AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left newArr AST#expression#Right . push AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#subscript_expression#Left AST#expression#Left oldArr AST#expression#Right [ AST#expression#Left i AST#expression#Right ] AST#subscript_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#for_statement#Right AST#statement#Right AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left newArr AST#expression#Right . join AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left '' AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right } AST#class_body#Right AST#class_declaration#Right AST#export_declaration#Right
|
export default class TypeConversionUtil {
static byteToString(arr: Uint8Array): string {
let str: string = ''
let _arr: Uint8Array = arr
for (let i = 0; i < _arr.length; i++) {
let binaryStr: string = _arr[i].toString(2)
let matchArray = binaryStr.match(new RegExp('/^1+?(?=0)/'))
if (matchArray && binaryStr.length == 8) {
let bytesLength: number = matchArray[0].length
let store: string = _arr[i].toString(2).slice(7 - bytesLength)
for (let j = 1; j < bytesLength; j++) {
store += _arr[j + i].toString(2).slice(2)
}
str += String.fromCharCode(Number.parseInt(store, 2))
i += bytesLength - 1
} else {
str += String.fromCharCode(_arr[i])
}
}
return str
}
static stringToByte(str: string): Uint8Array {
let bytes: number[] = new Array()
let unicode: number
for (let i = 0; i < str.length; i++) {
unicode = str.charCodeAt(i)
if (unicode >= 0x010000 && unicode <= 0x10FFFF) {
bytes.push(((unicode >> 18) & 0x07) | 0xf0)
bytes.push(((unicode >> 12) & 0x3F) | 0x80)
bytes.push(((unicode >> 6) & 0x3f) | 0x80)
bytes.push((unicode & 0x3F) | 0x80)
} else if (unicode >= 0x000800 && unicode <= 0x00FFF) {
bytes.push(((unicode >> 12) & 0x07) | 0xf0)
bytes.push(((unicode >> 6) & 0x3F) | 0x80)
bytes.push((unicode & 0x3F) | 0x80)
} else if (unicode >= 0x000800 && unicode <= 0x0007FF) {
bytes.push(((unicode >> 6) & 0x3F) | 0x80)
bytes.push((unicode & 0x3F) | 0x80)
} else {
bytes.push(unicode & 0xFF)
}
}
return new Uint8Array(bytes)
}
static uuidChange(uuid: string): string {
let oldArr: string[] = uuid.split('')
let newArr: string[] = []
for (let i = 0; i < oldArr.length; i++) {
if (oldArr[i] === '-') {
continue
}
if (oldArr[i] >= 'a' && oldArr[i] <= 'z') {
oldArr[i] = oldArr[i].toUpperCase()
}
newArr.push(oldArr[i])
}
return newArr.join('')
}
}
|
https://github.com/openharmony/applications_app_samples/blob/a826ab0e75fe51d028c1c5af58188e908736b53b/code/SystemFeature/FileManagement/MediaCollections/entry/src/main/ets/model/TypeConversion.ets#L19-L98
|
a7c9d751da627561a93d2c34cd82bf3f1083a986
|
gitee
|
|
openharmony/codelabs
|
d899f32a52b2ae0dfdbb86e34e8d94645b5d4090
|
ETSUI/WebCookie/entry/src/main/ets/common/constants/CommonConstant.ets
|
arkts
|
Common constants for all features.
|
export class CommonConstants {
/**
* User Center Link.
*/
static readonly USER_CENTER_URL = 'https://id1.cloud.huawei.com/AMW/portal/userCenter/index.html?' +
'service=http://developer.huawei.com/consumer/cn/#/accountCenter/userCenter';
/**
* About Links.
*/
static readonly USER_ABOUT_URL = 'https://id1.cloud.huawei.com/AMW/portal/userCenter/index.html?' +
'service=http://developer.huawei.com/consumer/cn/#/accountCenter/about';
/**
* Font size of navigation text.
*/
static readonly NAVIGATOR_SIZE = '20fp';
/**
* Font size of page title text.
*/
static readonly TITLE_SIZE = '18fp';
/**
* Font size of button text.
*/
static readonly BUTTON_SIZE = '14fp';
/**
* Margin of divider.
*/
static readonly DIVIDER_MARGIN = 12;
/**
* Height of divider.
*/
static readonly DIVIDER_HEIGHT = '2.2%';
/**
* Url of verify page.
*/
static readonly PAGE_VERIFY = 'pages/Verify';
/**
* Url of index page.
*/
static readonly PAGE_INDEX = 'pages/WebIndex';
/**
* Maximum of width.
*/
static readonly FULL_WIDTH = '100%';
/**
* Maximum of height.
*/
static readonly FULL_HEIGHT = '100%';
/**
* Width of back icon.
*/
static readonly BACK_WIDTH = '6.7%';
/**
* Height of back icon.
*/
static readonly BACK_HEIGHT = '3.1%';
/**
* Height of web component.
*/
static readonly WEB_HEIGHT = '60%';
/**
* Width of web component.
*/
static readonly WEB_WIDTH = '90%';
/**
* Height of page title text.
*/
static readonly PAGE_TITLE_HEIGHT = '3.1%';
/**
* Width of page title text.
*/
static readonly PAGE_TITLE_WIDTH = '25.6%';
/**
* Top margin of navigation.
*/
static readonly NAVIGATOR_MARGIN_TOP = '1.7%';
/**
* Left margin of navigation.
*/
static readonly NAVIGATOR_MARGIN_LEFT = '10%';
/**
* Deeper font weight than normal font.
*/
static readonly FONT_WEIGHT_DEEPER = 500;
/**
* Top margin of app title.
*/
static readonly APP_TITLE_MARGIN_TOP = '15vp';
/**
* Left margin of app title.
*/
static readonly APP_TITLE_MARGIN_LEFT = '26vp';
/**
* Bottom margin of web.
*/
static readonly WEB_MARGIN_BOTTOM = '90vp';
/**
* Length of truncated.
*/
static readonly SUB_LENGTH: number = 300;
/**
* Text Zoom Ratio.
*/
static readonly TEXT_ZOOM_RATIO: number = 60;
}
|
AST#export_declaration#Left export AST#class_declaration#Left class CommonConstants AST#class_body#Left { /**
* User Center Link.
*/ AST#property_declaration#Left static readonly USER_CENTER_URL = AST#expression#Left AST#binary_expression#Left AST#expression#Left 'https://id1.cloud.huawei.com/AMW/portal/userCenter/index.html?' AST#expression#Right + AST#expression#Left 'service=http://developer.huawei.com/consumer/cn/#/accountCenter/userCenter' AST#expression#Right AST#binary_expression#Right AST#expression#Right ; AST#property_declaration#Right /**
* About Links.
*/ AST#property_declaration#Left static readonly USER_ABOUT_URL = AST#expression#Left AST#binary_expression#Left AST#expression#Left 'https://id1.cloud.huawei.com/AMW/portal/userCenter/index.html?' AST#expression#Right + AST#expression#Left 'service=http://developer.huawei.com/consumer/cn/#/accountCenter/about' AST#expression#Right AST#binary_expression#Right AST#expression#Right ; AST#property_declaration#Right /**
* Font size of navigation text.
*/ AST#property_declaration#Left static readonly NAVIGATOR_SIZE = AST#expression#Left '20fp' AST#expression#Right ; AST#property_declaration#Right /**
* Font size of page title text.
*/ AST#property_declaration#Left static readonly TITLE_SIZE = AST#expression#Left '18fp' AST#expression#Right ; AST#property_declaration#Right /**
* Font size of button text.
*/ AST#property_declaration#Left static readonly BUTTON_SIZE = AST#expression#Left '14fp' AST#expression#Right ; AST#property_declaration#Right /**
* Margin of divider.
*/ AST#property_declaration#Left static readonly DIVIDER_MARGIN = AST#expression#Left 12 AST#expression#Right ; AST#property_declaration#Right /**
* Height of divider.
*/ AST#property_declaration#Left static readonly DIVIDER_HEIGHT = AST#expression#Left '2.2%' AST#expression#Right ; AST#property_declaration#Right /**
* Url of verify page.
*/ AST#property_declaration#Left static readonly PAGE_VERIFY = AST#expression#Left 'pages/Verify' AST#expression#Right ; AST#property_declaration#Right /**
* Url of index page.
*/ AST#property_declaration#Left static readonly PAGE_INDEX = AST#expression#Left 'pages/WebIndex' AST#expression#Right ; AST#property_declaration#Right /**
* Maximum of width.
*/ AST#property_declaration#Left static readonly FULL_WIDTH = AST#expression#Left '100%' AST#expression#Right ; AST#property_declaration#Right /**
* Maximum of height.
*/ AST#property_declaration#Left static readonly FULL_HEIGHT = AST#expression#Left '100%' AST#expression#Right ; AST#property_declaration#Right /**
* Width of back icon.
*/ AST#property_declaration#Left static readonly BACK_WIDTH = AST#expression#Left '6.7%' AST#expression#Right ; AST#property_declaration#Right /**
* Height of back icon.
*/ AST#property_declaration#Left static readonly BACK_HEIGHT = AST#expression#Left '3.1%' AST#expression#Right ; AST#property_declaration#Right /**
* Height of web component.
*/ AST#property_declaration#Left static readonly WEB_HEIGHT = AST#expression#Left '60%' AST#expression#Right ; AST#property_declaration#Right /**
* Width of web component.
*/ AST#property_declaration#Left static readonly WEB_WIDTH = AST#expression#Left '90%' AST#expression#Right ; AST#property_declaration#Right /**
* Height of page title text.
*/ AST#property_declaration#Left static readonly PAGE_TITLE_HEIGHT = AST#expression#Left '3.1%' AST#expression#Right ; AST#property_declaration#Right /**
* Width of page title text.
*/ AST#property_declaration#Left static readonly PAGE_TITLE_WIDTH = AST#expression#Left '25.6%' AST#expression#Right ; AST#property_declaration#Right /**
* Top margin of navigation.
*/ AST#property_declaration#Left static readonly NAVIGATOR_MARGIN_TOP = AST#expression#Left '1.7%' AST#expression#Right ; AST#property_declaration#Right /**
* Left margin of navigation.
*/ AST#property_declaration#Left static readonly NAVIGATOR_MARGIN_LEFT = AST#expression#Left '10%' AST#expression#Right ; AST#property_declaration#Right /**
* Deeper font weight than normal font.
*/ AST#property_declaration#Left static readonly FONT_WEIGHT_DEEPER = AST#expression#Left 500 AST#expression#Right ; AST#property_declaration#Right /**
* Top margin of app title.
*/ AST#property_declaration#Left static readonly APP_TITLE_MARGIN_TOP = AST#expression#Left '15vp' AST#expression#Right ; AST#property_declaration#Right /**
* Left margin of app title.
*/ AST#property_declaration#Left static readonly APP_TITLE_MARGIN_LEFT = AST#expression#Left '26vp' AST#expression#Right ; AST#property_declaration#Right /**
* Bottom margin of web.
*/ AST#property_declaration#Left static readonly WEB_MARGIN_BOTTOM = AST#expression#Left '90vp' AST#expression#Right ; AST#property_declaration#Right /**
* Length of truncated.
*/ AST#property_declaration#Left static readonly SUB_LENGTH : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left 300 AST#expression#Right ; AST#property_declaration#Right /**
* Text Zoom Ratio.
*/ AST#property_declaration#Left static readonly TEXT_ZOOM_RATIO : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left 60 AST#expression#Right ; AST#property_declaration#Right } AST#class_body#Right AST#class_declaration#Right AST#export_declaration#Right
|
export class CommonConstants {
static readonly USER_CENTER_URL = 'https://id1.cloud.huawei.com/AMW/portal/userCenter/index.html?' +
'service=http://developer.huawei.com/consumer/cn/#/accountCenter/userCenter';
static readonly USER_ABOUT_URL = 'https://id1.cloud.huawei.com/AMW/portal/userCenter/index.html?' +
'service=http://developer.huawei.com/consumer/cn/#/accountCenter/about';
static readonly NAVIGATOR_SIZE = '20fp';
static readonly TITLE_SIZE = '18fp';
static readonly BUTTON_SIZE = '14fp';
static readonly DIVIDER_MARGIN = 12;
static readonly DIVIDER_HEIGHT = '2.2%';
static readonly PAGE_VERIFY = 'pages/Verify';
static readonly PAGE_INDEX = 'pages/WebIndex';
static readonly FULL_WIDTH = '100%';
static readonly FULL_HEIGHT = '100%';
static readonly BACK_WIDTH = '6.7%';
static readonly BACK_HEIGHT = '3.1%';
static readonly WEB_HEIGHT = '60%';
static readonly WEB_WIDTH = '90%';
static readonly PAGE_TITLE_HEIGHT = '3.1%';
static readonly PAGE_TITLE_WIDTH = '25.6%';
static readonly NAVIGATOR_MARGIN_TOP = '1.7%';
static readonly NAVIGATOR_MARGIN_LEFT = '10%';
static readonly FONT_WEIGHT_DEEPER = 500;
static readonly APP_TITLE_MARGIN_TOP = '15vp';
static readonly APP_TITLE_MARGIN_LEFT = '26vp';
static readonly WEB_MARGIN_BOTTOM = '90vp';
static readonly SUB_LENGTH: number = 300;
static readonly TEXT_ZOOM_RATIO: number = 60;
}
|
https://github.com/openharmony/codelabs/blob/d899f32a52b2ae0dfdbb86e34e8d94645b5d4090/ETSUI/WebCookie/entry/src/main/ets/common/constants/CommonConstant.ets#L19-L147
|
175a5dc34ab942a7a1eb3bfc3af2b6a9f4fe818f
|
gitee
|
|
harmonyos-cases/cases
|
eccdb71f1cee10fa6ff955e16c454c1b59d3ae13
|
CommonAppDevelopment/feature/pageturninganimation/src/main/ets/view/PageTurningAnimation.ets
|
arkts
|
pageTurningAnimate
|
通过animateTo方法为组件添加动效,动效时长要小于setInterval函数调用周期
|
private pageTurningAnimate() {
// TODO: 知识点: 使用animateTo方法添加动画效果,同时控制动画的时长,以及动画过程中各元素状态的改变。
animateTo(
{
duration: 700, onFinish: () => {
// 动画结束时,Text组件A显示的页面编号和B显示的页面编号相等
this.pageNumTextA = this.animatePageNumTextB;
// 动画结束时,Text组件A以中心线为轴旋转180度,用于显示左侧翻页动画结束时的页面编号
this.rotateAngleTextA = 180;
// 动画结束时,Text组件B的旋转角度重置为0度
this.rotateAngleTextB = 0;
// 动画结束时,Text组件B显示的页面编号加1
this.animatePageNumTextB = (this.animatePageNumTextB + 1) % 8;
}
},
() => {
// 动画开始,Text组件B的旋转角度设置为180度
this.rotateAngleTextB = 180;
//动画开始,Text组件D的页面编号加1,用于刷新显示下一个翻页的页面编号
this.nextPageNumTextD = this.animatePageNumTextB + 1;
})
}
|
AST#method_declaration#Left private pageTurningAnimate AST#parameter_list#Left ( ) AST#parameter_list#Right AST#builder_function_body#Left { // TODO: 知识点: 使用animateTo方法添加动画效果,同时控制动画的时长,以及动画过程中各元素状态的改变。 AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left animateTo ( AST#component_parameters#Left { AST#component_parameter#Left duration : AST#expression#Left 700 AST#expression#Right AST#component_parameter#Right , AST#component_parameter#Left onFinish : AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( ) AST#parameter_list#Right => AST#block_statement#Left { // 动画结束时,Text组件A显示的页面编号和B显示的页面编号相等 AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . pageNumTextA AST#member_expression#Right = AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . animatePageNumTextB AST#member_expression#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right // 动画结束时,Text组件A以中心线为轴旋转180度,用于显示左侧翻页动画结束时的页面编号 AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . rotateAngleTextA AST#member_expression#Right = AST#expression#Left 180 AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right // 动画结束时,Text组件B的旋转角度重置为0度 AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . rotateAngleTextB AST#member_expression#Right = AST#expression#Left 0 AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right // 动画结束时,Text组件B显示的页面编号加1 AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . animatePageNumTextB AST#member_expression#Right = AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#parenthesized_expression#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . animatePageNumTextB AST#member_expression#Right AST#expression#Right + AST#expression#Left 1 AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#parenthesized_expression#Right AST#expression#Right % AST#expression#Left 8 AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#arrow_function#Right AST#expression#Right AST#component_parameter#Right } AST#component_parameters#Right AST#ERROR#Left , ( AST#ERROR#Right ) AST#ERROR#Left => AST#ERROR#Right AST#container_content_body#Left { // 动画开始,Text组件B的旋转角度设置为180度 AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . rotateAngleTextB AST#member_expression#Right = AST#expression#Left 180 AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right //动画开始,Text组件D的页面编号加1,用于刷新显示下一个翻页的页面编号 AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . nextPageNumTextD AST#member_expression#Right = AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . animatePageNumTextB AST#member_expression#Right AST#expression#Right + AST#expression#Left 1 AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right } AST#container_content_body#Right AST#ui_component#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right AST#ERROR#Left ) AST#ERROR#Right } AST#builder_function_body#Right AST#method_declaration#Right
|
private pageTurningAnimate() {
animateTo(
{
duration: 700, onFinish: () => {
this.pageNumTextA = this.animatePageNumTextB;
this.rotateAngleTextA = 180;
this.rotateAngleTextB = 0;
this.animatePageNumTextB = (this.animatePageNumTextB + 1) % 8;
}
},
() => {
this.rotateAngleTextB = 180;
this.nextPageNumTextD = this.animatePageNumTextB + 1;
})
}
|
https://github.com/harmonyos-cases/cases/blob/eccdb71f1cee10fa6ff955e16c454c1b59d3ae13/CommonAppDevelopment/feature/pageturninganimation/src/main/ets/view/PageTurningAnimation.ets#L90-L111
|
799ebf449f6fee03d50fdbca5486d41823dfcd7f
|
gitee
|
harmonyos-cases/cases
|
eccdb71f1cee10fa6ff955e16c454c1b59d3ae13
|
CommonAppDevelopment/feature/customscan/src/main/ets/viewmodel/CustomScanViewModel.ets
|
arkts
|
initScanData
|
自定义扫码数据初始化
@returns {void}
|
initScanData() {
this.isScanLine = false;
this.isScanned = false;
this.scanResult = {} as ScanResults;
}
|
AST#method_declaration#Left initScanData AST#parameter_list#Left ( ) AST#parameter_list#Right AST#builder_function_body#Left { AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . isScanLine AST#member_expression#Right = AST#expression#Left AST#boolean_literal#Left false AST#boolean_literal#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . isScanned AST#member_expression#Right = AST#expression#Left AST#boolean_literal#Left false AST#boolean_literal#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . scanResult AST#member_expression#Right = AST#expression#Left AST#as_expression#Left AST#expression#Left AST#object_literal#Left { } AST#object_literal#Right AST#expression#Right as AST#type_annotation#Left AST#primary_type#Left ScanResults AST#primary_type#Right AST#type_annotation#Right AST#as_expression#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right } AST#builder_function_body#Right AST#method_declaration#Right
|
initScanData() {
this.isScanLine = false;
this.isScanned = false;
this.scanResult = {} as ScanResults;
}
|
https://github.com/harmonyos-cases/cases/blob/eccdb71f1cee10fa6ff955e16c454c1b59d3ae13/CommonAppDevelopment/feature/customscan/src/main/ets/viewmodel/CustomScanViewModel.ets#L280-L284
|
5d0a2fd0bbb2c521c8eec9ab2ad0ebcdbe6444be
|
gitee
|
CongDuang/PlayHarmony.git
|
674a0459e1b20db9de8c837dff6a8d1f06330e79
|
entry/src/main/ets/utils/HttpUtil.ets
|
arkts
|
post
|
post 请求
@param url
@param data
@returns
|
post<Resp, Data>(url: string, data: Data): Promise<AxiosResponse<BaseResp<Resp>, Data>> {
return HttpUtil.axiosInstance!.post<Resp, AxiosResponse<BaseResp<Resp>, Data>, Data>(url, data)
}
|
AST#method_declaration#Left post AST#type_parameters#Left < AST#type_parameter#Left Resp AST#type_parameter#Right , AST#type_parameter#Left Data AST#type_parameter#Right > AST#type_parameters#Right AST#parameter_list#Left ( AST#parameter#Left url : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left data : AST#type_annotation#Left AST#primary_type#Left Data AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left AST#generic_type#Left Promise AST#type_arguments#Left < AST#type_annotation#Left AST#primary_type#Left AST#generic_type#Left AxiosResponse AST#type_arguments#Left < AST#type_annotation#Left AST#primary_type#Left AST#generic_type#Left BaseResp AST#type_arguments#Left < AST#type_annotation#Left AST#primary_type#Left Resp AST#primary_type#Right AST#type_annotation#Right > AST#type_arguments#Right AST#generic_type#Right AST#primary_type#Right AST#type_annotation#Right , AST#type_annotation#Left AST#primary_type#Left Data AST#primary_type#Right AST#type_annotation#Right > AST#type_arguments#Right AST#generic_type#Right AST#primary_type#Right AST#type_annotation#Right > AST#type_arguments#Right AST#generic_type#Right AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#non_null_assertion_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left HttpUtil AST#expression#Right . axiosInstance AST#member_expression#Right AST#expression#Right ! AST#non_null_assertion_expression#Right AST#expression#Right . post AST#member_expression#Right AST#expression#Right AST#type_arguments#Left < AST#type_annotation#Left AST#primary_type#Left Resp AST#primary_type#Right AST#type_annotation#Right , AST#type_annotation#Left AST#primary_type#Left AST#generic_type#Left AxiosResponse AST#type_arguments#Left < AST#type_annotation#Left AST#primary_type#Left AST#generic_type#Left BaseResp AST#type_arguments#Left < AST#type_annotation#Left AST#primary_type#Left Resp AST#primary_type#Right AST#type_annotation#Right > AST#type_arguments#Right AST#generic_type#Right AST#primary_type#Right AST#type_annotation#Right , AST#type_annotation#Left AST#primary_type#Left Data AST#primary_type#Right AST#type_annotation#Right > AST#type_arguments#Right AST#generic_type#Right AST#primary_type#Right AST#type_annotation#Right , AST#type_annotation#Left AST#primary_type#Left Data AST#primary_type#Right AST#type_annotation#Right > AST#type_arguments#Right AST#argument_list#Left ( AST#expression#Left url AST#expression#Right , AST#expression#Left data AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
post<Resp, Data>(url: string, data: Data): Promise<AxiosResponse<BaseResp<Resp>, Data>> {
return HttpUtil.axiosInstance!.post<Resp, AxiosResponse<BaseResp<Resp>, Data>, Data>(url, data)
}
|
https://github.com/CongDuang/PlayHarmony.git/blob/674a0459e1b20db9de8c837dff6a8d1f06330e79/entry/src/main/ets/utils/HttpUtil.ets#L58-L60
|
68a80ca083d06212d90c01b186ccd874d6886800
|
github
|
openharmony/developtools_profiler
|
73d26bb5acfcafb2b1f4f94ead5640241d1e5f73
|
host/smartperf/client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/ArrayUtils.ets
|
arkts
|
Copyright (C) 2022 Huawei Device Co., Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
|
export default class ArrayUtils {
static copyOfRange(arr: number[], fromIndex: number, toIndex: number): number[] {
//需将copya的类型指定为any,这样才能够使其能够任意添加属性
var copya: number[];
//最关键的是注意 下面 当a中有方法时,json.parse(json.stringify(xx))是无效的
for (var i = 0; i < arr.length; i++) {
if (typeof arr[i] == 'function') {
return [];
} else {
copya[i] = JSON.parse(JSON.stringify(arr[i]));
}
}
return copya;
}
}
|
AST#export_declaration#Left export default AST#class_declaration#Left class ArrayUtils AST#class_body#Left { AST#method_declaration#Left static copyOfRange AST#parameter_list#Left ( AST#parameter#Left arr : AST#type_annotation#Left AST#primary_type#Left AST#array_type#Left number [ ] AST#array_type#Right AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left fromIndex : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left toIndex : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left AST#array_type#Left number [ ] AST#array_type#Right AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { //需将copya的类型指定为any,这样才能够使其能够任意添加属性 AST#statement#Left AST#variable_declaration#Left var AST#variable_declarator#Left copya : AST#type_annotation#Left AST#primary_type#Left AST#array_type#Left number [ ] AST#array_type#Right AST#primary_type#Right AST#type_annotation#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right //最关键的是注意 下面 当a中有方法时,json.parse(json.stringify(xx))是无效的 AST#statement#Left AST#for_statement#Left for ( AST#variable_declaration#Left var AST#variable_declarator#Left i = AST#expression#Left 0 AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left i AST#expression#Right < AST#expression#Left arr AST#expression#Right AST#binary_expression#Right AST#expression#Right . length AST#member_expression#Right AST#expression#Right ; AST#expression#Left AST#update_expression#Left AST#expression#Left i AST#expression#Right ++ AST#update_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#subscript_expression#Left AST#expression#Left AST#unary_expression#Left typeof AST#expression#Left arr AST#expression#Right AST#unary_expression#Right AST#expression#Right [ AST#expression#Left i AST#expression#Right ] AST#subscript_expression#Right AST#expression#Right == AST#expression#Left 'function' AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#array_literal#Left [ ] AST#array_literal#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right else AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#subscript_expression#Left AST#expression#Left copya AST#expression#Right [ AST#expression#Left i AST#expression#Right ] AST#subscript_expression#Right AST#expression#Right AST#ERROR#Left = JSON AST#ERROR#Right . parse AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left JSON AST#expression#Right . stringify AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#subscript_expression#Left AST#expression#Left arr AST#expression#Right [ AST#expression#Left i AST#expression#Right ] AST#subscript_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#if_statement#Right AST#statement#Right } AST#block_statement#Right AST#for_statement#Right AST#statement#Right AST#statement#Left AST#return_statement#Left return AST#expression#Left copya AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right } AST#class_body#Right AST#class_declaration#Right AST#export_declaration#Right
|
export default class ArrayUtils {
static copyOfRange(arr: number[], fromIndex: number, toIndex: number): number[] {
var copya: number[];
for (var i = 0; i < arr.length; i++) {
if (typeof arr[i] == 'function') {
return [];
} else {
copya[i] = JSON.parse(JSON.stringify(arr[i]));
}
}
return copya;
}
}
|
https://github.com/openharmony/developtools_profiler/blob/73d26bb5acfcafb2b1f4f94ead5640241d1e5f73/host/smartperf/client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/ArrayUtils.ets#L16-L30
|
ceb80415226a20bb6b30ddd16b3f91f8df696663
|
gitee
|
|
XiangRui_FuZi/harmony-oscourse
|
da885f9a777a1eace7a07e1cd81137746687974b
|
class1/entry/src/main/ets/commons/utils/AudioRendererManager.ets
|
arkts
|
pause
|
暂停播放
|
static async pause() {
await AudioRendererManager.audioRender?.pause()
}
|
AST#method_declaration#Left static async pause AST#parameter_list#Left ( ) AST#parameter_list#Right AST#builder_function_body#Left { AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#await_expression#Left await AST#expression#Left AudioRendererManager AST#expression#Right AST#await_expression#Right AST#expression#Right . audioRender AST#member_expression#Right AST#expression#Right ?. pause AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right } AST#builder_function_body#Right AST#method_declaration#Right
|
static async pause() {
await AudioRendererManager.audioRender?.pause()
}
|
https://github.com/XiangRui_FuZi/harmony-oscourse/blob/da885f9a777a1eace7a07e1cd81137746687974b/class1/entry/src/main/ets/commons/utils/AudioRendererManager.ets#L77-L79
|
749565b271064cb87c9e06dff99e299e4c9f81a9
|
gitee
|
harmonyos-cases/cases
|
eccdb71f1cee10fa6ff955e16c454c1b59d3ae13
|
CommonAppDevelopment/feature/mediafullscreen/src/main/ets/view/XComponentVideo.ets
|
arkts
|
init
|
初始化AVPlayer
|
async init(): Promise<void> {
await this.release();
const context = getContext(this);
// 获取fdSrc用于注册AVPlayer
context.resourceManager.getRawFd(this.fileName).then(async (value: resourceManager.RawFileDescriptor) => {
this.avPlayer = await media.createAVPlayer();
this.isCreate = true;
await this.setSourceInfo(); // 视频信息上报函数
await this.setStateChangeCallback(); // 状态机上报回调函数
this.avPlayer.fdSrc = {
fd: value.fd,
offset: value.offset,
length: value.length
};
});
}
|
AST#method_declaration#Left async init AST#parameter_list#Left ( ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left AST#generic_type#Left Promise AST#type_arguments#Left < AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right > AST#type_arguments#Right AST#generic_type#Right AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#await_expression#Left await AST#expression#Left this AST#expression#Right AST#await_expression#Right AST#expression#Right . release AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left context = AST#expression#Left AST#call_expression#Left AST#expression#Left getContext AST#expression#Right AST#argument_list#Left ( AST#expression#Left this AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right // 获取fdSrc用于注册AVPlayer AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left context AST#expression#Right . resourceManager AST#member_expression#Right AST#expression#Right . getRawFd AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . fileName AST#member_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right . then AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#arrow_function#Left async AST#parameter_list#Left ( AST#parameter#Left value : AST#type_annotation#Left AST#primary_type#Left AST#qualified_type#Left resourceManager . RawFileDescriptor AST#qualified_type#Right AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right => AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . avPlayer AST#member_expression#Right = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#await_expression#Left await AST#expression#Left media AST#expression#Right AST#await_expression#Right AST#expression#Right . createAVPlayer AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . isCreate AST#member_expression#Right = AST#expression#Left AST#boolean_literal#Left true AST#boolean_literal#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#await_expression#Left await AST#expression#Left this AST#expression#Right AST#await_expression#Right AST#expression#Right . setSourceInfo AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right // 视频信息上报函数 AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#await_expression#Left await AST#expression#Left this AST#expression#Right AST#await_expression#Right AST#expression#Right . setStateChangeCallback AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right // 状态机上报回调函数 AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . avPlayer AST#member_expression#Right AST#expression#Right . fdSrc AST#member_expression#Right = AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left fd AST#property_name#Right : AST#expression#Left AST#member_expression#Left AST#expression#Left value AST#expression#Right . fd AST#member_expression#Right AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left offset AST#property_name#Right : AST#expression#Left AST#member_expression#Left AST#expression#Left value AST#expression#Right . offset AST#member_expression#Right AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left length AST#property_name#Right : AST#expression#Left AST#member_expression#Left AST#expression#Left value AST#expression#Right . length AST#member_expression#Right AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#arrow_function#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
async init(): Promise<void> {
await this.release();
const context = getContext(this);
context.resourceManager.getRawFd(this.fileName).then(async (value: resourceManager.RawFileDescriptor) => {
this.avPlayer = await media.createAVPlayer();
this.isCreate = true;
await this.setSourceInfo();
await this.setStateChangeCallback();
this.avPlayer.fdSrc = {
fd: value.fd,
offset: value.offset,
length: value.length
};
});
}
|
https://github.com/harmonyos-cases/cases/blob/eccdb71f1cee10fa6ff955e16c454c1b59d3ae13/CommonAppDevelopment/feature/mediafullscreen/src/main/ets/view/XComponentVideo.ets#L107-L122
|
4aa10578b32aed25b2d9ce057b2f538ae6e1b647
|
gitee
|
JackJiang2011/harmonychat.git
|
bca3f3e1ce54d763720510f99acf595a49e37879
|
entry/src/main/ets/pages/utils/ToolKits.ets
|
arkts
|
getTimeSegmentStr
|
将一个两位24小时时间的转换为上午、下午这样的描述。
@param hh24 两位的24小时制时间的小时部分
@return 如果成功转换则返回形如:“凌晨”、“上午”等,否则返回空字符串(不是null)
@since 3.1
|
static getTimeSegmentStr(hh24: string): string {
let ret: string = '';
if (hh24 && hh24.length >= 2) {
try {
// 取出“小时”部分
let a = parseInt(hh24.substring(0, 2));
if (a >= 0 && a <= 6) {
ret = "凌晨";
} else if (a > 6 && a <= 12) {
ret = "上午";
} else if (a > 12 && a <= 13) {
ret = "中午";
} else if (a > 13 && a <= 18) {
ret = "下午";
} else if (a > 18 && a <= 24) {
ret = "晚上";
}
} catch (e) {
ClientCoreSDK.Log.warn("【DEBUG-getTimeSegmentStr】计算出错:" + JSON.stringify(e) + " 【NO】");
}
}
return ret;
}
|
AST#method_declaration#Left static getTimeSegmentStr AST#parameter_list#Left ( AST#parameter#Left hh24 : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left ret : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left '' AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left hh24 AST#expression#Right && AST#expression#Left hh24 AST#expression#Right AST#binary_expression#Right AST#expression#Right . length AST#member_expression#Right AST#expression#Right >= AST#expression#Left 2 AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#try_statement#Left try AST#block_statement#Left { // 取出“小时”部分 AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left a = AST#expression#Left AST#call_expression#Left AST#expression#Left parseInt AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left hh24 AST#expression#Right . substring AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left 0 AST#expression#Right , AST#expression#Left 2 AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left a AST#expression#Right >= AST#expression#Left 0 AST#expression#Right AST#binary_expression#Right AST#expression#Right && AST#expression#Left AST#binary_expression#Left AST#expression#Left a AST#expression#Right <= AST#expression#Left 6 AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left ret = AST#expression#Left "凌晨" AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right else AST#if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left a AST#expression#Right > AST#expression#Left 6 AST#expression#Right AST#binary_expression#Right AST#expression#Right && AST#expression#Left AST#binary_expression#Left AST#expression#Left a AST#expression#Right <= AST#expression#Left 12 AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left ret = AST#expression#Left "上午" AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right else AST#if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left a AST#expression#Right > AST#expression#Left 12 AST#expression#Right AST#binary_expression#Right AST#expression#Right && AST#expression#Left AST#binary_expression#Left AST#expression#Left a AST#expression#Right <= AST#expression#Left 13 AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left ret = AST#expression#Left "中午" AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right else AST#if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left a AST#expression#Right > AST#expression#Left 13 AST#expression#Right AST#binary_expression#Right AST#expression#Right && AST#expression#Left AST#binary_expression#Left AST#expression#Left a AST#expression#Right <= AST#expression#Left 18 AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left ret = AST#expression#Left "下午" AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right else AST#if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left a AST#expression#Right > AST#expression#Left 18 AST#expression#Right AST#binary_expression#Right AST#expression#Right && AST#expression#Left AST#binary_expression#Left AST#expression#Left a AST#expression#Right <= AST#expression#Left 24 AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left ret = AST#expression#Left "晚上" AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#if_statement#Right AST#if_statement#Right AST#if_statement#Right AST#if_statement#Right AST#if_statement#Right AST#statement#Right } AST#block_statement#Right AST#catch_clause#Left catch ( e ) AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left ClientCoreSDK AST#expression#Right . Log AST#member_expression#Right AST#expression#Right . warn AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left "【DEBUG-getTimeSegmentStr】计算出错:" AST#expression#Right + AST#expression#Left JSON AST#expression#Right AST#binary_expression#Right AST#expression#Right . stringify AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left e AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right + AST#expression#Left " 【NO】" AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#catch_clause#Right AST#try_statement#Right AST#statement#Right } AST#block_statement#Right AST#if_statement#Right AST#statement#Right AST#statement#Left AST#return_statement#Left return AST#expression#Left ret AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
static getTimeSegmentStr(hh24: string): string {
let ret: string = '';
if (hh24 && hh24.length >= 2) {
try {
let a = parseInt(hh24.substring(0, 2));
if (a >= 0 && a <= 6) {
ret = "凌晨";
} else if (a > 6 && a <= 12) {
ret = "上午";
} else if (a > 12 && a <= 13) {
ret = "中午";
} else if (a > 13 && a <= 18) {
ret = "下午";
} else if (a > 18 && a <= 24) {
ret = "晚上";
}
} catch (e) {
ClientCoreSDK.Log.warn("【DEBUG-getTimeSegmentStr】计算出错:" + JSON.stringify(e) + " 【NO】");
}
}
return ret;
}
|
https://github.com/JackJiang2011/harmonychat.git/blob/bca3f3e1ce54d763720510f99acf595a49e37879/entry/src/main/ets/pages/utils/ToolKits.ets#L305-L328
|
ca8fbe142b853fdbf1d8d672843f9d912139fc6b
|
github
|
bigbear20240612/birthday_reminder.git
|
647c411a6619affd42eb5d163ff18db4b34b27ff
|
entry/src/main/ets/pages/SettingsPage.ets
|
arkts
|
showClearDataDialog
|
显示清空数据确认对话框
|
private showClearDataDialog(): void {
AlertDialog.show({
title: '清空所有数据',
message: '此操作将删除所有联系人、纪念日和祝福历史记录,且无法恢复。确定要继续吗?',
alignment: DialogAlignment.Center,
primaryButton: {
value: '取消',
action: () => {
// 取消操作
}
},
secondaryButton: {
value: '确认清空',
fontColor: '#ff6b6b',
action: () => {
this.clearAllData();
}
}
});
}
|
AST#method_declaration#Left private showClearDataDialog AST#parameter_list#Left ( ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right AST#builder_function_body#Left { AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AlertDialog AST#expression#Right . show AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left title AST#property_name#Right : AST#expression#Left '清空所有数据' AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left message AST#property_name#Right : AST#expression#Left '此操作将删除所有联系人、纪念日和祝福历史记录,且无法恢复。确定要继续吗?' AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left alignment AST#property_name#Right : AST#expression#Left AST#member_expression#Left AST#expression#Left DialogAlignment AST#expression#Right . Center AST#member_expression#Right AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left primaryButton AST#property_name#Right : AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left value AST#property_name#Right : AST#expression#Left '取消' AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left action AST#property_name#Right : AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( ) AST#parameter_list#Right => AST#expression#Left AST#object_literal#Left { // 取消操作 } AST#object_literal#Right AST#expression#Right AST#arrow_function#Right AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left secondaryButton AST#property_name#Right : AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left value AST#property_name#Right : AST#expression#Left '确认清空' AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left fontColor AST#property_name#Right : AST#expression#Left '#ff6b6b' AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left action AST#property_name#Right : AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( ) AST#parameter_list#Right => AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . clearAllData AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#arrow_function#Right AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right } AST#builder_function_body#Right AST#method_declaration#Right
|
private showClearDataDialog(): void {
AlertDialog.show({
title: '清空所有数据',
message: '此操作将删除所有联系人、纪念日和祝福历史记录,且无法恢复。确定要继续吗?',
alignment: DialogAlignment.Center,
primaryButton: {
value: '取消',
action: () => {
}
},
secondaryButton: {
value: '确认清空',
fontColor: '#ff6b6b',
action: () => {
this.clearAllData();
}
}
});
}
|
https://github.com/bigbear20240612/birthday_reminder.git/blob/647c411a6619affd42eb5d163ff18db4b34b27ff/entry/src/main/ets/pages/SettingsPage.ets#L106-L125
|
f33ae7918f5ded09899d415765397ccbe62675ec
|
github
|
openharmony/developtools_profiler
|
73d26bb5acfcafb2b1f4f94ead5640241d1e5f73
|
host/smartperf/client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/EntryOhos.ets
|
arkts
|
equalTo
|
Compares value, xIndex and data of the entries. Returns true if entries
are equal in those points, false if not. Does not check by hash-code like
it's done by the "equals" method.
@param e
@return
|
public equalTo(e: EntryOhos): boolean {
if (!e) {
return false;
}
if (e.getData() != this.getData()) {
return false;
}
if (Math.abs(e.x - this.x) > Utils.FLOAT_EPSILON) {
return false;
}
if (Math.abs(e.getY() - this.getY()) > Utils.FLOAT_EPSILON) {
return false;
}
return true;
}
|
AST#method_declaration#Left public equalTo AST#parameter_list#Left ( AST#parameter#Left e : AST#type_annotation#Left AST#primary_type#Left EntryOhos AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left boolean AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#if_statement#Left if ( AST#expression#Left AST#unary_expression#Left ! AST#expression#Left e AST#expression#Right AST#unary_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#boolean_literal#Left false AST#boolean_literal#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#if_statement#Right AST#statement#Right AST#statement#Left AST#if_statement#Left if ( AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left e AST#expression#Right . getData AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right != AST#expression#Left this AST#expression#Right AST#binary_expression#Right AST#expression#Right . getData AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#boolean_literal#Left false AST#boolean_literal#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#if_statement#Right AST#statement#Right AST#statement#Left AST#if_statement#Left if ( AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left Math AST#expression#Right . abs AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left e AST#expression#Right . x AST#member_expression#Right AST#expression#Right - AST#expression#Left this AST#expression#Right AST#binary_expression#Right AST#expression#Right . x AST#member_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right > AST#expression#Left Utils AST#expression#Right AST#binary_expression#Right AST#expression#Right . FLOAT_EPSILON AST#member_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#boolean_literal#Left false AST#boolean_literal#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#if_statement#Right AST#statement#Right AST#statement#Left AST#if_statement#Left if ( AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left Math AST#expression#Right . abs AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left e AST#expression#Right . getY AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right - AST#expression#Left this AST#expression#Right AST#binary_expression#Right AST#expression#Right . getY AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right > AST#expression#Left Utils AST#expression#Right AST#binary_expression#Right AST#expression#Right . FLOAT_EPSILON AST#member_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#boolean_literal#Left false AST#boolean_literal#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#if_statement#Right AST#statement#Right AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#boolean_literal#Left true AST#boolean_literal#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
public equalTo(e: EntryOhos): boolean {
if (!e) {
return false;
}
if (e.getData() != this.getData()) {
return false;
}
if (Math.abs(e.x - this.x) > Utils.FLOAT_EPSILON) {
return false;
}
if (Math.abs(e.getY() - this.getY()) > Utils.FLOAT_EPSILON) {
return false;
}
return true;
}
|
https://github.com/openharmony/developtools_profiler/blob/73d26bb5acfcafb2b1f4f94ead5640241d1e5f73/host/smartperf/client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/EntryOhos.ets#L69-L87
|
0d8cbb95bf716a8779a43dc709920d58a9c0ffb2
|
gitee
|
openharmony/codelabs
|
d899f32a52b2ae0dfdbb86e34e8d94645b5d4090
|
Distributed/DistributeDraw/entry/src/main/ets/viewmodel/KvStoreModel.ets
|
arkts
|
put
|
Add data to the distributed key-value database.
@param key Store key name.
@param value Store value.
|
put(key: string, value: string): void {
if (this.kvStore === undefined) {
return;
}
this.kvStore.put(key, value).then(() => {
Logger.info('KvStoreModel', `kvStore.put key=${key} finished}`);
}).catch((error: Error) => {
Logger.error('KvStoreModel',
`kvStore.put key=${key} failed, error=${JSON.stringify(error)}`);
});
}
|
AST#method_declaration#Left put AST#parameter_list#Left ( AST#parameter#Left key : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left value : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . kvStore AST#member_expression#Right AST#expression#Right === AST#expression#Left undefined AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#return_statement#Left return ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#if_statement#Right AST#statement#Right AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . kvStore AST#member_expression#Right AST#expression#Right . put AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left key AST#expression#Right , AST#expression#Left value AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right . then AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( ) AST#parameter_list#Right => AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left Logger AST#expression#Right . info AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left 'KvStoreModel' AST#expression#Right , AST#expression#Left AST#template_literal#Left ` kvStore.put key= AST#template_substitution#Left $ { AST#expression#Left key AST#expression#Right } AST#template_substitution#Right finished} ` AST#template_literal#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#arrow_function#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right . catch AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( AST#parameter#Left error : AST#type_annotation#Left AST#primary_type#Left Error AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right => AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left Logger AST#expression#Right . error AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left 'KvStoreModel' AST#expression#Right , AST#expression#Left AST#template_literal#Left ` kvStore.put key= AST#template_substitution#Left $ { AST#expression#Left key AST#expression#Right } AST#template_substitution#Right failed, error= AST#template_substitution#Left $ { AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left JSON AST#expression#Right . stringify AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left error AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right } AST#template_substitution#Right ` AST#template_literal#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#arrow_function#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
put(key: string, value: string): void {
if (this.kvStore === undefined) {
return;
}
this.kvStore.put(key, value).then(() => {
Logger.info('KvStoreModel', `kvStore.put key=${key} finished}`);
}).catch((error: Error) => {
Logger.error('KvStoreModel',
`kvStore.put key=${key} failed, error=${JSON.stringify(error)}`);
});
}
|
https://github.com/openharmony/codelabs/blob/d899f32a52b2ae0dfdbb86e34e8d94645b5d4090/Distributed/DistributeDraw/entry/src/main/ets/viewmodel/KvStoreModel.ets#L86-L97
|
e7a2f3c47e108ce40cfb852fda0a879bbe986b47
|
gitee
|
harmonyos-cases/cases
|
eccdb71f1cee10fa6ff955e16c454c1b59d3ae13
|
CommonAppDevelopment/feature/customview/src/main/ets/view/CustomView.ets
|
arkts
|
CustomView
|
实现步骤:
1. 页签实现:添加onClick方法,记录点击的index,index变化后,改变页签颜色、字体大小,使用animateTo方法实现页签切换动画
2. 内容区实现:使用List,添加滑动手势来进行页面的切换,手势响应后,使用scrollToIndex方法来实现平滑的滑动到相应index
|
@Component
export struct CustomView
{
// 当前选中的页签index
@State currentIndex: number = 0;
// 颜色条的偏移量
@State transitionX: number = 0;
// 即将前往的页签index
@State wantGoIndex: number = 0;
// 创建Scroller对象
scroller: Scroller = new Scroller();
// 页签显示数据
private titleArray: Array<string> = ['候补预测', '在线换座', '余票挖掘', '个人中心'];
build() {
Column() {
// 页签实现
DiscoverTopView({currentIndex: this.currentIndex, transitionX: this.transitionX,
wantGoIndex: this.wantGoIndex, scroller: this.scroller, titleArray: this.titleArray})
// 内容区域实现
DiscoverTabView({currentIndex: this.currentIndex, transitionX: this.transitionX,
wantGoIndex: this.wantGoIndex, scroller: this.scroller, titleArray: this.titleArray})
}
.width($r('app.string.custom_view_one_hundred_percent'))
.height($r('app.string.custom_view_one_hundred_percent'))
.justifyContent(FlexAlign.Center)
}
}
|
AST#decorated_export_declaration#Left AST#decorator#Left @ Component AST#decorator#Right export struct CustomView AST#component_body#Left { // 当前选中的页签index AST#property_declaration#Left AST#decorator#Left @ State AST#decorator#Right currentIndex : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left 0 AST#expression#Right ; AST#property_declaration#Right // 颜色条的偏移量 AST#property_declaration#Left AST#decorator#Left @ State AST#decorator#Right transitionX : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left 0 AST#expression#Right ; AST#property_declaration#Right // 即将前往的页签index AST#property_declaration#Left AST#decorator#Left @ State AST#decorator#Right wantGoIndex : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left 0 AST#expression#Right ; AST#property_declaration#Right // 创建Scroller对象 AST#property_declaration#Left scroller : AST#type_annotation#Left AST#primary_type#Left Scroller AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#new_expression#Left new AST#expression#Left Scroller AST#expression#Right AST#new_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#property_declaration#Right // 页签显示数据 AST#property_declaration#Left private titleArray : AST#type_annotation#Left AST#primary_type#Left AST#generic_type#Left Array AST#type_arguments#Left < AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right > AST#type_arguments#Right AST#generic_type#Right AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#array_literal#Left [ AST#expression#Left '候补预测' AST#expression#Right , AST#expression#Left '在线换座' AST#expression#Right , AST#expression#Left '余票挖掘' AST#expression#Right , AST#expression#Left '个人中心' AST#expression#Right ] AST#array_literal#Right AST#expression#Right ; AST#property_declaration#Right AST#build_method#Left build ( ) AST#build_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Column ( ) AST#container_content_body#Left { // 页签实现 AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left DiscoverTopView ( AST#component_parameters#Left { AST#component_parameter#Left currentIndex : AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . currentIndex AST#member_expression#Right AST#expression#Right AST#component_parameter#Right , AST#component_parameter#Left transitionX : AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . transitionX AST#member_expression#Right AST#expression#Right AST#component_parameter#Right , AST#component_parameter#Left wantGoIndex : AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . wantGoIndex AST#member_expression#Right AST#expression#Right AST#component_parameter#Right , AST#component_parameter#Left scroller : AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . scroller AST#member_expression#Right AST#expression#Right AST#component_parameter#Right , AST#component_parameter#Left titleArray : AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . titleArray AST#member_expression#Right AST#expression#Right AST#component_parameter#Right } AST#component_parameters#Right ) AST#ui_component#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right // 内容区域实现 AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left DiscoverTabView ( AST#component_parameters#Left { AST#component_parameter#Left currentIndex : AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . currentIndex AST#member_expression#Right AST#expression#Right AST#component_parameter#Right , AST#component_parameter#Left transitionX : AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . transitionX AST#member_expression#Right AST#expression#Right AST#component_parameter#Right , AST#component_parameter#Left wantGoIndex : AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . wantGoIndex AST#member_expression#Right AST#expression#Right AST#component_parameter#Right , AST#component_parameter#Left scroller : AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . scroller AST#member_expression#Right AST#expression#Right AST#component_parameter#Right , AST#component_parameter#Left titleArray : AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . titleArray AST#member_expression#Right AST#expression#Right AST#component_parameter#Right } AST#component_parameters#Right ) AST#ui_component#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#container_content_body#Right AST#ui_component#Right AST#modifier_chain_expression#Left . width ( AST#expression#Left AST#resource_expression#Left $r ( AST#expression#Left 'app.string.custom_view_one_hundred_percent' AST#expression#Right ) AST#resource_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Left . height ( AST#expression#Left AST#resource_expression#Left $r ( AST#expression#Left 'app.string.custom_view_one_hundred_percent' AST#expression#Right ) AST#resource_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Left . justifyContent ( AST#expression#Left AST#member_expression#Left AST#expression#Left FlexAlign AST#expression#Right . Center AST#member_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#build_body#Right AST#build_method#Right } AST#component_body#Right AST#decorated_export_declaration#Right
|
@Component
export struct CustomView
{
@State currentIndex: number = 0;
@State transitionX: number = 0;
@State wantGoIndex: number = 0;
scroller: Scroller = new Scroller();
private titleArray: Array<string> = ['候补预测', '在线换座', '余票挖掘', '个人中心'];
build() {
Column() {
DiscoverTopView({currentIndex: this.currentIndex, transitionX: this.transitionX,
wantGoIndex: this.wantGoIndex, scroller: this.scroller, titleArray: this.titleArray})
DiscoverTabView({currentIndex: this.currentIndex, transitionX: this.transitionX,
wantGoIndex: this.wantGoIndex, scroller: this.scroller, titleArray: this.titleArray})
}
.width($r('app.string.custom_view_one_hundred_percent'))
.height($r('app.string.custom_view_one_hundred_percent'))
.justifyContent(FlexAlign.Center)
}
}
|
https://github.com/harmonyos-cases/cases/blob/eccdb71f1cee10fa6ff955e16c454c1b59d3ae13/CommonAppDevelopment/feature/customview/src/main/ets/view/CustomView.ets#L23-L50
|
6a1728ee8de7b89478004c40fa9baaae99795423
|
gitee
|
openharmony-tpc/ohos_mpchart
|
4fb43a7137320ef2fee2634598f53d93975dfb4a
|
library/src/main/ets/components/components/AxisBase.ets
|
arkts
|
getSpaceMax
|
Gets extra spacing for `axisMaximum` to be added to automatically calculated `axisMaximum`
|
public getSpaceMax(): number {
return this.mSpaceMax;
}
|
AST#method_declaration#Left public getSpaceMax AST#parameter_list#Left ( ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . mSpaceMax AST#member_expression#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
public getSpaceMax(): number {
return this.mSpaceMax;
}
|
https://github.com/openharmony-tpc/ohos_mpchart/blob/4fb43a7137320ef2fee2634598f53d93975dfb4a/library/src/main/ets/components/components/AxisBase.ets#L816-L818
|
353a862d769674975397b7dd12d36d80f9bd0e95
|
gitee
|
open9527/OpenHarmony
|
fdea69ed722d426bf04e817ec05bff4002e81a4e
|
libs/core/src/main/ets/utils/DateUtils.ets
|
arkts
|
getAmountDayStr
|
获取前几天日期或后几天日期,返回字符串
@param date
@param amount 进行加减操作的具体数值。
|
static getAmountDayStr(date: number | string | Date, amount: number, format: string = DATE_FORMAT4): string {
return DateUtils.getFormatDateStr(DateUtils.getAmountDay(date, amount), format);
}
|
AST#method_declaration#Left static getAmountDayStr AST#parameter_list#Left ( AST#parameter#Left date : AST#type_annotation#Left AST#union_type#Left AST#primary_type#Left number AST#primary_type#Right | AST#primary_type#Left string AST#primary_type#Right | AST#primary_type#Left Date AST#primary_type#Right AST#union_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left amount : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left format : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left DATE_FORMAT4 AST#expression#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left DateUtils AST#expression#Right . getFormatDateStr AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left DateUtils AST#expression#Right . getAmountDay AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left date AST#expression#Right , AST#expression#Left amount AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right , AST#expression#Left format AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
static getAmountDayStr(date: number | string | Date, amount: number, format: string = DATE_FORMAT4): string {
return DateUtils.getFormatDateStr(DateUtils.getAmountDay(date, amount), format);
}
|
https://github.com/open9527/OpenHarmony/blob/fdea69ed722d426bf04e817ec05bff4002e81a4e/libs/core/src/main/ets/utils/DateUtils.ets#L270-L272
|
e52dd12a7c48bd39e997ca6f1c1bf6020c4745bc
|
gitee
|
JHB11Hinson/mineMointorAPP.git
|
b6b853cf534021ac39e66c9b3a35113896a272b2
|
entry/src/main/ets/view/dust/DustMonitorCard.ets
|
arkts
|
getPm25Color
|
辅助函数:根据PM2.5值返回颜色
|
private getPm25Color(pm25: number): string {
if (pm25 > 150) return '#FF4D4F'; // 红色:重度污染
if (pm25 > 75) return '#FAAD14'; // 黄色:中度污染
if (pm25 > 35) return '#FADB14'; // 浅黄色:轻度污染
return '#52C41A'; // 绿色:良好
}
|
AST#method_declaration#Left private getPm25Color AST#parameter_list#Left ( AST#parameter#Left pm25 : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left pm25 AST#expression#Right > AST#expression#Left 150 AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#statement#Left AST#return_statement#Left return AST#expression#Left '#FF4D4F' AST#expression#Right ; AST#return_statement#Right AST#statement#Right AST#if_statement#Right AST#statement#Right // 红色:重度污染 AST#statement#Left AST#if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left pm25 AST#expression#Right > AST#expression#Left 75 AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#statement#Left AST#return_statement#Left return AST#expression#Left '#FAAD14' AST#expression#Right ; AST#return_statement#Right AST#statement#Right AST#if_statement#Right AST#statement#Right // 黄色:中度污染 AST#statement#Left AST#if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left pm25 AST#expression#Right > AST#expression#Left 35 AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#statement#Left AST#return_statement#Left return AST#expression#Left '#FADB14' AST#expression#Right ; AST#return_statement#Right AST#statement#Right AST#if_statement#Right AST#statement#Right // 浅黄色:轻度污染 AST#statement#Left AST#return_statement#Left return AST#expression#Left '#52C41A' AST#expression#Right ; AST#return_statement#Right AST#statement#Right // 绿色:良好 } AST#block_statement#Right AST#method_declaration#Right
|
private getPm25Color(pm25: number): string {
if (pm25 > 150) return '#FF4D4F';
if (pm25 > 75) return '#FAAD14';
if (pm25 > 35) return '#FADB14';
return '#52C41A';
}
|
https://github.com/JHB11Hinson/mineMointorAPP.git/blob/b6b853cf534021ac39e66c9b3a35113896a272b2/entry/src/main/ets/view/dust/DustMonitorCard.ets#L147-L152
|
b2b61028c3b22f61a262e6ff28a7c6cc8c860571
|
github
|
harmonyos-cases/cases
|
eccdb71f1cee10fa6ff955e16c454c1b59d3ae13
|
CommonAppDevelopment/feature/secondarylinkage/src/main/ets/pages/DataType.ets
|
arkts
|
getData
|
获取指定索引数据。
@param {number} index - 索引值。
@returns {CustomDataType} 返回指定索引数据。
|
public getData(index: number): CustomDataType {
return this.originDataArray[index];
}
|
AST#method_declaration#Left public getData AST#parameter_list#Left ( AST#parameter#Left index : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left CustomDataType AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#subscript_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . originDataArray AST#member_expression#Right AST#expression#Right [ AST#expression#Left index AST#expression#Right ] AST#subscript_expression#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
public getData(index: number): CustomDataType {
return this.originDataArray[index];
}
|
https://github.com/harmonyos-cases/cases/blob/eccdb71f1cee10fa6ff955e16c454c1b59d3ae13/CommonAppDevelopment/feature/secondarylinkage/src/main/ets/pages/DataType.ets#L63-L65
|
41ed4c113911c4d499ba7d3ee8dac952acbb511f
|
gitee
|
Joker-x-dev/HarmonyKit.git
|
f97197ce157df7f303244fba42e34918306dfb08
|
core/model/src/main/ets/entity/User.ets
|
arkts
|
fromResponse
|
从接口响应构建安全的用户对象
@param {Partial<User>} data - 新的用户数据
@returns {User} 用户对象
|
static fromResponse(data: Partial<User>): User {
return new User(data);
}
|
AST#method_declaration#Left static fromResponse AST#parameter_list#Left ( AST#parameter#Left data : AST#type_annotation#Left AST#primary_type#Left AST#generic_type#Left Partial AST#type_arguments#Left < AST#type_annotation#Left AST#primary_type#Left User AST#primary_type#Right AST#type_annotation#Right > AST#type_arguments#Right AST#generic_type#Right AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left User AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#call_expression#Left AST#expression#Left AST#new_expression#Left new AST#expression#Left User AST#expression#Right AST#new_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left data AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
static fromResponse(data: Partial<User>): User {
return new User(data);
}
|
https://github.com/Joker-x-dev/HarmonyKit.git/blob/f97197ce157df7f303244fba42e34918306dfb08/core/model/src/main/ets/entity/User.ets#L77-L79
|
6d1e6592de13d140a1e7a319d4e83bc501321ce4
|
github
|
openharmony/codelabs
|
d899f32a52b2ae0dfdbb86e34e8d94645b5d4090
|
ExcellentCase/Healthy_life/entry/src/main/ets/viewmodel/CalendarViewModel.ets
|
arkts
|
lazy page number
|
export interface ScrollPage {
next: boolean;
direction?: Axis;
}
|
AST#export_declaration#Left export AST#interface_declaration#Left interface ScrollPage AST#object_type#Left { AST#type_member#Left next : AST#type_annotation#Left AST#primary_type#Left boolean AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; AST#type_member#Left direction ? : AST#type_annotation#Left AST#primary_type#Left Axis AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; } AST#object_type#Right AST#interface_declaration#Right AST#export_declaration#Right
|
export interface ScrollPage {
next: boolean;
direction?: Axis;
}
|
https://github.com/openharmony/codelabs/blob/d899f32a52b2ae0dfdbb86e34e8d94645b5d4090/ExcellentCase/Healthy_life/entry/src/main/ets/viewmodel/CalendarViewModel.ets#L24-L27
|
dcfc5de18b5870bf54e56fe6ad595e7cff224340
|
gitee
|
|
openharmony/applications_app_samples
|
a826ab0e75fe51d028c1c5af58188e908736b53b
|
code/DocsSample/CoreFile/SandBoxShare/entry/src/main/ets/fileFs/FileFs.ets
|
arkts
|
读取文件内容
|
export function readFile(fileName: string): string {
let file = fs.openSync(filesDir + '/' + fileName + '.txt', fs.OpenMode.READ_WRITE);
// 创建一个大小为1024字节的ArrayBuffer对象,用于存储从文件中读取的数据
let arrayBuffer = new ArrayBuffer(1024);
let readOptions: ReadOptions = {
offset: 0, // 从文件的开头开始读取
length: arrayBuffer.byteLength
};
let readLen = fs.readSync(file.fd, arrayBuffer, readOptions);
let buf = buffer.from(arrayBuffer, 0, readLen); // 这个 Buffer 对象是 arrayBuffer 中从位置 0 开始的前 readLen 字节
Logger.info('the content of file: ' + buf.toString());
// 关闭文件
let str = 'the content of file: ' + buf.toString();
fs.closeSync(file);
return str;
}
|
AST#export_declaration#Left export AST#function_declaration#Left function readFile AST#parameter_list#Left ( AST#parameter#Left fileName : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left file = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left fs AST#expression#Right . openSync AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left filesDir AST#expression#Right + AST#expression#Left '/' AST#expression#Right AST#binary_expression#Right AST#expression#Right + AST#expression#Left fileName AST#expression#Right AST#binary_expression#Right AST#expression#Right + AST#expression#Left '.txt' AST#expression#Right AST#binary_expression#Right AST#expression#Right , AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left fs AST#expression#Right . OpenMode AST#member_expression#Right AST#expression#Right . READ_WRITE AST#member_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right // 创建一个大小为1024字节的ArrayBuffer对象,用于存储从文件中读取的数据 AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left arrayBuffer = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#new_expression#Left new AST#expression#Left ArrayBuffer AST#expression#Right AST#new_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left 1024 AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left readOptions : AST#type_annotation#Left AST#primary_type#Left ReadOptions AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left offset AST#property_name#Right : AST#expression#Left 0 AST#expression#Right AST#property_assignment#Right , // 从文件的开头开始读取 AST#property_assignment#Left AST#property_name#Left length AST#property_name#Right : AST#expression#Left AST#member_expression#Left AST#expression#Left arrayBuffer AST#expression#Right . byteLength AST#member_expression#Right AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left readLen = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left fs AST#expression#Right . readSync AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#member_expression#Left AST#expression#Left file AST#expression#Right . fd AST#member_expression#Right AST#expression#Right , AST#expression#Left arrayBuffer AST#expression#Right , AST#expression#Left readOptions AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left buf = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left buffer AST#expression#Right . from AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left arrayBuffer AST#expression#Right , AST#expression#Left 0 AST#expression#Right , AST#expression#Left readLen AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right // 这个 Buffer 对象是 arrayBuffer 中从位置 0 开始的前 readLen 字节 AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left Logger AST#expression#Right . info AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left 'the content of file: ' AST#expression#Right + AST#expression#Left buf AST#expression#Right AST#binary_expression#Right AST#expression#Right . toString AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right // 关闭文件 AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left str = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left 'the content of file: ' AST#expression#Right + AST#expression#Left buf AST#expression#Right AST#binary_expression#Right AST#expression#Right . toString AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left fs AST#expression#Right . closeSync AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left file AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right AST#statement#Left AST#return_statement#Left return AST#expression#Left str AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#function_declaration#Right AST#export_declaration#Right
|
export function readFile(fileName: string): string {
let file = fs.openSync(filesDir + '/' + fileName + '.txt', fs.OpenMode.READ_WRITE);
let arrayBuffer = new ArrayBuffer(1024);
let readOptions: ReadOptions = {
offset: 0,
length: arrayBuffer.byteLength
};
let readLen = fs.readSync(file.fd, arrayBuffer, readOptions);
let buf = buffer.from(arrayBuffer, 0, readLen);
Logger.info('the content of file: ' + buf.toString());
let str = 'the content of file: ' + buf.toString();
fs.closeSync(file);
return str;
}
|
https://github.com/openharmony/applications_app_samples/blob/a826ab0e75fe51d028c1c5af58188e908736b53b/code/DocsSample/CoreFile/SandBoxShare/entry/src/main/ets/fileFs/FileFs.ets#L69-L84
|
6fcc71403d22b3cc318b26098e21f27f4f20e1fa
|
gitee
|
|
openharmony/applications_app_samples
|
a826ab0e75fe51d028c1c5af58188e908736b53b
|
code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/drag/DefaultDrag.ets
|
arkts
|
PreDragChange
|
[End generate_pix_map] 长按50ms时提前准备自定义截图的pixmap
|
private PreDragChange(preDragStatus: PreDragStatus): void {
if (preDragStatus == PreDragStatus.ACTION_DETECTING_STATUS) {
this.getComponentSnapshot();
}
}
|
AST#method_declaration#Left private PreDragChange AST#parameter_list#Left ( AST#parameter#Left preDragStatus : AST#type_annotation#Left AST#primary_type#Left PreDragStatus AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right AST#builder_function_body#Left { AST#ui_control_flow#Left AST#ui_if_statement#Left if ( AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left preDragStatus AST#expression#Right == AST#expression#Left PreDragStatus AST#expression#Right AST#binary_expression#Right AST#expression#Right . ACTION_DETECTING_STATUS AST#member_expression#Right AST#expression#Right ) { AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . getComponentSnapshot AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right } AST#ui_if_statement#Right AST#ui_control_flow#Right } AST#builder_function_body#Right AST#method_declaration#Right
|
private PreDragChange(preDragStatus: PreDragStatus): void {
if (preDragStatus == PreDragStatus.ACTION_DETECTING_STATUS) {
this.getComponentSnapshot();
}
}
|
https://github.com/openharmony/applications_app_samples/blob/a826ab0e75fe51d028c1c5af58188e908736b53b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/drag/DefaultDrag.ets#L90-L94
|
0a0a45d7d8bbc3a4ee453b7c9939c4d4917ff671
|
gitee
|
harmonyos-cases/cases
|
eccdb71f1cee10fa6ff955e16c454c1b59d3ae13
|
CommonAppDevelopment/common/routermodule/src/main/ets/model/AppRouterInfo.ets
|
arkts
|
路由信息
|
export interface AppRouterInfo {
name: string;
pageModule: string;
registerFunction?: string;
pageSourceFile?: string;
}
|
AST#export_declaration#Left export AST#interface_declaration#Left interface AppRouterInfo AST#object_type#Left { AST#type_member#Left name : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; AST#type_member#Left pageModule : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; AST#type_member#Left registerFunction ? : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; AST#type_member#Left pageSourceFile ? : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; } AST#object_type#Right AST#interface_declaration#Right AST#export_declaration#Right
|
export interface AppRouterInfo {
name: string;
pageModule: string;
registerFunction?: string;
pageSourceFile?: string;
}
|
https://github.com/harmonyos-cases/cases/blob/eccdb71f1cee10fa6ff955e16c454c1b59d3ae13/CommonAppDevelopment/common/routermodule/src/main/ets/model/AppRouterInfo.ets#L16-L21
|
c201e4e55e1cfe4540e3a8e80104bf13cfdba089
|
gitee
|
|
conrad_sheeran/TickAuth
|
8ef852e12999d15cf70394cdab82d08ac5843143
|
features/homepage/src/main/ets/common/Constants.ets
|
arkts
|
Copyright (c) 2024 Yang He
TickAuth is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
export class Constants {
static readonly DOMAIN: number = 0x00201;
static readonly SECRET_FILE_DIR: string = "/secret.json";
static readonly HOMEPAGE_SIZE: string = "100%";
static readonly TOTPVIEW_LIST_SIZE: string = "100%";
static readonly TOTPVIEW_LIST_SPACE: number = 12;
static readonly TOTPVIEW_LISTITEM_MAXLINE: number = 1;
static readonly TOTPVIEW_LISTITEM_TOTP_WIDTH: string = "50%";
static readonly TOTPVIEW_LISTITEM_TOTP_HEIGHT: string = "50%";
static readonly TOTPVIEW_LISTITEM_WIDTH: string = "100%";
static readonly TOTPVIEW_LISTITEM_HEIGHT: string = "13.5%";
static readonly NOKEYINJSON_IMAGE_MARGIN: string = "7%";
static readonly ANIMATION_DURING: number = 500;
static readonly IMPORTANDEXPORT_ITEM_MARGIN: string = "12%";
static readonly IMPORTANDEXPORT_ITEM_WIDTH: string = "80%";
static readonly IMPORTANDEXPORT_SIZE: string = "100%";
}
|
AST#export_declaration#Left export AST#class_declaration#Left class Constants AST#class_body#Left { AST#property_declaration#Left static readonly DOMAIN : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left 0x00201 AST#expression#Right ; AST#property_declaration#Right AST#property_declaration#Left static readonly SECRET_FILE_DIR : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left "/secret.json" AST#expression#Right ; AST#property_declaration#Right AST#property_declaration#Left static readonly HOMEPAGE_SIZE : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left "100%" AST#expression#Right ; AST#property_declaration#Right AST#property_declaration#Left static readonly TOTPVIEW_LIST_SIZE : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left "100%" AST#expression#Right ; AST#property_declaration#Right AST#property_declaration#Left static readonly TOTPVIEW_LIST_SPACE : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left 12 AST#expression#Right ; AST#property_declaration#Right AST#property_declaration#Left static readonly TOTPVIEW_LISTITEM_MAXLINE : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left 1 AST#expression#Right ; AST#property_declaration#Right AST#property_declaration#Left static readonly TOTPVIEW_LISTITEM_TOTP_WIDTH : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left "50%" AST#expression#Right ; AST#property_declaration#Right AST#property_declaration#Left static readonly TOTPVIEW_LISTITEM_TOTP_HEIGHT : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left "50%" AST#expression#Right ; AST#property_declaration#Right AST#property_declaration#Left static readonly TOTPVIEW_LISTITEM_WIDTH : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left "100%" AST#expression#Right ; AST#property_declaration#Right AST#property_declaration#Left static readonly TOTPVIEW_LISTITEM_HEIGHT : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left "13.5%" AST#expression#Right ; AST#property_declaration#Right AST#property_declaration#Left static readonly NOKEYINJSON_IMAGE_MARGIN : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left "7%" AST#expression#Right ; AST#property_declaration#Right AST#property_declaration#Left static readonly ANIMATION_DURING : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left 500 AST#expression#Right ; AST#property_declaration#Right AST#property_declaration#Left static readonly IMPORTANDEXPORT_ITEM_MARGIN : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left "12%" AST#expression#Right ; AST#property_declaration#Right AST#property_declaration#Left static readonly IMPORTANDEXPORT_ITEM_WIDTH : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left "80%" AST#expression#Right ; AST#property_declaration#Right AST#property_declaration#Left static readonly IMPORTANDEXPORT_SIZE : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left "100%" AST#expression#Right ; AST#property_declaration#Right } AST#class_body#Right AST#class_declaration#Right AST#export_declaration#Right
|
export class Constants {
static readonly DOMAIN: number = 0x00201;
static readonly SECRET_FILE_DIR: string = "/secret.json";
static readonly HOMEPAGE_SIZE: string = "100%";
static readonly TOTPVIEW_LIST_SIZE: string = "100%";
static readonly TOTPVIEW_LIST_SPACE: number = 12;
static readonly TOTPVIEW_LISTITEM_MAXLINE: number = 1;
static readonly TOTPVIEW_LISTITEM_TOTP_WIDTH: string = "50%";
static readonly TOTPVIEW_LISTITEM_TOTP_HEIGHT: string = "50%";
static readonly TOTPVIEW_LISTITEM_WIDTH: string = "100%";
static readonly TOTPVIEW_LISTITEM_HEIGHT: string = "13.5%";
static readonly NOKEYINJSON_IMAGE_MARGIN: string = "7%";
static readonly ANIMATION_DURING: number = 500;
static readonly IMPORTANDEXPORT_ITEM_MARGIN: string = "12%";
static readonly IMPORTANDEXPORT_ITEM_WIDTH: string = "80%";
static readonly IMPORTANDEXPORT_SIZE: string = "100%";
}
|
https://github.com/conrad_sheeran/TickAuth/blob/8ef852e12999d15cf70394cdab82d08ac5843143/features/homepage/src/main/ets/common/Constants.ets#L18-L48
|
2f92735409173bd4496fc7662b44ea2bf41d2113
|
gitee
|
|
harmonyos-cases/cases
|
eccdb71f1cee10fa6ff955e16c454c1b59d3ae13
|
CommonAppDevelopment/feature/mapthumbtack/src/main/ets/components/ThumbTackComponent.ets
|
arkts
|
createVerticalPostAnimation
|
创建大头针针杆动画
|
createVerticalPostAnimation() {
// 创建针杆位置偏移动画
this.postOffsetAnimator = animator.create({
// 100, 大头针针尖位置偏移动画持续时间100ms
duration: 100,
easing: 'fast-out-slow-in',
// 200, 动画延时200ms执行
delay: 200,
fill: 'forwards',
direction: 'alternate',
iterations: 2,
begin: 0,
end: this.thumbTackWidth * ThumbTackCommonConstants.TACK_POST_ANIMATION_OFFSET_RATIO
})
this.postOffsetAnimator.onFinish = () => {
// 5, 动画结束,延时5ms停止动画
setTimeout(() => {
this.postOffsetAnimator.cancel();
}, 5);
}
this.postOffsetAnimator.onCancel = () => {
this.tackPostOffset = 0;
}
this.postOffsetAnimator.onFrame = (value) => {
this.tackPostOffset = value;
}
// 创建针杆长度变化动画
this.postHeightAnimator = animator.create({
// 大头针针柄长度动画持续200ms
duration: 200,
easing: 'fast-out-slow-in',
delay: 0,
fill: 'forwards',
direction: 'alternate',
iterations: 2,
begin: this.thumbTackWidth * ThumbTackCommonConstants.TACK_POST_HEIGHT_RATIO,
end: this.thumbTackWidth * ThumbTackCommonConstants.TACK_POST_ANIMATION_HEIGHT_RATIO
})
this.postHeightAnimator.onFinish = () => {
// 5, 动画结束,延时5ms停止动画
this.animationFinishCallback();
setTimeout(() => {
this.postHeightAnimator.cancel();
}, 5);
}
this.postHeightAnimator.onCancel = () => {
this.tackPostHeight = this.thumbTackWidth * ThumbTackCommonConstants.TACK_POST_HEIGHT_RATIO;
}
this.postHeightAnimator.onFrame = (value) => {
this.tackPostHeight = value;
}
}
|
AST#method_declaration#Left createVerticalPostAnimation AST#parameter_list#Left ( ) AST#parameter_list#Right AST#builder_function_body#Left { // 创建针杆位置偏移动画 AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . postOffsetAnimator AST#member_expression#Right = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left animator AST#expression#Right . create AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#object_literal#Left { // 100, 大头针针尖位置偏移动画持续时间100ms AST#property_assignment#Left AST#property_name#Left duration AST#property_name#Right : AST#expression#Left 100 AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left easing AST#property_name#Right : AST#expression#Left 'fast-out-slow-in' AST#expression#Right AST#property_assignment#Right , // 200, 动画延时200ms执行 AST#property_assignment#Left AST#property_name#Left delay AST#property_name#Right : AST#expression#Left 200 AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left fill AST#property_name#Right : AST#expression#Left 'forwards' AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left direction AST#property_name#Right : AST#expression#Left 'alternate' AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left iterations AST#property_name#Right : AST#expression#Left 2 AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left begin AST#property_name#Right : AST#expression#Left 0 AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left end AST#property_name#Right : AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . thumbTackWidth AST#member_expression#Right AST#expression#Right * AST#expression#Left ThumbTackCommonConstants AST#expression#Right AST#binary_expression#Right AST#expression#Right . TACK_POST_ANIMATION_OFFSET_RATIO AST#member_expression#Right AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right AST#expression_statement#Right AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . postOffsetAnimator AST#member_expression#Right AST#expression#Right . onFinish AST#member_expression#Right = AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( ) AST#parameter_list#Right => AST#block_statement#Left { // 5, 动画结束,延时5ms停止动画 AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left setTimeout AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( ) AST#parameter_list#Right => AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . postOffsetAnimator AST#member_expression#Right AST#expression#Right . cancel AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#arrow_function#Right AST#expression#Right , AST#expression#Left 5 AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#arrow_function#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right AST#expression_statement#Right AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . postOffsetAnimator AST#member_expression#Right AST#expression#Right . onCancel AST#member_expression#Right = AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( ) AST#parameter_list#Right => AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . tackPostOffset AST#member_expression#Right = AST#expression#Left 0 AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#arrow_function#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right AST#expression_statement#Right AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . postOffsetAnimator AST#member_expression#Right AST#expression#Right . onFrame AST#member_expression#Right = AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( AST#parameter#Left value AST#parameter#Right ) AST#parameter_list#Right => AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . tackPostOffset AST#member_expression#Right = AST#expression#Left value AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#arrow_function#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right AST#expression_statement#Right // 创建针杆长度变化动画 AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . postHeightAnimator AST#member_expression#Right = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left animator AST#expression#Right . create AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#object_literal#Left { // 大头针针柄长度动画持续200ms AST#property_assignment#Left AST#property_name#Left duration AST#property_name#Right : AST#expression#Left 200 AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left easing AST#property_name#Right : AST#expression#Left 'fast-out-slow-in' AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left delay AST#property_name#Right : AST#expression#Left 0 AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left fill AST#property_name#Right : AST#expression#Left 'forwards' AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left direction AST#property_name#Right : AST#expression#Left 'alternate' AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left iterations AST#property_name#Right : AST#expression#Left 2 AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left begin AST#property_name#Right : AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . thumbTackWidth AST#member_expression#Right AST#expression#Right * AST#expression#Left ThumbTackCommonConstants AST#expression#Right AST#binary_expression#Right AST#expression#Right . TACK_POST_HEIGHT_RATIO AST#member_expression#Right AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left end AST#property_name#Right : AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . thumbTackWidth AST#member_expression#Right AST#expression#Right * AST#expression#Left ThumbTackCommonConstants AST#expression#Right AST#binary_expression#Right AST#expression#Right . TACK_POST_ANIMATION_HEIGHT_RATIO AST#member_expression#Right AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right AST#expression_statement#Right AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . postHeightAnimator AST#member_expression#Right AST#expression#Right . onFinish AST#member_expression#Right = AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( ) AST#parameter_list#Right => AST#block_statement#Left { // 5, 动画结束,延时5ms停止动画 AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . animationFinishCallback AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left setTimeout AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( ) AST#parameter_list#Right => AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . postHeightAnimator AST#member_expression#Right AST#expression#Right . cancel AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#arrow_function#Right AST#expression#Right , AST#expression#Left 5 AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#arrow_function#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right AST#expression_statement#Right AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . postHeightAnimator AST#member_expression#Right AST#expression#Right . onCancel AST#member_expression#Right = AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( ) AST#parameter_list#Right => AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . tackPostHeight AST#member_expression#Right = AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . thumbTackWidth AST#member_expression#Right AST#expression#Right * AST#expression#Left ThumbTackCommonConstants AST#expression#Right AST#binary_expression#Right AST#expression#Right . TACK_POST_HEIGHT_RATIO AST#member_expression#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#arrow_function#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right AST#expression_statement#Right AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . postHeightAnimator AST#member_expression#Right AST#expression#Right . onFrame AST#member_expression#Right = AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( AST#parameter#Left value AST#parameter#Right ) AST#parameter_list#Right => AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . tackPostHeight AST#member_expression#Right = AST#expression#Left value AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#arrow_function#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right AST#expression_statement#Right } AST#builder_function_body#Right AST#method_declaration#Right
|
createVerticalPostAnimation() {
this.postOffsetAnimator = animator.create({
duration: 100,
easing: 'fast-out-slow-in',
delay: 200,
fill: 'forwards',
direction: 'alternate',
iterations: 2,
begin: 0,
end: this.thumbTackWidth * ThumbTackCommonConstants.TACK_POST_ANIMATION_OFFSET_RATIO
})
this.postOffsetAnimator.onFinish = () => {
setTimeout(() => {
this.postOffsetAnimator.cancel();
}, 5);
}
this.postOffsetAnimator.onCancel = () => {
this.tackPostOffset = 0;
}
this.postOffsetAnimator.onFrame = (value) => {
this.tackPostOffset = value;
}
this.postHeightAnimator = animator.create({
duration: 200,
easing: 'fast-out-slow-in',
delay: 0,
fill: 'forwards',
direction: 'alternate',
iterations: 2,
begin: this.thumbTackWidth * ThumbTackCommonConstants.TACK_POST_HEIGHT_RATIO,
end: this.thumbTackWidth * ThumbTackCommonConstants.TACK_POST_ANIMATION_HEIGHT_RATIO
})
this.postHeightAnimator.onFinish = () => {
this.animationFinishCallback();
setTimeout(() => {
this.postHeightAnimator.cancel();
}, 5);
}
this.postHeightAnimator.onCancel = () => {
this.tackPostHeight = this.thumbTackWidth * ThumbTackCommonConstants.TACK_POST_HEIGHT_RATIO;
}
this.postHeightAnimator.onFrame = (value) => {
this.tackPostHeight = value;
}
}
|
https://github.com/harmonyos-cases/cases/blob/eccdb71f1cee10fa6ff955e16c454c1b59d3ae13/CommonAppDevelopment/feature/mapthumbtack/src/main/ets/components/ThumbTackComponent.ets#L56-L111
|
e96d8faa89647d3c6be5dedc2ba64af925f351e1
|
gitee
|
tongyuyan/harmony-utils
|
697472f011a43e783eeefaa28ef9d713c4171726
|
harmony_utils/src/main/ets/entity/constraint.ets
|
arkts
|
2025/01/05 14
|
export const DATE_FORMAT10: string = "yyyy/MM/dd";
|
AST#export_declaration#Left export AST#variable_declaration#Left const AST#variable_declarator#Left DATE_FORMAT10 : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left "yyyy/MM/dd" AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#export_declaration#Right
|
export const DATE_FORMAT10: string = "yyyy/MM/dd";
|
https://github.com/tongyuyan/harmony-utils/blob/697472f011a43e783eeefaa28ef9d713c4171726/harmony_utils/src/main/ets/entity/constraint.ets#L22-L22
|
9316e32b3d20f10157ce2fc4152b998d8afaa339
|
gitee
|
|
yycy134679/FoodieHarmony.git
|
e6971f0a8f7574ae278d02eb5c057e57e667dab5
|
entry/src/main/ets/view/common/index.ets
|
arkts
|
MerchantCard
|
通用组件导出
|
export { MerchantCard } from './MerchantCard';
|
AST#export_declaration#Left export { MerchantCard } from './MerchantCard' ; AST#export_declaration#Right
|
export { MerchantCard } from './MerchantCard';
|
https://github.com/yycy134679/FoodieHarmony.git/blob/e6971f0a8f7574ae278d02eb5c057e57e667dab5/entry/src/main/ets/view/common/index.ets#L5-L5
|
0325a6bebc68e17e9aded972c67ed81c4ad8f1b8
|
github
|
bigbear20240612/birthday_reminder.git
|
647c411a6619affd42eb5d163ff18db4b34b27ff
|
entry/src/main/ets/common/utils/LunarCalendar.ets
|
arkts
|
农历计算系统 v3.0
基于权威天文数据和算法实现
支持1900-2100年完整农历公历转换
包含传统节日、闰月处理、二十四节气
农历年份配置接口
|
export interface LunarYearConfig {
year: number;
months: number[]; // 各月天数
leapMonth: number; // 闰月月份,0表示无闰月
leapMonthDays: number; // 闰月天数
springFestivalDate: string; // 春节公历日期 (MM-DD格式)
totalDays: number; // 该农历年总天数
}
|
AST#export_declaration#Left export AST#interface_declaration#Left interface LunarYearConfig AST#object_type#Left { AST#type_member#Left year : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; AST#type_member#Left months : AST#type_annotation#Left AST#primary_type#Left AST#array_type#Left number [ ] AST#array_type#Right AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; // 各月天数 AST#type_member#Left leapMonth : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; // 闰月月份,0表示无闰月 AST#type_member#Left leapMonthDays : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; // 闰月天数 AST#type_member#Left springFestivalDate : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; // 春节公历日期 (MM-DD格式) AST#type_member#Left totalDays : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; // 该农历年总天数 } AST#object_type#Right AST#interface_declaration#Right AST#export_declaration#Right
|
export interface LunarYearConfig {
year: number;
months: number[];
leapMonth: number;
leapMonthDays: number;
springFestivalDate: string;
totalDays: number;
}
|
https://github.com/bigbear20240612/birthday_reminder.git/blob/647c411a6619affd42eb5d163ff18db4b34b27ff/entry/src/main/ets/common/utils/LunarCalendar.ets#L11-L18
|
0a5b620be7042a92e1b3dd9477f3f7519905d7d8
|
github
|
|
openharmony/interface_sdk-js
|
c349adc73e2ec1f61f6fca489b5af059e3ed6999
|
api/@ohos.app.appstartup.StartupTask.d.ets
|
arkts
|
onDependencyCompleted
|
Called when specific dependent task complete.
@param { string } dependency - Indicates name of specific dependent startup task.
@param { Object } result - Indicates result of specific dependent startup task.
@syscap SystemCapability.Ability.AppStartup
@stagemodelonly
@since 12
|
onDependencyCompleted?(dependency: string, result: Object): void;
|
AST#method_declaration#Left onDependencyCompleted AST#ERROR#Left ? AST#ERROR#Right AST#parameter_list#Left ( AST#parameter#Left dependency : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left result : AST#type_annotation#Left AST#primary_type#Left Object AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right ; AST#method_declaration#Right
|
onDependencyCompleted?(dependency: string, result: Object): void;
|
https://github.com/openharmony/interface_sdk-js/blob/c349adc73e2ec1f61f6fca489b5af059e3ed6999/api/@ohos.app.appstartup.StartupTask.d.ets#L41-L41
|
c9aa51675f0fa8179a1cb91336406484e6fd9b4b
|
gitee
|
ThePivotPoint/ArkTS-LSP-Server-Plugin.git
|
6231773905435f000d00d94b26504433082ba40b
|
packages/declarations/ets/api/@ohos.atomicservice.AtomicServiceWeb.d.ets
|
arkts
|
Defines the Web's request/response header.
@typedef WebHeader
@syscap SystemCapability.ArkUI.ArkUI.Full
@atomicservice
@since 12
|
export declare interface WebHeader {
/**
* Gets the key of the request/response header.
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 12
*/
headerKey: string;
/**
* Gets the value of the request/response header.
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 12
*/
headerValue: string;
}
|
AST#export_declaration#Left export AST#ERROR#Left declare AST#ERROR#Right AST#interface_declaration#Left interface WebHeader AST#object_type#Left { /**
* Gets the key of the request/response header.
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 12
*/ AST#type_member#Left headerKey : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; /**
* Gets the value of the request/response header.
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 12
*/ AST#type_member#Left headerValue : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; } AST#object_type#Right AST#interface_declaration#Right AST#export_declaration#Right
|
export declare interface WebHeader {
headerKey: string;
headerValue: string;
}
|
https://github.com/ThePivotPoint/ArkTS-LSP-Server-Plugin.git/blob/6231773905435f000d00d94b26504433082ba40b/packages/declarations/ets/api/@ohos.atomicservice.AtomicServiceWeb.d.ets#L447-L466
|
8d33adb93231f8904f0e2fdf9b0300eed491e4aa
|
github
|
|
openharmony/developtools_profiler
|
73d26bb5acfcafb2b1f4f94ead5640241d1e5f73
|
host/smartperf/client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/ChartData.ets
|
arkts
|
getDataSets
|
Returns all DataSet objects this ChartData object holds.
@return
|
public getDataSets(): JArrayList<T> {
return this.mDataSets;
}
|
AST#method_declaration#Left public getDataSets AST#parameter_list#Left ( ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left AST#generic_type#Left JArrayList AST#type_arguments#Left < AST#type_annotation#Left AST#primary_type#Left T AST#primary_type#Right AST#type_annotation#Right > AST#type_arguments#Right AST#generic_type#Right AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . mDataSets AST#member_expression#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
public getDataSets(): JArrayList<T> {
return this.mDataSets;
}
|
https://github.com/openharmony/developtools_profiler/blob/73d26bb5acfcafb2b1f4f94ead5640241d1e5f73/host/smartperf/client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/ChartData.ets#L270-L272
|
3e46aa70b55f8c170b3c0d7229e07aaa2d0d3c2d
|
gitee
|
bigbear20240612/birthday_reminder.git
|
647c411a6619affd42eb5d163ff18db4b34b27ff
|
entry/src/main/ets/services/ai/GreetingGenerationService.ets
|
arkts
|
generateMultipleGreetings
|
批量生成多个祝福语选项
|
async generateMultipleGreetings(
params: GreetingGenerateParams,
count: number = 3
): Promise<GreetingGenerationResult> {
const startTime = Date.now();
try {
hilog.info(LogConstants.DOMAIN_APP, LogConstants.TAG_APP, `Generating ${count} greeting options for ${params.contact.name}`);
const contactSummary = this.extractContactInfo(params.contact);
const prompt = this.buildPrompt(contactSummary, params);
// 生成多个选项
const generatedOptions = await this.simulateMultipleGeneration(prompt, params, count);
const processingTime = Date.now() - startTime;
const result: GreetingGenerationResult = {
success: true,
content: generatedOptions[0] || '',
alternatives: generatedOptions.slice(1),
confidence: 0.92,
processingTime
};
hilog.info(LogConstants.DOMAIN_APP, LogConstants.TAG_APP, `Multiple greeting generation completed in ${processingTime}ms`);
return result;
} catch (error) {
hilog.error(LogConstants.DOMAIN_APP, LogConstants.TAG_APP, `Failed to generate multiple greetings: ${error}`);
return {
success: false,
content: '',
alternatives: [],
confidence: 0,
processingTime: Date.now() - startTime,
error: `批量生成失败:${error}`
};
}
}
|
AST#method_declaration#Left async generateMultipleGreetings AST#parameter_list#Left ( AST#parameter#Left params : AST#type_annotation#Left AST#primary_type#Left GreetingGenerateParams AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left count : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left 3 AST#expression#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left AST#generic_type#Left Promise AST#type_arguments#Left < AST#type_annotation#Left AST#primary_type#Left GreetingGenerationResult AST#primary_type#Right AST#type_annotation#Right > AST#type_arguments#Right AST#generic_type#Right AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left startTime = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left Date AST#expression#Right . now AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#try_statement#Left try AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left hilog AST#expression#Right . info AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#member_expression#Left AST#expression#Left LogConstants AST#expression#Right . DOMAIN_APP AST#member_expression#Right AST#expression#Right , AST#expression#Left AST#member_expression#Left AST#expression#Left LogConstants AST#expression#Right . TAG_APP AST#member_expression#Right AST#expression#Right , AST#expression#Left AST#template_literal#Left ` Generating AST#template_substitution#Left $ { AST#expression#Left count AST#expression#Right } AST#template_substitution#Right greeting options for AST#template_substitution#Left $ { AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left params AST#expression#Right . contact AST#member_expression#Right AST#expression#Right . name AST#member_expression#Right AST#expression#Right } AST#template_substitution#Right ` AST#template_literal#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left contactSummary = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . extractContactInfo AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#member_expression#Left AST#expression#Left params AST#expression#Right . contact AST#member_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left prompt = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . buildPrompt AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left contactSummary AST#expression#Right , AST#expression#Left params AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right // 生成多个选项 AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left generatedOptions = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#await_expression#Left await AST#expression#Left this AST#expression#Right AST#await_expression#Right AST#expression#Right . simulateMultipleGeneration AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left prompt AST#expression#Right , AST#expression#Left params AST#expression#Right , AST#expression#Left count AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left processingTime = AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left Date AST#expression#Right . now AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right - AST#expression#Left startTime AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left result : AST#type_annotation#Left AST#primary_type#Left GreetingGenerationResult AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left success AST#property_name#Right : AST#expression#Left AST#boolean_literal#Left true AST#boolean_literal#Right AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left content AST#property_name#Right : AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#subscript_expression#Left AST#expression#Left generatedOptions AST#expression#Right [ AST#expression#Left 0 AST#expression#Right ] AST#subscript_expression#Right AST#expression#Right || AST#expression#Left '' AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left alternatives AST#property_name#Right : AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left generatedOptions AST#expression#Right . slice AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left 1 AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left confidence AST#property_name#Right : AST#expression#Left 0.92 AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left processingTime AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left hilog AST#expression#Right . info AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#member_expression#Left AST#expression#Left LogConstants AST#expression#Right . DOMAIN_APP AST#member_expression#Right AST#expression#Right , AST#expression#Left AST#member_expression#Left AST#expression#Left LogConstants AST#expression#Right . TAG_APP AST#member_expression#Right AST#expression#Right , AST#expression#Left AST#template_literal#Left ` Multiple greeting generation completed in AST#template_substitution#Left $ { AST#expression#Left processingTime AST#expression#Right } AST#template_substitution#Right ms ` AST#template_literal#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right AST#statement#Left AST#return_statement#Left return AST#expression#Left result AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#catch_clause#Left catch ( error ) AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left hilog AST#expression#Right . error AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#member_expression#Left AST#expression#Left LogConstants AST#expression#Right . DOMAIN_APP AST#member_expression#Right AST#expression#Right , AST#expression#Left AST#member_expression#Left AST#expression#Left LogConstants AST#expression#Right . TAG_APP AST#member_expression#Right AST#expression#Right , AST#expression#Left AST#template_literal#Left ` Failed to generate multiple greetings: AST#template_substitution#Left $ { AST#expression#Left error AST#expression#Right } AST#template_substitution#Right ` AST#template_literal#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left success AST#property_name#Right : AST#expression#Left AST#boolean_literal#Left false AST#boolean_literal#Right AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left content AST#property_name#Right : AST#expression#Left '' AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left alternatives AST#property_name#Right : AST#expression#Left AST#array_literal#Left [ ] AST#array_literal#Right AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left confidence AST#property_name#Right : AST#expression#Left 0 AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left processingTime AST#property_name#Right : AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left Date AST#expression#Right . now AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right - AST#expression#Left startTime AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left error AST#property_name#Right : AST#expression#Left AST#template_literal#Left ` 批量生成失败: AST#template_substitution#Left $ { AST#expression#Left error AST#expression#Right } AST#template_substitution#Right ` AST#template_literal#Right AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#catch_clause#Right AST#try_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
async generateMultipleGreetings(
params: GreetingGenerateParams,
count: number = 3
): Promise<GreetingGenerationResult> {
const startTime = Date.now();
try {
hilog.info(LogConstants.DOMAIN_APP, LogConstants.TAG_APP, `Generating ${count} greeting options for ${params.contact.name}`);
const contactSummary = this.extractContactInfo(params.contact);
const prompt = this.buildPrompt(contactSummary, params);
const generatedOptions = await this.simulateMultipleGeneration(prompt, params, count);
const processingTime = Date.now() - startTime;
const result: GreetingGenerationResult = {
success: true,
content: generatedOptions[0] || '',
alternatives: generatedOptions.slice(1),
confidence: 0.92,
processingTime
};
hilog.info(LogConstants.DOMAIN_APP, LogConstants.TAG_APP, `Multiple greeting generation completed in ${processingTime}ms`);
return result;
} catch (error) {
hilog.error(LogConstants.DOMAIN_APP, LogConstants.TAG_APP, `Failed to generate multiple greetings: ${error}`);
return {
success: false,
content: '',
alternatives: [],
confidence: 0,
processingTime: Date.now() - startTime,
error: `批量生成失败:${error}`
};
}
}
|
https://github.com/bigbear20240612/birthday_reminder.git/blob/647c411a6619affd42eb5d163ff18db4b34b27ff/entry/src/main/ets/services/ai/GreetingGenerationService.ets#L187-L227
|
83f30c13b3c9d08b54171cf8fcf30425382d8954
|
github
|
openharmony-tpc-incubate/photo-deal-demo
|
01382ce30b1785f8fc8bc14f6b94f0a670a5b50b
|
library/src/main/ets/model/ImageEditModel.ets
|
arkts
|
马赛克记录数据
|
export class MosaicData {
/**
* 马赛克路径
*/
path: Path2D
/**
* 线宽
*/
lineWidth: number
/**
* 剩余记录数据
*/
leftTotalPaths?: MosaicData[]
constructor
|
AST#export_declaration#Left export AST#ERROR#Left class MosaicData { /**
* 马赛克路径
*/ path AST#ERROR#Left : AST#type_annotation#Left AST#primary_type#Left Path2D AST#primary_type#Right AST#type_annotation#Right AST#ERROR#Right /**
* 线宽
*/ AST#ERROR#Left l in eWidth AST#ERROR#Right : AST#primary_type#Left AST#array_type#Left number /**
* 剩余记录数据
*/ AST#ERROR#Left leftTotalPaths ? : MosaicData AST#ERROR#Right [ ] AST#array_type#Right AST#primary_type#Right AST#ERROR#Right AST#variable_declaration#Left const AST#variable_declarator#Left ructor AST#variable_declarator#Right AST#variable_declaration#Right AST#export_declaration#Right
|
export class MosaicData {
path: Path2D
lineWidth: number
leftTotalPaths?: MosaicData[]
constructor
|
https://github.com/openharmony-tpc-incubate/photo-deal-demo/blob/01382ce30b1785f8fc8bc14f6b94f0a670a5b50b/library/src/main/ets/model/ImageEditModel.ets#L94-L108
|
4fb2739f521a4f77d5f121c2d6aa7cd94a535e82
|
gitee
|
|
yunkss/ef-tool
|
75f6761a0f2805d97183504745bf23c975ae514d
|
ef_crypto/src/main/ets/crypto/encryption/SM4Sync.ets
|
arkts
|
generateSM4Key
|
生成SM4的对称密钥
@param resultCoding 返回结果编码方式(hex/base64)-默认不传为base64格式
@returns SM4密钥
|
static generateSM4Key(resultCoding: buffer.BufferEncoding = 'base64'): string {
return CryptoSyncUtil.generateSymKey('SM4_128', resultCoding);
}
|
AST#method_declaration#Left static generateSM4Key AST#parameter_list#Left ( AST#parameter#Left resultCoding : AST#type_annotation#Left AST#primary_type#Left AST#qualified_type#Left buffer . BufferEncoding AST#qualified_type#Right AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left 'base64' AST#expression#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left CryptoSyncUtil AST#expression#Right . generateSymKey AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left 'SM4_128' AST#expression#Right , AST#expression#Left resultCoding AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
static generateSM4Key(resultCoding: buffer.BufferEncoding = 'base64'): string {
return CryptoSyncUtil.generateSymKey('SM4_128', resultCoding);
}
|
https://github.com/yunkss/ef-tool/blob/75f6761a0f2805d97183504745bf23c975ae514d/ef_crypto/src/main/ets/crypto/encryption/SM4Sync.ets#L32-L34
|
01f83ba6d435f0fd0c6913d731eb40458ac8ccf6
|
gitee
|
harmonyos-cases/cases
|
eccdb71f1cee10fa6ff955e16c454c1b59d3ae13
|
CommonAppDevelopment/feature/chatwithexpression/src/main/ets/model/Emoji.ets
|
arkts
|
表情所表示的含义
|
constructor(imgSrc: Resource, meaning: string) {
this.imgSrc = imgSrc;
this.meaning = meaning;
}
|
AST#constructor_declaration#Left constructor AST#parameter_list#Left ( AST#parameter#Left imgSrc : AST#type_annotation#Left AST#primary_type#Left Resource AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left meaning : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . imgSrc AST#member_expression#Right = AST#expression#Left imgSrc AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . meaning AST#member_expression#Right = AST#expression#Left meaning AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#constructor_declaration#Right
|
constructor(imgSrc: Resource, meaning: string) {
this.imgSrc = imgSrc;
this.meaning = meaning;
}
|
https://github.com/harmonyos-cases/cases/blob/eccdb71f1cee10fa6ff955e16c454c1b59d3ae13/CommonAppDevelopment/feature/chatwithexpression/src/main/ets/model/Emoji.ets#L23-L26
|
93366c71451176ec9e7597ec44a4dcab6dd2e61e
|
gitee
|
|
KoStudio/ArkTS-WordTree.git
|
78c2a8f8ef6cf4c6be8bab2212f04bfcfa7e7324
|
entry/src/main/ets/common/components/Speech/Wave/WaveView.ets
|
arkts
|
===================== UI构建 =====================
|
build() {
Column() {
Canvas(this.context) // 创建画布
.width('100%') // 宽度100%
.height(250) // 固定高度250vp
.backgroundColor('transparent') // 透明背景
.onReady(() => { // 画布准备就绪回调
const width = this.context.width; // 获取画布实际宽度
const height = this.context.height; // 获取画布实际高度
this.startWaveAnimation(width, height); // 启动波纹动画
})
}
.width('100%') // 容器宽度100%
}
|
AST#build_method#Left build ( ) AST#build_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Column ( ) AST#container_content_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Canvas ( AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . context AST#member_expression#Right AST#expression#Right ) AST#ui_component#Right // 创建画布 AST#modifier_chain_expression#Left . width ( AST#expression#Left '100%' AST#expression#Right ) // 宽度100% AST#modifier_chain_expression#Left . height ( AST#expression#Left 250 AST#expression#Right ) // 固定高度250vp AST#modifier_chain_expression#Left . backgroundColor ( AST#expression#Left 'transparent' AST#expression#Right ) // 透明背景 AST#modifier_chain_expression#Left . onReady ( AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( ) AST#parameter_list#Right => AST#block_statement#Left { // 画布准备就绪回调 AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left width = AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . context AST#member_expression#Right AST#expression#Right . width AST#member_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right // 获取画布实际宽度 AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left height = AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . context AST#member_expression#Right AST#expression#Right . height AST#member_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right // 获取画布实际高度 AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . startWaveAnimation AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left width AST#expression#Right , AST#expression#Left height AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right // 启动波纹动画 } AST#block_statement#Right AST#arrow_function#Right AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#container_content_body#Right AST#ui_component#Right AST#modifier_chain_expression#Left . width ( AST#expression#Left '100%' AST#expression#Right ) AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right // 容器宽度100% } AST#build_body#Right AST#build_method#Right
|
build() {
Column() {
Canvas(this.context)
.width('100%')
.height(250)
.backgroundColor('transparent')
.onReady(() => {
const width = this.context.width;
const height = this.context.height;
this.startWaveAnimation(width, height);
})
}
.width('100%')
}
|
https://github.com/KoStudio/ArkTS-WordTree.git/blob/78c2a8f8ef6cf4c6be8bab2212f04bfcfa7e7324/entry/src/main/ets/common/components/Speech/Wave/WaveView.ets#L28-L41
|
99e8a383addfb1328fb2cdd1076001ed6b19ad34
|
github
|
|
tongyuyan/harmony-utils
|
697472f011a43e783eeefaa28ef9d713c4171726
|
harmony_utils/src/main/ets/utils/StrUtil.ets
|
arkts
|
notEqual
|
判断两个传入的数值或者是字符串是否不相等
@param source
@param target
@returns
|
static notEqual(source: string | number, target: string | number): boolean {
return false === StrUtil.equal(source, target);
}
|
AST#method_declaration#Left static notEqual AST#parameter_list#Left ( AST#parameter#Left source : AST#type_annotation#Left AST#union_type#Left AST#primary_type#Left string AST#primary_type#Right | AST#primary_type#Left number AST#primary_type#Right AST#union_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left target : AST#type_annotation#Left AST#union_type#Left AST#primary_type#Left string AST#primary_type#Right | AST#primary_type#Left number AST#primary_type#Right AST#union_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left boolean AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#boolean_literal#Left false AST#boolean_literal#Right AST#expression#Right === AST#expression#Left StrUtil AST#expression#Right AST#binary_expression#Right AST#expression#Right . equal AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left source AST#expression#Right , AST#expression#Left target AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
static notEqual(source: string | number, target: string | number): boolean {
return false === StrUtil.equal(source, target);
}
|
https://github.com/tongyuyan/harmony-utils/blob/697472f011a43e783eeefaa28ef9d713c4171726/harmony_utils/src/main/ets/utils/StrUtil.ets#L232-L234
|
0a0057626c15cfed5a9bf6114d1602f8a5348c12
|
gitee
|
openharmony/interface_sdk-js
|
c349adc73e2ec1f61f6fca489b5af059e3ed6999
|
api/@ohos.uiExtensionHost.d.ets
|
arkts
|
Transition Controller
@interface UIExtensionHostWindowProxy
@syscap SystemCapability.ArkUI.ArkUI.Full
@systemapi
@since 11
|
export interface UIExtensionHostWindowProxy {
/**
* Get the avoid area
*
* @param { window.AvoidAreaType } type - Type of the area
* @returns { window.AvoidArea } Area where the window cannot be displayed.
* @throws { BusinessError } 401 - Parameter error.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 11
*/
getWindowAvoidArea(type: window.AvoidAreaType): window.AvoidArea;
/**
* Register the callback of avoidAreaChange
*
* @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', indicating the event of changes to the avoid area.
* @param { Callback<{ type: window.AvoidAreaType, area: window.AvoidArea }> } callback - Callback used to return the area.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 11
*/
/**
* Register the callback of avoidAreaChange
*
* @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', indicating the event of changes to the avoid area.
* @param { Callback<WindowInfo> } callback - Callback used to return the area.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 16
*/
// on(type: 'avoidAreaChange', callback: Callback<WindowInfo>): void;
on<T>(type: string, callback: Callback<T>):void;
/**
* Unregister the callback of avoidAreaChange
*
* @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', indicating the event of changes to the avoid area.
* @param { Callback<{ type: window.AvoidAreaType, area: window.AvoidArea }> } callback - Callback used to return the area.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 11
*/
/**
* Unregister the callback of avoidAreaChange
*
* @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', indicating the event of changes to the avoid area.
* @param { Callback<WindowInfo> } callback - Callback used to return the area.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 16
*/
// off(type: 'avoidAreaChange', callback?: Callback<WindowInfo>): void;
off<T>(type: string, callback?: Callback<T>): void;
/**
* Register the callback of windowSizeChange
*
* @param { 'windowSizeChange' } type - The value is fixed at 'windowSizeChange', indicating the window size change event.
* @param { Callback<window.Size> } callback - Callback used to return the window size.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 11
*/
// on(type: 'windowSizeChange', callback: Callback<window.Size>): void;
/**
* Unregister the callback of windowSizeChange
*
* @param { 'windowSizeChange' } type - The value is fixed at 'windowSizeChange', indicating the window size change event.
* @param { Callback<window.Size> } callback - Callback used to return the window size.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 11
*/
// off(type: 'windowSizeChange', callback?: Callback<window.Size>): void;
/**
* The properties of the UIExtension window
*
* @type { UIExtensionHostWindowProxyProperties }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 11
*/
properties: UIExtensionHostWindowProxyProperties;
/**
* Hide the non-secure windows
*
* @param { boolean } shouldHide - Hide the non-secure windows if true, otherwise means the opposite.
* @returns { Promise<void> } - The promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 11
*/
/**
* Hide the non-secure windows.
* When called by modal UIExtension and shouldHide == false, the "ohos.permission.ALLOW_SHOW_NON_SECURE_WINDOWS" permission is required.
*
* @permission ohos.permission.ALLOW_SHOW_NON_SECURE_WINDOWS
* @param { boolean } shouldHide - Hide the non-secure windows if true, otherwise means the opposite.
* @returns { Promise<void> } - The promise returned by the function.
* @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 1300002 - Abnormal state. Possible causes:
* <br> 1. Permission denied. Interface caller does not have permission "ohos.permission.ALLOW_SHOW_NON_SECURE_WINDOWS".
* <br> 2. The UIExtension window proxy is abnormal.
* @throws { BusinessError } 1300003 - This window manager service works abnormally.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 12
*/
hideNonSecureWindows(shouldHide: boolean): Promise<void>;
/**
* Create sub window.
*
* @param { string } name - window name of sub window
* @param { window.SubWindowOptions } subWindowOptions - options of sub window creation
* @returns { Promise<window.Window> } Promise used to return the subwindow.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
* @throws { BusinessError } 1300002 - This window state is abnormal.
* @throws { BusinessError } 1300005 - This window proxy is abnormal.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @StageModelOnly
* @since 12
*/
createSubWindowWithOptions(name: string, subWindowOptions: window.SubWindowOptions): Promise<window.Window>;
/**
* Set the watermark flag on the UIExtension window
*
* @param { boolean } enable - Add water mark flag to the UIExtension window if true, or remove flag if false
* @returns { Promise<void> } - The promise returned by the function
* @throws { BusinessError } 1300002 - The UIExtension window proxy is abnormal.
* @throws { BusinessError } 1300003 - This window manager service works abnormally.
* @throws { BusinessError } 1300008 - The display device is abnormal.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 12
*/
setWaterMarkFlag(enable: boolean): Promise<void>;
/**
* Hide the display content when snapshot.
*
* @param { boolean } shouldHide - Hide the display content of UIExtensionAbility when the host application takes snapshots if true,
* otherwise means the opposite.
* @returns { Promise<void> } - The promise returned by the function.
* @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 1300002 - Abnormal state. Possible causes:
* <br> 1. The UIExtension window proxy is abnormal.
* <br> 2. Not the UIExtensionAbility process calling.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 13
*/
hidePrivacyContentForHost(shouldHide: boolean): Promise<void>;
}
|
AST#export_declaration#Left export AST#interface_declaration#Left interface UIExtensionHostWindowProxy AST#object_type#Left { /**
* Get the avoid area
*
* @param { window.AvoidAreaType } type - Type of the area
* @returns { window.AvoidArea } Area where the window cannot be displayed.
* @throws { BusinessError } 401 - Parameter error.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 11
*/ AST#type_member#Left getWindowAvoidArea AST#parameter_list#Left ( AST#parameter#Left type : AST#type_annotation#Left AST#primary_type#Left AST#qualified_type#Left window . AvoidAreaType AST#qualified_type#Right AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left AST#qualified_type#Left window . AvoidArea AST#qualified_type#Right AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; /**
* Register the callback of avoidAreaChange
*
* @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', indicating the event of changes to the avoid area.
* @param { Callback<{ type: window.AvoidAreaType, area: window.AvoidArea }> } callback - Callback used to return the area.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 11
*/ /**
* Register the callback of avoidAreaChange
*
* @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', indicating the event of changes to the avoid area.
* @param { Callback<WindowInfo> } callback - Callback used to return the area.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 16
*/ // on(type: 'avoidAreaChange', callback: Callback<WindowInfo>): void; AST#type_member#Left on AST#type_parameters#Left < AST#type_parameter#Left T AST#type_parameter#Right > AST#type_parameters#Right AST#parameter_list#Left ( AST#parameter#Left type : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left callback : AST#type_annotation#Left AST#primary_type#Left AST#generic_type#Left Callback AST#type_arguments#Left < AST#type_annotation#Left AST#primary_type#Left T AST#primary_type#Right AST#type_annotation#Right > AST#type_arguments#Right AST#generic_type#Right AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; /**
* Unregister the callback of avoidAreaChange
*
* @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', indicating the event of changes to the avoid area.
* @param { Callback<{ type: window.AvoidAreaType, area: window.AvoidArea }> } callback - Callback used to return the area.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 11
*/ /**
* Unregister the callback of avoidAreaChange
*
* @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', indicating the event of changes to the avoid area.
* @param { Callback<WindowInfo> } callback - Callback used to return the area.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 16
*/ // off(type: 'avoidAreaChange', callback?: Callback<WindowInfo>): void; AST#type_member#Left off AST#type_parameters#Left < AST#type_parameter#Left T AST#type_parameter#Right > AST#type_parameters#Right AST#parameter_list#Left ( AST#parameter#Left type : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left callback ? : AST#type_annotation#Left AST#primary_type#Left AST#generic_type#Left Callback AST#type_arguments#Left < AST#type_annotation#Left AST#primary_type#Left T AST#primary_type#Right AST#type_annotation#Right > AST#type_arguments#Right AST#generic_type#Right AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; /**
* Register the callback of windowSizeChange
*
* @param { 'windowSizeChange' } type - The value is fixed at 'windowSizeChange', indicating the window size change event.
* @param { Callback<window.Size> } callback - Callback used to return the window size.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 11
*/ // on(type: 'windowSizeChange', callback: Callback<window.Size>): void; /**
* Unregister the callback of windowSizeChange
*
* @param { 'windowSizeChange' } type - The value is fixed at 'windowSizeChange', indicating the window size change event.
* @param { Callback<window.Size> } callback - Callback used to return the window size.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 11
*/ // off(type: 'windowSizeChange', callback?: Callback<window.Size>): void; /**
* The properties of the UIExtension window
*
* @type { UIExtensionHostWindowProxyProperties }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 11
*/ AST#type_member#Left properties : AST#type_annotation#Left AST#primary_type#Left UIExtensionHostWindowProxyProperties AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; /**
* Hide the non-secure windows
*
* @param { boolean } shouldHide - Hide the non-secure windows if true, otherwise means the opposite.
* @returns { Promise<void> } - The promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 11
*/ /**
* Hide the non-secure windows.
* When called by modal UIExtension and shouldHide == false, the "ohos.permission.ALLOW_SHOW_NON_SECURE_WINDOWS" permission is required.
*
* @permission ohos.permission.ALLOW_SHOW_NON_SECURE_WINDOWS
* @param { boolean } shouldHide - Hide the non-secure windows if true, otherwise means the opposite.
* @returns { Promise<void> } - The promise returned by the function.
* @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 1300002 - Abnormal state. Possible causes:
* <br> 1. Permission denied. Interface caller does not have permission "ohos.permission.ALLOW_SHOW_NON_SECURE_WINDOWS".
* <br> 2. The UIExtension window proxy is abnormal.
* @throws { BusinessError } 1300003 - This window manager service works abnormally.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 12
*/ AST#type_member#Left hideNonSecureWindows AST#parameter_list#Left ( AST#parameter#Left shouldHide : AST#type_annotation#Left AST#primary_type#Left boolean AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left AST#generic_type#Left Promise AST#type_arguments#Left < AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right > AST#type_arguments#Right AST#generic_type#Right AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; /**
* Create sub window.
*
* @param { string } name - window name of sub window
* @param { window.SubWindowOptions } subWindowOptions - options of sub window creation
* @returns { Promise<window.Window> } Promise used to return the subwindow.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
* @throws { BusinessError } 1300002 - This window state is abnormal.
* @throws { BusinessError } 1300005 - This window proxy is abnormal.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @StageModelOnly
* @since 12
*/ AST#type_member#Left createSubWindowWithOptions AST#parameter_list#Left ( AST#parameter#Left name : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left subWindowOptions : AST#type_annotation#Left AST#primary_type#Left AST#qualified_type#Left window . SubWindowOptions AST#qualified_type#Right AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left AST#generic_type#Left Promise AST#type_arguments#Left < AST#type_annotation#Left AST#primary_type#Left AST#qualified_type#Left window . Window AST#qualified_type#Right AST#primary_type#Right AST#type_annotation#Right > AST#type_arguments#Right AST#generic_type#Right AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; /**
* Set the watermark flag on the UIExtension window
*
* @param { boolean } enable - Add water mark flag to the UIExtension window if true, or remove flag if false
* @returns { Promise<void> } - The promise returned by the function
* @throws { BusinessError } 1300002 - The UIExtension window proxy is abnormal.
* @throws { BusinessError } 1300003 - This window manager service works abnormally.
* @throws { BusinessError } 1300008 - The display device is abnormal.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 12
*/ AST#type_member#Left setWaterMarkFlag AST#parameter_list#Left ( AST#parameter#Left enable : AST#type_annotation#Left AST#primary_type#Left boolean AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left AST#generic_type#Left Promise AST#type_arguments#Left < AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right > AST#type_arguments#Right AST#generic_type#Right AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; /**
* Hide the display content when snapshot.
*
* @param { boolean } shouldHide - Hide the display content of UIExtensionAbility when the host application takes snapshots if true,
* otherwise means the opposite.
* @returns { Promise<void> } - The promise returned by the function.
* @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 1300002 - Abnormal state. Possible causes:
* <br> 1. The UIExtension window proxy is abnormal.
* <br> 2. Not the UIExtensionAbility process calling.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 13
*/ AST#type_member#Left hidePrivacyContentForHost AST#parameter_list#Left ( AST#parameter#Left shouldHide : AST#type_annotation#Left AST#primary_type#Left boolean AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left AST#generic_type#Left Promise AST#type_arguments#Left < AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right > AST#type_arguments#Right AST#generic_type#Right AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; } AST#object_type#Right AST#interface_declaration#Right AST#export_declaration#Right
|
export interface UIExtensionHostWindowProxy {
getWindowAvoidArea(type: window.AvoidAreaType): window.AvoidArea;
on<T>(type: string, callback: Callback<T>):void;
off<T>(type: string, callback?: Callback<T>): void;
properties: UIExtensionHostWindowProxyProperties;
hideNonSecureWindows(shouldHide: boolean): Promise<void>;
createSubWindowWithOptions(name: string, subWindowOptions: window.SubWindowOptions): Promise<window.Window>;
setWaterMarkFlag(enable: boolean): Promise<void>;
hidePrivacyContentForHost(shouldHide: boolean): Promise<void>;
}
|
https://github.com/openharmony/interface_sdk-js/blob/c349adc73e2ec1f61f6fca489b5af059e3ed6999/api/@ohos.uiExtensionHost.d.ets#L68-L267
|
0ec0ae512bd545df55dbbd3701e340ef598578a3
|
gitee
|
|
bigbear20240612/birthday_reminder.git
|
647c411a6619affd42eb5d163ff18db4b34b27ff
|
entry/src/main/ets/services/analytics/AnalyticsService.ets
|
arkts
|
月度分布数据接口
|
export interface MonthlyDistribution {
month: number;
count: number;
percentage: number;
}
|
AST#export_declaration#Left export AST#interface_declaration#Left interface MonthlyDistribution AST#object_type#Left { AST#type_member#Left month : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; AST#type_member#Left count : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; AST#type_member#Left percentage : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; } AST#object_type#Right AST#interface_declaration#Right AST#export_declaration#Right
|
export interface MonthlyDistribution {
month: number;
count: number;
percentage: number;
}
|
https://github.com/bigbear20240612/birthday_reminder.git/blob/647c411a6619affd42eb5d163ff18db4b34b27ff/entry/src/main/ets/services/analytics/AnalyticsService.ets#L15-L19
|
f259a57e4183a780def34514b5ba45815e7bb45d
|
github
|
|
harmonyos_samples/BestPracticeSnippets
|
490ea539a6d4427dd395f3dac3cf4887719f37af
|
Weather/common/src/main/ets/model/FormDate.ets
|
arkts
|
formMonthDay
|
月+日
|
formMonthDay(goal?: string) {
let date = goal ? new Date(goal) : new Date();
return `${this.fill(date.getMonth() + 1)}/${date.getDate()}`;
}
|
AST#method_declaration#Left formMonthDay AST#parameter_list#Left ( AST#parameter#Left goal ? : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right AST#block_statement#Left { AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left date = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#conditional_expression#Left AST#expression#Left goal AST#expression#Right ? AST#expression#Left AST#call_expression#Left AST#expression#Left AST#new_expression#Left new AST#expression#Left Date AST#expression#Right AST#new_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left goal AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right : AST#expression#Left AST#new_expression#Left new AST#expression#Left Date AST#expression#Right AST#new_expression#Right AST#expression#Right AST#conditional_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#template_literal#Left ` AST#template_substitution#Left $ { AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . fill AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left date AST#expression#Right . getMonth AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right + AST#expression#Left 1 AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right } AST#template_substitution#Right / AST#template_substitution#Left $ { AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left date AST#expression#Right . getDate AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right } AST#template_substitution#Right ` AST#template_literal#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
formMonthDay(goal?: string) {
let date = goal ? new Date(goal) : new Date();
return `${this.fill(date.getMonth() + 1)}/${date.getDate()}`;
}
|
https://github.com/harmonyos_samples/BestPracticeSnippets/blob/490ea539a6d4427dd395f3dac3cf4887719f37af/Weather/common/src/main/ets/model/FormDate.ets#L24-L27
|
097e017f6d4e00ea53ec470b78b5791745b63132
|
gitee
|
gracienewd/openharmony-App-YunmoAi.git
|
181952ab00aab5025a81b7b3a6b88d2a5258c76a
|
entry/src/main/ets/pages/home/index.ets
|
arkts
|
_notice
|
3.通知公告
|
@Builder
_notice() {
Swiper() {
Row() {
Image($r("app.media.announce")).height(20).margin({ right: 8 })
Text("注册新账户立即赠送5Credits")
.fontSize(14)
.fontColor(0xFFFFFF)
.alignRules({
center: { anchor: '__container__', align: VerticalAlign.Center },
middle: { anchor: '__container__', align: HorizontalAlign.Center }
})
}.alignItems(VerticalAlign.Center).width("100%")
Row() {
Image($r("app.media.announce")).height(20).margin({ right: 8 })
Text("邀请好友一起玩转YunMo")
.fontSize(14)
.fontColor(0xFFFFFF)
.alignRules({
center: { anchor: '__container__', align: VerticalAlign.Center },
middle: { anchor: '__container__', align: HorizontalAlign.Center }
})
}.alignItems(VerticalAlign.Center).width("100%")
}
.height(50)
.indicator(true)
.vertical(false)
.loop(true)
.indicator(false)
.padding({
left: 12,
right: 12,
top: 6
})
}
|
AST#method_declaration#Left AST#decorator#Left @ Builder AST#decorator#Right _notice AST#parameter_list#Left ( ) AST#parameter_list#Right AST#builder_function_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Swiper ( ) AST#container_content_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Row ( ) AST#container_content_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Image ( AST#expression#Left AST#resource_expression#Left $r ( AST#expression#Left "app.media.announce" AST#expression#Right ) AST#resource_expression#Right AST#expression#Right ) AST#ui_component#Right AST#modifier_chain_expression#Left . height ( AST#expression#Left 20 AST#expression#Right ) AST#modifier_chain_expression#Left . margin ( AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left right AST#property_name#Right : AST#expression#Left 8 AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Text ( AST#expression#Left "注册新账户立即赠送5Credits" AST#expression#Right ) AST#ui_component#Right AST#modifier_chain_expression#Left . fontSize ( AST#expression#Left 14 AST#expression#Right ) AST#modifier_chain_expression#Left . fontColor ( AST#expression#Left 0xFFFFFF AST#expression#Right ) AST#modifier_chain_expression#Left . alignRules ( AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left center AST#property_name#Right : AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left anchor AST#property_name#Right : AST#expression#Left '__container__' AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left align AST#property_name#Right : AST#expression#Left AST#member_expression#Left AST#expression#Left VerticalAlign AST#expression#Right . Center AST#member_expression#Right AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left middle AST#property_name#Right : AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left anchor AST#property_name#Right : AST#expression#Left '__container__' AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left align AST#property_name#Right : AST#expression#Left AST#member_expression#Left AST#expression#Left HorizontalAlign AST#expression#Right . Center AST#member_expression#Right AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#container_content_body#Right AST#ui_component#Right AST#modifier_chain_expression#Left . alignItems ( AST#expression#Left AST#member_expression#Left AST#expression#Left VerticalAlign AST#expression#Right . Center AST#member_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Left . width ( AST#expression#Left "100%" AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Row ( ) AST#container_content_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Image ( AST#expression#Left AST#resource_expression#Left $r ( AST#expression#Left "app.media.announce" AST#expression#Right ) AST#resource_expression#Right AST#expression#Right ) AST#ui_component#Right AST#modifier_chain_expression#Left . height ( AST#expression#Left 20 AST#expression#Right ) AST#modifier_chain_expression#Left . margin ( AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left right AST#property_name#Right : AST#expression#Left 8 AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Text ( AST#expression#Left "邀请好友一起玩转YunMo" AST#expression#Right ) AST#ui_component#Right AST#modifier_chain_expression#Left . fontSize ( AST#expression#Left 14 AST#expression#Right ) AST#modifier_chain_expression#Left . fontColor ( AST#expression#Left 0xFFFFFF AST#expression#Right ) AST#modifier_chain_expression#Left . alignRules ( AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left center AST#property_name#Right : AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left anchor AST#property_name#Right : AST#expression#Left '__container__' AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left align AST#property_name#Right : AST#expression#Left AST#member_expression#Left AST#expression#Left VerticalAlign AST#expression#Right . Center AST#member_expression#Right AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left middle AST#property_name#Right : AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left anchor AST#property_name#Right : AST#expression#Left '__container__' AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left align AST#property_name#Right : AST#expression#Left AST#member_expression#Left AST#expression#Left HorizontalAlign AST#expression#Right . Center AST#member_expression#Right AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#container_content_body#Right AST#ui_component#Right AST#modifier_chain_expression#Left . alignItems ( AST#expression#Left AST#member_expression#Left AST#expression#Left VerticalAlign AST#expression#Right . Center AST#member_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Left . width ( AST#expression#Left "100%" AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#container_content_body#Right AST#ui_component#Right AST#modifier_chain_expression#Left . height ( AST#expression#Left 50 AST#expression#Right ) AST#modifier_chain_expression#Left . indicator ( AST#expression#Left AST#boolean_literal#Left true AST#boolean_literal#Right AST#expression#Right ) AST#modifier_chain_expression#Left . vertical ( AST#expression#Left AST#boolean_literal#Left false AST#boolean_literal#Right AST#expression#Right ) AST#modifier_chain_expression#Left . loop ( AST#expression#Left AST#boolean_literal#Left true AST#boolean_literal#Right AST#expression#Right ) AST#modifier_chain_expression#Left . indicator ( AST#expression#Left AST#boolean_literal#Left false AST#boolean_literal#Right AST#expression#Right ) AST#modifier_chain_expression#Left . padding ( AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left left AST#property_name#Right : AST#expression#Left 12 AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left right AST#property_name#Right : AST#expression#Left 12 AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left top AST#property_name#Right : AST#expression#Left 6 AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#builder_function_body#Right AST#method_declaration#Right
|
@Builder
_notice() {
Swiper() {
Row() {
Image($r("app.media.announce")).height(20).margin({ right: 8 })
Text("注册新账户立即赠送5Credits")
.fontSize(14)
.fontColor(0xFFFFFF)
.alignRules({
center: { anchor: '__container__', align: VerticalAlign.Center },
middle: { anchor: '__container__', align: HorizontalAlign.Center }
})
}.alignItems(VerticalAlign.Center).width("100%")
Row() {
Image($r("app.media.announce")).height(20).margin({ right: 8 })
Text("邀请好友一起玩转YunMo")
.fontSize(14)
.fontColor(0xFFFFFF)
.alignRules({
center: { anchor: '__container__', align: VerticalAlign.Center },
middle: { anchor: '__container__', align: HorizontalAlign.Center }
})
}.alignItems(VerticalAlign.Center).width("100%")
}
.height(50)
.indicator(true)
.vertical(false)
.loop(true)
.indicator(false)
.padding({
left: 12,
right: 12,
top: 6
})
}
|
https://github.com/gracienewd/openharmony-App-YunmoAi.git/blob/181952ab00aab5025a81b7b3a6b88d2a5258c76a/entry/src/main/ets/pages/home/index.ets#L83-L118
|
799b1c387cfef8b1aa68f1556d9ed20abcb720b5
|
github
|
openharmony/applications_app_samples
|
a826ab0e75fe51d028c1c5af58188e908736b53b
|
code/Solutions/InputMethod/KikaInput/entry/src/main/ets/model/KeyboardKeyData.ets
|
arkts
|
Copyright (c) 2022-2023 Huawei Device Co., Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
|
export enum MenuType {
NORMAL = 0,
NUMBER = 1,
SPECIAL = 2
}
|
AST#export_declaration#Left export AST#enum_declaration#Left enum MenuType AST#enum_body#Left { AST#enum_member#Left NORMAL = AST#expression#Left 0 AST#expression#Right AST#enum_member#Right , AST#enum_member#Left NUMBER = AST#expression#Left 1 AST#expression#Right AST#enum_member#Right , AST#enum_member#Left SPECIAL = AST#expression#Left 2 AST#expression#Right AST#enum_member#Right } AST#enum_body#Right AST#enum_declaration#Right AST#export_declaration#Right
|
export enum MenuType {
NORMAL = 0,
NUMBER = 1,
SPECIAL = 2
}
|
https://github.com/openharmony/applications_app_samples/blob/a826ab0e75fe51d028c1c5af58188e908736b53b/code/Solutions/InputMethod/KikaInput/entry/src/main/ets/model/KeyboardKeyData.ets#L16-L20
|
a7f6c1d8a06f52644da7e53c19cbfc71fce4a053
|
gitee
|
|
bigbear20240612/birthday_reminder.git
|
647c411a6619affd42eb5d163ff18db4b34b27ff
|
entry/src/main/ets/services/analytics/AnalyticsService.ets
|
arkts
|
星座分布数据接口
|
export interface ZodiacDistribution {
zodiac: string;
count: number;
percentage: number;
}
|
AST#export_declaration#Left export AST#interface_declaration#Left interface ZodiacDistribution AST#object_type#Left { AST#type_member#Left zodiac : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; AST#type_member#Left count : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; AST#type_member#Left percentage : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; } AST#object_type#Right AST#interface_declaration#Right AST#export_declaration#Right
|
export interface ZodiacDistribution {
zodiac: string;
count: number;
percentage: number;
}
|
https://github.com/bigbear20240612/birthday_reminder.git/blob/647c411a6619affd42eb5d163ff18db4b34b27ff/entry/src/main/ets/services/analytics/AnalyticsService.ets#L36-L40
|
be1439f0fb84246523b0093ba255a5a79aa04be1
|
github
|
|
IceYuanyyy/OxHornCampus.git
|
bb5686f77fa36db89687502e35898cda218d601f
|
entry/src/main/ets/viewmodel/AddressItem.ets
|
arkts
|
AddressItem
|
Landmarks.
|
@Observed
export class AddressItem {
name?: Resource;
icon?: Resource;
locations: Array<Location> = [];
textColor?: Resource;
}
|
AST#decorated_export_declaration#Left AST#decorator#Left @ Observed AST#decorator#Right export class AddressItem AST#class_body#Left { AST#property_declaration#Left name ? : AST#type_annotation#Left AST#primary_type#Left Resource AST#primary_type#Right AST#type_annotation#Right ; AST#property_declaration#Right AST#property_declaration#Left icon ? : AST#type_annotation#Left AST#primary_type#Left Resource AST#primary_type#Right AST#type_annotation#Right ; AST#property_declaration#Right AST#property_declaration#Left locations : AST#type_annotation#Left AST#primary_type#Left AST#generic_type#Left Array AST#type_arguments#Left < AST#type_annotation#Left AST#primary_type#Left Location AST#primary_type#Right AST#type_annotation#Right > AST#type_arguments#Right AST#generic_type#Right AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#array_literal#Left [ ] AST#array_literal#Right AST#expression#Right ; AST#property_declaration#Right AST#property_declaration#Left textColor ? : AST#type_annotation#Left AST#primary_type#Left Resource AST#primary_type#Right AST#type_annotation#Right ; AST#property_declaration#Right } AST#class_body#Right AST#decorated_export_declaration#Right
|
@Observed
export class AddressItem {
name?: Resource;
icon?: Resource;
locations: Array<Location> = [];
textColor?: Resource;
}
|
https://github.com/IceYuanyyy/OxHornCampus.git/blob/bb5686f77fa36db89687502e35898cda218d601f/entry/src/main/ets/viewmodel/AddressItem.ets#L19-L25
|
f68024c1be0545bbef0a8dba9a498d2dac0ae0e9
|
github
|
Joker-x-dev/CoolMallArkTS.git
|
9f3fabf89fb277692cb82daf734c220c7282919c
|
core/ui/src/main/ets/component/modal/DictSelectModal.ets
|
arkts
|
DictSelectModal
|
@file 字典选择弹窗组件
@author Joker.X
|
@ComponentV2
export struct DictSelectModal {
/**
* 是否显示弹窗
*/
@Param
@Require
visible: boolean = false;
/**
* 弹窗标题
*/
@Param
title: ResourceStr = $r("app.string.please_select");
/**
* 关闭回调
*/
@Param
onDismiss: () => void = () => {
};
/**
* 网络请求状态
*/
@Param
uiState: BaseNetWorkUiState = BaseNetWorkUiState.LOADING;
/**
* 字典项列表数据
*/
@Param
dictList: DictItem[] = [];
/**
* 当前选中的字典项
*/
@Param
selectedItem: DictItem | null = null;
/**
* 字典项选择回调
* @param {DictItem} item - 选中的字典项
*/
@Param
onItemSelected: (item: DictItem) => void = () => {
};
/**
* 确认按钮回调
* @param {DictItem | null} item - 当前选中的字典项
*/
@Param
onConfirm: (item: DictItem | null) => void = () => {
};
/**
* 重试回调
*/
@Param
onRetry: () => void = () => {
};
/**
* 复选框分组 ID(用于控制选中态)
*/
@Local
private readonly groupId: string = "dict_select_group";
/**
* 构建字典选择弹窗
* @returns {void} 无返回值
*/
build(): void {
BottomModal({
visible: this.visible,
title: this.title,
onDismiss: this.onDismiss,
containerColor: $r("app.color.bg_grey"),
content: (): void => this.ModalContentNetWorkLayout()
});
}
/**
* 弹窗内容包装器(包含网络状态处理)
* @returns {void} 无返回值
*/
@Builder
private ModalContentNetWorkLayout(): void {
BaseNetWorkView({
uiState: this.uiState,
onRetry: this.onRetry,
loadingBuilder: (): void => this.CustomLoading(),
errorBuilder: (): void => this.CustomError(),
content: (): void => this.ModalContent()
});
}
/**
* 弹窗内容
* @returns {void} 无返回值
*/
@Builder
private ModalContent(): void {
ColumnStart({ widthValue: P100 }) {
Scroll() {
IBestCheckboxGroup({ group: this.groupId, activeList: this.getActiveList() }) {
IBestCellGroup({
inset: true,
radius: $r("app.float.radius_medium"),
outerMargin: 0
}) {
ForEach(this.dictList, (item: DictItem, index: number): void => {
IBestCell({
title: item.name ?? "",
center: true,
clickable: true,
hasBorder: index !== this.dictList.length - 1,
rightIconBuilder: (): void => this.DictItemCheckbox(this.getItemKey(item, index)),
onCellClick: (): void => this.onItemClick(item)
});
}, (item: DictItem, index: number): string => `${item.id ?? 0}-${index}`);
}
}
}
.width(P100)
.scrollBar(BarState.Off);
SpaceVerticalLarge();
IBestButton({
text: $r("app.string.confirm"),
type: "primary",
round: true,
btnWidth: P100,
disabled: this.selectedItem === null,
onBtnClick: (): void => this.handleConfirm()
});
}
}
/**
* 字典项右侧选择器
* @param {string} name - 选项名称
* @returns {void} 无返回值
*/
@Builder
private DictItemCheckbox(name: string): void {
IBestCheckbox({
group: this.groupId,
name: name
});
}
/**
* 处理字典项点击
* @param {DictItem} item - 字典项
* @returns {void} 无返回值
*/
private onItemClick(item: DictItem): void {
this.onItemSelected(item);
}
/**
* 获取当前选中列表
* @returns {string[]} 选中列表
*/
private getActiveList(): string[] {
if (!this.selectedItem) {
return [];
}
return [this.getItemKey(this.selectedItem, 0)];
}
/**
* 获取字典项 Key
* @param {DictItem} item - 字典项
* @param {number} index - 下标
* @returns {string} Key
*/
private getItemKey(item: DictItem, index: number): string {
const itemId: number | null | undefined = item.id;
if (itemId === null || itemId === undefined) {
return `${index}`;
}
return `${itemId}`;
}
/**
* 处理确认按钮点击
* @returns {void} 无返回值
*/
private handleConfirm(): void {
this.onConfirm(this.selectedItem);
this.onDismiss();
}
/**
* 自定义加载状态
* @returns {void} 无返回值
*/
@Builder
private CustomLoading(): void {
Column() {
PageLoading();
}
.height(300)
.width(P100);
}
/**
* 自定义错误状态
* @returns {void} 无返回值
*/
@Builder
private CustomError(): void {
Column() {
EmptyNetwork({
onAction: (): void => this.onRetry()
});
}
.height(300)
.width(P100);
}
}
|
AST#decorated_export_declaration#Left AST#decorator#Left @ ComponentV2 AST#decorator#Right export struct DictSelectModal AST#component_body#Left { /**
* 是否显示弹窗
*/ AST#property_declaration#Left AST#decorator#Left @ Param AST#decorator#Right AST#decorator#Left @ Require AST#decorator#Right visible : AST#type_annotation#Left AST#primary_type#Left boolean AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#boolean_literal#Left false AST#boolean_literal#Right AST#expression#Right ; AST#property_declaration#Right /**
* 弹窗标题
*/ AST#property_declaration#Left AST#decorator#Left @ Param AST#decorator#Right title : AST#type_annotation#Left AST#primary_type#Left ResourceStr AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#resource_expression#Left $r ( AST#expression#Left "app.string.please_select" AST#expression#Right ) AST#resource_expression#Right AST#expression#Right ; AST#property_declaration#Right /**
* 关闭回调
*/ AST#property_declaration#Left AST#decorator#Left @ Param AST#decorator#Right onDismiss : AST#type_annotation#Left AST#function_type#Left AST#parameter_list#Left ( ) AST#parameter_list#Right => AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right AST#function_type#Right AST#type_annotation#Right = AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( ) AST#parameter_list#Right => AST#expression#Left AST#object_literal#Left { } AST#object_literal#Right AST#expression#Right AST#arrow_function#Right AST#expression#Right ; AST#property_declaration#Right /**
* 网络请求状态
*/ AST#property_declaration#Left AST#decorator#Left @ Param AST#decorator#Right uiState : AST#type_annotation#Left AST#primary_type#Left BaseNetWorkUiState AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#member_expression#Left AST#expression#Left BaseNetWorkUiState AST#expression#Right . LOADING AST#member_expression#Right AST#expression#Right ; AST#property_declaration#Right /**
* 字典项列表数据
*/ AST#property_declaration#Left AST#decorator#Left @ Param AST#decorator#Right dictList : AST#type_annotation#Left AST#primary_type#Left AST#array_type#Left DictItem [ ] AST#array_type#Right AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#array_literal#Left [ ] AST#array_literal#Right AST#expression#Right ; AST#property_declaration#Right /**
* 当前选中的字典项
*/ AST#property_declaration#Left AST#decorator#Left @ Param AST#decorator#Right selectedItem : AST#type_annotation#Left AST#union_type#Left AST#primary_type#Left DictItem AST#primary_type#Right | AST#primary_type#Left null AST#primary_type#Right AST#union_type#Right AST#type_annotation#Right = AST#expression#Left AST#null_literal#Left null AST#null_literal#Right AST#expression#Right ; AST#property_declaration#Right /**
* 字典项选择回调
* @param {DictItem} item - 选中的字典项
*/ AST#property_declaration#Left AST#decorator#Left @ Param AST#decorator#Right onItemSelected : AST#type_annotation#Left AST#function_type#Left AST#parameter_list#Left ( AST#parameter#Left item : AST#type_annotation#Left AST#primary_type#Left DictItem AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right => AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right AST#function_type#Right AST#type_annotation#Right = AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( ) AST#parameter_list#Right => AST#expression#Left AST#object_literal#Left { } AST#object_literal#Right AST#expression#Right AST#arrow_function#Right AST#expression#Right ; AST#property_declaration#Right /**
* 确认按钮回调
* @param {DictItem | null} item - 当前选中的字典项
*/ AST#property_declaration#Left AST#decorator#Left @ Param AST#decorator#Right onConfirm : AST#type_annotation#Left AST#function_type#Left AST#parameter_list#Left ( AST#parameter#Left item : AST#type_annotation#Left AST#union_type#Left AST#primary_type#Left DictItem AST#primary_type#Right | AST#primary_type#Left null AST#primary_type#Right AST#union_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right => AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right AST#function_type#Right AST#type_annotation#Right = AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( ) AST#parameter_list#Right => AST#expression#Left AST#object_literal#Left { } AST#object_literal#Right AST#expression#Right AST#arrow_function#Right AST#expression#Right ; AST#property_declaration#Right /**
* 重试回调
*/ AST#property_declaration#Left AST#decorator#Left @ Param AST#decorator#Right onRetry : AST#type_annotation#Left AST#function_type#Left AST#parameter_list#Left ( ) AST#parameter_list#Right => AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right AST#function_type#Right AST#type_annotation#Right = AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( ) AST#parameter_list#Right => AST#expression#Left AST#object_literal#Left { } AST#object_literal#Right AST#expression#Right AST#arrow_function#Right AST#expression#Right ; AST#property_declaration#Right /**
* 复选框分组 ID(用于控制选中态)
*/ AST#property_declaration#Left AST#decorator#Left @ Local AST#decorator#Right private readonly groupId : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left "dict_select_group" AST#expression#Right ; AST#property_declaration#Right /**
* 构建字典选择弹窗
* @returns {void} 无返回值
*/ AST#build_method#Left build ( ) : AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right AST#build_body#Left { AST#ui_custom_component_statement#Left BottomModal ( AST#component_parameters#Left { AST#component_parameter#Left visible : AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . visible AST#member_expression#Right AST#expression#Right AST#component_parameter#Right , AST#component_parameter#Left title : AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . title AST#member_expression#Right AST#expression#Right AST#component_parameter#Right , AST#component_parameter#Left onDismiss : AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . onDismiss AST#member_expression#Right AST#expression#Right AST#component_parameter#Right , AST#component_parameter#Left containerColor : AST#expression#Left AST#resource_expression#Left $r ( AST#expression#Left "app.color.bg_grey" AST#expression#Right ) AST#resource_expression#Right AST#expression#Right AST#component_parameter#Right , AST#component_parameter#Left content : AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right => AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . ModalContentNetWorkLayout AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#arrow_function#Right AST#expression#Right AST#component_parameter#Right } AST#component_parameters#Right ) ; AST#ui_custom_component_statement#Right } AST#build_body#Right AST#build_method#Right /**
* 弹窗内容包装器(包含网络状态处理)
* @returns {void} 无返回值
*/ AST#method_declaration#Left AST#decorator#Left @ Builder AST#decorator#Right private ModalContentNetWorkLayout AST#parameter_list#Left ( ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right AST#builder_function_body#Left { AST#ui_custom_component_statement#Left BaseNetWorkView ( AST#component_parameters#Left { AST#component_parameter#Left uiState : AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . uiState AST#member_expression#Right AST#expression#Right AST#component_parameter#Right , AST#component_parameter#Left onRetry : AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . onRetry AST#member_expression#Right AST#expression#Right AST#component_parameter#Right , AST#component_parameter#Left loadingBuilder : AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right => AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . CustomLoading AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#arrow_function#Right AST#expression#Right AST#component_parameter#Right , AST#component_parameter#Left errorBuilder : AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right => AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . CustomError AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#arrow_function#Right AST#expression#Right AST#component_parameter#Right , AST#component_parameter#Left content : AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right => AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . ModalContent AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#arrow_function#Right AST#expression#Right AST#component_parameter#Right } AST#component_parameters#Right ) ; AST#ui_custom_component_statement#Right } AST#builder_function_body#Right AST#method_declaration#Right /**
* 弹窗内容
* @returns {void} 无返回值
*/ AST#method_declaration#Left AST#decorator#Left @ Builder AST#decorator#Right private ModalContent AST#parameter_list#Left ( ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right AST#builder_function_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left ColumnStart ( AST#component_parameters#Left { AST#component_parameter#Left widthValue : AST#expression#Left P100 AST#expression#Right AST#component_parameter#Right } AST#component_parameters#Right ) AST#container_content_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Scroll ( ) AST#container_content_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left IBestCheckboxGroup ( AST#component_parameters#Left { AST#component_parameter#Left group : AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . groupId AST#member_expression#Right AST#expression#Right AST#component_parameter#Right , AST#component_parameter#Left activeList : AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . getActiveList AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#component_parameter#Right } AST#component_parameters#Right ) AST#container_content_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left IBestCellGroup ( AST#component_parameters#Left { AST#component_parameter#Left inset : AST#expression#Left AST#boolean_literal#Left true AST#boolean_literal#Right AST#expression#Right AST#component_parameter#Right , AST#component_parameter#Left radius : AST#expression#Left AST#resource_expression#Left $r ( AST#expression#Left "app.float.radius_medium" AST#expression#Right ) AST#resource_expression#Right AST#expression#Right AST#component_parameter#Right , AST#component_parameter#Left outerMargin : AST#expression#Left 0 AST#expression#Right AST#component_parameter#Right } AST#component_parameters#Right ) AST#container_content_body#Left { AST#ui_control_flow#Left AST#for_each_statement#Left ForEach ( AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . dictList AST#member_expression#Right AST#expression#Right , AST#ui_builder_arrow_function#Left AST#parameter_list#Left ( AST#parameter#Left item : AST#type_annotation#Left AST#primary_type#Left DictItem AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left index : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right => AST#ui_arrow_function_body#Left { AST#ui_custom_component_statement#Left IBestCell ( AST#component_parameters#Left { AST#component_parameter#Left title : AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left item AST#expression#Right . name AST#member_expression#Right AST#expression#Right ?? AST#expression#Left "" AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#component_parameter#Right , AST#component_parameter#Left center : AST#expression#Left AST#boolean_literal#Left true AST#boolean_literal#Right AST#expression#Right AST#component_parameter#Right , AST#component_parameter#Left clickable : AST#expression#Left AST#boolean_literal#Left true AST#boolean_literal#Right AST#expression#Right AST#component_parameter#Right , AST#component_parameter#Left hasBorder : AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left index AST#expression#Right !== AST#expression#Left this AST#expression#Right AST#binary_expression#Right AST#expression#Right . dictList AST#member_expression#Right AST#expression#Right . length AST#member_expression#Right AST#expression#Right - AST#expression#Left 1 AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#component_parameter#Right , AST#component_parameter#Left rightIconBuilder : AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right => AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . DictItemCheckbox AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . getItemKey AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left item AST#expression#Right , AST#expression#Left index AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#arrow_function#Right AST#expression#Right AST#component_parameter#Right , AST#component_parameter#Left onCellClick : AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right => AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . onItemClick AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left item AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#arrow_function#Right AST#expression#Right AST#component_parameter#Right } AST#component_parameters#Right ) ; AST#ui_custom_component_statement#Right } AST#ui_arrow_function_body#Right AST#ui_builder_arrow_function#Right , AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( AST#parameter#Left item : AST#type_annotation#Left AST#primary_type#Left DictItem AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left index : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right => AST#expression#Left AST#template_literal#Left ` AST#template_substitution#Left $ { AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left item AST#expression#Right . id AST#member_expression#Right AST#expression#Right ?? AST#expression#Left 0 AST#expression#Right AST#binary_expression#Right AST#expression#Right } AST#template_substitution#Right - AST#template_substitution#Left $ { AST#expression#Left index AST#expression#Right } AST#template_substitution#Right ` AST#template_literal#Right AST#expression#Right AST#arrow_function#Right AST#expression#Right ) AST#for_each_statement#Right AST#ui_control_flow#Right AST#ERROR#Left ; AST#ERROR#Right } AST#container_content_body#Right AST#ui_component#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#container_content_body#Right AST#ui_component#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#container_content_body#Right AST#ui_component#Right AST#modifier_chain_expression#Left . width ( AST#expression#Left P100 AST#expression#Right ) AST#modifier_chain_expression#Left . scrollBar ( AST#expression#Left AST#member_expression#Left AST#expression#Left BarState AST#expression#Right . Off AST#member_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right AST#expression_statement#Left AST#expression#Left AST#expression#Right ; AST#expression_statement#Right AST#ui_custom_component_statement#Left SpaceVerticalLarge ( ) ; AST#ui_custom_component_statement#Right AST#ui_custom_component_statement#Left IBestButton ( AST#component_parameters#Left { AST#component_parameter#Left text : AST#expression#Left AST#resource_expression#Left $r ( AST#expression#Left "app.string.confirm" AST#expression#Right ) AST#resource_expression#Right AST#expression#Right AST#component_parameter#Right , AST#component_parameter#Left type : AST#expression#Left "primary" AST#expression#Right AST#component_parameter#Right , AST#component_parameter#Left round : AST#expression#Left AST#boolean_literal#Left true AST#boolean_literal#Right AST#expression#Right AST#component_parameter#Right , AST#component_parameter#Left btnWidth : AST#expression#Left P100 AST#expression#Right AST#component_parameter#Right , AST#component_parameter#Left disabled : AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . selectedItem AST#member_expression#Right AST#expression#Right === AST#expression#Left AST#null_literal#Left null AST#null_literal#Right AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#component_parameter#Right , AST#component_parameter#Left onBtnClick : AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right => AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . handleConfirm AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#arrow_function#Right AST#expression#Right AST#component_parameter#Right } AST#component_parameters#Right ) ; AST#ui_custom_component_statement#Right } AST#container_content_body#Right AST#ui_component#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#builder_function_body#Right AST#method_declaration#Right /**
* 字典项右侧选择器
* @param {string} name - 选项名称
* @returns {void} 无返回值
*/ AST#method_declaration#Left AST#decorator#Left @ Builder AST#decorator#Right private DictItemCheckbox AST#parameter_list#Left ( AST#parameter#Left name : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right AST#builder_function_body#Left { AST#ui_custom_component_statement#Left IBestCheckbox ( AST#component_parameters#Left { AST#component_parameter#Left group : AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . groupId AST#member_expression#Right AST#expression#Right AST#component_parameter#Right , AST#component_parameter#Left name : AST#expression#Left name AST#expression#Right AST#component_parameter#Right } AST#component_parameters#Right ) ; AST#ui_custom_component_statement#Right } AST#builder_function_body#Right AST#method_declaration#Right /**
* 处理字典项点击
* @param {DictItem} item - 字典项
* @returns {void} 无返回值
*/ AST#method_declaration#Left private onItemClick AST#parameter_list#Left ( AST#parameter#Left item : AST#type_annotation#Left AST#primary_type#Left DictItem AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right AST#builder_function_body#Left { AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . onItemSelected AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left item AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right } AST#builder_function_body#Right AST#method_declaration#Right /**
* 获取当前选中列表
* @returns {string[]} 选中列表
*/ AST#method_declaration#Left private getActiveList AST#parameter_list#Left ( ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left AST#array_type#Left string [ ] AST#array_type#Right AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#if_statement#Left if ( AST#expression#Left AST#member_expression#Left AST#expression#Left AST#unary_expression#Left ! AST#expression#Left this AST#expression#Right AST#unary_expression#Right AST#expression#Right . selectedItem AST#member_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#array_literal#Left [ ] AST#array_literal#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#if_statement#Right AST#statement#Right AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#array_literal#Left [ AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . getItemKey AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . selectedItem AST#member_expression#Right AST#expression#Right , AST#expression#Left 0 AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ] AST#array_literal#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right /**
* 获取字典项 Key
* @param {DictItem} item - 字典项
* @param {number} index - 下标
* @returns {string} Key
*/ AST#method_declaration#Left private getItemKey AST#parameter_list#Left ( AST#parameter#Left item : AST#type_annotation#Left AST#primary_type#Left DictItem AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left index : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left itemId : AST#type_annotation#Left AST#union_type#Left AST#primary_type#Left number AST#primary_type#Right | AST#primary_type#Left null AST#primary_type#Right | AST#primary_type#Left undefined AST#primary_type#Right AST#union_type#Right AST#type_annotation#Right = AST#expression#Left AST#member_expression#Left AST#expression#Left item AST#expression#Right . id AST#member_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left itemId AST#expression#Right === AST#expression#Left AST#null_literal#Left null AST#null_literal#Right AST#expression#Right AST#binary_expression#Right AST#expression#Right || AST#expression#Left AST#binary_expression#Left AST#expression#Left itemId AST#expression#Right === AST#expression#Left undefined AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#template_literal#Left ` AST#template_substitution#Left $ { AST#expression#Left index AST#expression#Right } AST#template_substitution#Right ` AST#template_literal#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#if_statement#Right AST#statement#Right AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#template_literal#Left ` AST#template_substitution#Left $ { AST#expression#Left itemId AST#expression#Right } AST#template_substitution#Right ` AST#template_literal#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right /**
* 处理确认按钮点击
* @returns {void} 无返回值
*/ AST#method_declaration#Left private handleConfirm AST#parameter_list#Left ( ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right AST#builder_function_body#Left { AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . onConfirm AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . selectedItem AST#member_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . onDismiss AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right } AST#builder_function_body#Right AST#method_declaration#Right /**
* 自定义加载状态
* @returns {void} 无返回值
*/ AST#method_declaration#Left AST#decorator#Left @ Builder AST#decorator#Right private CustomLoading AST#parameter_list#Left ( ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right AST#builder_function_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Column ( ) AST#container_content_body#Left { AST#ui_custom_component_statement#Left PageLoading ( ) ; AST#ui_custom_component_statement#Right } AST#container_content_body#Right AST#ui_component#Right AST#modifier_chain_expression#Left . height ( AST#expression#Left 300 AST#expression#Right ) AST#modifier_chain_expression#Left . width ( AST#expression#Left P100 AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right AST#ERROR#Left ; AST#ERROR#Right } AST#builder_function_body#Right AST#method_declaration#Right /**
* 自定义错误状态
* @returns {void} 无返回值
*/ AST#method_declaration#Left AST#decorator#Left @ Builder AST#decorator#Right private CustomError AST#parameter_list#Left ( ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right AST#builder_function_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Column ( ) AST#container_content_body#Left { AST#ui_custom_component_statement#Left EmptyNetwork ( AST#component_parameters#Left { AST#component_parameter#Left onAction : AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right => AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . onRetry AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#arrow_function#Right AST#expression#Right AST#component_parameter#Right } AST#component_parameters#Right ) ; AST#ui_custom_component_statement#Right } AST#container_content_body#Right AST#ui_component#Right AST#modifier_chain_expression#Left . height ( AST#expression#Left 300 AST#expression#Right ) AST#modifier_chain_expression#Left . width ( AST#expression#Left P100 AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right AST#ERROR#Left ; AST#ERROR#Right } AST#builder_function_body#Right AST#method_declaration#Right } AST#component_body#Right AST#decorated_export_declaration#Right
|
@ComponentV2
export struct DictSelectModal {
@Param
@Require
visible: boolean = false;
@Param
title: ResourceStr = $r("app.string.please_select");
@Param
onDismiss: () => void = () => {
};
@Param
uiState: BaseNetWorkUiState = BaseNetWorkUiState.LOADING;
@Param
dictList: DictItem[] = [];
@Param
selectedItem: DictItem | null = null;
@Param
onItemSelected: (item: DictItem) => void = () => {
};
@Param
onConfirm: (item: DictItem | null) => void = () => {
};
@Param
onRetry: () => void = () => {
};
@Local
private readonly groupId: string = "dict_select_group";
build(): void {
BottomModal({
visible: this.visible,
title: this.title,
onDismiss: this.onDismiss,
containerColor: $r("app.color.bg_grey"),
content: (): void => this.ModalContentNetWorkLayout()
});
}
@Builder
private ModalContentNetWorkLayout(): void {
BaseNetWorkView({
uiState: this.uiState,
onRetry: this.onRetry,
loadingBuilder: (): void => this.CustomLoading(),
errorBuilder: (): void => this.CustomError(),
content: (): void => this.ModalContent()
});
}
@Builder
private ModalContent(): void {
ColumnStart({ widthValue: P100 }) {
Scroll() {
IBestCheckboxGroup({ group: this.groupId, activeList: this.getActiveList() }) {
IBestCellGroup({
inset: true,
radius: $r("app.float.radius_medium"),
outerMargin: 0
}) {
ForEach(this.dictList, (item: DictItem, index: number): void => {
IBestCell({
title: item.name ?? "",
center: true,
clickable: true,
hasBorder: index !== this.dictList.length - 1,
rightIconBuilder: (): void => this.DictItemCheckbox(this.getItemKey(item, index)),
onCellClick: (): void => this.onItemClick(item)
});
}, (item: DictItem, index: number): string => `${item.id ?? 0}-${index}`);
}
}
}
.width(P100)
.scrollBar(BarState.Off);
SpaceVerticalLarge();
IBestButton({
text: $r("app.string.confirm"),
type: "primary",
round: true,
btnWidth: P100,
disabled: this.selectedItem === null,
onBtnClick: (): void => this.handleConfirm()
});
}
}
@Builder
private DictItemCheckbox(name: string): void {
IBestCheckbox({
group: this.groupId,
name: name
});
}
private onItemClick(item: DictItem): void {
this.onItemSelected(item);
}
private getActiveList(): string[] {
if (!this.selectedItem) {
return [];
}
return [this.getItemKey(this.selectedItem, 0)];
}
private getItemKey(item: DictItem, index: number): string {
const itemId: number | null | undefined = item.id;
if (itemId === null || itemId === undefined) {
return `${index}`;
}
return `${itemId}`;
}
private handleConfirm(): void {
this.onConfirm(this.selectedItem);
this.onDismiss();
}
@Builder
private CustomLoading(): void {
Column() {
PageLoading();
}
.height(300)
.width(P100);
}
@Builder
private CustomError(): void {
Column() {
EmptyNetwork({
onAction: (): void => this.onRetry()
});
}
.height(300)
.width(P100);
}
}
|
https://github.com/Joker-x-dev/CoolMallArkTS.git/blob/9f3fabf89fb277692cb82daf734c220c7282919c/core/ui/src/main/ets/component/modal/DictSelectModal.ets#L16-L231
|
76144ed17da983bbcaff812eb31f527c844f7ff3
|
github
|
openharmony/interface_sdk-js
|
c349adc73e2ec1f61f6fca489b5af059e3ed6999
|
api/@ohos.deviceInfo.d.ets
|
arkts
|
get
|
Obtains the version ID by a string.
@syscap SystemCapability.Startup.SystemInfo
@crossplatform
@since 20
@arkts 1.2
|
static get versionId(): string;
|
AST#method_declaration#Left static get AST#ERROR#Left versionId AST#ERROR#Right AST#parameter_list#Left ( ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right ; AST#method_declaration#Right
|
static get versionId(): string;
|
https://github.com/openharmony/interface_sdk-js/blob/c349adc73e2ec1f61f6fca489b5af059e3ed6999/api/@ohos.deviceInfo.d.ets#L316-L316
|
45fbc50e453266c9afa3446b109b8e58477b441d
|
gitee
|
bigbear20240612/birthday_reminder.git
|
647c411a6619affd42eb5d163ff18db4b34b27ff
|
entry/src/main/ets/common/utils/DateUtils.ets
|
arkts
|
getRelativeTime
|
获取相对时间描述
@param date 目标日期
@param baseDate 基准日期,默认为现在
@returns 相对时间描述
|
static getRelativeTime(date: Date, baseDate: Date = new Date()): string {
const diff = DateUtils.daysBetween(baseDate, date);
if (diff === 0) {
return '今天';
} else if (diff === 1) {
return '明天';
} else if (diff === -1) {
return '昨天';
} else if (diff > 0 && diff <= 7) {
return `${diff}天后`;
} else if (diff < 0 && diff >= -7) {
return `${Math.abs(diff)}天前`;
} else if (diff > 7) {
return DateUtils.formatDate(date, 'MM-DD');
} else {
return DateUtils.formatDate(date, 'YYYY-MM-DD');
}
}
|
AST#method_declaration#Left static getRelativeTime AST#parameter_list#Left ( AST#parameter#Left date : AST#type_annotation#Left AST#primary_type#Left Date AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left baseDate : AST#type_annotation#Left AST#primary_type#Left Date AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#new_expression#Left new AST#expression#Left Date AST#expression#Right AST#new_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left diff = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left DateUtils AST#expression#Right . daysBetween AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left baseDate AST#expression#Right , AST#expression#Left date AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left diff AST#expression#Right === AST#expression#Left 0 AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#return_statement#Left return AST#expression#Left '今天' AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right else AST#if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left diff AST#expression#Right === AST#expression#Left 1 AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#return_statement#Left return AST#expression#Left '明天' AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right else AST#if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left diff AST#expression#Right === AST#expression#Left AST#unary_expression#Left - AST#expression#Left 1 AST#expression#Right AST#unary_expression#Right AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#return_statement#Left return AST#expression#Left '昨天' AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right else AST#if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left diff AST#expression#Right > AST#expression#Left 0 AST#expression#Right AST#binary_expression#Right AST#expression#Right && AST#expression#Left AST#binary_expression#Left AST#expression#Left diff AST#expression#Right <= AST#expression#Left 7 AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#template_literal#Left ` AST#template_substitution#Left $ { AST#expression#Left diff AST#expression#Right } AST#template_substitution#Right 天后 ` AST#template_literal#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right else AST#if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left diff AST#expression#Right < AST#expression#Left 0 AST#expression#Right AST#binary_expression#Right AST#expression#Right && AST#expression#Left AST#binary_expression#Left AST#expression#Left diff AST#expression#Right >= AST#expression#Left AST#unary_expression#Left - AST#expression#Left 7 AST#expression#Right AST#unary_expression#Right AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#template_literal#Left ` AST#template_substitution#Left $ { AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left Math AST#expression#Right . abs AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left diff AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right } AST#template_substitution#Right 天前 ` AST#template_literal#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right else AST#if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left diff AST#expression#Right > AST#expression#Left 7 AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left DateUtils AST#expression#Right . formatDate AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left date AST#expression#Right , AST#expression#Left 'MM-DD' AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right else AST#block_statement#Left { AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left DateUtils AST#expression#Right . formatDate AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left date AST#expression#Right , AST#expression#Left 'YYYY-MM-DD' AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#if_statement#Right AST#if_statement#Right AST#if_statement#Right AST#if_statement#Right AST#if_statement#Right AST#if_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
static getRelativeTime(date: Date, baseDate: Date = new Date()): string {
const diff = DateUtils.daysBetween(baseDate, date);
if (diff === 0) {
return '今天';
} else if (diff === 1) {
return '明天';
} else if (diff === -1) {
return '昨天';
} else if (diff > 0 && diff <= 7) {
return `${diff}天后`;
} else if (diff < 0 && diff >= -7) {
return `${Math.abs(diff)}天前`;
} else if (diff > 7) {
return DateUtils.formatDate(date, 'MM-DD');
} else {
return DateUtils.formatDate(date, 'YYYY-MM-DD');
}
}
|
https://github.com/bigbear20240612/birthday_reminder.git/blob/647c411a6619affd42eb5d163ff18db4b34b27ff/entry/src/main/ets/common/utils/DateUtils.ets#L226-L244
|
c9b2a583352d15a439daab324de083b7e746be06
|
github
|
open9527/OpenHarmony
|
fdea69ed722d426bf04e817ec05bff4002e81a4e
|
libs/core/src/main/ets/utils/StringUtils.ets
|
arkts
|
toStr
|
格式化字符串
@param source
@param defaultValue
@returns
|
static toStr(source: string | null | undefined, defaultValue = "") {
if (source == null || source == undefined) {
return defaultValue;
}
return String(source);
}
|
AST#method_declaration#Left static toStr AST#parameter_list#Left ( AST#parameter#Left source : AST#type_annotation#Left AST#union_type#Left AST#primary_type#Left string AST#primary_type#Right | AST#primary_type#Left null AST#primary_type#Right | AST#primary_type#Left undefined AST#primary_type#Right AST#union_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left defaultValue = AST#expression#Left "" AST#expression#Right AST#parameter#Right ) AST#parameter_list#Right AST#block_statement#Left { AST#statement#Left AST#if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left source AST#expression#Right == AST#expression#Left AST#null_literal#Left null AST#null_literal#Right AST#expression#Right AST#binary_expression#Right AST#expression#Right || AST#expression#Left AST#binary_expression#Left AST#expression#Left source AST#expression#Right == AST#expression#Left undefined AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#return_statement#Left return AST#expression#Left defaultValue AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#if_statement#Right AST#statement#Right AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#call_expression#Left AST#expression#Left String AST#expression#Right AST#argument_list#Left ( AST#expression#Left source AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
static toStr(source: string | null | undefined, defaultValue = "") {
if (source == null || source == undefined) {
return defaultValue;
}
return String(source);
}
|
https://github.com/open9527/OpenHarmony/blob/fdea69ed722d426bf04e817ec05bff4002e81a4e/libs/core/src/main/ets/utils/StringUtils.ets#L88-L93
|
1f4d1112290511c452606c9cb7eae5e1fadb8e3d
|
gitee
|
openharmony/xts_acts
|
5eb33396ca0ffafd9e5d0ba4b5dedfde44aff686
|
arkui/ace_ets_component_common_attrss/ace_ets_component_common_attrss_position/entry/src/main/ets/MainAbility/view/position/NavRouterView.ets
|
arkts
|
NavRouterView
|
Copyright (c) 2023 Huawei Device Co., Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
|
@Component
export struct NavRouterView {
@State isActive: boolean = false;
@State indexDev: number = 0;
@Link _position: Position;
private componentKey: string = '';
build() {
NavRouter() {
Row() {
Image($r('app.media.icon'))
.width(30)
.height(30)
.borderRadius(30)
.margin({ left: 3, right: 10 })
Text(`NavRouter`)
.fontSize(22)
.fontWeight(500)
.textAlign(TextAlign.Center)
}
.width(180)
.height(72)
.backgroundColor('#fff')
.borderRadius(24)
NavDestination() {
Text(`NavDestination`).fontSize(50)
Flex({ direction: FlexDirection.Row }) {
Row() {
Image($r('app.media.icon'))
.width(40)
.height(40)
.borderRadius(40)
.margin({ right: 15 })
Text('NavDestination content')
.fontSize(30)
}.padding({ left: 15 })
}
}.backgroundColor('#ccc')
.title(`NavDestination`)
}.onStateChange((isActivated: boolean) => {
console.info('isActivated = ' + isActivated);
})
.position(this._position)
.key(this.componentKey)
}
}
|
AST#decorated_export_declaration#Left AST#decorator#Left @ Component AST#decorator#Right export struct NavRouterView AST#component_body#Left { AST#property_declaration#Left AST#decorator#Left @ State AST#decorator#Right isActive : AST#type_annotation#Left AST#primary_type#Left boolean AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#boolean_literal#Left false AST#boolean_literal#Right AST#expression#Right ; AST#property_declaration#Right AST#property_declaration#Left AST#decorator#Left @ State AST#decorator#Right indexDev : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left 0 AST#expression#Right ; AST#property_declaration#Right AST#property_declaration#Left AST#decorator#Left @ Link AST#decorator#Right _position : AST#type_annotation#Left AST#primary_type#Left Position AST#primary_type#Right AST#type_annotation#Right ; AST#property_declaration#Right AST#property_declaration#Left private componentKey : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left '' AST#expression#Right ; AST#property_declaration#Right AST#build_method#Left build ( ) AST#build_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left NavRouter ( ) AST#container_content_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Row ( ) AST#container_content_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Image ( AST#expression#Left AST#resource_expression#Left $r ( AST#expression#Left 'app.media.icon' AST#expression#Right ) AST#resource_expression#Right AST#expression#Right ) AST#ui_component#Right AST#modifier_chain_expression#Left . width ( AST#expression#Left 30 AST#expression#Right ) AST#modifier_chain_expression#Left . height ( AST#expression#Left 30 AST#expression#Right ) AST#modifier_chain_expression#Left . borderRadius ( AST#expression#Left 30 AST#expression#Right ) AST#modifier_chain_expression#Left . margin ( AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left left AST#property_name#Right : AST#expression#Left 3 AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left right AST#property_name#Right : AST#expression#Left 10 AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Text ( AST#expression#Left AST#template_literal#Left ` NavRouter ` AST#template_literal#Right AST#expression#Right ) AST#ui_component#Right AST#modifier_chain_expression#Left . fontSize ( AST#expression#Left 22 AST#expression#Right ) AST#modifier_chain_expression#Left . fontWeight ( AST#expression#Left 500 AST#expression#Right ) AST#modifier_chain_expression#Left . textAlign ( AST#expression#Left AST#member_expression#Left AST#expression#Left TextAlign AST#expression#Right . Center AST#member_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#container_content_body#Right AST#ui_component#Right AST#modifier_chain_expression#Left . width ( AST#expression#Left 180 AST#expression#Right ) AST#modifier_chain_expression#Left . height ( AST#expression#Left 72 AST#expression#Right ) AST#modifier_chain_expression#Left . backgroundColor ( AST#expression#Left '#fff' AST#expression#Right ) AST#modifier_chain_expression#Left . borderRadius ( AST#expression#Left 24 AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left NavDestination ( ) AST#container_content_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Text ( AST#expression#Left AST#template_literal#Left ` NavDestination ` AST#template_literal#Right AST#expression#Right ) AST#ui_component#Right AST#modifier_chain_expression#Left . fontSize ( AST#expression#Left 50 AST#expression#Right ) AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Flex ( AST#component_parameters#Left { AST#component_parameter#Left direction : AST#expression#Left AST#member_expression#Left AST#expression#Left FlexDirection AST#expression#Right . Row AST#member_expression#Right AST#expression#Right AST#component_parameter#Right } AST#component_parameters#Right ) AST#container_content_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Row ( ) AST#container_content_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Image ( AST#expression#Left AST#resource_expression#Left $r ( AST#expression#Left 'app.media.icon' AST#expression#Right ) AST#resource_expression#Right AST#expression#Right ) AST#ui_component#Right AST#modifier_chain_expression#Left . width ( AST#expression#Left 40 AST#expression#Right ) AST#modifier_chain_expression#Left . height ( AST#expression#Left 40 AST#expression#Right ) AST#modifier_chain_expression#Left . borderRadius ( AST#expression#Left 40 AST#expression#Right ) AST#modifier_chain_expression#Left . margin ( AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left right AST#property_name#Right : AST#expression#Left 15 AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Text ( AST#expression#Left 'NavDestination content' AST#expression#Right ) AST#ui_component#Right AST#modifier_chain_expression#Left . fontSize ( AST#expression#Left 30 AST#expression#Right ) AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#container_content_body#Right AST#ui_component#Right AST#modifier_chain_expression#Left . padding ( AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left left AST#property_name#Right : AST#expression#Left 15 AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#container_content_body#Right AST#ui_component#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#container_content_body#Right AST#ui_component#Right AST#modifier_chain_expression#Left . backgroundColor ( AST#expression#Left '#ccc' AST#expression#Right ) AST#modifier_chain_expression#Left . title ( AST#expression#Left AST#template_literal#Left ` NavDestination ` AST#template_literal#Right AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#container_content_body#Right AST#ui_component#Right AST#modifier_chain_expression#Left . onStateChange ( AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( AST#parameter#Left isActivated : AST#type_annotation#Left AST#primary_type#Left boolean AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right => AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left console AST#expression#Right . info AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left 'isActivated = ' AST#expression#Right + AST#expression#Left isActivated AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#arrow_function#Right AST#expression#Right ) AST#modifier_chain_expression#Left . position ( AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . _position AST#member_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Left . key ( AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . componentKey AST#member_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#build_body#Right AST#build_method#Right } AST#component_body#Right AST#decorated_export_declaration#Right
|
@Component
export struct NavRouterView {
@State isActive: boolean = false;
@State indexDev: number = 0;
@Link _position: Position;
private componentKey: string = '';
build() {
NavRouter() {
Row() {
Image($r('app.media.icon'))
.width(30)
.height(30)
.borderRadius(30)
.margin({ left: 3, right: 10 })
Text(`NavRouter`)
.fontSize(22)
.fontWeight(500)
.textAlign(TextAlign.Center)
}
.width(180)
.height(72)
.backgroundColor('#fff')
.borderRadius(24)
NavDestination() {
Text(`NavDestination`).fontSize(50)
Flex({ direction: FlexDirection.Row }) {
Row() {
Image($r('app.media.icon'))
.width(40)
.height(40)
.borderRadius(40)
.margin({ right: 15 })
Text('NavDestination content')
.fontSize(30)
}.padding({ left: 15 })
}
}.backgroundColor('#ccc')
.title(`NavDestination`)
}.onStateChange((isActivated: boolean) => {
console.info('isActivated = ' + isActivated);
})
.position(this._position)
.key(this.componentKey)
}
}
|
https://github.com/openharmony/xts_acts/blob/5eb33396ca0ffafd9e5d0ba4b5dedfde44aff686/arkui/ace_ets_component_common_attrss/ace_ets_component_common_attrss_position/entry/src/main/ets/MainAbility/view/position/NavRouterView.ets#L16-L62
|
fdb4293966c81bd0351096753550faae028dc9f8
|
gitee
|
openharmony/applications_settings
|
aac607310ec30e30d1d54db2e04d055655f72730
|
common/search/src/main/ets/default/page/resultComponent.ets
|
arkts
|
result component
|
@Component
export default struct ResultComponent {
@Link highlightKeyword: string
@State icon: string = ''
@State data: SearchData = new SearchData()
@State columnSpace: string = '2vp';
private TEXT_TYPE_NORMAL = 1
private TEXT_TYPE_KEYWORD = 2
@Builder
HighlightText(
spans: Info[],
fontColor: Color | Resource,
fontSize: Resource,
highlightFontColor: Color | Resource) {
Text() {
ForEach(spans.map((item1: Info, index1: number) => {
let tmpItem: InfoItem = { index: index1, data: item1 };
return tmpItem;
}), (item: InfoItem) => {
if (item.data.type == this.TEXT_TYPE_NORMAL) {
Span(item.data.text).fontColor(fontColor).fontSize(fontSize).fontWeight(FontWeight.Medium)
} else if (item.data.type == this.TEXT_TYPE_KEYWORD) {
Span(item.data.text).fontColor(highlightFontColor).fontSize(fontSize).fontWeight(FontWeight.Regular)
}
},
(item: InfoItem) => item.index.toString()
)
}
.textAlign(TextAlign.Start)
.maxLines(3)
.textOverflow({ overflow: TextOverflow.Ellipsis })
}
build()
|
AST#decorated_export_declaration#Left AST#decorator#Left @ Component AST#decorator#Right export default AST#ERROR#Left struct ResultComponent { AST#property_declaration#Left AST#decorator#Left @ Link AST#decorator#Right highlightKeyword : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#property_declaration#Right AST#property_declaration#Left AST#decorator#Left @ State AST#decorator#Right icon : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left '' AST#expression#Right AST#property_declaration#Right AST#property_declaration#Left AST#decorator#Left @ State AST#decorator#Right data : AST#type_annotation#Left AST#primary_type#Left SearchData AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#new_expression#Left new AST#expression#Left SearchData AST#expression#Right AST#new_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#property_declaration#Right AST#property_declaration#Left AST#decorator#Left @ State AST#decorator#Right columnSpace : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left '2vp' AST#expression#Right ; AST#property_declaration#Right AST#property_declaration#Left private TEXT_TYPE_NORMAL = AST#expression#Left 1 AST#expression#Right AST#property_declaration#Right AST#property_declaration#Left private TEXT_TYPE_KEYWORD = AST#expression#Left 2 AST#expression#Right AST#property_declaration#Right AST#method_declaration#Left AST#decorator#Left @ Builder AST#decorator#Right HighlightText AST#parameter_list#Left ( AST#parameter#Left spans : AST#type_annotation#Left AST#primary_type#Left AST#array_type#Left Info [ ] AST#array_type#Right AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left fontColor : AST#type_annotation#Left AST#union_type#Left AST#primary_type#Left Color AST#primary_type#Right | AST#primary_type#Left Resource AST#primary_type#Right AST#union_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left fontSize : AST#type_annotation#Left AST#primary_type#Left Resource AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left highlightFontColor : AST#type_annotation#Left AST#union_type#Left AST#primary_type#Left Color AST#primary_type#Right | AST#primary_type#Left Resource AST#primary_type#Right AST#union_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right AST#extend_function_body#Left { AST#ERROR#Left Text ( AST#ERROR#Left ) AST#ERROR#Right { AST#property_name#Left ForEach AST#property_name#Right ( spans AST#ERROR#Right AST#modifier_chain_expression#Left . map ( AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( AST#parameter#Left item1 : AST#type_annotation#Left AST#primary_type#Left Info AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left index1 : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right => AST#block_statement#Left { AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left tmpItem : AST#type_annotation#Left AST#primary_type#Left InfoItem AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left index AST#property_name#Right : AST#expression#Left index1 AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left data AST#property_name#Right : AST#expression#Left item1 AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#return_statement#Left return AST#expression#Left tmpItem AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#arrow_function#Right AST#expression#Right AST#ERROR#Left ) AST#ERROR#Right , AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( AST#parameter#Left item : AST#type_annotation#Left AST#primary_type#Left InfoItem AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right => AST#block_statement#Left { AST#statement#Left AST#if_statement#Left if ( AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left item AST#expression#Right . data AST#member_expression#Right AST#expression#Right . type AST#member_expression#Right AST#expression#Right == AST#expression#Left this AST#expression#Right AST#binary_expression#Right AST#expression#Right . TEXT_TYPE_NORMAL AST#member_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left Span AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left item AST#expression#Right . data AST#member_expression#Right AST#expression#Right . text AST#member_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right . fontColor AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left fontColor AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right . fontSize AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left fontSize AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right . fontWeight AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#member_expression#Left AST#expression#Left FontWeight AST#expression#Right . Medium AST#member_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right else AST#if_statement#Left if ( AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left item AST#expression#Right . data AST#member_expression#Right AST#expression#Right . type AST#member_expression#Right AST#expression#Right == AST#expression#Left this AST#expression#Right AST#binary_expression#Right AST#expression#Right . TEXT_TYPE_KEYWORD AST#member_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left Span AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left item AST#expression#Right . data AST#member_expression#Right AST#expression#Right . text AST#member_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right . fontColor AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left highlightFontColor AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right . fontSize AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left fontSize AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right . fontWeight AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#member_expression#Left AST#expression#Left FontWeight AST#expression#Right . Regular AST#member_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#if_statement#Right AST#if_statement#Right AST#statement#Right } AST#block_statement#Right AST#arrow_function#Right AST#expression#Right , AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( AST#parameter#Left item : AST#type_annotation#Left AST#primary_type#Left InfoItem AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right => AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left item AST#expression#Right . index AST#member_expression#Right AST#expression#Right . toString AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#arrow_function#Right AST#expression#Right ) AST#modifier_chain_expression#Right } AST#extend_function_body#Right AST#method_declaration#Right . textAlign AST#ERROR#Right AST#expression#Left AST#call_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#parenthesized_expression#Left ( AST#expression#Left AST#member_expression#Left AST#expression#Left TextAlign AST#expression#Right . Start AST#member_expression#Right AST#expression#Right ) AST#parenthesized_expression#Right AST#expression#Right . maxLines AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left 3 AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right . textOverflow AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left overflow AST#property_name#Right : AST#expression#Left AST#member_expression#Left AST#expression#Left TextOverflow AST#expression#Right . Ellipsis AST#member_expression#Right AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#ERROR#Left } build AST#ERROR#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#decorated_export_declaration#Right
|
@Component
export default struct ResultComponent {
@Link highlightKeyword: string
@State icon: string = ''
@State data: SearchData = new SearchData()
@State columnSpace: string = '2vp';
private TEXT_TYPE_NORMAL = 1
private TEXT_TYPE_KEYWORD = 2
@Builder
HighlightText(
spans: Info[],
fontColor: Color | Resource,
fontSize: Resource,
highlightFontColor: Color | Resource) {
Text() {
ForEach(spans.map((item1: Info, index1: number) => {
let tmpItem: InfoItem = { index: index1, data: item1 };
return tmpItem;
}), (item: InfoItem) => {
if (item.data.type == this.TEXT_TYPE_NORMAL) {
Span(item.data.text).fontColor(fontColor).fontSize(fontSize).fontWeight(FontWeight.Medium)
} else if (item.data.type == this.TEXT_TYPE_KEYWORD) {
Span(item.data.text).fontColor(highlightFontColor).fontSize(fontSize).fontWeight(FontWeight.Regular)
}
},
(item: InfoItem) => item.index.toString()
)
}
.textAlign(TextAlign.Start)
.maxLines(3)
.textOverflow({ overflow: TextOverflow.Ellipsis })
}
build()
|
https://github.com/openharmony/applications_settings/blob/aac607310ec30e30d1d54db2e04d055655f72730/common/search/src/main/ets/default/page/resultComponent.ets#L34-L69
|
208706815588a481cb0219757fdaa0939e49922d
|
gitee
|
|
openharmony/arkui_ace_engine
|
30c7d1ee12fbedf0fabece54291d75897e2ad44f
|
frameworks/bridge/arkts_frontend/koala_mirror/arkoala-arkts/arkui/src/Storage.ets
|
arkts
|
Size
|
Called when you check how much data is stored.
@since 7
|
static Size(): number {
return AppStorage.size()
}
|
AST#method_declaration#Left static Size AST#parameter_list#Left ( ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AppStorage AST#expression#Right . size AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
static Size(): number {
return AppStorage.size()
}
|
https://github.com/openharmony/arkui_ace_engine/blob/30c7d1ee12fbedf0fabece54291d75897e2ad44f/frameworks/bridge/arkts_frontend/koala_mirror/arkoala-arkts/arkui/src/Storage.ets#L246-L248
|
28a3c910f9458e6ce8d5fd339db882adc15a696b
|
gitee
|
Joker-x-dev/HarmonyKit.git
|
f97197ce157df7f303244fba42e34918306dfb08
|
core/util/src/main/ets/storage/PreferencesUtil.ets
|
arkts
|
set
|
写入键值并立即 flush 持久化
@param {string} key 键
@param {preferences.ValueType} value 值(支持 string/number/boolean)
@returns {Promise<void>} Promise<void>
|
async set(key: string, value: preferences.ValueType): Promise<void> {
try {
const prefs: preferences.Preferences = await this.getPrefs();
await prefs.put(key, value);
await prefs.flush();
} catch (error) {
throw this.wrapError(error, `写入键 ${key} 失败`);
}
}
|
AST#method_declaration#Left async set AST#parameter_list#Left ( AST#parameter#Left key : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left value : AST#type_annotation#Left AST#primary_type#Left AST#qualified_type#Left preferences . ValueType AST#qualified_type#Right AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left AST#generic_type#Left Promise AST#type_arguments#Left < AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right > AST#type_arguments#Right AST#generic_type#Right AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#try_statement#Left try AST#block_statement#Left { AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left prefs : AST#type_annotation#Left AST#primary_type#Left AST#qualified_type#Left preferences . Preferences AST#qualified_type#Right AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#await_expression#Left await AST#expression#Left this AST#expression#Right AST#await_expression#Right AST#expression#Right . getPrefs AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#await_expression#Left await AST#expression#Left prefs AST#expression#Right AST#await_expression#Right AST#expression#Right . put AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left key AST#expression#Right , AST#expression#Left value AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#await_expression#Left await AST#expression#Left prefs AST#expression#Right AST#await_expression#Right AST#expression#Right . flush AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#catch_clause#Left catch ( error ) AST#block_statement#Left { AST#statement#Left AST#throw_statement#Left throw AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . wrapError AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left error AST#expression#Right , AST#expression#Left AST#template_literal#Left ` 写入键 AST#template_substitution#Left $ { AST#expression#Left key AST#expression#Right } AST#template_substitution#Right 失败 ` AST#template_literal#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#throw_statement#Right AST#statement#Right } AST#block_statement#Right AST#catch_clause#Right AST#try_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
async set(key: string, value: preferences.ValueType): Promise<void> {
try {
const prefs: preferences.Preferences = await this.getPrefs();
await prefs.put(key, value);
await prefs.flush();
} catch (error) {
throw this.wrapError(error, `写入键 ${key} 失败`);
}
}
|
https://github.com/Joker-x-dev/HarmonyKit.git/blob/f97197ce157df7f303244fba42e34918306dfb08/core/util/src/main/ets/storage/PreferencesUtil.ets#L45-L53
|
945e465d02249444e1b4cb5e1686a36017e13e8b
|
github
|
Joker-x-dev/HarmonyKit.git
|
f97197ce157df7f303244fba42e34918306dfb08
|
core/designsystem/src/main/ets/constants/LayoutPercent.ets
|
arkts
|
75% 百分比
|
export const P75: string = "75%";
|
AST#export_declaration#Left export AST#variable_declaration#Left const AST#variable_declarator#Left P75 : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left "75%" AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#export_declaration#Right
|
export const P75: string = "75%";
|
https://github.com/Joker-x-dev/HarmonyKit.git/blob/f97197ce157df7f303244fba42e34918306dfb08/core/designsystem/src/main/ets/constants/LayoutPercent.ets#L84-L84
|
ccb54b220ef34eace70da22c4b93742630f9e213
|
github
|
|
harmonyos-cases/cases
|
eccdb71f1cee10fa6ff955e16c454c1b59d3ae13
|
CommonAppDevelopment/feature/statusbaranimation/src/main/ets/model/ObservedArray.ets
|
arkts
|
ObservedArray
|
Wraps an array as an observed object
|
@Observed
export class ObservedArray<T> extends Array<T> {
constructor(args?: T[]) {
if (args instanceof Array) {
super(...args);
} else {
super();
}
}
}
|
AST#decorated_export_declaration#Left AST#decorator#Left @ Observed AST#decorator#Right export class ObservedArray AST#type_parameters#Left < AST#type_parameter#Left T AST#type_parameter#Right > AST#type_parameters#Right extends AST#type_annotation#Left AST#primary_type#Left AST#generic_type#Left Array AST#type_arguments#Left < AST#type_annotation#Left AST#primary_type#Left T AST#primary_type#Right AST#type_annotation#Right > AST#type_arguments#Right AST#generic_type#Right AST#primary_type#Right AST#type_annotation#Right AST#class_body#Left { AST#constructor_declaration#Left constructor AST#parameter_list#Left ( AST#parameter#Left args ? : AST#type_annotation#Left AST#primary_type#Left AST#array_type#Left T [ ] AST#array_type#Right AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right AST#block_statement#Left { AST#statement#Left AST#if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left args AST#expression#Right instanceof AST#expression#Left Array AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left super AST#expression#Right AST#argument_list#Left ( AST#spread_element#Left ... AST#expression#Left args AST#expression#Right AST#spread_element#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right else AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left super AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#if_statement#Right AST#statement#Right } AST#block_statement#Right AST#constructor_declaration#Right } AST#class_body#Right AST#decorated_export_declaration#Right
|
@Observed
export class ObservedArray<T> extends Array<T> {
constructor(args?: T[]) {
if (args instanceof Array) {
super(...args);
} else {
super();
}
}
}
|
https://github.com/harmonyos-cases/cases/blob/eccdb71f1cee10fa6ff955e16c454c1b59d3ae13/CommonAppDevelopment/feature/statusbaranimation/src/main/ets/model/ObservedArray.ets#L19-L28
|
b4608dd611724eceac78a8651d99109e85c7de8b
|
gitee
|
KoStudio/ArkTS-WordTree.git
|
78c2a8f8ef6cf4c6be8bab2212f04bfcfa7e7324
|
entry/src/main/ets/models/managers/plan/plancurve/Plan.ets
|
arkts
|
get
|
/ 获取已经学习的单字(未删除)状态的wordIds
获取已经学习的单字(未删除)状态的wordIds
每个字只记录一次(即:只要是学习或复习过的字,不管复习过多少次,都只算一次已学习记录)
by ko 2021.03.20
@param learns 当前plan的学习记录数组
@returns 已学习的字列表
|
get learnedWordIds(): number[] | null {
// 获取所有learn对象的wordId,并过滤掉null
const wordIds: number[] = this.learns.map(l => l.wordId).filter(l => l !== null) as number[];
// 去除重复元素
return ArrayUtils.removedDuplicates(wordIds);
}
|
AST#method_declaration#Left get AST#ERROR#Left learnedWordIds AST#ERROR#Right AST#parameter_list#Left ( ) AST#parameter_list#Right : AST#type_annotation#Left AST#union_type#Left AST#primary_type#Left AST#array_type#Left number [ ] AST#array_type#Right AST#primary_type#Right | AST#primary_type#Left null AST#primary_type#Right AST#union_type#Right AST#type_annotation#Right AST#block_statement#Left { // 获取所有learn对象的wordId,并过滤掉null AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left wordIds : AST#type_annotation#Left AST#primary_type#Left AST#array_type#Left number [ ] AST#array_type#Right AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#as_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . learns AST#member_expression#Right AST#expression#Right . map AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#arrow_function#Left l => AST#expression#Left AST#member_expression#Left AST#expression#Left l AST#expression#Right . wordId AST#member_expression#Right AST#expression#Right AST#arrow_function#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right . filter AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#arrow_function#Left l => AST#expression#Left AST#binary_expression#Left AST#expression#Left l AST#expression#Right !== AST#expression#Left AST#null_literal#Left null AST#null_literal#Right AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#arrow_function#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right as AST#type_annotation#Left AST#primary_type#Left AST#array_type#Left number [ ] AST#array_type#Right AST#primary_type#Right AST#type_annotation#Right AST#as_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right // 去除重复元素 AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left ArrayUtils AST#expression#Right . removedDuplicates AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left wordIds AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
get learnedWordIds(): number[] | null {
const wordIds: number[] = this.learns.map(l => l.wordId).filter(l => l !== null) as number[];
return ArrayUtils.removedDuplicates(wordIds);
}
|
https://github.com/KoStudio/ArkTS-WordTree.git/blob/78c2a8f8ef6cf4c6be8bab2212f04bfcfa7e7324/entry/src/main/ets/models/managers/plan/plancurve/Plan.ets#L239-L245
|
d4585ff109229d32318372dcd97f52665163f3c2
|
github
|
fmtjava/Ohs_ArkTs_Eyepetizer.git
|
79578f394ccb926da1455e63b7fe0722df9b9a22
|
entry/src/main/ets/common/DateUtil.ets
|
arkts
|
formatTimestamp
|
将时间戳(毫秒)格式化为日期时间字符串
默认格式:yyyy/MM/dd HH:mm
@param milliseconds 13 位毫秒时间戳
@returns 如:2024/12/20 14:30:45
|
static formatTimestamp(milliseconds: number): string {
if (milliseconds <= 0) {
return '';
}
const date: Date = new Date(milliseconds);
const year: number = date.getFullYear();
const month: number = date.getMonth() + 1; // 0-11 → 1-12
const day: number = date.getDate();
const hours: number = date.getHours();
const minutes: number = date.getMinutes();
return `${year}/${DateUtil.padZero(month)}/${DateUtil.padZero(day)} ` +
`${DateUtil.padZero(hours)}:${DateUtil.padZero(minutes)}`;
}
|
AST#method_declaration#Left static formatTimestamp AST#parameter_list#Left ( AST#parameter#Left milliseconds : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left milliseconds AST#expression#Right <= AST#expression#Left 0 AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#return_statement#Left return AST#expression#Left '' AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#if_statement#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left date : AST#type_annotation#Left AST#primary_type#Left Date AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#new_expression#Left new AST#expression#Left Date AST#expression#Right AST#new_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left milliseconds AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left year : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left date AST#expression#Right . getFullYear AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left month : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left date AST#expression#Right . getMonth AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right + AST#expression#Left 1 AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right // 0-11 → 1-12 AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left day : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left date AST#expression#Right . getDate AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left hours : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left date AST#expression#Right . getHours AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left minutes : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left date AST#expression#Right . getMinutes AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#template_literal#Left ` AST#template_substitution#Left $ { AST#expression#Left year AST#expression#Right } AST#template_substitution#Right / AST#template_substitution#Left $ { AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left DateUtil AST#expression#Right . padZero AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left month AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right } AST#template_substitution#Right / AST#template_substitution#Left $ { AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left DateUtil AST#expression#Right . padZero AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left day AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right } AST#template_substitution#Right ` AST#template_literal#Right AST#expression#Right + AST#expression#Left AST#template_literal#Left ` AST#template_substitution#Left $ { AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left DateUtil AST#expression#Right . padZero AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left hours AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right } AST#template_substitution#Right : AST#template_substitution#Left $ { AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left DateUtil AST#expression#Right . padZero AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left minutes AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right } AST#template_substitution#Right ` AST#template_literal#Right AST#expression#Right AST#binary_expression#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
static formatTimestamp(milliseconds: number): string {
if (milliseconds <= 0) {
return '';
}
const date: Date = new Date(milliseconds);
const year: number = date.getFullYear();
const month: number = date.getMonth() + 1;
const day: number = date.getDate();
const hours: number = date.getHours();
const minutes: number = date.getMinutes();
return `${year}/${DateUtil.padZero(month)}/${DateUtil.padZero(day)} ` +
`${DateUtil.padZero(hours)}:${DateUtil.padZero(minutes)}`;
}
|
https://github.com/fmtjava/Ohs_ArkTs_Eyepetizer.git/blob/79578f394ccb926da1455e63b7fe0722df9b9a22/entry/src/main/ets/common/DateUtil.ets#L11-L24
|
b2510ccd8072161ebbf5038d1d329c7a0b307725
|
github
|
common-apps/ZRouter
|
5adc9c4bcca6ba7d9b323451ed464e1e9b47eee6
|
RouterApi/src/main/ets/api/Router.ets
|
arkts
|
getParam
|
@deprecated
@see {ZRouter.getInstance().getParam}
@returns
|
public static getParam(): ObjectOrNull {
return ZRouter.getRouterMgr().getParam()
}
|
AST#method_declaration#Left public static getParam AST#parameter_list#Left ( ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left ObjectOrNull AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left ZRouter AST#expression#Right . getRouterMgr AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right . getParam AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
public static getParam(): ObjectOrNull {
return ZRouter.getRouterMgr().getParam()
}
|
https://github.com/common-apps/ZRouter/blob/5adc9c4bcca6ba7d9b323451ed464e1e9b47eee6/RouterApi/src/main/ets/api/Router.ets#L533-L535
|
6b95cabde311d8a3df457ac4eae5c7879b6528b2
|
gitee
|
Joker-x-dev/CoolMallArkTS.git
|
9f3fabf89fb277692cb82daf734c220c7282919c
|
feature/user/src/main/ets/viewmodel/ProfileViewModel.ets
|
arkts
|
onLogoutClick
|
退出登录点击
@returns {void} 无返回值
|
onLogoutClick(): void {
this.requestLogout();
}
|
AST#method_declaration#Left onLogoutClick AST#parameter_list#Left ( ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right AST#builder_function_body#Left { AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . requestLogout AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right } AST#builder_function_body#Right AST#method_declaration#Right
|
onLogoutClick(): void {
this.requestLogout();
}
|
https://github.com/Joker-x-dev/CoolMallArkTS.git/blob/9f3fabf89fb277692cb82daf734c220c7282919c/feature/user/src/main/ets/viewmodel/ProfileViewModel.ets#L42-L44
|
5603e11aeb560b3e74e21e858c0ebf8ead6def48
|
github
|
openharmony/codelabs
|
d899f32a52b2ae0dfdbb86e34e8d94645b5d4090
|
ETSUI/WebComponent/entry/src/main/ets/common/Constant.ets
|
arkts
|
Copyright (c) 2022 Huawei Device Co., Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
|
export const WEB_PAGE_URI: string = 'pages/WebPage';
|
AST#export_declaration#Left export AST#variable_declaration#Left const AST#variable_declarator#Left WEB_PAGE_URI : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left 'pages/WebPage' AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#export_declaration#Right
|
export const WEB_PAGE_URI: string = 'pages/WebPage';
|
https://github.com/openharmony/codelabs/blob/d899f32a52b2ae0dfdbb86e34e8d94645b5d4090/ETSUI/WebComponent/entry/src/main/ets/common/Constant.ets#L16-L16
|
ca3f8fe73c581f6b000c07550c0e7ba86adeb542
|
gitee
|
|
openharmony/applications_app_samples
|
a826ab0e75fe51d028c1c5af58188e908736b53b
|
code/Performance/PerformanceLibrary/feature/ThreadDataTransfer/src/main/ets/utils/ImageUtil.ets
|
arkts
|
createPixelMapFromResource
|
从Resource创造PixelMap
|
static async createPixelMapFromResource(resource: Resource, context: Context): Promise<image.PixelMap> {
let colorsBuffer = await ImageUtils.getResourceArrayBufferFromResourceManager(resource, context);
let imageSource: image.ImageSource = image.createImageSource(colorsBuffer);
return ImageUtils.createPixelMapFromImageSource(imageSource);
}
|
AST#method_declaration#Left static async createPixelMapFromResource AST#parameter_list#Left ( AST#parameter#Left resource : AST#type_annotation#Left AST#primary_type#Left Resource AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left context : AST#type_annotation#Left AST#primary_type#Left Context AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left AST#generic_type#Left Promise AST#type_arguments#Left < AST#type_annotation#Left AST#primary_type#Left AST#qualified_type#Left image . PixelMap AST#qualified_type#Right AST#primary_type#Right AST#type_annotation#Right > AST#type_arguments#Right AST#generic_type#Right AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left colorsBuffer = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#await_expression#Left await AST#expression#Left ImageUtils AST#expression#Right AST#await_expression#Right AST#expression#Right . getResourceArrayBufferFromResourceManager AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left resource AST#expression#Right , AST#expression#Left context AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left imageSource : AST#type_annotation#Left AST#primary_type#Left AST#qualified_type#Left image . ImageSource AST#qualified_type#Right AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left image AST#expression#Right . createImageSource AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left colorsBuffer AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left ImageUtils AST#expression#Right . createPixelMapFromImageSource AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left imageSource AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
static async createPixelMapFromResource(resource: Resource, context: Context): Promise<image.PixelMap> {
let colorsBuffer = await ImageUtils.getResourceArrayBufferFromResourceManager(resource, context);
let imageSource: image.ImageSource = image.createImageSource(colorsBuffer);
return ImageUtils.createPixelMapFromImageSource(imageSource);
}
|
https://github.com/openharmony/applications_app_samples/blob/a826ab0e75fe51d028c1c5af58188e908736b53b/code/Performance/PerformanceLibrary/feature/ThreadDataTransfer/src/main/ets/utils/ImageUtil.ets#L23-L27
|
f86dd19d47e6cfb80168be40ff620cad5b4b6521
|
gitee
|
mayuanwei/harmonyOS_bilibili
|
8a36b68b1ddf4433e2e17ee10fee4993cce2a6c5
|
NEXT/XiaoXunAI/entry/src/main/ets/model/TongYiResponse.ets
|
arkts
|
通义千问大语言模型请求响应数据结构类(阿里云)
@author 却家庭
@version 1.0
@date 2024.10.10
|
export class TongYiResponse {
/**
* 系统生成的标志本次调用的id
*/
request_id?: string;
/**
* 调用结果信息对象
*/
output?: TongYiResp_output;
/**
* 计量信息对象
*/
usage?: TongYiResp_usage;
}
|
AST#export_declaration#Left export AST#class_declaration#Left class TongYiResponse AST#class_body#Left { /**
* 系统生成的标志本次调用的id
*/ AST#property_declaration#Left request_id ? : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right ; AST#property_declaration#Right /**
* 调用结果信息对象
*/ AST#property_declaration#Left output ? : AST#type_annotation#Left AST#primary_type#Left TongYiResp_output AST#primary_type#Right AST#type_annotation#Right ; AST#property_declaration#Right /**
* 计量信息对象
*/ AST#property_declaration#Left usage ? : AST#type_annotation#Left AST#primary_type#Left TongYiResp_usage AST#primary_type#Right AST#type_annotation#Right ; AST#property_declaration#Right } AST#class_body#Right AST#class_declaration#Right AST#export_declaration#Right
|
export class TongYiResponse {
request_id?: string;
output?: TongYiResp_output;
usage?: TongYiResp_usage;
}
|
https://github.com/mayuanwei/harmonyOS_bilibili/blob/8a36b68b1ddf4433e2e17ee10fee4993cce2a6c5/NEXT/XiaoXunAI/entry/src/main/ets/model/TongYiResponse.ets#L8-L23
|
0781f8fa9087f3697f6db8afb7f9135983a2b327
|
gitee
|
|
bigbear20240612/birthday_reminder.git
|
647c411a6619affd42eb5d163ff18db4b34b27ff
|
entry/src/main/ets/services/todo/TodoService.ets
|
arkts
|
generateId
|
生成唯一ID
|
private generateId(): string {
return `todo_${Date.now()}_${Math.random().toString(36).substring(2, 11)}`;
}
|
AST#method_declaration#Left private generateId AST#parameter_list#Left ( ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#template_literal#Left ` todo_ AST#template_substitution#Left $ { AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left Date AST#expression#Right . now AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right } AST#template_substitution#Right _ AST#template_substitution#Left $ { AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left Math AST#expression#Right . random AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right . toString AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left 36 AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right . substring AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left 2 AST#expression#Right , AST#expression#Left 11 AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right } AST#template_substitution#Right ` AST#template_literal#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
private generateId(): string {
return `todo_${Date.now()}_${Math.random().toString(36).substring(2, 11)}`;
}
|
https://github.com/bigbear20240612/birthday_reminder.git/blob/647c411a6619affd42eb5d163ff18db4b34b27ff/entry/src/main/ets/services/todo/TodoService.ets#L127-L129
|
8ed3e242879174de04ef882eed1e033877ea4abe
|
github
|
openharmony/applications_app_samples
|
a826ab0e75fe51d028c1c5af58188e908736b53b
|
code/DocsSample/ArkTS/ArkTsConcurrent/ApplicationMultithreadingDevelopment/PracticalCases/entry/src/main/ets/managers/SharedValuesBucket.ets
|
arkts
|
[Start define_data_format]
|
export interface IValueBucket {
id: number;
name: string;
age: number;
salary: number;
}
|
AST#export_declaration#Left export AST#interface_declaration#Left interface IValueBucket AST#object_type#Left { AST#type_member#Left id : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; AST#type_member#Left name : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; AST#type_member#Left age : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; AST#type_member#Left salary : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; } AST#object_type#Right AST#interface_declaration#Right AST#export_declaration#Right
|
export interface IValueBucket {
id: number;
name: string;
age: number;
salary: number;
}
|
https://github.com/openharmony/applications_app_samples/blob/a826ab0e75fe51d028c1c5af58188e908736b53b/code/DocsSample/ArkTS/ArkTsConcurrent/ApplicationMultithreadingDevelopment/PracticalCases/entry/src/main/ets/managers/SharedValuesBucket.ets#L17-L22
|
5f459e1ee01e14e192bbce089063da55d2337a73
|
gitee
|
|
harmonyos-cases/cases
|
eccdb71f1cee10fa6ff955e16c454c1b59d3ae13
|
CommonAppDevelopment/feature/imageviewer/src/main/ets/view/ImageItemView.ets
|
arkts
|
calcImageDefaultSize
|
根据图片宽高比及窗口大小计算图片的默认宽高,即,图片最适配屏幕的大小
@param imageWHRatio:图片原始宽高比
@param size:窗口大小{with:number,height:number}
@returns image.Size
|
calcImageDefaultSize(imageWHRatio: number, size: window.Size): image.Size {
let width = 0
let height = 0;
if (imageWHRatio > size.width / size.height) {
// 图片宽高比大于屏幕宽高比,图片默认以屏幕宽度进行显示
width = size.width;
height = size.width / imageWHRatio;
} else {
height = size.height;
width = size.height * imageWHRatio;
}
return { width: width, height: height };
}
|
AST#method_declaration#Left calcImageDefaultSize AST#parameter_list#Left ( AST#parameter#Left imageWHRatio : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left size : AST#type_annotation#Left AST#primary_type#Left AST#qualified_type#Left window . Size AST#qualified_type#Right AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left AST#qualified_type#Left image . Size AST#qualified_type#Right AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left width = AST#expression#Left 0 AST#expression#Right AST#variable_declarator#Right AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left height = AST#expression#Left 0 AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#if_statement#Left if ( AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left imageWHRatio AST#expression#Right > AST#expression#Left size AST#expression#Right AST#binary_expression#Right AST#expression#Right . width AST#member_expression#Right AST#expression#Right / AST#expression#Left size AST#expression#Right AST#binary_expression#Right AST#expression#Right . height AST#member_expression#Right AST#expression#Right ) AST#block_statement#Left { // 图片宽高比大于屏幕宽高比,图片默认以屏幕宽度进行显示 AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left width = AST#expression#Left AST#member_expression#Left AST#expression#Left size AST#expression#Right . width AST#member_expression#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left height = AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left size AST#expression#Right . width AST#member_expression#Right AST#expression#Right / AST#expression#Left imageWHRatio AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right else AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left height = AST#expression#Left AST#member_expression#Left AST#expression#Left size AST#expression#Right . height AST#member_expression#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left width = AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left size AST#expression#Right . height AST#member_expression#Right AST#expression#Right * AST#expression#Left imageWHRatio AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#if_statement#Right AST#statement#Right AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left width AST#property_name#Right : AST#expression#Left width AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left height AST#property_name#Right : AST#expression#Left height AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
calcImageDefaultSize(imageWHRatio: number, size: window.Size): image.Size {
let width = 0
let height = 0;
if (imageWHRatio > size.width / size.height) {
width = size.width;
height = size.width / imageWHRatio;
} else {
height = size.height;
width = size.height * imageWHRatio;
}
return { width: width, height: height };
}
|
https://github.com/harmonyos-cases/cases/blob/eccdb71f1cee10fa6ff955e16c454c1b59d3ae13/CommonAppDevelopment/feature/imageviewer/src/main/ets/view/ImageItemView.ets#L50-L62
|
169eb1497e55c190623d07d7934dfbd1c85109af
|
gitee
|
ThePivotPoint/ArkTS-LSP-Server-Plugin.git
|
6231773905435f000d00d94b26504433082ba40b
|
packages/declarations/ets/api/@ohos.arkui.advanced.Chip.d.ets
|
arkts
|
Defines chip symbolglyph options.
@interface ChipSymbolGlyphOptions
@syscap SystemCapability.ArkUI.ArkUI.Full
@crossplatform
@atomicservice
@since 12
|
export interface ChipSymbolGlyphOptions {
/**
* Symbol normal.
*
* @type { ?SymbolGlyphModifier }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
normal?: SymbolGlyphModifier;
/**
* Symbol activated.
*
* @type { ?SymbolGlyphModifier }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
activated?: SymbolGlyphModifier;
}
|
AST#export_declaration#Left export AST#interface_declaration#Left interface ChipSymbolGlyphOptions AST#object_type#Left { /**
* Symbol normal.
*
* @type { ?SymbolGlyphModifier }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/ AST#type_member#Left normal ? : AST#type_annotation#Left AST#primary_type#Left SymbolGlyphModifier AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; /**
* Symbol activated.
*
* @type { ?SymbolGlyphModifier }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/ AST#type_member#Left activated ? : AST#type_annotation#Left AST#primary_type#Left SymbolGlyphModifier AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; } AST#object_type#Right AST#interface_declaration#Right AST#export_declaration#Right
|
export interface ChipSymbolGlyphOptions {
normal?: SymbolGlyphModifier;
activated?: SymbolGlyphModifier;
}
|
https://github.com/ThePivotPoint/ArkTS-LSP-Server-Plugin.git/blob/6231773905435f000d00d94b26504433082ba40b/packages/declarations/ets/api/@ohos.arkui.advanced.Chip.d.ets#L223-L244
|
817abfa3f6bbb463cc6e2ca8c5ece31bed6cf3d3
|
github
|
|
openharmony/arkui_ace_engine
|
30c7d1ee12fbedf0fabece54291d75897e2ad44f
|
examples/Overlay/entry/src/main/ets/common/MyComponent.ets
|
arkts
|
MyComponent
|
Copyright (c) 2025 Huawei Device Co., Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
|
@Preview
@Component
export struct MyComponent {
title: string = 'test'
func: () => void = () => {
}
@Styles
pressedStyle(){
.backgroundColor(0x238E23)
}
@Styles
normalStyles() {
.backgroundColor(0x0000ff)
}
build() {
Text(this.title)
.key(this.title)
.fontSize(10)
.backgroundColor(0x0000ff)
.fontColor(0xffffff)
.padding(5)
.onClick(this.func)
.stateStyles({ pressed: this.pressedStyle, normal: this.normalStyles })
}
}
|
AST#decorated_export_declaration#Left AST#decorator#Left @ Preview AST#decorator#Right AST#decorator#Left @ Component AST#decorator#Right export struct MyComponent AST#component_body#Left { AST#property_declaration#Left title : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#ERROR#Left = AST#expression#Left AST#call_expression#Left AST#expression#Left 'test' AST#expression#Right AST#ERROR#Left func : AST#ERROR#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right => void AST#ERROR#Right = AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( ) AST#parameter_list#Right => AST#expression#Left AST#object_literal#Left { } AST#object_literal#Right AST#expression#Right AST#arrow_function#Right AST#expression#Right AST#property_declaration#Right AST#method_declaration#Left AST#decorator#Left @ Styles AST#decorator#Right pressedStyle AST#parameter_list#Left ( ) AST#parameter_list#Right AST#extend_function_body#Left { AST#modifier_chain_expression#Left . backgroundColor ( AST#expression#Left 0x238E23 AST#expression#Right ) AST#modifier_chain_expression#Right } AST#extend_function_body#Right AST#method_declaration#Right AST#method_declaration#Left AST#decorator#Left @ Styles AST#decorator#Right normalStyles AST#parameter_list#Left ( ) AST#parameter_list#Right AST#extend_function_body#Left { AST#modifier_chain_expression#Left . backgroundColor ( AST#expression#Left 0x0000ff AST#expression#Right ) AST#modifier_chain_expression#Right } AST#extend_function_body#Right AST#method_declaration#Right AST#build_method#Left build ( ) AST#build_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Text ( AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . title AST#member_expression#Right AST#expression#Right ) AST#ui_component#Right AST#modifier_chain_expression#Left . key ( AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . title AST#member_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Left . fontSize ( AST#expression#Left 10 AST#expression#Right ) AST#modifier_chain_expression#Left . backgroundColor ( AST#expression#Left 0x0000ff AST#expression#Right ) AST#modifier_chain_expression#Left . fontColor ( AST#expression#Left 0xffffff AST#expression#Right ) AST#modifier_chain_expression#Left . padding ( AST#expression#Left 5 AST#expression#Right ) AST#modifier_chain_expression#Left . onClick ( AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . func AST#member_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Left . stateStyles ( AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left pressed AST#property_name#Right : AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . pressedStyle AST#member_expression#Right AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left normal AST#property_name#Right : AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . normalStyles AST#member_expression#Right AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#build_body#Right AST#build_method#Right } AST#component_body#Right AST#decorated_export_declaration#Right
|
@Preview
@Component
export struct MyComponent {
title: string = 'test'
func: () => void = () => {
}
@Styles
pressedStyle(){
.backgroundColor(0x238E23)
}
@Styles
normalStyles() {
.backgroundColor(0x0000ff)
}
build() {
Text(this.title)
.key(this.title)
.fontSize(10)
.backgroundColor(0x0000ff)
.fontColor(0xffffff)
.padding(5)
.onClick(this.func)
.stateStyles({ pressed: this.pressedStyle, normal: this.normalStyles })
}
}
|
https://github.com/openharmony/arkui_ace_engine/blob/30c7d1ee12fbedf0fabece54291d75897e2ad44f/examples/Overlay/entry/src/main/ets/common/MyComponent.ets#L16-L43
|
52ab34c68037817bdf33d4249623ac04d593c64d
|
gitee
|
vhall/VHLive_SDK_Harmony
|
29c820e5301e17ae01bc6bdcc393a4437b518e7c
|
watchKit/src/main/ets/components/player/VHWatchLivePlayerComponent.ets
|
arkts
|
onPlayerVolume
|
播放器音量
@param volume :当前播放器音量值
|
onPlayerVolume(volume: number) {
}
|
AST#method_declaration#Left onPlayerVolume AST#parameter_list#Left ( AST#parameter#Left volume : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right AST#builder_function_body#Left { } AST#builder_function_body#Right AST#method_declaration#Right
|
onPlayerVolume(volume: number) {
}
|
https://github.com/vhall/VHLive_SDK_Harmony/blob/29c820e5301e17ae01bc6bdcc393a4437b518e7c/watchKit/src/main/ets/components/player/VHWatchLivePlayerComponent.ets#L228-L229
|
3b46dd34a2806963186dd3f03a5c50005e60057f
|
gitee
|
wuyuanwuhui999/harmony-arkts-chat-app-ui.git
|
128861bc002adae9c34c6ce8fbf12686c26e51ec
|
entry/src/main/ets/components/MarkdownRenderer.ets
|
arkts
|
MarkdownRenderer
|
MarkdownRenderer.ets - 主组件
|
@Component
export default struct MarkdownRenderer {
private markdownText: string = ''
private textColor: ResourceColor = Color.Black
private fontSize: number = 16
private paddingValue: Padding | number = 16
build() {
Column() {
this.buildMarkdownElements()
}
.width('100%')
.padding(this.paddingValue)
.alignItems(HorizontalAlign.Start)
}
@Builder
buildMarkdownElements() {
const elements = MarkdownParser.parse(this.markdownText)
ForEach(elements, (element: MarkdownElement) => {
this.renderElement(element)
})
}
@Builder
renderElement(element: MarkdownElement) {
if (element.type === 'h1') {
this.renderHeader(element.content, 24, FontWeight.Bold, { bottom: 16, top: 8 })
} else if (element.type === 'h2') {
this.renderHeader(element.content, 20, FontWeight.Bold, { bottom: 12, top: 6 })
} else if (element.type === 'h3') {
this.renderHeader(element.content, 18, FontWeight.Bold, { bottom: 10, top: 4 })
} else if (element.type === 'h4') {
this.renderHeader(element.content, 16, FontWeight.Medium, { bottom: 8, top: 4 })
} else if (element.type === 'h5') {
this.renderHeader(element.content, 15, FontWeight.Medium, { bottom: 6, top: 4 })
} else if (element.type === 'h6') {
this.renderHeader(element.content, 14, FontWeight.Medium, { bottom: 6, top: 4 })
} else if (element.type === 'list') {
this.renderList(element.items || [])
} else if (element.type === 'quote') {
this.renderQuote(element.content)
} else if (element.type === 'code') {
this.renderCode(element.content)
} else if (element.type === 'divider') {
this.renderDivider()
} else {
this.renderParagraph(element.content)
}
}
@Builder
renderHeader(content: string, size: number, weight: FontWeight, margin: Margin) {
Text(content)
.fontSize(size)
.fontWeight(weight)
.fontColor(this.textColor)
.margin(margin)
.width('100%')
}
@Builder
renderParagraph(content: string) {
const spans = MarkdownParser.parseInline(content)
Column() {
ForEach(spans, (span: InlineSpan) => {
if (span.isLink) {
Text(span.text)
.fontColor('#007DFF')
.decoration({ type: TextDecorationType.Underline })
.fontSize(this.fontSize)
.fontWeight(span.isBold ? FontWeight.Bold : FontWeight.Normal)
.fontStyle(span.isItalic ? FontStyle.Italic : FontStyle.Normal)
.onClick(() => {
this.handleLinkClick(span.linkUrl || '')
})
} else {
Text(span.text)
.fontColor(this.textColor)
.fontSize(this.fontSize)
.fontWeight(span.isBold ? FontWeight.Bold : FontWeight.Normal)
.fontStyle(span.isItalic ? FontStyle.Italic : FontStyle.Normal)
.backgroundColor(span.isCode ? '#F5F5F5' : Color.Transparent)
.fontFamily(span.isCode ? 'monospace' : 'sans-serif')
.padding(span.isCode ? { left: 4, right: 4, top: 2, bottom: 2 } : 0)
.borderRadius(span.isCode ? 4 : 0)
}
})
}
.width('100%')
.alignItems(HorizontalAlign.Start)
.margin({ bottom: 8 })
}
@Builder
renderList(items: string[]) {
Column() {
ForEach(items, (item: string) => {
Row() {
Text('•')
.fontSize(this.fontSize)
.fontColor(this.textColor)
.margin({ right: 8 })
this.renderParagraph(item)
}
.width('100%')
.margin({ bottom: 4 })
})
}
.margin({ bottom: 12, left: 8 })
.width('100%')
}
@Builder
renderQuote(content: string) {
Column() {
this.renderParagraph(content)
}
.padding(12)
.backgroundColor('#F8F9FA')
.border({ width: { left: 4 }, color: '#DEE2E6' })
.borderRadius(4)
.margin({ bottom: 12 })
.width('100%')
}
@Builder
renderCode(content: string) {
Text(content)
.fontSize(this.fontSize - 1)
.fontColor('#24292E')
.fontFamily('monospace')
.backgroundColor('#F6F8FA')
.padding(12)
.border({ width: 1, color: '#D0D7DE' })
.borderRadius(6)
.margin({ bottom: 12 })
.width('100%')
}
@Builder
renderDivider() {
Divider()
.color('#E1E3E6')
.margin({ top: 16, bottom: 16 })
.width('100%')
}
private handleLinkClick(url: string) {
console.log('打开链接:', url)
// 这里可以添加打开链接的逻辑
}
}
|
AST#decorated_export_declaration#Left AST#decorator#Left @ Component AST#decorator#Right export default struct MarkdownRenderer AST#component_body#Left { AST#property_declaration#Left private markdownText : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left '' AST#expression#Right AST#property_declaration#Right AST#property_declaration#Left private textColor : AST#type_annotation#Left AST#primary_type#Left ResourceColor AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#member_expression#Left AST#expression#Left Color AST#expression#Right . Black AST#member_expression#Right AST#expression#Right AST#property_declaration#Right AST#property_declaration#Left private fontSize : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left 16 AST#expression#Right AST#property_declaration#Right AST#property_declaration#Left private paddingValue : AST#type_annotation#Left AST#union_type#Left AST#primary_type#Left Padding AST#primary_type#Right | AST#primary_type#Left number AST#primary_type#Right AST#union_type#Right AST#type_annotation#Right = AST#expression#Left 16 AST#expression#Right AST#property_declaration#Right AST#build_method#Left build ( ) AST#build_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Column ( ) AST#container_content_body#Left { AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . buildMarkdownElements AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right } AST#container_content_body#Right AST#ui_component#Right AST#modifier_chain_expression#Left . width ( AST#expression#Left '100%' AST#expression#Right ) AST#modifier_chain_expression#Left . padding ( AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . paddingValue AST#member_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Left . alignItems ( AST#expression#Left AST#member_expression#Left AST#expression#Left HorizontalAlign AST#expression#Right . Start AST#member_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#build_body#Right AST#build_method#Right AST#method_declaration#Left AST#decorator#Left @ Builder AST#decorator#Right buildMarkdownElements AST#parameter_list#Left ( ) AST#parameter_list#Right AST#block_statement#Left { AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left elements = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left MarkdownParser AST#expression#Right . parse AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . markdownText AST#member_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#ERROR#Left ForEach AST#ERROR#Right AST#argument_list#Left ( AST#expression#Left elements AST#expression#Right , AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( AST#parameter#Left element : AST#type_annotation#Left AST#primary_type#Left MarkdownElement AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right => AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . renderElement AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left element AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#arrow_function#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right AST#variable_declaration#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right AST#method_declaration#Left AST#decorator#Left @ Builder AST#decorator#Right renderElement AST#parameter_list#Left ( AST#parameter#Left element : AST#type_annotation#Left AST#primary_type#Left MarkdownElement AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right AST#builder_function_body#Left { AST#ui_control_flow#Left AST#ui_if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left element AST#expression#Right . type AST#member_expression#Right AST#expression#Right === AST#expression#Left 'h1' AST#expression#Right AST#binary_expression#Right AST#expression#Right ) { AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . renderHeader AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#member_expression#Left AST#expression#Left element AST#expression#Right . content AST#member_expression#Right AST#expression#Right , AST#expression#Left 24 AST#expression#Right , AST#expression#Left AST#member_expression#Left AST#expression#Left FontWeight AST#expression#Right . Bold AST#member_expression#Right AST#expression#Right , AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left bottom AST#property_name#Right : AST#expression#Left 16 AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left top AST#property_name#Right : AST#expression#Left 8 AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right } else AST#ui_if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left element AST#expression#Right . type AST#member_expression#Right AST#expression#Right === AST#expression#Left 'h2' AST#expression#Right AST#binary_expression#Right AST#expression#Right ) { AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . renderHeader AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#member_expression#Left AST#expression#Left element AST#expression#Right . content AST#member_expression#Right AST#expression#Right , AST#expression#Left 20 AST#expression#Right , AST#expression#Left AST#member_expression#Left AST#expression#Left FontWeight AST#expression#Right . Bold AST#member_expression#Right AST#expression#Right , AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left bottom AST#property_name#Right : AST#expression#Left 12 AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left top AST#property_name#Right : AST#expression#Left 6 AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right } else AST#ui_if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left element AST#expression#Right . type AST#member_expression#Right AST#expression#Right === AST#expression#Left 'h3' AST#expression#Right AST#binary_expression#Right AST#expression#Right ) { AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . renderHeader AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#member_expression#Left AST#expression#Left element AST#expression#Right . content AST#member_expression#Right AST#expression#Right , AST#expression#Left 18 AST#expression#Right , AST#expression#Left AST#member_expression#Left AST#expression#Left FontWeight AST#expression#Right . Bold AST#member_expression#Right AST#expression#Right , AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left bottom AST#property_name#Right : AST#expression#Left 10 AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left top AST#property_name#Right : AST#expression#Left 4 AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right } else AST#ui_if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left element AST#expression#Right . type AST#member_expression#Right AST#expression#Right === AST#expression#Left 'h4' AST#expression#Right AST#binary_expression#Right AST#expression#Right ) { AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . renderHeader AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#member_expression#Left AST#expression#Left element AST#expression#Right . content AST#member_expression#Right AST#expression#Right , AST#expression#Left 16 AST#expression#Right , AST#expression#Left AST#member_expression#Left AST#expression#Left FontWeight AST#expression#Right . Medium AST#member_expression#Right AST#expression#Right , AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left bottom AST#property_name#Right : AST#expression#Left 8 AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left top AST#property_name#Right : AST#expression#Left 4 AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right } else AST#ui_if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left element AST#expression#Right . type AST#member_expression#Right AST#expression#Right === AST#expression#Left 'h5' AST#expression#Right AST#binary_expression#Right AST#expression#Right ) { AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . renderHeader AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#member_expression#Left AST#expression#Left element AST#expression#Right . content AST#member_expression#Right AST#expression#Right , AST#expression#Left 15 AST#expression#Right , AST#expression#Left AST#member_expression#Left AST#expression#Left FontWeight AST#expression#Right . Medium AST#member_expression#Right AST#expression#Right , AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left bottom AST#property_name#Right : AST#expression#Left 6 AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left top AST#property_name#Right : AST#expression#Left 4 AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right } else AST#ui_if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left element AST#expression#Right . type AST#member_expression#Right AST#expression#Right === AST#expression#Left 'h6' AST#expression#Right AST#binary_expression#Right AST#expression#Right ) { AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . renderHeader AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#member_expression#Left AST#expression#Left element AST#expression#Right . content AST#member_expression#Right AST#expression#Right , AST#expression#Left 14 AST#expression#Right , AST#expression#Left AST#member_expression#Left AST#expression#Left FontWeight AST#expression#Right . Medium AST#member_expression#Right AST#expression#Right , AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left bottom AST#property_name#Right : AST#expression#Left 6 AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left top AST#property_name#Right : AST#expression#Left 4 AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right } else AST#ui_if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left element AST#expression#Right . type AST#member_expression#Right AST#expression#Right === AST#expression#Left 'list' AST#expression#Right AST#binary_expression#Right AST#expression#Right ) { AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . renderList AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left element AST#expression#Right . items AST#member_expression#Right AST#expression#Right || AST#expression#Left AST#array_literal#Left [ ] AST#array_literal#Right AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right } else AST#ui_if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left element AST#expression#Right . type AST#member_expression#Right AST#expression#Right === AST#expression#Left 'quote' AST#expression#Right AST#binary_expression#Right AST#expression#Right ) { AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . renderQuote AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#member_expression#Left AST#expression#Left element AST#expression#Right . content AST#member_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right } else AST#ui_if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left element AST#expression#Right . type AST#member_expression#Right AST#expression#Right === AST#expression#Left 'code' AST#expression#Right AST#binary_expression#Right AST#expression#Right ) { AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . renderCode AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#member_expression#Left AST#expression#Left element AST#expression#Right . content AST#member_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right } else AST#ui_if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left element AST#expression#Right . type AST#member_expression#Right AST#expression#Right === AST#expression#Left 'divider' AST#expression#Right AST#binary_expression#Right AST#expression#Right ) { AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . renderDivider AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right } else { AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . renderParagraph AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#member_expression#Left AST#expression#Left element AST#expression#Right . content AST#member_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right } AST#ui_if_statement#Right AST#ui_if_statement#Right AST#ui_if_statement#Right AST#ui_if_statement#Right AST#ui_if_statement#Right AST#ui_if_statement#Right AST#ui_if_statement#Right AST#ui_if_statement#Right AST#ui_if_statement#Right AST#ui_if_statement#Right AST#ui_control_flow#Right } AST#builder_function_body#Right AST#method_declaration#Right AST#method_declaration#Left AST#decorator#Left @ Builder AST#decorator#Right renderHeader AST#parameter_list#Left ( AST#parameter#Left content : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left size : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left weight : AST#type_annotation#Left AST#primary_type#Left FontWeight AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left margin : AST#type_annotation#Left AST#primary_type#Left Margin AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right AST#builder_function_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Text ( AST#expression#Left content AST#expression#Right ) AST#ui_component#Right AST#modifier_chain_expression#Left . fontSize ( AST#expression#Left size AST#expression#Right ) AST#modifier_chain_expression#Left . fontWeight ( AST#expression#Left weight AST#expression#Right ) AST#modifier_chain_expression#Left . fontColor ( AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . textColor AST#member_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Left . margin ( AST#expression#Left margin AST#expression#Right ) AST#modifier_chain_expression#Left . width ( AST#expression#Left '100%' AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#builder_function_body#Right AST#method_declaration#Right AST#method_declaration#Left AST#decorator#Left @ Builder AST#decorator#Right renderParagraph AST#parameter_list#Left ( AST#parameter#Left content : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right AST#builder_function_body#Left { AST#ERROR#Left const AST#variable_declarator#Left spans = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left MarkdownParser AST#expression#Right . parseInline AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left content AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right AST#ERROR#Right AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Column ( ) AST#container_content_body#Left { AST#ui_control_flow#Left AST#for_each_statement#Left ForEach ( AST#expression#Left spans AST#expression#Right , AST#ui_builder_arrow_function#Left AST#parameter_list#Left ( AST#parameter#Left span : AST#type_annotation#Left AST#primary_type#Left InlineSpan AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right => AST#ui_arrow_function_body#Left { AST#ui_control_flow#Left AST#ui_if_statement#Left if ( AST#expression#Left AST#member_expression#Left AST#expression#Left span AST#expression#Right . isLink AST#member_expression#Right AST#expression#Right ) { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Text ( AST#expression#Left AST#member_expression#Left AST#expression#Left span AST#expression#Right . text AST#member_expression#Right AST#expression#Right ) AST#ui_component#Right AST#modifier_chain_expression#Left . fontColor ( AST#expression#Left '#007DFF' AST#expression#Right ) AST#modifier_chain_expression#Left . decoration ( AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left type AST#property_name#Right : AST#expression#Left AST#member_expression#Left AST#expression#Left TextDecorationType AST#expression#Right . Underline AST#member_expression#Right AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#modifier_chain_expression#Left . fontSize ( AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . fontSize AST#member_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Left . fontWeight ( AST#expression#Left AST#member_expression#Left AST#expression#Left AST#conditional_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left span AST#expression#Right . isBold AST#member_expression#Right AST#expression#Right ? AST#expression#Left AST#member_expression#Left AST#expression#Left FontWeight AST#expression#Right . Bold AST#member_expression#Right AST#expression#Right : AST#expression#Left FontWeight AST#expression#Right AST#conditional_expression#Right AST#expression#Right . Normal AST#member_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Left . fontStyle ( AST#expression#Left AST#member_expression#Left AST#expression#Left AST#conditional_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left span AST#expression#Right . isItalic AST#member_expression#Right AST#expression#Right ? AST#expression#Left AST#member_expression#Left AST#expression#Left FontStyle AST#expression#Right . Italic AST#member_expression#Right AST#expression#Right : AST#expression#Left FontStyle AST#expression#Right AST#conditional_expression#Right AST#expression#Right . Normal AST#member_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Left . onClick ( AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( ) AST#parameter_list#Right => AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . handleLinkClick AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left span AST#expression#Right . linkUrl AST#member_expression#Right AST#expression#Right || AST#expression#Left '' AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#arrow_function#Right AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } else { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Text ( AST#expression#Left AST#member_expression#Left AST#expression#Left span AST#expression#Right . text AST#member_expression#Right AST#expression#Right ) AST#ui_component#Right AST#modifier_chain_expression#Left . fontColor ( AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . textColor AST#member_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Left . fontSize ( AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . fontSize AST#member_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Left . fontWeight ( AST#expression#Left AST#member_expression#Left AST#expression#Left AST#conditional_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left span AST#expression#Right . isBold AST#member_expression#Right AST#expression#Right ? AST#expression#Left AST#member_expression#Left AST#expression#Left FontWeight AST#expression#Right . Bold AST#member_expression#Right AST#expression#Right : AST#expression#Left FontWeight AST#expression#Right AST#conditional_expression#Right AST#expression#Right . Normal AST#member_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Left . fontStyle ( AST#expression#Left AST#member_expression#Left AST#expression#Left AST#conditional_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left span AST#expression#Right . isItalic AST#member_expression#Right AST#expression#Right ? AST#expression#Left AST#member_expression#Left AST#expression#Left FontStyle AST#expression#Right . Italic AST#member_expression#Right AST#expression#Right : AST#expression#Left FontStyle AST#expression#Right AST#conditional_expression#Right AST#expression#Right . Normal AST#member_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Left . backgroundColor ( AST#expression#Left AST#member_expression#Left AST#expression#Left AST#conditional_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left span AST#expression#Right . isCode AST#member_expression#Right AST#expression#Right ? AST#expression#Left '#F5F5F5' AST#expression#Right : AST#expression#Left Color AST#expression#Right AST#conditional_expression#Right AST#expression#Right . Transparent AST#member_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Left . fontFamily ( AST#expression#Left AST#conditional_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left span AST#expression#Right . isCode AST#member_expression#Right AST#expression#Right ? AST#expression#Left 'monospace' AST#expression#Right : AST#expression#Left 'sans-serif' AST#expression#Right AST#conditional_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Left . padding ( AST#expression#Left AST#conditional_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left span AST#expression#Right . isCode AST#member_expression#Right AST#expression#Right ? AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left left AST#property_name#Right : AST#expression#Left 4 AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left right AST#property_name#Right : AST#expression#Left 4 AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left top AST#property_name#Right : AST#expression#Left 2 AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left bottom AST#property_name#Right : AST#expression#Left 2 AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right : AST#expression#Left 0 AST#expression#Right AST#conditional_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Left . borderRadius ( AST#expression#Left AST#conditional_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left span AST#expression#Right . isCode AST#member_expression#Right AST#expression#Right ? AST#expression#Left 4 AST#expression#Right : AST#expression#Left 0 AST#expression#Right AST#conditional_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#ui_if_statement#Right AST#ui_control_flow#Right } AST#ui_arrow_function_body#Right AST#ui_builder_arrow_function#Right ) AST#for_each_statement#Right AST#ui_control_flow#Right } AST#container_content_body#Right AST#ui_component#Right AST#modifier_chain_expression#Left . width ( AST#expression#Left '100%' AST#expression#Right ) AST#modifier_chain_expression#Left . alignItems ( AST#expression#Left AST#member_expression#Left AST#expression#Left HorizontalAlign AST#expression#Right . Start AST#member_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Left . margin ( AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left bottom AST#property_name#Right : AST#expression#Left 8 AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#builder_function_body#Right AST#method_declaration#Right AST#method_declaration#Left AST#decorator#Left @ Builder AST#decorator#Right renderList AST#parameter_list#Left ( AST#parameter#Left items : AST#type_annotation#Left AST#primary_type#Left AST#array_type#Left string [ ] AST#array_type#Right AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right AST#builder_function_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Column ( ) AST#container_content_body#Left { AST#ui_control_flow#Left AST#for_each_statement#Left ForEach ( AST#expression#Left items AST#expression#Right , AST#ui_builder_arrow_function#Left AST#parameter_list#Left ( AST#parameter#Left item : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right => AST#ui_arrow_function_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Row ( ) AST#container_content_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Text ( AST#expression#Left '•' AST#expression#Right ) AST#ui_component#Right AST#modifier_chain_expression#Left . fontSize ( AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . fontSize AST#member_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Left . fontColor ( AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . textColor AST#member_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Left . margin ( AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left right AST#property_name#Right : AST#expression#Left 8 AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . renderParagraph AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left item AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right } AST#container_content_body#Right AST#ui_component#Right AST#modifier_chain_expression#Left . width ( AST#expression#Left '100%' AST#expression#Right ) AST#modifier_chain_expression#Left . margin ( AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left bottom AST#property_name#Right : AST#expression#Left 4 AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#ui_arrow_function_body#Right AST#ui_builder_arrow_function#Right ) AST#for_each_statement#Right AST#ui_control_flow#Right } AST#container_content_body#Right AST#ui_component#Right AST#modifier_chain_expression#Left . margin ( AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left bottom AST#property_name#Right : AST#expression#Left 12 AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left left AST#property_name#Right : AST#expression#Left 8 AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#modifier_chain_expression#Left . width ( AST#expression#Left '100%' AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#builder_function_body#Right AST#method_declaration#Right AST#method_declaration#Left AST#decorator#Left @ Builder AST#decorator#Right renderQuote AST#parameter_list#Left ( AST#parameter#Left content : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right AST#builder_function_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Column ( ) AST#container_content_body#Left { AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . renderParagraph AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left content AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right } AST#container_content_body#Right AST#ui_component#Right AST#modifier_chain_expression#Left . padding ( AST#expression#Left 12 AST#expression#Right ) AST#modifier_chain_expression#Left . backgroundColor ( AST#expression#Left '#F8F9FA' AST#expression#Right ) AST#modifier_chain_expression#Left . border ( AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left width AST#property_name#Right : AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left left AST#property_name#Right : AST#expression#Left 4 AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left color AST#property_name#Right : AST#expression#Left '#DEE2E6' AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#modifier_chain_expression#Left . borderRadius ( AST#expression#Left 4 AST#expression#Right ) AST#modifier_chain_expression#Left . margin ( AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left bottom AST#property_name#Right : AST#expression#Left 12 AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#modifier_chain_expression#Left . width ( AST#expression#Left '100%' AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#builder_function_body#Right AST#method_declaration#Right AST#method_declaration#Left AST#decorator#Left @ Builder AST#decorator#Right renderCode AST#parameter_list#Left ( AST#parameter#Left content : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right AST#builder_function_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Text ( AST#expression#Left content AST#expression#Right ) AST#ui_component#Right AST#modifier_chain_expression#Left . fontSize ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . fontSize AST#member_expression#Right AST#expression#Right - AST#expression#Left 1 AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Left . fontColor ( AST#expression#Left '#24292E' AST#expression#Right ) AST#modifier_chain_expression#Left . fontFamily ( AST#expression#Left 'monospace' AST#expression#Right ) AST#modifier_chain_expression#Left . backgroundColor ( AST#expression#Left '#F6F8FA' AST#expression#Right ) AST#modifier_chain_expression#Left . padding ( AST#expression#Left 12 AST#expression#Right ) AST#modifier_chain_expression#Left . border ( AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left width AST#property_name#Right : AST#expression#Left 1 AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left color AST#property_name#Right : AST#expression#Left '#D0D7DE' AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#modifier_chain_expression#Left . borderRadius ( AST#expression#Left 6 AST#expression#Right ) AST#modifier_chain_expression#Left . margin ( AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left bottom AST#property_name#Right : AST#expression#Left 12 AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#modifier_chain_expression#Left . width ( AST#expression#Left '100%' AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#builder_function_body#Right AST#method_declaration#Right AST#method_declaration#Left AST#decorator#Left @ Builder AST#decorator#Right renderDivider AST#parameter_list#Left ( ) AST#parameter_list#Right AST#builder_function_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Divider ( ) AST#ui_component#Right AST#modifier_chain_expression#Left . color ( AST#expression#Left '#E1E3E6' AST#expression#Right ) AST#modifier_chain_expression#Left . margin ( AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left top AST#property_name#Right : AST#expression#Left 16 AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left bottom AST#property_name#Right : AST#expression#Left 16 AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#modifier_chain_expression#Left . width ( AST#expression#Left '100%' AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#builder_function_body#Right AST#method_declaration#Right AST#method_declaration#Left private handleLinkClick AST#parameter_list#Left ( AST#parameter#Left url : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right AST#builder_function_body#Left { AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left console AST#expression#Right . log AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left '打开链接:' AST#expression#Right , AST#expression#Left url AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right // 这里可以添加打开链接的逻辑 } AST#builder_function_body#Right AST#method_declaration#Right } AST#component_body#Right AST#decorated_export_declaration#Right
|
@Component
export default struct MarkdownRenderer {
private markdownText: string = ''
private textColor: ResourceColor = Color.Black
private fontSize: number = 16
private paddingValue: Padding | number = 16
build() {
Column() {
this.buildMarkdownElements()
}
.width('100%')
.padding(this.paddingValue)
.alignItems(HorizontalAlign.Start)
}
@Builder
buildMarkdownElements() {
const elements = MarkdownParser.parse(this.markdownText)
ForEach(elements, (element: MarkdownElement) => {
this.renderElement(element)
})
}
@Builder
renderElement(element: MarkdownElement) {
if (element.type === 'h1') {
this.renderHeader(element.content, 24, FontWeight.Bold, { bottom: 16, top: 8 })
} else if (element.type === 'h2') {
this.renderHeader(element.content, 20, FontWeight.Bold, { bottom: 12, top: 6 })
} else if (element.type === 'h3') {
this.renderHeader(element.content, 18, FontWeight.Bold, { bottom: 10, top: 4 })
} else if (element.type === 'h4') {
this.renderHeader(element.content, 16, FontWeight.Medium, { bottom: 8, top: 4 })
} else if (element.type === 'h5') {
this.renderHeader(element.content, 15, FontWeight.Medium, { bottom: 6, top: 4 })
} else if (element.type === 'h6') {
this.renderHeader(element.content, 14, FontWeight.Medium, { bottom: 6, top: 4 })
} else if (element.type === 'list') {
this.renderList(element.items || [])
} else if (element.type === 'quote') {
this.renderQuote(element.content)
} else if (element.type === 'code') {
this.renderCode(element.content)
} else if (element.type === 'divider') {
this.renderDivider()
} else {
this.renderParagraph(element.content)
}
}
@Builder
renderHeader(content: string, size: number, weight: FontWeight, margin: Margin) {
Text(content)
.fontSize(size)
.fontWeight(weight)
.fontColor(this.textColor)
.margin(margin)
.width('100%')
}
@Builder
renderParagraph(content: string) {
const spans = MarkdownParser.parseInline(content)
Column() {
ForEach(spans, (span: InlineSpan) => {
if (span.isLink) {
Text(span.text)
.fontColor('#007DFF')
.decoration({ type: TextDecorationType.Underline })
.fontSize(this.fontSize)
.fontWeight(span.isBold ? FontWeight.Bold : FontWeight.Normal)
.fontStyle(span.isItalic ? FontStyle.Italic : FontStyle.Normal)
.onClick(() => {
this.handleLinkClick(span.linkUrl || '')
})
} else {
Text(span.text)
.fontColor(this.textColor)
.fontSize(this.fontSize)
.fontWeight(span.isBold ? FontWeight.Bold : FontWeight.Normal)
.fontStyle(span.isItalic ? FontStyle.Italic : FontStyle.Normal)
.backgroundColor(span.isCode ? '#F5F5F5' : Color.Transparent)
.fontFamily(span.isCode ? 'monospace' : 'sans-serif')
.padding(span.isCode ? { left: 4, right: 4, top: 2, bottom: 2 } : 0)
.borderRadius(span.isCode ? 4 : 0)
}
})
}
.width('100%')
.alignItems(HorizontalAlign.Start)
.margin({ bottom: 8 })
}
@Builder
renderList(items: string[]) {
Column() {
ForEach(items, (item: string) => {
Row() {
Text('•')
.fontSize(this.fontSize)
.fontColor(this.textColor)
.margin({ right: 8 })
this.renderParagraph(item)
}
.width('100%')
.margin({ bottom: 4 })
})
}
.margin({ bottom: 12, left: 8 })
.width('100%')
}
@Builder
renderQuote(content: string) {
Column() {
this.renderParagraph(content)
}
.padding(12)
.backgroundColor('#F8F9FA')
.border({ width: { left: 4 }, color: '#DEE2E6' })
.borderRadius(4)
.margin({ bottom: 12 })
.width('100%')
}
@Builder
renderCode(content: string) {
Text(content)
.fontSize(this.fontSize - 1)
.fontColor('#24292E')
.fontFamily('monospace')
.backgroundColor('#F6F8FA')
.padding(12)
.border({ width: 1, color: '#D0D7DE' })
.borderRadius(6)
.margin({ bottom: 12 })
.width('100%')
}
@Builder
renderDivider() {
Divider()
.color('#E1E3E6')
.margin({ top: 16, bottom: 16 })
.width('100%')
}
private handleLinkClick(url: string) {
console.log('打开链接:', url)
}
}
|
https://github.com/wuyuanwuhui999/harmony-arkts-chat-app-ui.git/blob/128861bc002adae9c34c6ce8fbf12686c26e51ec/entry/src/main/ets/components/MarkdownRenderer.ets#L204-L358
|
f85643b485663fcd911a6c39d037917ec0d285bb
|
github
|
harmonyos_samples/BestPracticeSnippets
|
490ea539a6d4427dd395f3dac3cf4887719f37af
|
ArkUI/Component_Redundancy_Refresh_Optimization/entry/src/main/ets/segment/segment1.ets
|
arkts
|
Properties of uiStyle used by multiple components
|
build() {
Column() {
// Components that use state variables
SpecialImage({ specialImageUiStyle: this.uiStyle })
Column() {
// 需要替换为开发者所需的图像资源文件
Image($r('app.media.startIcon'))
.height('150vp')
.width('150vp')
.scale({
x: this.uiStyle.scaleX,
y: this.uiStyle.scaleY
})
Text('Hello World')
.fontWeight(FontWeight.Bold)
}
.translate({
x: this.uiStyle.translateX,
y: this.uiStyle.translateY
})
.width('95%')
.height('200vp')
.margin({
top: '10vp',
left: '15vp',
right: '15vp'
})
.borderRadius('16vp')
.backgroundColor(Color.White)
// Modify the value of a state variable via a button click callback, causing the corresponding component to refresh.
Column() {
Button('Move')
.width('80%')
.onClick(() => {
this.getUIContext().animateTo({ duration: animationDuration }, () => {
this.uiStyle.translateY = (this.uiStyle.translateY + translateYChangeValue) % translateYChangeRange;
})
})
Button('Scale')
.width('80%')
.onClick(() => {
this.uiStyle.scaleX = (this.uiStyle.scaleX + scaleXChangeValue) % scaleXChangeRange;
})
.margin({
top: '10vp',
left: '15vp',
right: '15vp'
})
}
.height('35%')
.justifyContent(FlexAlign.End)
.width('100%')
}
}
|
AST#build_method#Left build ( ) AST#build_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Column ( ) AST#container_content_body#Left { // Components that use state variables AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left SpecialImage ( AST#component_parameters#Left { AST#component_parameter#Left specialImageUiStyle : AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . uiStyle AST#member_expression#Right AST#expression#Right AST#component_parameter#Right } AST#component_parameters#Right ) AST#ui_component#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Column ( ) AST#container_content_body#Left { // 需要替换为开发者所需的图像资源文件 AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Image ( AST#expression#Left AST#resource_expression#Left $r ( AST#expression#Left 'app.media.startIcon' AST#expression#Right ) AST#resource_expression#Right AST#expression#Right ) AST#ui_component#Right AST#modifier_chain_expression#Left . height ( AST#expression#Left '150vp' AST#expression#Right ) AST#modifier_chain_expression#Left . width ( AST#expression#Left '150vp' AST#expression#Right ) AST#modifier_chain_expression#Left . scale ( AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left x AST#property_name#Right : AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . uiStyle AST#member_expression#Right AST#expression#Right . scaleX AST#member_expression#Right AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left y AST#property_name#Right : AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . uiStyle AST#member_expression#Right AST#expression#Right . scaleY AST#member_expression#Right AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Text ( AST#expression#Left 'Hello World' AST#expression#Right ) AST#ui_component#Right AST#modifier_chain_expression#Left . fontWeight ( AST#expression#Left AST#member_expression#Left AST#expression#Left FontWeight AST#expression#Right . Bold AST#member_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#container_content_body#Right AST#ui_component#Right AST#modifier_chain_expression#Left . translate ( AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left x AST#property_name#Right : AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . uiStyle AST#member_expression#Right AST#expression#Right . translateX AST#member_expression#Right AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left y AST#property_name#Right : AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . uiStyle AST#member_expression#Right AST#expression#Right . translateY AST#member_expression#Right AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#modifier_chain_expression#Left . width ( AST#expression#Left '95%' AST#expression#Right ) AST#modifier_chain_expression#Left . height ( AST#expression#Left '200vp' AST#expression#Right ) AST#modifier_chain_expression#Left . margin ( AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left top AST#property_name#Right : AST#expression#Left '10vp' AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left left AST#property_name#Right : AST#expression#Left '15vp' AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left right AST#property_name#Right : AST#expression#Left '15vp' AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#modifier_chain_expression#Left . borderRadius ( AST#expression#Left '16vp' AST#expression#Right ) AST#modifier_chain_expression#Left . backgroundColor ( AST#expression#Left AST#member_expression#Left AST#expression#Left Color AST#expression#Right . White AST#member_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right // Modify the value of a state variable via a button click callback, causing the corresponding component to refresh. AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Column ( ) AST#container_content_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Button ( AST#expression#Left 'Move' AST#expression#Right ) AST#ui_component#Right AST#modifier_chain_expression#Left . width ( AST#expression#Left '80%' AST#expression#Right ) AST#modifier_chain_expression#Left . onClick ( AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( ) AST#parameter_list#Right => AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . getUIContext AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right . animateTo AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left duration AST#property_name#Right : AST#expression#Left animationDuration AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right , AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( ) AST#parameter_list#Right => AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . uiStyle AST#member_expression#Right AST#expression#Right . translateY AST#member_expression#Right = AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#parenthesized_expression#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . uiStyle AST#member_expression#Right AST#expression#Right . translateY AST#member_expression#Right AST#expression#Right + AST#expression#Left translateYChangeValue AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#parenthesized_expression#Right AST#expression#Right % AST#expression#Left translateYChangeRange AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#arrow_function#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#arrow_function#Right AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Button ( AST#expression#Left 'Scale' AST#expression#Right ) AST#ui_component#Right AST#modifier_chain_expression#Left . width ( AST#expression#Left '80%' AST#expression#Right ) AST#modifier_chain_expression#Left . onClick ( AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( ) AST#parameter_list#Right => AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . uiStyle AST#member_expression#Right AST#expression#Right . scaleX AST#member_expression#Right = AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#parenthesized_expression#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . uiStyle AST#member_expression#Right AST#expression#Right . scaleX AST#member_expression#Right AST#expression#Right + AST#expression#Left scaleXChangeValue AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#parenthesized_expression#Right AST#expression#Right % AST#expression#Left scaleXChangeRange AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#arrow_function#Right AST#expression#Right ) AST#modifier_chain_expression#Left . margin ( AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left top AST#property_name#Right : AST#expression#Left '10vp' AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left left AST#property_name#Right : AST#expression#Left '15vp' AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left right AST#property_name#Right : AST#expression#Left '15vp' AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#container_content_body#Right AST#ui_component#Right AST#modifier_chain_expression#Left . height ( AST#expression#Left '35%' AST#expression#Right ) AST#modifier_chain_expression#Left . justifyContent ( AST#expression#Left AST#member_expression#Left AST#expression#Left FlexAlign AST#expression#Right . End AST#member_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Left . width ( AST#expression#Left '100%' AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#container_content_body#Right AST#ui_component#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#build_body#Right AST#build_method#Right
|
build() {
Column() {
SpecialImage({ specialImageUiStyle: this.uiStyle })
Column() {
Image($r('app.media.startIcon'))
.height('150vp')
.width('150vp')
.scale({
x: this.uiStyle.scaleX,
y: this.uiStyle.scaleY
})
Text('Hello World')
.fontWeight(FontWeight.Bold)
}
.translate({
x: this.uiStyle.translateX,
y: this.uiStyle.translateY
})
.width('95%')
.height('200vp')
.margin({
top: '10vp',
left: '15vp',
right: '15vp'
})
.borderRadius('16vp')
.backgroundColor(Color.White)
Column() {
Button('Move')
.width('80%')
.onClick(() => {
this.getUIContext().animateTo({ duration: animationDuration }, () => {
this.uiStyle.translateY = (this.uiStyle.translateY + translateYChangeValue) % translateYChangeRange;
})
})
Button('Scale')
.width('80%')
.onClick(() => {
this.uiStyle.scaleX = (this.uiStyle.scaleX + scaleXChangeValue) % scaleXChangeRange;
})
.margin({
top: '10vp',
left: '15vp',
right: '15vp'
})
}
.height('35%')
.justifyContent(FlexAlign.End)
.width('100%')
}
}
|
https://github.com/harmonyos_samples/BestPracticeSnippets/blob/490ea539a6d4427dd395f3dac3cf4887719f37af/ArkUI/Component_Redundancy_Refresh_Optimization/entry/src/main/ets/segment/segment1.ets#L23-L76
|
de29b09ee2253517a61d74ff848fca31e7d2d7c4
|
gitee
|
|
liuchao0739/arkTS_universal_starter.git
|
0ca845f5ae0e78db439dc09f712d100c0dd46ed3
|
entry/src/main/ets/utils/DateUtils.ets
|
arkts
|
format
|
格式化日期
|
static format(date: Date, format: string = 'YYYY-MM-DD HH:mm:ss'): string {
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
const hours = String(date.getHours()).padStart(2, '0');
const minutes = String(date.getMinutes()).padStart(2, '0');
const seconds = String(date.getSeconds()).padStart(2, '0');
return format
.replace('YYYY', String(year))
.replace('MM', month)
.replace('DD', day)
.replace('HH', hours)
.replace('mm', minutes)
.replace('ss', seconds);
}
|
AST#method_declaration#Left static format AST#parameter_list#Left ( AST#parameter#Left date : AST#type_annotation#Left AST#primary_type#Left Date AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left format : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left 'YYYY-MM-DD HH:mm:ss' AST#expression#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left year = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left date AST#expression#Right . getFullYear AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left month = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left String AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left date AST#expression#Right . getMonth AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right + AST#expression#Left 1 AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right . padStart AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left 2 AST#expression#Right , AST#expression#Left '0' AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left day = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left String AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left date AST#expression#Right . getDate AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right . padStart AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left 2 AST#expression#Right , AST#expression#Left '0' AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left hours = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left String AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left date AST#expression#Right . getHours AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right . padStart AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left 2 AST#expression#Right , AST#expression#Left '0' AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left minutes = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left String AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left date AST#expression#Right . getMinutes AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right . padStart AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left 2 AST#expression#Right , AST#expression#Left '0' AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left seconds = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left String AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left date AST#expression#Right . getSeconds AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right . padStart AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left 2 AST#expression#Right , AST#expression#Left '0' AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left format AST#expression#Right . replace AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left 'YYYY' AST#expression#Right , AST#expression#Left AST#call_expression#Left AST#expression#Left String AST#expression#Right AST#argument_list#Left ( AST#expression#Left year AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right . replace AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left 'MM' AST#expression#Right , AST#expression#Left month AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right . replace AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left 'DD' AST#expression#Right , AST#expression#Left day AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right . replace AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left 'HH' AST#expression#Right , AST#expression#Left hours AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right . replace AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left 'mm' AST#expression#Right , AST#expression#Left minutes AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right . replace AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left 'ss' AST#expression#Right , AST#expression#Left seconds AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
static format(date: Date, format: string = 'YYYY-MM-DD HH:mm:ss'): string {
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
const hours = String(date.getHours()).padStart(2, '0');
const minutes = String(date.getMinutes()).padStart(2, '0');
const seconds = String(date.getSeconds()).padStart(2, '0');
return format
.replace('YYYY', String(year))
.replace('MM', month)
.replace('DD', day)
.replace('HH', hours)
.replace('mm', minutes)
.replace('ss', seconds);
}
|
https://github.com/liuchao0739/arkTS_universal_starter.git/blob/0ca845f5ae0e78db439dc09f712d100c0dd46ed3/entry/src/main/ets/utils/DateUtils.ets#L9-L24
|
5ece328c38c4a781f20a35a60acbbc1804a2c6be
|
github
|
harmonyos/samples
|
f5d967efaa7666550ee3252d118c3c73a77686f5
|
ETSUI/eTSBuildCommonView/entry/src/main/ets/default/app.ets
|
arkts
|
Copyright (c) 2021 Huawei Device Co., Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
|
export default {
onCreate() {
console.info('Application onCreate')
},
onDestroy() {
console.info('Application onDestroy')
},
}
|
AST#export_declaration#Left export default AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left onCreate AST#property_name#Right AST#parameter_list#Left ( ) AST#parameter_list#Right AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left console AST#expression#Right . info AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left 'Application onCreate' AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left onDestroy AST#property_name#Right AST#parameter_list#Left ( ) AST#parameter_list#Right AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left console AST#expression#Right . info AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left 'Application onDestroy' AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#property_assignment#Right , } AST#object_literal#Right AST#expression#Right AST#export_declaration#Right
|
export default {
onCreate() {
console.info('Application onCreate')
},
onDestroy() {
console.info('Application onDestroy')
},
}
|
https://github.com/harmonyos/samples/blob/f5d967efaa7666550ee3252d118c3c73a77686f5/ETSUI/eTSBuildCommonView/entry/src/main/ets/default/app.ets#L16-L23
|
aad78b2e66f5873601cd9e47b54b98344083ede6
|
gitee
|
|
IceYuanyyy/OxHornCampus.git
|
bb5686f77fa36db89687502e35898cda218d601f
|
entry/src/main/ets/pages/IntroductionPage.ets
|
arkts
|
initializeZoneId
|
Initialize the zone id accord to the type of jumping to this page.
|
initializeZoneId() {
if (this.cardID !== -1) {
this.currentZoneId = this.cardID;
} else if (this.isContinuation === 'false' || this.getUIContext().getRouter().getParams() !== undefined) {
this.currentZoneId = (this.getUIContext().getRouter().getParams() as RouterParmaInterface).id;
}
}
|
AST#method_declaration#Left initializeZoneId AST#parameter_list#Left ( ) AST#parameter_list#Right AST#builder_function_body#Left { AST#ui_control_flow#Left AST#ui_if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . cardID AST#member_expression#Right AST#expression#Right !== AST#expression#Left AST#unary_expression#Left - AST#expression#Left 1 AST#expression#Right AST#unary_expression#Right AST#expression#Right AST#binary_expression#Right AST#expression#Right ) { AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . currentZoneId AST#member_expression#Right = AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . cardID AST#member_expression#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right } else AST#ui_if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . isContinuation AST#member_expression#Right AST#expression#Right === AST#expression#Left 'false' AST#expression#Right AST#binary_expression#Right AST#expression#Right || AST#expression#Left this AST#expression#Right AST#binary_expression#Right AST#expression#Right . getUIContext AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right . getRouter AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right . getParams AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right !== AST#expression#Left undefined AST#expression#Right AST#binary_expression#Right AST#expression#Right ) { AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . currentZoneId AST#member_expression#Right = AST#expression#Left AST#member_expression#Left AST#expression#Left AST#parenthesized_expression#Left ( AST#expression#Left AST#as_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . getUIContext AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right . getRouter AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right . getParams AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right as AST#type_annotation#Left AST#primary_type#Left RouterParmaInterface AST#primary_type#Right AST#type_annotation#Right AST#as_expression#Right AST#expression#Right ) AST#parenthesized_expression#Right AST#expression#Right . id AST#member_expression#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right } AST#ui_if_statement#Right AST#ui_if_statement#Right AST#ui_control_flow#Right } AST#builder_function_body#Right AST#method_declaration#Right
|
initializeZoneId() {
if (this.cardID !== -1) {
this.currentZoneId = this.cardID;
} else if (this.isContinuation === 'false' || this.getUIContext().getRouter().getParams() !== undefined) {
this.currentZoneId = (this.getUIContext().getRouter().getParams() as RouterParmaInterface).id;
}
}
|
https://github.com/IceYuanyyy/OxHornCampus.git/blob/bb5686f77fa36db89687502e35898cda218d601f/entry/src/main/ets/pages/IntroductionPage.ets#L249-L255
|
3aad2b7308cb349cb53af7cc59eced5c032d9e0e
|
github
|
bigbear20240612/birthday_reminder.git
|
647c411a6619affd42eb5d163ff18db4b34b27ff
|
entry/src/main/ets/common/utils/LunarCalendar.ets
|
arkts
|
公历日期接口
|
export interface SolarDate {
year: number;
month: number;
day: number;
}
|
AST#export_declaration#Left export AST#interface_declaration#Left interface SolarDate AST#object_type#Left { AST#type_member#Left year : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; AST#type_member#Left month : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; AST#type_member#Left day : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right ; } AST#object_type#Right AST#interface_declaration#Right AST#export_declaration#Right
|
export interface SolarDate {
year: number;
month: number;
day: number;
}
|
https://github.com/bigbear20240612/birthday_reminder.git/blob/647c411a6619affd42eb5d163ff18db4b34b27ff/entry/src/main/ets/common/utils/LunarCalendar.ets#L46-L50
|
6c2bef3dd3263164cebae46da8fdad093ae2b5f8
|
github
|
|
KoStudio/ArkTS-WordTree.git
|
78c2a8f8ef6cf4c6be8bab2212f04bfcfa7e7324
|
entry/src/main/ets/models/managers/plan/plancurve/Plan.ets
|
arkts
|
appendMemBoxes
|
/ 从内存中添加boxes
|
appendMemBoxes(boxes: Box[]): void {
this.boxes.push(...boxes);
}
|
AST#method_declaration#Left appendMemBoxes AST#parameter_list#Left ( AST#parameter#Left boxes : AST#type_annotation#Left AST#primary_type#Left AST#array_type#Left Box [ ] AST#array_type#Right AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right AST#builder_function_body#Left { AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . boxes AST#member_expression#Right AST#expression#Right . push AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#spread_element#Left ... AST#expression#Left boxes AST#expression#Right AST#spread_element#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right } AST#builder_function_body#Right AST#method_declaration#Right
|
appendMemBoxes(boxes: Box[]): void {
this.boxes.push(...boxes);
}
|
https://github.com/KoStudio/ArkTS-WordTree.git/blob/78c2a8f8ef6cf4c6be8bab2212f04bfcfa7e7324/entry/src/main/ets/models/managers/plan/plancurve/Plan.ets#L194-L196
|
be2656f9c220b711f0d4bf0e9864746ff869b433
|
github
|
Application-Security-Automation/Arktan.git
|
3ad9cb05235e38b00cd5828476aa59a345afa1c0
|
dataset/completeness/variable_scope/private_variable/private_variable_002_F.ets
|
arkts
|
Introduction 类私有变量
|
export function private_variable_002_F(taint_src : string) {
let _t = taint_src
let _clean = "clean"
let a = new A();
a.setData(_clean);
taint.Sink(a.getData());
}
|
AST#export_declaration#Left export AST#function_declaration#Left function private_variable_002_F AST#parameter_list#Left ( AST#parameter#Left taint_src : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right AST#block_statement#Left { AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left _t = AST#expression#Left taint_src AST#expression#Right AST#variable_declarator#Right AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left _clean = AST#expression#Left "clean" AST#expression#Right AST#variable_declarator#Right AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left a = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#new_expression#Left new AST#expression#Left A AST#expression#Right AST#new_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left a AST#expression#Right . setData AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left _clean AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left taint AST#expression#Right . Sink AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left a AST#expression#Right . getData AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#function_declaration#Right AST#export_declaration#Right
|
export function private_variable_002_F(taint_src : string) {
let _t = taint_src
let _clean = "clean"
let a = new A();
a.setData(_clean);
taint.Sink(a.getData());
}
|
https://github.com/Application-Security-Automation/Arktan.git/blob/3ad9cb05235e38b00cd5828476aa59a345afa1c0/dataset/completeness/variable_scope/private_variable/private_variable_002_F.ets#L6-L12
|
f2e738a6501ce90262d1d92bcda7c313a652f765
|
github
|
|
tongyuyan/harmony-utils
|
697472f011a43e783eeefaa28ef9d713c4171726
|
harmony_utils/src/main/ets/utils/JSONUtil.ets
|
arkts
|
isJSONStr
|
判断是否是字符串格式json
@param str 待验证字符串
@returns
|
static isJSONStr(str: string | undefined | null): boolean {
try {
JSON.parse(str);
return true;
} catch (error) {
return false;
}
}
|
AST#method_declaration#Left static isJSONStr AST#parameter_list#Left ( AST#parameter#Left str : AST#type_annotation#Left AST#union_type#Left AST#primary_type#Left string AST#primary_type#Right | AST#primary_type#Left undefined AST#primary_type#Right | AST#primary_type#Left null AST#primary_type#Right AST#union_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left boolean AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#try_statement#Left try AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left JSON AST#expression#Right . parse AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left str AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#boolean_literal#Left true AST#boolean_literal#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#catch_clause#Left catch ( error ) AST#block_statement#Left { AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#boolean_literal#Left false AST#boolean_literal#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#catch_clause#Right AST#try_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
static isJSONStr(str: string | undefined | null): boolean {
try {
JSON.parse(str);
return true;
} catch (error) {
return false;
}
}
|
https://github.com/tongyuyan/harmony-utils/blob/697472f011a43e783eeefaa28ef9d713c4171726/harmony_utils/src/main/ets/utils/JSONUtil.ets#L137-L144
|
8bc1bf7adc9fe6d6c88dd1556a7602f791d4e245
|
gitee
|
zhongte/TaoYao
|
80850f3800dd6037216d3f7c58a2bf34a881c93f
|
taoyao/src/main/ets/shijing/taoyao/TaoYao.ets
|
arkts
|
hasPermission
|
仅仅检测是否有权限,如果没有权限,不会申请权限
@param permissions
@returns true 有权限
|
static hasPermission(permissions: Array<Permissions>): boolean {
const generalChecker = new GeneralChecker()
return generalChecker.hasPermission(permissions)
}
|
AST#method_declaration#Left static hasPermission AST#parameter_list#Left ( AST#parameter#Left permissions : AST#type_annotation#Left AST#primary_type#Left AST#generic_type#Left Array AST#type_arguments#Left < AST#type_annotation#Left AST#primary_type#Left Permissions AST#primary_type#Right AST#type_annotation#Right > AST#type_arguments#Right AST#generic_type#Right AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left boolean AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left generalChecker = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#new_expression#Left new AST#expression#Left GeneralChecker AST#expression#Right AST#new_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left generalChecker AST#expression#Right . hasPermission AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left permissions AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
static hasPermission(permissions: Array<Permissions>): boolean {
const generalChecker = new GeneralChecker()
return generalChecker.hasPermission(permissions)
}
|
https://github.com/zhongte/TaoYao/blob/80850f3800dd6037216d3f7c58a2bf34a881c93f/taoyao/src/main/ets/shijing/taoyao/TaoYao.ets#L76-L79
|
5fd227c3243349f500229b2ad5b0cadd8d5d5cc6
|
gitee
|
openharmony/arkui_ace_engine
|
30c7d1ee12fbedf0fabece54291d75897e2ad44f
|
examples/Overlay/entry/src/main/ets/pages/components/menu/bindContextMenuPreview.ets
|
arkts
|
PreviewBuilder
|
菜单预览图
|
@Builder
export function PreviewBuilder() {
Image($r('app.media.app_icon'))
.width(200)
.height(120)
}
|
AST#decorated_export_declaration#Left AST#decorator#Left @ Builder AST#decorator#Right export function PreviewBuilder AST#parameter_list#Left ( ) AST#parameter_list#Right AST#builder_function_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Image ( AST#expression#Left AST#resource_expression#Left $r ( AST#expression#Left 'app.media.app_icon' AST#expression#Right ) AST#resource_expression#Right AST#expression#Right ) AST#ui_component#Right AST#modifier_chain_expression#Left . width ( AST#expression#Left 200 AST#expression#Right ) AST#modifier_chain_expression#Left . height ( AST#expression#Left 120 AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#builder_function_body#Right AST#decorated_export_declaration#Right
|
@Builder
export function PreviewBuilder() {
Image($r('app.media.app_icon'))
.width(200)
.height(120)
}
|
https://github.com/openharmony/arkui_ace_engine/blob/30c7d1ee12fbedf0fabece54291d75897e2ad44f/examples/Overlay/entry/src/main/ets/pages/components/menu/bindContextMenuPreview.ets#L22-L27
|
c9796b5768e0a367ed9db26435527dec26f35f34
|
gitee
|
KoStudio/ArkTS-WordTree.git
|
78c2a8f8ef6cf4c6be8bab2212f04bfcfa7e7324
|
entry/src/main/ets/common/utils/array/ArrayStringUtils.ets
|
arkts
|
getCharIndexInAllTexts
|
根据 texts 数组计算全局字符索引
- texts: 每个元素是一段文本(例如每页或每条)
- textIndex: 指定属于 texts 的第几个元素(0-based)
- charIndexInAText: 在该文本内的字符索引(0-based)
返回值:
- 成功:返回全局索引(从 0 开始计数)
- 参数非法或越界:返回 -1
|
static getCharIndexInAllTexts(texts: string[], textIndex: number, charIndexInAText: number): number {
// 参数基本校验
if (!Array.isArray(texts)) return -1;
if (texts.length === 0) return -1;
if (!Number.isInteger(textIndex) || !Number.isInteger(charIndexInAText)) return -1;
if (textIndex < 0 || textIndex >= texts.length) return -1;
const targetText = texts[textIndex] ?? "";
const targetLen = targetText.length;
// charIndexInAText 必须在目标文本范围内
if (charIndexInAText < 0 || charIndexInAText >= targetLen) return -1;
// 先把目标文本内的索引作为初值,然后累加此前所有文本的长度
let globalIndex = charIndexInAText;
for (let i = 0; i < textIndex; i++) {
globalIndex += (texts[i] ?? "").length;
}
return globalIndex;
}
|
AST#method_declaration#Left static getCharIndexInAllTexts AST#parameter_list#Left ( AST#parameter#Left texts : AST#type_annotation#Left AST#primary_type#Left AST#array_type#Left string [ ] AST#array_type#Right AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left textIndex : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left charIndexInAText : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { // 参数基本校验 AST#statement#Left AST#if_statement#Left if ( AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#unary_expression#Left ! AST#expression#Left Array AST#expression#Right AST#unary_expression#Right AST#expression#Right . isArray AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left texts AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ) AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#unary_expression#Left - AST#expression#Left 1 AST#expression#Right AST#unary_expression#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right AST#if_statement#Right AST#statement#Right AST#statement#Left AST#if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left texts AST#expression#Right . length AST#member_expression#Right AST#expression#Right === AST#expression#Left 0 AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#unary_expression#Left - AST#expression#Left 1 AST#expression#Right AST#unary_expression#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right AST#if_statement#Right AST#statement#Right AST#statement#Left AST#if_statement#Left if ( AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#unary_expression#Left ! AST#expression#Left Number AST#expression#Right AST#unary_expression#Right AST#expression#Right . isInteger AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left textIndex AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right || AST#expression#Left AST#unary_expression#Left ! AST#expression#Left Number AST#expression#Right AST#unary_expression#Right AST#expression#Right AST#binary_expression#Right AST#expression#Right . isInteger AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left charIndexInAText AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ) AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#unary_expression#Left - AST#expression#Left 1 AST#expression#Right AST#unary_expression#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right AST#if_statement#Right AST#statement#Right AST#statement#Left AST#if_statement#Left if ( AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left textIndex AST#expression#Right < AST#expression#Left 0 AST#expression#Right AST#binary_expression#Right AST#expression#Right || AST#expression#Left AST#binary_expression#Left AST#expression#Left textIndex AST#expression#Right >= AST#expression#Left texts AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#binary_expression#Right AST#expression#Right . length AST#member_expression#Right AST#expression#Right ) AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#unary_expression#Left - AST#expression#Left 1 AST#expression#Right AST#unary_expression#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right AST#if_statement#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left targetText = AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#subscript_expression#Left AST#expression#Left texts AST#expression#Right [ AST#expression#Left textIndex AST#expression#Right ] AST#subscript_expression#Right AST#expression#Right ?? AST#expression#Left "" AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left targetLen = AST#expression#Left AST#member_expression#Left AST#expression#Left targetText AST#expression#Right . length AST#member_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right // charIndexInAText 必须在目标文本范围内 AST#statement#Left AST#if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left charIndexInAText AST#expression#Right < AST#expression#Left 0 AST#expression#Right AST#binary_expression#Right AST#expression#Right || AST#expression#Left AST#binary_expression#Left AST#expression#Left charIndexInAText AST#expression#Right >= AST#expression#Left targetLen AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#unary_expression#Left - AST#expression#Left 1 AST#expression#Right AST#unary_expression#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right AST#if_statement#Right AST#statement#Right // 先把目标文本内的索引作为初值,然后累加此前所有文本的长度 AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left globalIndex = AST#expression#Left charIndexInAText AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#for_statement#Left for ( AST#variable_declaration#Left let AST#variable_declarator#Left i = AST#expression#Left 0 AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#expression#Left AST#binary_expression#Left AST#expression#Left i AST#expression#Right < AST#expression#Left textIndex AST#expression#Right AST#binary_expression#Right AST#expression#Right ; AST#expression#Left AST#update_expression#Left AST#expression#Left i AST#expression#Right ++ AST#update_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left globalIndex += AST#expression#Left AST#member_expression#Left AST#expression#Left AST#parenthesized_expression#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#subscript_expression#Left AST#expression#Left texts AST#expression#Right [ AST#expression#Left i AST#expression#Right ] AST#subscript_expression#Right AST#expression#Right ?? AST#expression#Left "" AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#parenthesized_expression#Right AST#expression#Right . length AST#member_expression#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#for_statement#Right AST#statement#Right AST#statement#Left AST#return_statement#Left return AST#expression#Left globalIndex AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
static getCharIndexInAllTexts(texts: string[], textIndex: number, charIndexInAText: number): number {
if (!Array.isArray(texts)) return -1;
if (texts.length === 0) return -1;
if (!Number.isInteger(textIndex) || !Number.isInteger(charIndexInAText)) return -1;
if (textIndex < 0 || textIndex >= texts.length) return -1;
const targetText = texts[textIndex] ?? "";
const targetLen = targetText.length;
if (charIndexInAText < 0 || charIndexInAText >= targetLen) return -1;
let globalIndex = charIndexInAText;
for (let i = 0; i < textIndex; i++) {
globalIndex += (texts[i] ?? "").length;
}
return globalIndex;
}
|
https://github.com/KoStudio/ArkTS-WordTree.git/blob/78c2a8f8ef6cf4c6be8bab2212f04bfcfa7e7324/entry/src/main/ets/common/utils/array/ArrayStringUtils.ets#L58-L78
|
b203bce10af8b3811bff349fe0bfd90ff60c4ee8
|
github
|
linhanlove/hormany-os-notion
|
a65f47bfc1a2bbce531b9af97831eb1ba934c2f8
|
entry/src/main/ets/view/SplashPage.ets
|
arkts
|
aboutToAppear
|
周期函数aboutToAppear里添加一个2秒的定时任务跳转到主页
|
aboutToAppear() {
this.timer = setTimeout(()=>{
router.replaceUrl({url:Constants.loadingToJump})
.catch(err=>{
promptAction.showToast({
message:err==200002? $r('app.string.not_found_url'):$r('app.string.loading_to_jump_error'),
duration: 2000,
});
})
},Constants.DELAY_TIME_5s)
}
|
AST#method_declaration#Left aboutToAppear AST#parameter_list#Left ( ) AST#parameter_list#Right AST#builder_function_body#Left { AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . timer AST#member_expression#Right = AST#expression#Left AST#call_expression#Left AST#expression#Left setTimeout AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( ) AST#parameter_list#Right => AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left router AST#expression#Right . replaceUrl AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left url AST#property_name#Right : AST#expression#Left AST#member_expression#Left AST#expression#Left Constants AST#expression#Right . loadingToJump AST#member_expression#Right AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right . catch AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#arrow_function#Left err => AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left promptAction AST#expression#Right . showToast AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left message AST#property_name#Right : AST#expression#Left AST#conditional_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left err AST#expression#Right == AST#expression#Left 200002 AST#expression#Right AST#binary_expression#Right AST#expression#Right ? AST#expression#Left AST#resource_expression#Left $r ( AST#expression#Left 'app.string.not_found_url' AST#expression#Right ) AST#resource_expression#Right AST#expression#Right : AST#expression#Left AST#resource_expression#Left $r ( AST#expression#Left 'app.string.loading_to_jump_error' AST#expression#Right ) AST#resource_expression#Right AST#expression#Right AST#conditional_expression#Right AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left duration AST#property_name#Right : AST#expression#Left 2000 AST#expression#Right AST#property_assignment#Right , } AST#object_literal#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#arrow_function#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#arrow_function#Right AST#expression#Right , AST#expression#Left AST#member_expression#Left AST#expression#Left Constants AST#expression#Right . DELAY_TIME_5s AST#member_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right AST#expression_statement#Right } AST#builder_function_body#Right AST#method_declaration#Right
|
aboutToAppear() {
this.timer = setTimeout(()=>{
router.replaceUrl({url:Constants.loadingToJump})
.catch(err=>{
promptAction.showToast({
message:err==200002? $r('app.string.not_found_url'):$r('app.string.loading_to_jump_error'),
duration: 2000,
});
})
},Constants.DELAY_TIME_5s)
}
|
https://github.com/linhanlove/hormany-os-notion/blob/a65f47bfc1a2bbce531b9af97831eb1ba934c2f8/entry/src/main/ets/view/SplashPage.ets#L52-L62
|
e5c33935a3c2bcb2e32636f681eca90ee89577db
|
gitee
|
KoStudio/ArkTS-WordTree.git
|
78c2a8f8ef6cf4c6be8bab2212f04bfcfa7e7324
|
entry/src/main/ets/views/setting/ReclaimView.ets
|
arkts
|
refreshUIState
|
刷新UI状态
|
private refreshUIState() {
const trimmedContent = this.content.trim();
this.characterCount = trimmedContent.length;
this.isSendButtonEnabled =
this.characterCount > this.MIN_COUNT &&
this.characterCount <= this.MAX_COUNT;
}
|
AST#method_declaration#Left private refreshUIState AST#parameter_list#Left ( ) AST#parameter_list#Right AST#block_statement#Left { AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left trimmedContent = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . content AST#member_expression#Right AST#expression#Right . trim AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . characterCount AST#member_expression#Right = AST#expression#Left AST#member_expression#Left AST#expression#Left trimmedContent AST#expression#Right . length AST#member_expression#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . isSendButtonEnabled AST#member_expression#Right = AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . characterCount AST#member_expression#Right AST#expression#Right > AST#expression#Left this AST#expression#Right AST#binary_expression#Right AST#expression#Right . MIN_COUNT AST#member_expression#Right AST#expression#Right && AST#expression#Left this AST#expression#Right AST#binary_expression#Right AST#expression#Right . characterCount AST#member_expression#Right AST#expression#Right <= AST#expression#Left this AST#expression#Right AST#binary_expression#Right AST#expression#Right . MAX_COUNT AST#member_expression#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
private refreshUIState() {
const trimmedContent = this.content.trim();
this.characterCount = trimmedContent.length;
this.isSendButtonEnabled =
this.characterCount > this.MIN_COUNT &&
this.characterCount <= this.MAX_COUNT;
}
|
https://github.com/KoStudio/ArkTS-WordTree.git/blob/78c2a8f8ef6cf4c6be8bab2212f04bfcfa7e7324/entry/src/main/ets/views/setting/ReclaimView.ets#L125-L131
|
d390ad29efd9c918e46cf021c979f7c3b2f348ef
|
github
|
harmonyos-cases/cases
|
eccdb71f1cee10fa6ff955e16c454c1b59d3ae13
|
CommonAppDevelopment/feature/gridexchange/src/main/ets/model/GridItemDeletionCtrl.ets
|
arkts
|
addGridItem
|
向首页应用里添加应用的动画
@param item 被点击的gridItem
@param appInfoList 首页应用里的所有GridItem
|
addGridItem(item: T, appInfoList: AppInfo[]): void {
const index: number = this.sortAppData.indexOf(item);
const appId: string = (item as AppInfo).name.toString();
animateTo({
curve: Curve.ExtremeDeceleration, duration: ADD_ANIMATION_DURATION, onFinish: () => {
this.modifier[index].attribute?.visibility(Visibility.Hidden);
// 初始化modifier所有属性
this.modifier.forEach((item) => {
item.attribute?.visibility(Visibility.Hidden).translate({ x: 0, y: 0 });
})
this.status = AddStatus.FINISH;
// 存储动画状态
AppStorage.setOrCreate('addStatus', this.status);
}
}, () => {
let offsetX: number = 0;
let offsetY: number = 0;
this.modifier[index].attribute?.visibility(Visibility.Visible);
// 首页应用里的gridItem个数
const gridItemNumber: number = appInfoList.length;
// 首页应用里的gridItem个数除列数的余数
const homeAppIndex: number = gridItemNumber % COLUMN_COUNT;
// 被点击应用的坐标信息
const componentInfo: componentUtils.ComponentInfo = componentUtils.getRectangleById(appId);
// 余数也是被点击应用移动的终点位置的索引号,两者索引号相减,再乘gridItem本身的宽度,就是横向移动的距离
offsetX = (homeAppIndex - index) * GRID_ITEM_SIZE;
// 首页应用里的个数为0
if (appInfoList.length === 0) {
// 用首页应用的第一个app的y轴坐标减去被点击应用的y轴坐标即可计算出y轴偏移量
offsetY = FIRST_APP_SCREEN_OFFSET_Y - componentInfo.screenOffset.y;
this.modifier[index].attribute?.translate({ x: offsetX, y: px2vp(offsetY) });
this.status = AddStatus.START;
return;
}
// 首页应用里最后一个gridItem的坐标信息
const lastAppComponentInfo: componentUtils.ComponentInfo =
componentUtils.getRectangleById(`${appInfoList[appInfoList.length - 1].name.toString()}InHome`);
if (homeAppIndex === 0) {
// 余数等于0,说明gridItem要移动到一行的第一个,y轴移动距离要加上girItem本身的高度
offsetY = lastAppComponentInfo.screenOffset.y - componentInfo.screenOffset.y + lastAppComponentInfo.size.height;
} else {
// 余数不等于0,直接使用两者的y轴坐标相减即可得到移动距离
offsetY = lastAppComponentInfo.screenOffset.y - componentInfo.screenOffset.y;
}
this.modifier[index].attribute?.translate({ x: offsetX, y: px2vp(offsetY) });
this.status = AddStatus.START;
})
}
|
AST#method_declaration#Left addGridItem AST#parameter_list#Left ( AST#parameter#Left item : AST#type_annotation#Left AST#primary_type#Left T AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left appInfoList : AST#type_annotation#Left AST#primary_type#Left AST#array_type#Left AppInfo [ ] AST#array_type#Right AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left void AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left index : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . sortAppData AST#member_expression#Right AST#expression#Right . indexOf AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left item AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left appId : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#parenthesized_expression#Left ( AST#expression#Left AST#as_expression#Left AST#expression#Left item AST#expression#Right as AST#type_annotation#Left AST#primary_type#Left AppInfo AST#primary_type#Right AST#type_annotation#Right AST#as_expression#Right AST#expression#Right ) AST#parenthesized_expression#Right AST#expression#Right . name AST#member_expression#Right AST#expression#Right . toString AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left animateTo AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left curve AST#property_name#Right : AST#expression#Left AST#member_expression#Left AST#expression#Left Curve AST#expression#Right . ExtremeDeceleration AST#member_expression#Right AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left duration AST#property_name#Right : AST#expression#Left ADD_ANIMATION_DURATION AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left onFinish AST#property_name#Right : AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( ) AST#parameter_list#Right => AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#subscript_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . modifier AST#member_expression#Right AST#expression#Right [ AST#expression#Left index AST#expression#Right ] AST#subscript_expression#Right AST#expression#Right . attribute AST#member_expression#Right AST#expression#Right ?. visibility AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#member_expression#Left AST#expression#Left Visibility AST#expression#Right . Hidden AST#member_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right // 初始化modifier所有属性 AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . modifier AST#member_expression#Right AST#expression#Right . forEach AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( AST#parameter#Left item AST#parameter#Right ) AST#parameter_list#Right => AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left item AST#expression#Right . attribute AST#member_expression#Right AST#expression#Right ?. visibility AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#member_expression#Left AST#expression#Left Visibility AST#expression#Right . Hidden AST#member_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right . translate AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left x AST#property_name#Right : AST#expression#Left 0 AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left y AST#property_name#Right : AST#expression#Left 0 AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#arrow_function#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right AST#statement#Right AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . status AST#member_expression#Right = AST#expression#Left AST#member_expression#Left AST#expression#Left AddStatus AST#expression#Right . FINISH AST#member_expression#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right // 存储动画状态 AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AppStorage AST#expression#Right . setOrCreate AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left 'addStatus' AST#expression#Right , AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . status AST#member_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#arrow_function#Right AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right , AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( ) AST#parameter_list#Right => AST#block_statement#Left { AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left offsetX : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left 0 AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left offsetY : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left 0 AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#subscript_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . modifier AST#member_expression#Right AST#expression#Right [ AST#expression#Left index AST#expression#Right ] AST#subscript_expression#Right AST#expression#Right . attribute AST#member_expression#Right AST#expression#Right ?. visibility AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#member_expression#Left AST#expression#Left Visibility AST#expression#Right . Visible AST#member_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right // 首页应用里的gridItem个数 AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left gridItemNumber : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#member_expression#Left AST#expression#Left appInfoList AST#expression#Right . length AST#member_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right // 首页应用里的gridItem个数除列数的余数 AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left homeAppIndex : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#binary_expression#Left AST#expression#Left gridItemNumber AST#expression#Right % AST#expression#Left COLUMN_COUNT AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right // 被点击应用的坐标信息 AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left componentInfo : AST#type_annotation#Left AST#primary_type#Left AST#qualified_type#Left componentUtils . ComponentInfo AST#qualified_type#Right AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left componentUtils AST#expression#Right . getRectangleById AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left appId AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right // 余数也是被点击应用移动的终点位置的索引号,两者索引号相减,再乘gridItem本身的宽度,就是横向移动的距离 AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left offsetX = AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#parenthesized_expression#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left homeAppIndex AST#expression#Right - AST#expression#Left index AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#parenthesized_expression#Right AST#expression#Right * AST#expression#Left GRID_ITEM_SIZE AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right // 首页应用里的个数为0 AST#statement#Left AST#if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left appInfoList AST#expression#Right . length AST#member_expression#Right AST#expression#Right === AST#expression#Left 0 AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#block_statement#Left { // 用首页应用的第一个app的y轴坐标减去被点击应用的y轴坐标即可计算出y轴偏移量 AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left offsetY = AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left FIRST_APP_SCREEN_OFFSET_Y AST#expression#Right - AST#expression#Left componentInfo AST#expression#Right AST#binary_expression#Right AST#expression#Right . screenOffset AST#member_expression#Right AST#expression#Right . y AST#member_expression#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#subscript_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . modifier AST#member_expression#Right AST#expression#Right [ AST#expression#Left index AST#expression#Right ] AST#subscript_expression#Right AST#expression#Right . attribute AST#member_expression#Right AST#expression#Right ?. translate AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left x AST#property_name#Right : AST#expression#Left offsetX AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left y AST#property_name#Right : AST#expression#Left AST#call_expression#Left AST#expression#Left px2vp AST#expression#Right AST#argument_list#Left ( AST#expression#Left offsetY AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . status AST#member_expression#Right = AST#expression#Left AST#member_expression#Left AST#expression#Left AddStatus AST#expression#Right . START AST#member_expression#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right AST#statement#Left AST#return_statement#Left return ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#if_statement#Right AST#statement#Right // 首页应用里最后一个gridItem的坐标信息 AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left lastAppComponentInfo : AST#type_annotation#Left AST#primary_type#Left AST#qualified_type#Left componentUtils . ComponentInfo AST#qualified_type#Right AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left componentUtils AST#expression#Right . getRectangleById AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#template_literal#Left ` AST#template_substitution#Left $ { AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#subscript_expression#Left AST#expression#Left appInfoList AST#expression#Right [ AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left appInfoList AST#expression#Right . length AST#member_expression#Right AST#expression#Right - AST#expression#Left 1 AST#expression#Right AST#binary_expression#Right AST#expression#Right ] AST#subscript_expression#Right AST#expression#Right . name AST#member_expression#Right AST#expression#Right . toString AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right } AST#template_substitution#Right InHome ` AST#template_literal#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#if_statement#Left if ( AST#expression#Left AST#binary_expression#Left AST#expression#Left homeAppIndex AST#expression#Right === AST#expression#Left 0 AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#block_statement#Left { // 余数等于0,说明gridItem要移动到一行的第一个,y轴移动距离要加上girItem本身的高度 AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left offsetY = AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left lastAppComponentInfo AST#expression#Right . screenOffset AST#member_expression#Right AST#expression#Right . y AST#member_expression#Right AST#expression#Right - AST#expression#Left componentInfo AST#expression#Right AST#binary_expression#Right AST#expression#Right . screenOffset AST#member_expression#Right AST#expression#Right . y AST#member_expression#Right AST#expression#Right + AST#expression#Left lastAppComponentInfo AST#expression#Right AST#binary_expression#Right AST#expression#Right . size AST#member_expression#Right AST#expression#Right . height AST#member_expression#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right else AST#block_statement#Left { // 余数不等于0,直接使用两者的y轴坐标相减即可得到移动距离 AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left offsetY = AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left lastAppComponentInfo AST#expression#Right . screenOffset AST#member_expression#Right AST#expression#Right . y AST#member_expression#Right AST#expression#Right - AST#expression#Left componentInfo AST#expression#Right AST#binary_expression#Right AST#expression#Right . screenOffset AST#member_expression#Right AST#expression#Right . y AST#member_expression#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#if_statement#Right AST#statement#Right AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#subscript_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . modifier AST#member_expression#Right AST#expression#Right [ AST#expression#Left index AST#expression#Right ] AST#subscript_expression#Right AST#expression#Right . attribute AST#member_expression#Right AST#expression#Right ?. translate AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left x AST#property_name#Right : AST#expression#Left offsetX AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left y AST#property_name#Right : AST#expression#Left AST#call_expression#Left AST#expression#Left px2vp AST#expression#Right AST#argument_list#Left ( AST#expression#Left offsetY AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . status AST#member_expression#Right = AST#expression#Left AST#member_expression#Left AST#expression#Left AddStatus AST#expression#Right . START AST#member_expression#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#arrow_function#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
addGridItem(item: T, appInfoList: AppInfo[]): void {
const index: number = this.sortAppData.indexOf(item);
const appId: string = (item as AppInfo).name.toString();
animateTo({
curve: Curve.ExtremeDeceleration, duration: ADD_ANIMATION_DURATION, onFinish: () => {
this.modifier[index].attribute?.visibility(Visibility.Hidden);
this.modifier.forEach((item) => {
item.attribute?.visibility(Visibility.Hidden).translate({ x: 0, y: 0 });
})
this.status = AddStatus.FINISH;
AppStorage.setOrCreate('addStatus', this.status);
}
}, () => {
let offsetX: number = 0;
let offsetY: number = 0;
this.modifier[index].attribute?.visibility(Visibility.Visible);
const gridItemNumber: number = appInfoList.length;
除列数的余数
const homeAppIndex: number = gridItemNumber % COLUMN_COUNT;
const componentInfo: componentUtils.ComponentInfo = componentUtils.getRectangleById(appId);
offsetX = (homeAppIndex - index) * GRID_ITEM_SIZE;
if (appInfoList.length === 0) {
offsetY = FIRST_APP_SCREEN_OFFSET_Y - componentInfo.screenOffset.y;
this.modifier[index].attribute?.translate({ x: offsetX, y: px2vp(offsetY) });
this.status = AddStatus.START;
return;
}
const lastAppComponentInfo: componentUtils.ComponentInfo =
componentUtils.getRectangleById(`${appInfoList[appInfoList.length - 1].name.toString()}InHome`);
if (homeAppIndex === 0) {
offsetY = lastAppComponentInfo.screenOffset.y - componentInfo.screenOffset.y + lastAppComponentInfo.size.height;
} else {
offsetY = lastAppComponentInfo.screenOffset.y - componentInfo.screenOffset.y;
}
this.modifier[index].attribute?.translate({ x: offsetX, y: px2vp(offsetY) });
this.status = AddStatus.START;
})
}
|
https://github.com/harmonyos-cases/cases/blob/eccdb71f1cee10fa6ff955e16c454c1b59d3ae13/CommonAppDevelopment/feature/gridexchange/src/main/ets/model/GridItemDeletionCtrl.ets#L147-L195
|
62a23ecd6badbd5d9a5442c6df3e47a57fabb946
|
gitee
|
BohanSu/LumosAgent-HarmonyOS.git
|
9eee81c93b67318d9c1c5d5a831ffc1c1fa08e76
|
entry/src/main/ets/model/ChatLog.ets
|
arkts
|
fromRow
|
Create ChatLog from database row
|
static fromRow(row: ChatLogRow): ChatLog {
return new ChatLog(
row.id,
row.date,
row.content,
row.is_user === 1,
row.emotion,
row.timestamp
);
}
|
AST#method_declaration#Left static fromRow AST#parameter_list#Left ( AST#parameter#Left row : AST#type_annotation#Left AST#primary_type#Left ChatLogRow AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left ChatLog AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#call_expression#Left AST#expression#Left AST#new_expression#Left new AST#expression#Left ChatLog AST#expression#Right AST#new_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#member_expression#Left AST#expression#Left row AST#expression#Right . id AST#member_expression#Right AST#expression#Right , AST#expression#Left AST#member_expression#Left AST#expression#Left row AST#expression#Right . date AST#member_expression#Right AST#expression#Right , AST#expression#Left AST#member_expression#Left AST#expression#Left row AST#expression#Right . content AST#member_expression#Right AST#expression#Right , AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left row AST#expression#Right . is_user AST#member_expression#Right AST#expression#Right === AST#expression#Left 1 AST#expression#Right AST#binary_expression#Right AST#expression#Right , AST#expression#Left AST#member_expression#Left AST#expression#Left row AST#expression#Right . emotion AST#member_expression#Right AST#expression#Right , AST#expression#Left AST#member_expression#Left AST#expression#Left row AST#expression#Right . timestamp AST#member_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
static fromRow(row: ChatLogRow): ChatLog {
return new ChatLog(
row.id,
row.date,
row.content,
row.is_user === 1,
row.emotion,
row.timestamp
);
}
|
https://github.com/BohanSu/LumosAgent-HarmonyOS.git/blob/9eee81c93b67318d9c1c5d5a831ffc1c1fa08e76/entry/src/main/ets/model/ChatLog.ets#L56-L65
|
6978b5bdf2a161191bb061da158f624b803b6e83
|
github
|
lentozi/DailyPlan.git
|
96ce0bec8f545511c51b577c4aa8327c2c5bb0c8
|
entry/src/main/ets/tabcontent/HomeContent.ets
|
arkts
|
dateItem
|
封装日历中的单条内容
|
@Builder dateItem(dateItem: DateItem) {
Column() {
Row() {
Row() {
Text(dateItem.date.toString())
.height('100%')
.width('100%')
.textAlign(TextAlign.Center)
.fontColor(dateItem.date == this.selectedDate.date ? dateItem.date == this.currentDate.date ? "#FFFFFF" : "#0A59F7" : dateItem.date == this.currentDate.date ? "#0A59F7" : "#000000")
.fontSize(20)
.fontWeight(600)
}
.width('55vp')
.height('55vp')
.borderRadius(100)
.borderColor(dateItem.date == this.selectedDate.date ? "#0A59F7" : "#F1F2F3")
.borderWidth(2)
.backgroundColor(dateItem.date == this.selectedDate.date && dateItem.date == this.currentDate.date ? "#0A59F7" : "#F1F2F3")
}
.height('60%')
.width('100%')
.justifyContent(FlexAlign.Center)
Row() {
Column({ space: 4 }) {
Row() {
Text()
}
.backgroundColor("#ff99bbf1")
.width('100%')
.height('30px')
Row() {
Text()
}
.backgroundColor("#ff99bbf1")
.width('100%')
.height('30px')
}
.width('90%')
.height('100%')
}
.height('40%')
}
.justifyContent(FlexAlign.Start)
.onClick(() => {
animateTo({ duration: 100, curve: Curve.EaseInOut }, () => {
this.selectedDate = dateItem;
})
})
}
|
AST#method_declaration#Left AST#decorator#Left @ Builder AST#decorator#Right dateItem AST#parameter_list#Left ( AST#parameter#Left dateItem : AST#type_annotation#Left AST#primary_type#Left DateItem AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right AST#builder_function_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Column ( ) AST#container_content_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Row ( ) AST#container_content_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Row ( ) AST#container_content_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Text ( AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left dateItem AST#expression#Right . date AST#member_expression#Right AST#expression#Right . toString AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ) AST#ui_component#Right AST#modifier_chain_expression#Left . height ( AST#expression#Left '100%' AST#expression#Right ) AST#modifier_chain_expression#Left . width ( AST#expression#Left '100%' AST#expression#Right ) AST#modifier_chain_expression#Left . textAlign ( AST#expression#Left AST#member_expression#Left AST#expression#Left TextAlign AST#expression#Right . Center AST#member_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Left . fontColor ( AST#expression#Left AST#conditional_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#conditional_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left dateItem AST#expression#Right . date AST#member_expression#Right AST#expression#Right == AST#expression#Left this AST#expression#Right AST#binary_expression#Right AST#expression#Right . selectedDate AST#member_expression#Right AST#expression#Right . date AST#member_expression#Right AST#expression#Right ? AST#expression#Left AST#conditional_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left dateItem AST#expression#Right . date AST#member_expression#Right AST#expression#Right == AST#expression#Left this AST#expression#Right AST#binary_expression#Right AST#expression#Right . currentDate AST#member_expression#Right AST#expression#Right . date AST#member_expression#Right AST#expression#Right ? AST#expression#Left "#FFFFFF" AST#expression#Right : AST#expression#Left "#0A59F7" AST#expression#Right AST#conditional_expression#Right AST#expression#Right : AST#expression#Left dateItem AST#expression#Right AST#conditional_expression#Right AST#expression#Right . date AST#member_expression#Right AST#expression#Right == AST#expression#Left this AST#expression#Right AST#binary_expression#Right AST#expression#Right . currentDate AST#member_expression#Right AST#expression#Right . date AST#member_expression#Right AST#expression#Right ? AST#expression#Left "#0A59F7" AST#expression#Right : AST#expression#Left "#000000" AST#expression#Right AST#conditional_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Left . fontSize ( AST#expression#Left 20 AST#expression#Right ) AST#modifier_chain_expression#Left . fontWeight ( AST#expression#Left 600 AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#container_content_body#Right AST#ui_component#Right AST#modifier_chain_expression#Left . width ( AST#expression#Left '55vp' AST#expression#Right ) AST#modifier_chain_expression#Left . height ( AST#expression#Left '55vp' AST#expression#Right ) AST#modifier_chain_expression#Left . borderRadius ( AST#expression#Left 100 AST#expression#Right ) AST#modifier_chain_expression#Left . borderColor ( AST#expression#Left AST#conditional_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left dateItem AST#expression#Right . date AST#member_expression#Right AST#expression#Right == AST#expression#Left this AST#expression#Right AST#binary_expression#Right AST#expression#Right . selectedDate AST#member_expression#Right AST#expression#Right . date AST#member_expression#Right AST#expression#Right ? AST#expression#Left "#0A59F7" AST#expression#Right : AST#expression#Left "#F1F2F3" AST#expression#Right AST#conditional_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Left . borderWidth ( AST#expression#Left 2 AST#expression#Right ) AST#modifier_chain_expression#Left . backgroundColor ( AST#expression#Left AST#conditional_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left dateItem AST#expression#Right . date AST#member_expression#Right AST#expression#Right == AST#expression#Left this AST#expression#Right AST#binary_expression#Right AST#expression#Right . selectedDate AST#member_expression#Right AST#expression#Right . date AST#member_expression#Right AST#expression#Right && AST#expression#Left dateItem AST#expression#Right AST#binary_expression#Right AST#expression#Right . date AST#member_expression#Right AST#expression#Right == AST#expression#Left this AST#expression#Right AST#binary_expression#Right AST#expression#Right . currentDate AST#member_expression#Right AST#expression#Right . date AST#member_expression#Right AST#expression#Right ? AST#expression#Left "#0A59F7" AST#expression#Right : AST#expression#Left "#F1F2F3" AST#expression#Right AST#conditional_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#container_content_body#Right AST#ui_component#Right AST#modifier_chain_expression#Left . height ( AST#expression#Left '60%' AST#expression#Right ) AST#modifier_chain_expression#Left . width ( AST#expression#Left '100%' AST#expression#Right ) AST#modifier_chain_expression#Left . justifyContent ( AST#expression#Left AST#member_expression#Left AST#expression#Left FlexAlign AST#expression#Right . Center AST#member_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Row ( ) AST#container_content_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Column ( AST#component_parameters#Left { AST#component_parameter#Left space : AST#expression#Left 4 AST#expression#Right AST#component_parameter#Right } AST#component_parameters#Right ) AST#container_content_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Row ( ) AST#container_content_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Text ( AST#expression#Left AST#expression#Right ) AST#ui_component#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#container_content_body#Right AST#ui_component#Right AST#modifier_chain_expression#Left . backgroundColor ( AST#expression#Left "#ff99bbf1" AST#expression#Right ) AST#modifier_chain_expression#Left . width ( AST#expression#Left '100%' AST#expression#Right ) AST#modifier_chain_expression#Left . height ( AST#expression#Left '30px' AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Row ( ) AST#container_content_body#Left { AST#arkts_ui_element#Left AST#ui_element_with_modifiers#Left AST#ui_component#Left Text ( AST#expression#Left AST#expression#Right ) AST#ui_component#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#container_content_body#Right AST#ui_component#Right AST#modifier_chain_expression#Left . backgroundColor ( AST#expression#Left "#ff99bbf1" AST#expression#Right ) AST#modifier_chain_expression#Left . width ( AST#expression#Left '100%' AST#expression#Right ) AST#modifier_chain_expression#Left . height ( AST#expression#Left '30px' AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#container_content_body#Right AST#ui_component#Right AST#modifier_chain_expression#Left . width ( AST#expression#Left '90%' AST#expression#Right ) AST#modifier_chain_expression#Left . height ( AST#expression#Left '100%' AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#container_content_body#Right AST#ui_component#Right AST#modifier_chain_expression#Left . height ( AST#expression#Left '40%' AST#expression#Right ) AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#container_content_body#Right AST#ui_component#Right AST#modifier_chain_expression#Left . justifyContent ( AST#expression#Left AST#member_expression#Left AST#expression#Left FlexAlign AST#expression#Right . Start AST#member_expression#Right AST#expression#Right ) AST#modifier_chain_expression#Left . onClick ( AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( ) AST#parameter_list#Right => AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left animateTo AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left duration AST#property_name#Right : AST#expression#Left 100 AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left curve AST#property_name#Right : AST#expression#Left AST#member_expression#Left AST#expression#Left Curve AST#expression#Right . EaseInOut AST#member_expression#Right AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right , AST#expression#Left AST#arrow_function#Left AST#parameter_list#Left ( ) AST#parameter_list#Right => AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . selectedDate AST#member_expression#Right = AST#expression#Left dateItem AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#arrow_function#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#arrow_function#Right AST#expression#Right ) AST#modifier_chain_expression#Right AST#modifier_chain_expression#Right AST#ui_element_with_modifiers#Right AST#arkts_ui_element#Right } AST#builder_function_body#Right AST#method_declaration#Right
|
@Builder dateItem(dateItem: DateItem) {
Column() {
Row() {
Row() {
Text(dateItem.date.toString())
.height('100%')
.width('100%')
.textAlign(TextAlign.Center)
.fontColor(dateItem.date == this.selectedDate.date ? dateItem.date == this.currentDate.date ? "#FFFFFF" : "#0A59F7" : dateItem.date == this.currentDate.date ? "#0A59F7" : "#000000")
.fontSize(20)
.fontWeight(600)
}
.width('55vp')
.height('55vp')
.borderRadius(100)
.borderColor(dateItem.date == this.selectedDate.date ? "#0A59F7" : "#F1F2F3")
.borderWidth(2)
.backgroundColor(dateItem.date == this.selectedDate.date && dateItem.date == this.currentDate.date ? "#0A59F7" : "#F1F2F3")
}
.height('60%')
.width('100%')
.justifyContent(FlexAlign.Center)
Row() {
Column({ space: 4 }) {
Row() {
Text()
}
.backgroundColor("#ff99bbf1")
.width('100%')
.height('30px')
Row() {
Text()
}
.backgroundColor("#ff99bbf1")
.width('100%')
.height('30px')
}
.width('90%')
.height('100%')
}
.height('40%')
}
.justifyContent(FlexAlign.Start)
.onClick(() => {
animateTo({ duration: 100, curve: Curve.EaseInOut }, () => {
this.selectedDate = dateItem;
})
})
}
|
https://github.com/lentozi/DailyPlan.git/blob/96ce0bec8f545511c51b577c4aa8327c2c5bb0c8/entry/src/main/ets/tabcontent/HomeContent.ets#L176-L226
|
f7448849c54fe1724a98c4acd8c119a763e4eae9
|
github
|
openharmony/applications_settings
|
aac607310ec30e30d1d54db2e04d055655f72730
|
product/phone/src/main/ets/pages/dateAndTime.ets
|
arkts
|
existApp
|
Cancel Dialog
|
existApp() {
LogUtil.info(MODULE_TAG + 'Cancel dialog!');
}
|
AST#method_declaration#Left existApp AST#parameter_list#Left ( ) AST#parameter_list#Right AST#builder_function_body#Left { AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left LogUtil AST#expression#Right . info AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left MODULE_TAG AST#expression#Right + AST#expression#Left 'Cancel dialog!' AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right } AST#builder_function_body#Right AST#method_declaration#Right
|
existApp() {
LogUtil.info(MODULE_TAG + 'Cancel dialog!');
}
|
https://github.com/openharmony/applications_settings/blob/aac607310ec30e30d1d54db2e04d055655f72730/product/phone/src/main/ets/pages/dateAndTime.ets#L168-L170
|
9afd60bb7cfb6e1ea010fd056ca28c2d1650f290
|
gitee
|
sedlei/Smart-park-system.git
|
253228f73e419e92fd83777f564889d202f7c699
|
src/main/ets/pages/EnvironmentMonitoringPage.ets
|
arkts
|
updateEnvironmentStatus
|
更新环境状态
|
private updateEnvironmentStatus() {
this.environmentData.tempStatus = checkTemperatureStatus(this.environmentData.temperature)
this.environmentData.humidityStatus = checkHumidityStatus(this.environmentData.humidity)
}
|
AST#method_declaration#Left private updateEnvironmentStatus AST#parameter_list#Left ( ) AST#parameter_list#Right AST#builder_function_body#Left { AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . environmentData AST#member_expression#Right AST#expression#Right . tempStatus AST#member_expression#Right = AST#expression#Left AST#call_expression#Left AST#expression#Left checkTemperatureStatus AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . environmentData AST#member_expression#Right AST#expression#Right . temperature AST#member_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right AST#expression_statement#Right AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . environmentData AST#member_expression#Right AST#expression#Right . humidityStatus AST#member_expression#Right = AST#expression#Left AST#call_expression#Left AST#expression#Left checkHumidityStatus AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . environmentData AST#member_expression#Right AST#expression#Right . humidity AST#member_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#assignment_expression#Right AST#expression#Right AST#expression_statement#Right } AST#builder_function_body#Right AST#method_declaration#Right
|
private updateEnvironmentStatus() {
this.environmentData.tempStatus = checkTemperatureStatus(this.environmentData.temperature)
this.environmentData.humidityStatus = checkHumidityStatus(this.environmentData.humidity)
}
|
https://github.com/sedlei/Smart-park-system.git/blob/253228f73e419e92fd83777f564889d202f7c699/src/main/ets/pages/EnvironmentMonitoringPage.ets#L177-L180
|
b618bc65555d6cc4da461abbfdd3656ebf062ceb
|
github
|
openharmony/applications_app_samples
|
a826ab0e75fe51d028c1c5af58188e908736b53b
|
code/SystemFeature/DeviceManagement/DeviceManagementCollection/feature/capabilities/src/main/ets/util/DeviceUtil.ets
|
arkts
|
securityPatchTag
|
安全补丁级别
|
static securityPatchTag(): string {
return deviceInfo.securityPatchTag
}
|
AST#method_declaration#Left static securityPatchTag AST#parameter_list#Left ( ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#member_expression#Left AST#expression#Left deviceInfo AST#expression#Right . securityPatchTag AST#member_expression#Right AST#expression#Right AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
static securityPatchTag(): string {
return deviceInfo.securityPatchTag
}
|
https://github.com/openharmony/applications_app_samples/blob/a826ab0e75fe51d028c1c5af58188e908736b53b/code/SystemFeature/DeviceManagement/DeviceManagementCollection/feature/capabilities/src/main/ets/util/DeviceUtil.ets#L106-L108
|
e1f59611206cc08d4e935a9baae94099361b0751
|
gitee
|
lulululing/calendar.git
|
c87b7e3ffb50a34941a5db50afe6a513c113bd0b
|
entry/src/main/ets/manager/NotificationManager.ets
|
arkts
|
publishSystemReminder
|
完善后的系统提醒代理发布(单次提醒)
|
private async publishSystemReminder(event: EventModel, eventDateTime: Date): Promise<number> {
const reminderTime = new Date(eventDateTime.getTime() - event.reminderMinutes * 60 * 1000)
if (reminderTime.getTime() <= Date.now()) {
throw new Error('提醒时间已过,无法设置')
}
console.info(`📅 设置提醒时间: ${reminderTime.getFullYear()}-${reminderTime.getMonth() + 1}-${reminderTime.getDate()} ${reminderTime.getHours()}:${reminderTime.getMinutes()}`)
const reminderRequest: reminderAgentManager.ReminderRequestCalendar = {
reminderType: reminderAgentManager.ReminderType.REMINDER_TYPE_CALENDAR,
dateTime: {
year: reminderTime.getFullYear(),
month: reminderTime.getMonth() + 1,
day: reminderTime.getDate(),
hour: reminderTime.getHours(),
minute: reminderTime.getMinutes()
},
title: '📅 日程提醒',
content: event.title,
slotType: notificationManager.SlotType.SOCIAL_COMMUNICATION
}
const reminderId = await reminderAgentManager.publishReminder(reminderRequest)
console.info(`✅ 系统提醒已发布,ID: ${reminderId}`)
return reminderId
}
|
AST#method_declaration#Left private async publishSystemReminder AST#parameter_list#Left ( AST#parameter#Left event : AST#type_annotation#Left AST#primary_type#Left EventModel AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left eventDateTime : AST#type_annotation#Left AST#primary_type#Left Date AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left AST#generic_type#Left Promise AST#type_arguments#Left < AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right > AST#type_arguments#Right AST#generic_type#Right AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left reminderTime = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#new_expression#Left new AST#expression#Left Date AST#expression#Right AST#new_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left eventDateTime AST#expression#Right . getTime AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right - AST#expression#Left event AST#expression#Right AST#binary_expression#Right AST#expression#Right . reminderMinutes AST#member_expression#Right AST#expression#Right * AST#expression#Left 60 AST#expression#Right AST#binary_expression#Right AST#expression#Right * AST#expression#Left 1000 AST#expression#Right AST#binary_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#if_statement#Left if ( AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left reminderTime AST#expression#Right . getTime AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right <= AST#expression#Left Date AST#expression#Right AST#binary_expression#Right AST#expression#Right . now AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#throw_statement#Left throw AST#expression#Left AST#call_expression#Left AST#expression#Left AST#new_expression#Left new AST#expression#Left Error AST#expression#Right AST#new_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left '提醒时间已过,无法设置' AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#throw_statement#Right AST#statement#Right } AST#block_statement#Right AST#if_statement#Right AST#statement#Right AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left console AST#expression#Right . info AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#template_literal#Left ` 📅 设置提醒时间: AST#template_substitution#Left $ { AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left reminderTime AST#expression#Right . getFullYear AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right } AST#template_substitution#Right - AST#template_substitution#Left $ { AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left reminderTime AST#expression#Right . getMonth AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right + AST#expression#Left 1 AST#expression#Right AST#binary_expression#Right AST#expression#Right } AST#template_substitution#Right - AST#template_substitution#Left $ { AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left reminderTime AST#expression#Right . getDate AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right } AST#template_substitution#Right AST#template_substitution#Left $ { AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left reminderTime AST#expression#Right . getHours AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right } AST#template_substitution#Right : AST#template_substitution#Left $ { AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left reminderTime AST#expression#Right . getMinutes AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right } AST#template_substitution#Right ` AST#template_literal#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left reminderRequest : AST#type_annotation#Left AST#primary_type#Left AST#qualified_type#Left reminderAgentManager . ReminderRequestCalendar AST#qualified_type#Right AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left reminderType AST#property_name#Right : AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left reminderAgentManager AST#expression#Right . ReminderType AST#member_expression#Right AST#expression#Right . REMINDER_TYPE_CALENDAR AST#member_expression#Right AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left dateTime AST#property_name#Right : AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left year AST#property_name#Right : AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left reminderTime AST#expression#Right . getFullYear AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left month AST#property_name#Right : AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left reminderTime AST#expression#Right . getMonth AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right + AST#expression#Left 1 AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left day AST#property_name#Right : AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left reminderTime AST#expression#Right . getDate AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left hour AST#property_name#Right : AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left reminderTime AST#expression#Right . getHours AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left minute AST#property_name#Right : AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left reminderTime AST#expression#Right . getMinutes AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left title AST#property_name#Right : AST#expression#Left '📅 日程提醒' AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left content AST#property_name#Right : AST#expression#Left AST#member_expression#Left AST#expression#Left event AST#expression#Right . title AST#member_expression#Right AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left slotType AST#property_name#Right : AST#expression#Left AST#member_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left notificationManager AST#expression#Right . SlotType AST#member_expression#Right AST#expression#Right . SOCIAL_COMMUNICATION AST#member_expression#Right AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right AST#variable_declarator#Right AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left reminderId = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#await_expression#Left await AST#expression#Left reminderAgentManager AST#expression#Right AST#await_expression#Right AST#expression#Right . publishReminder AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left reminderRequest AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#ERROR#Left console AST#ERROR#Right . info AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#template_literal#Left ` ✅ 系统提醒已发布,ID: AST#template_substitution#Left $ { AST#expression#Left reminderId AST#expression#Right } AST#template_substitution#Right ` AST#template_literal#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#return_statement#Left return AST#expression#Left reminderId AST#expression#Right AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
private async publishSystemReminder(event: EventModel, eventDateTime: Date): Promise<number> {
const reminderTime = new Date(eventDateTime.getTime() - event.reminderMinutes * 60 * 1000)
if (reminderTime.getTime() <= Date.now()) {
throw new Error('提醒时间已过,无法设置')
}
console.info(`📅 设置提醒时间: ${reminderTime.getFullYear()}-${reminderTime.getMonth() + 1}-${reminderTime.getDate()} ${reminderTime.getHours()}:${reminderTime.getMinutes()}`)
const reminderRequest: reminderAgentManager.ReminderRequestCalendar = {
reminderType: reminderAgentManager.ReminderType.REMINDER_TYPE_CALENDAR,
dateTime: {
year: reminderTime.getFullYear(),
month: reminderTime.getMonth() + 1,
day: reminderTime.getDate(),
hour: reminderTime.getHours(),
minute: reminderTime.getMinutes()
},
title: '📅 日程提醒',
content: event.title,
slotType: notificationManager.SlotType.SOCIAL_COMMUNICATION
}
const reminderId = await reminderAgentManager.publishReminder(reminderRequest)
console.info(`✅ 系统提醒已发布,ID: ${reminderId}`)
return reminderId
}
|
https://github.com/lulululing/calendar.git/blob/c87b7e3ffb50a34941a5db50afe6a513c113bd0b/entry/src/main/ets/manager/NotificationManager.ets#L90-L116
|
03dd5b5b85a3978ee2d4d55fc9cae1617a4bb23d
|
github
|
mayuanwei/harmonyOS_bilibili
|
8a36b68b1ddf4433e2e17ee10fee4993cce2a6c5
|
AtomicService/DxinPoetry/entry/src/main/ets/model/MustLearnPoetryModel.ets
|
arkts
|
诗词
|
export interface Poetry {
title: string
dynasty: string
author: string
content: string
}
|
AST#export_declaration#Left export AST#interface_declaration#Left interface Poetry AST#object_type#Left { AST#type_member#Left title : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right AST#type_member#Left dynasty : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right AST#type_member#Left author : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right AST#type_member#Left content : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#type_member#Right } AST#object_type#Right AST#interface_declaration#Right AST#export_declaration#Right
|
export interface Poetry {
title: string
dynasty: string
author: string
content: string
}
|
https://github.com/mayuanwei/harmonyOS_bilibili/blob/8a36b68b1ddf4433e2e17ee10fee4993cce2a6c5/AtomicService/DxinPoetry/entry/src/main/ets/model/MustLearnPoetryModel.ets#L16-L21
|
331bbba00810bdfc7e3ad06853efe4818c8ace19
|
gitee
|
|
yunkss/ef-tool
|
75f6761a0f2805d97183504745bf23c975ae514d
|
ef_crypto_dto/src/main/ets/crypto/encryption/sm2/SM2Sync.ets
|
arkts
|
decode
|
解密
@param decodeStr 待解密的字符串
@param priKey SM2私钥
@param keyCoding 密钥编码方式(utf8/hex/base64) 普通字符串则选择utf8格式
@param dataCoding 入参字符串编码方式(hex/base64) - 不传默认为base64
|
static decode(str: string, priKey: string, keyCoding: buffer.BufferEncoding,
dataCoding: buffer.BufferEncoding = 'base64'): OutDTO<string> {
return CryptoSyncUtil.decodeAsym(str, priKey, 'SM2_256', 'SM2_256|SM3', 256, keyCoding, dataCoding, false);
}
|
AST#method_declaration#Left static decode AST#parameter_list#Left ( AST#parameter#Left str : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left priKey : AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left keyCoding : AST#type_annotation#Left AST#primary_type#Left AST#qualified_type#Left buffer . BufferEncoding AST#qualified_type#Right AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right , AST#parameter#Left dataCoding : AST#type_annotation#Left AST#primary_type#Left AST#qualified_type#Left buffer . BufferEncoding AST#qualified_type#Right AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left 'base64' AST#expression#Right AST#parameter#Right ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left AST#generic_type#Left OutDTO AST#type_arguments#Left < AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right > AST#type_arguments#Right AST#generic_type#Right AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left CryptoSyncUtil AST#expression#Right . decodeAsym AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left str AST#expression#Right , AST#expression#Left priKey AST#expression#Right , AST#expression#Left 'SM2_256' AST#expression#Right , AST#expression#Left 'SM2_256|SM3' AST#expression#Right , AST#expression#Left 256 AST#expression#Right , AST#expression#Left keyCoding AST#expression#Right , AST#expression#Left dataCoding AST#expression#Right , AST#expression#Left AST#boolean_literal#Left false AST#boolean_literal#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
static decode(str: string, priKey: string, keyCoding: buffer.BufferEncoding,
dataCoding: buffer.BufferEncoding = 'base64'): OutDTO<string> {
return CryptoSyncUtil.decodeAsym(str, priKey, 'SM2_256', 'SM2_256|SM3', 256, keyCoding, dataCoding, false);
}
|
https://github.com/yunkss/ef-tool/blob/75f6761a0f2805d97183504745bf23c975ae514d/ef_crypto_dto/src/main/ets/crypto/encryption/sm2/SM2Sync.ets#L58-L61
|
ff1f2359ffc02ed035176c26f99466ccdd2dfd09
|
gitee
|
Active-hue/ArkTS-Accounting.git
|
c432916d305b407557f08e35017c3fd70668e441
|
entry/src/main/ets/pages/ReminderSetting.ets
|
arkts
|
generateMinuteList
|
生成分钟列表方法
|
generateMinuteList(): number[] {
const minutes: number[] = [];
for (let i = 0; i < 60; i++) {
minutes.push(i);
}
return minutes;
}
|
AST#method_declaration#Left generateMinuteList AST#parameter_list#Left ( ) AST#parameter_list#Right : AST#type_annotation#Left AST#primary_type#Left AST#array_type#Left number [ ] AST#array_type#Right AST#primary_type#Right AST#type_annotation#Right AST#block_statement#Left { AST#statement#Left AST#variable_declaration#Left const AST#variable_declarator#Left minutes : AST#type_annotation#Left AST#primary_type#Left AST#array_type#Left number [ ] AST#array_type#Right AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#array_literal#Left [ ] AST#array_literal#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#for_statement#Left for ( AST#variable_declaration#Left let AST#variable_declarator#Left i = AST#expression#Left 0 AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#expression#Left AST#binary_expression#Left AST#expression#Left i AST#expression#Right < AST#expression#Left 60 AST#expression#Right AST#binary_expression#Right AST#expression#Right ; AST#expression#Left AST#update_expression#Left AST#expression#Left i AST#expression#Right ++ AST#update_expression#Right AST#expression#Right ) AST#block_statement#Left { AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left minutes AST#expression#Right . push AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left i AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#for_statement#Right AST#statement#Right AST#statement#Left AST#return_statement#Left return AST#expression#Left minutes AST#expression#Right ; AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
generateMinuteList(): number[] {
const minutes: number[] = [];
for (let i = 0; i < 60; i++) {
minutes.push(i);
}
return minutes;
}
|
https://github.com/Active-hue/ArkTS-Accounting.git/blob/c432916d305b407557f08e35017c3fd70668e441/entry/src/main/ets/pages/ReminderSetting.ets#L28-L34
|
eefc627552f5353595acba5e6a3adadea751437f
|
github
|
IceTeacher/DrawingBook.git
|
c101a1b904388fcfa72de1ff402307bb9036b68b
|
entry/src/main/ets/pages/BookDetailPage.ets
|
arkts
|
getBookRecommend
|
获取书籍推荐列表
|
async getBookRecommend() {
let params: ESObject = router.getParams() as ESObject;
let httpObject = http.createHttp();
let url = "https://van.mama.cn/hb/api/comment/getList?goods_id=" + params.id + "&perpage=10"
let res = await httpObject.request(url)
res = JSON.parse(res["result"] as string);
let bookRecommend: Array<ESObject> = res["data"]["list"];
this.bookRecommend = bookRecommend;
}
|
AST#method_declaration#Left async getBookRecommend AST#parameter_list#Left ( ) AST#parameter_list#Right AST#block_statement#Left { AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left params : AST#type_annotation#Left AST#primary_type#Left ESObject AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#as_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left router AST#expression#Right . getParams AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right as AST#type_annotation#Left AST#primary_type#Left ESObject AST#primary_type#Right AST#type_annotation#Right AST#as_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left httpObject = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left http AST#expression#Right . createHttp AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left url = AST#expression#Left AST#binary_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#binary_expression#Left AST#expression#Left "https://van.mama.cn/hb/api/comment/getList?goods_id=" AST#expression#Right + AST#expression#Left params AST#expression#Right AST#binary_expression#Right AST#expression#Right . id AST#member_expression#Right AST#expression#Right + AST#expression#Left "&perpage=10" AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#variable_declarator#Right AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left res AST#ERROR#Left = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#await_expression#Left await AST#expression#Left httpObject AST#expression#Right AST#await_expression#Right AST#expression#Right . request AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left url AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right res AST#ERROR#Right = AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left JSON AST#expression#Right . parse AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left AST#as_expression#Left AST#expression#Left AST#subscript_expression#Left AST#expression#Left res AST#expression#Right [ AST#expression#Left "result" AST#expression#Right ] AST#subscript_expression#Right AST#expression#Right as AST#type_annotation#Left AST#primary_type#Left string AST#primary_type#Right AST#type_annotation#Right AST#as_expression#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#variable_declaration#Left let AST#variable_declarator#Left bookRecommend : AST#type_annotation#Left AST#primary_type#Left AST#generic_type#Left Array AST#type_arguments#Left < AST#type_annotation#Left AST#primary_type#Left ESObject AST#primary_type#Right AST#type_annotation#Right > AST#type_arguments#Right AST#generic_type#Right AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#subscript_expression#Left AST#expression#Left AST#subscript_expression#Left AST#expression#Left res AST#expression#Right [ AST#expression#Left "data" AST#expression#Right ] AST#subscript_expression#Right AST#expression#Right [ AST#expression#Left "list" AST#expression#Right ] AST#subscript_expression#Right AST#expression#Right AST#variable_declarator#Right ; AST#variable_declaration#Right AST#statement#Right AST#statement#Left AST#expression_statement#Left AST#expression#Left AST#assignment_expression#Left AST#member_expression#Left AST#expression#Left this AST#expression#Right . bookRecommend AST#member_expression#Right = AST#expression#Left bookRecommend AST#expression#Right AST#assignment_expression#Right AST#expression#Right ; AST#expression_statement#Right AST#statement#Right } AST#block_statement#Right AST#method_declaration#Right
|
async getBookRecommend() {
let params: ESObject = router.getParams() as ESObject;
let httpObject = http.createHttp();
let url = "https://van.mama.cn/hb/api/comment/getList?goods_id=" + params.id + "&perpage=10"
let res = await httpObject.request(url)
res = JSON.parse(res["result"] as string);
let bookRecommend: Array<ESObject> = res["data"]["list"];
this.bookRecommend = bookRecommend;
}
|
https://github.com/IceTeacher/DrawingBook.git/blob/c101a1b904388fcfa72de1ff402307bb9036b68b/entry/src/main/ets/pages/BookDetailPage.ets#L66-L74
|
d86f2d5b70cd4d1708b4105f00062431abb51ebf
|
github
|
common-apps/ZRouter
|
5adc9c4bcca6ba7d9b323451ed464e1e9b47eee6
|
RouterApi/src/main/ets/api/Router.ets
|
arkts
|
pop
|
@deprecated
@see {ZRouter.getInstance().pop}
@param animated
|
public static pop(animated: boolean = true) {
ZRouter.getRouterMgr().pop(animated)
}
|
AST#method_declaration#Left public static pop AST#parameter_list#Left ( AST#parameter#Left animated : AST#type_annotation#Left AST#primary_type#Left boolean AST#primary_type#Right AST#type_annotation#Right = AST#expression#Left AST#boolean_literal#Left true AST#boolean_literal#Right AST#expression#Right AST#parameter#Right ) AST#parameter_list#Right AST#builder_function_body#Left { AST#expression_statement#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left ZRouter AST#expression#Right . getRouterMgr AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right . pop AST#member_expression#Right AST#expression#Right AST#argument_list#Left ( AST#expression#Left animated AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#expression_statement#Right } AST#builder_function_body#Right AST#method_declaration#Right
|
public static pop(animated: boolean = true) {
ZRouter.getRouterMgr().pop(animated)
}
|
https://github.com/common-apps/ZRouter/blob/5adc9c4bcca6ba7d9b323451ed464e1e9b47eee6/RouterApi/src/main/ets/api/Router.ets#L447-L449
|
8375af64d84a418a61eaae1631204c986f1c2347
|
gitee
|
WinWang/HarmoneyOpenEye.git
|
57f0542795336009aa0d46fd9fa5b07facc2ae87
|
entry/src/main/ets/http/apiService.ets
|
arkts
|
获取视频详情接口
@param id
|
export function getRelationList(id: number) {
return axiosClient.get<HomeModel>(
{
url: baseUrl + "api/v4/video/related",
params: { "id": id }
}
)
}
|
AST#export_declaration#Left export AST#function_declaration#Left function getRelationList AST#parameter_list#Left ( AST#parameter#Left id : AST#type_annotation#Left AST#primary_type#Left number AST#primary_type#Right AST#type_annotation#Right AST#parameter#Right ) AST#parameter_list#Right AST#block_statement#Left { AST#statement#Left AST#return_statement#Left return AST#expression#Left AST#call_expression#Left AST#expression#Left AST#member_expression#Left AST#expression#Left axiosClient AST#expression#Right . get AST#member_expression#Right AST#expression#Right AST#type_arguments#Left < AST#type_annotation#Left AST#primary_type#Left HomeModel AST#primary_type#Right AST#type_annotation#Right > AST#type_arguments#Right AST#argument_list#Left ( AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left url AST#property_name#Right : AST#expression#Left AST#binary_expression#Left AST#expression#Left baseUrl AST#expression#Right + AST#expression#Left "api/v4/video/related" AST#expression#Right AST#binary_expression#Right AST#expression#Right AST#property_assignment#Right , AST#property_assignment#Left AST#property_name#Left params AST#property_name#Right : AST#expression#Left AST#object_literal#Left { AST#property_assignment#Left AST#property_name#Left "id" AST#property_name#Right : AST#expression#Left id AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right AST#property_assignment#Right } AST#object_literal#Right AST#expression#Right ) AST#argument_list#Right AST#call_expression#Right AST#expression#Right AST#return_statement#Right AST#statement#Right } AST#block_statement#Right AST#function_declaration#Right AST#export_declaration#Right
|
export function getRelationList(id: number) {
return axiosClient.get<HomeModel>(
{
url: baseUrl + "api/v4/video/related",
params: { "id": id }
}
)
}
|
https://github.com/WinWang/HarmoneyOpenEye.git/blob/57f0542795336009aa0d46fd9fa5b07facc2ae87/entry/src/main/ets/http/apiService.ets#L108-L115
|
6f7c857a751c7f6c0966d84239a271f5e11099ce
|
github
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.