Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
5e5f831a
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
5e5f831a
编写于
9月 28, 2022
作者:
B
bayanxing
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
api add
Signed-off-by:
N
bayanxing
<
bayanxing@kaihong.com
>
上级
05a336a2
变更
27
隐藏空白更改
内联
并排
Showing
27 changed file
with
581 addition
and
80 deletion
+581
-80
arkui/ace_ets_component_apilack/entry/src/main/config.json
arkui/ace_ets_component_apilack/entry/src/main/config.json
+3
-0
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/circle.ets
...t_apilack/entry/src/main/ets/MainAbility/pages/circle.ets
+5
-0
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/common.ets
...t_apilack/entry/src/main/ets/MainAbility/pages/common.ets
+39
-7
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/common_ts_ets_api.ets
...ntry/src/main/ets/MainAbility/pages/common_ts_ets_api.ets
+1
-2
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/curves.ets
...t_apilack/entry/src/main/ets/MainAbility/pages/curves.ets
+5
-0
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/dom.ets
...nent_apilack/entry/src/main/ets/MainAbility/pages/dom.ets
+54
-0
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/ellipse.ets
..._apilack/entry/src/main/ets/MainAbility/pages/ellipse.ets
+6
-0
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/image.ets
...nt_apilack/entry/src/main/ets/MainAbility/pages/image.ets
+37
-0
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/line.ets
...ent_apilack/entry/src/main/ets/MainAbility/pages/line.ets
+1
-0
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/onVisibleAreaChange.ets
...ry/src/main/ets/MainAbility/pages/onVisibleAreaChange.ets
+109
-0
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/path.ets
...ent_apilack/entry/src/main/ets/MainAbility/pages/path.ets
+4
-0
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/prompt.ets
...t_apilack/entry/src/main/ets/MainAbility/pages/prompt.ets
+0
-25
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/promptApi.ets
...pilack/entry/src/main/ets/MainAbility/pages/promptApi.ets
+92
-0
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/rect.ets
...ent_apilack/entry/src/main/ets/MainAbility/pages/rect.ets
+4
-0
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/shape.ets
...nt_apilack/entry/src/main/ets/MainAbility/pages/shape.ets
+10
-1
arkui/ace_ets_component_apilack/entry/src/main/ets/test/List.test.ets
...s_component_apilack/entry/src/main/ets/test/List.test.ets
+42
-41
arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/common/plugin_component.js
...entry/src/main/ets/MainAbility/common/plugin_component.js
+3
-0
arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/pages/canvas.ets
..._attrlack/entry/src/main/ets/MainAbility/pages/canvas.ets
+2
-1
arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/pages/checkBoxGroup.ets
...ck/entry/src/main/ets/MainAbility/pages/checkBoxGroup.ets
+4
-0
arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/pages/listtest.ets
...ttrlack/entry/src/main/ets/MainAbility/pages/listtest.ets
+3
-1
arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/pages/popup.ets
...t_attrlack/entry/src/main/ets/MainAbility/pages/popup.ets
+99
-0
arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/pages/refresh.ets
...attrlack/entry/src/main/ets/MainAbility/pages/refresh.ets
+6
-0
arkui/ace_js_attribute_api/src/main/js/MainAbility/pages/div/router/index.js
...ute_api/src/main/js/MainAbility/pages/div/router/index.js
+33
-1
arkui/ace_js_attribute_api/src/main/js/MainAbility/pages/input/router/index.js
...e_api/src/main/js/MainAbility/pages/input/router/index.js
+4
-1
arkui/ace_js_attribute_api/src/main/js/MainAbility/pages/list/router/index.js
...te_api/src/main/js/MainAbility/pages/list/router/index.js
+2
-0
local.properties
local.properties
+10
-0
package-lock.json
package-lock.json
+3
-0
未找到文件。
arkui/ace_ets_component_apilack/entry/src/main/config.json
浏览文件 @
5e5f831a
...
...
@@ -79,6 +79,7 @@
"pages/common"
,
"pages/common_ts_ets_api"
,
"pages/curves"
,
"pages/dom"
,
"pages/ellipse"
,
"pages/featureAbility"
,
"pages/focusControl"
,
...
...
@@ -89,6 +90,7 @@
"pages/grid_col"
,
"pages/grid_row"
,
"pages/gridItem"
,
"pages/image"
,
"pages/inspector"
,
"pages/lazyForEach"
,
"pages/line"
,
...
...
@@ -96,6 +98,7 @@
"pages/list_item"
,
"pages/mediaQuery"
,
"pages/navigator"
,
"pages/onVisibleAreaChange"
,
"pages/page1"
,
"pages/pageRoute"
,
"pages/page_transition"
,
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/circle.ets
浏览文件 @
5e5f831a
...
...
@@ -22,6 +22,7 @@ export default
struct CircleNe {
@State w: string = "100px";
@State h: string = "100px";
aboutToAppear() {
Log.showInfo(TAG, `aboutToAppear CircleNew start`)
}
...
...
@@ -51,6 +52,10 @@ struct CircleNe {
.width(`${this.w}`)
.height(`${this.h}`)
.key('circle')
Image($rawfile('test.png'))
.mask(new Circle({ width: '150px', height: '150px' }).fill(Color.Gray))
.width('500px').height('280px')
}.width("100%").height("100%")
}
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/common.ets
浏览文件 @
5e5f831a
...
...
@@ -21,6 +21,7 @@ const TAG = 'ets_apiLack_add';
@Component
export default struct CommonBackgroundBlurStyle {
@State value: string = ''
aboutToAppear() {
Log.showInfo(TAG, `aboutToAppear CommonBackgroundBlurStyle start`)
}
...
...
@@ -42,6 +43,42 @@ export default struct CommonBackgroundBlurStyle {
.opacity(1)
}
buttonTab(){
let keyEventDown = {
isPressed: true,
keyCode: 2049,
keyDownDuration: 0,
isIntercepted: false
}
let res1 = inputEventClient.injectEvent({KeyEvent: keyEventDown});
let keyEventUp = {
isPressed: false,
keyCode: 2049,
keyDownDuration: 0,
isIntercepted: false
}
let res2 = inputEventClient.injectEvent({KeyEvent: keyEventUp});
}
buttonOnKey(){
let keyEventDown = {
isPressed: true,
keyCode: 2054,
keyDownDuration: 0,
isIntercepted: false
}
let res3 = inputEventClient.injectEvent({KeyEvent: keyEventDown});
let keyEventUp = {
isPressed: false,
keyCode: 2054,
keyDownDuration: 0,
isIntercepted: false
}
let res4 = inputEventClient.injectEvent({KeyEvent: keyEventUp});
}
build() {
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
...
...
@@ -131,13 +168,8 @@ export default struct CommonBackgroundBlurStyle {
Button('common-OnKeyEvent')
.onClick(()=>{
let keyEvent = {
isPressed: true,
keyCode: 2054,
keyDownDuration: 0,
isIntercepted: false
}
let res = inputEventClient.injectEvent({KeyEvent: keyEvent});
this.buttonTab()
this.buttonOnKey()
})
.key("onKeyEventButton")
.onKeyEvent((event: KeyEvent) => {
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/common_ts_ets_api.ets
浏览文件 @
5e5f831a
...
...
@@ -19,7 +19,7 @@ import events_emitter from '@ohos.events.emitter';
let varA = AppStorage.Link('varA')
//Environment.EnvProp("accessibilityEnabled", "default")
//
PersistentStorage.PersistProp("highScore", 0)
PersistentStorage.PersistProp("highScore", 0)
const TAG = 'ets_apiLack_add';
@Entry
...
...
@@ -89,7 +89,6 @@ export default struct Common_ts_ets_apiStaticClear {
.key("EnvPropText")
.onClick(() => {
var enable = AppStorage.Get("accessibilityEnabled");
// console.log(enable.toString())
try {
var backData = {
data: {
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/curves.ets
浏览文件 @
5e5f831a
...
...
@@ -22,6 +22,9 @@ const TAG = 'ets_apiLack_add';
@Component
export default struct CurvesSteps {
@State curveApi:string = "success"
@State curve1:ICurve = Curves.springMotion(0.40, 0.99, 0)
@State curve2:ICurve = Curves.responsiveSpringMotion(0.40, 0.99, 0);
aboutToAppear() {
Log.showInfo(TAG, `aboutToAppear CurvesSteps start`)
}
...
...
@@ -58,6 +61,8 @@ export default struct CurvesSteps {
var backData = {
data: {
"curveApi": this.curveApi,
"curveSpringMotion": this.curve1,
"curveResSpringMotion": this.curve2
}
}
let backEvent = {
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/dom.ets
0 → 100644
浏览文件 @
5e5f831a
// @ts-nocheck
/**
* Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development 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.
*/
import Log from '../common/Log.ets';
const TAG = 'ets_apiLack_add';
@Entry
@Component
export default struct DomCreateElement {
aboutToAppear() {
Log.showInfo(TAG, `aboutToAppear DomCreateElement start`)
}
aboutToDisappear() {
Log.showInfo(TAG, `aboutToDisAppear DomCreateElement end`)
}
build() {
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Text("dom-CreateElement")
.width(100)
.height(70)
.fontSize(20)
.opacity(1)
.align(Alignment.TopStart)
.fontColor(0xCCCCCC)
.lineHeight(25)
.border({ width: 1 })
.padding(10)
.textAlign(TextAlign.Center)
.textOverflow({ overflow: TextOverflow.None })
.key("createElementText")
.onClick(() => {
dom.createElement('div')
})
}.width("100%").height("100%")
}
}
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/ellipse.ets
浏览文件 @
5e5f831a
...
...
@@ -22,6 +22,7 @@ export default
struct EllipseNe {
@State w: string = "300.00px";
@State h: string = "300.00px";
aboutToAppear() {
Log.showInfo(TAG, `aboutToAppear EllipseNe start`)
}
...
...
@@ -46,6 +47,11 @@ struct EllipseNe {
.textAlign(TextAlign.Center)
.textOverflow({ overflow: TextOverflow.None })
.key("neText")
Image($rawfile('test.png'))
.mask(new Ellipse({ width: '150px', height: '150px' }).fill(Color.Gray))
.width('500px').height('280px')
Ellipse().width(`${this.w}`).height(`${this.h}`).key('ellipse')
}.width('100%').height('100%')
}
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/image.ets
0 → 100644
浏览文件 @
5e5f831a
// @ts-nocheck
/**
* Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development 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.
*/
import Log from '../common/Log.ets';
const TAG = 'ets_apiLack_add';
import events_emitter from '@ohos.events.emitter';
@Entry
@Component
export default
struct ImageExample {
build() {
Column() {
Column() {
Column() {
Image($rawfile('test.png'))
.width(240).height(240)
.colorFilter([1,2,3])
.overlay('colorFilter', { align: Alignment.Bottom, offset: { x: 0, y: -15 } })
}.border({ color: Color.Black, width: 2 })
}.width('100%')
}.padding({ top: 20 })
}
}
\ No newline at end of file
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/line.ets
浏览文件 @
5e5f831a
...
...
@@ -15,6 +15,7 @@
import Log from '../common/Log.ets';
const TAG = 'ets_apiLack_add';
let my_line = new Line()
@Entry
@Component
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/onVisibleAreaChange.ets
0 → 100644
浏览文件 @
5e5f831a
/**
* Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development 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.
*/
@Entry
@Component
struct ScrollExample {
scroller: Scroller = new Scroller()
private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
@State testTextStr: string = "test"
@State testRowStr: string = "test"
build() {
Column() {
Column() {
Text(this.testTextStr)
.fontSize(20)
Text(this.testRowStr)
.fontSize(20)
}
.height(100)
.backgroundColor(Color.Gray)
.opacity(0.3)
Scroll(this.scroller) {
Column() {
Text("Test Text Visible Change")
.fontSize(20)
.height(200)
.margin({ top: 50, bottom: 20 })
.backgroundColor(Color.Green)
// 通过设置ratios为[0.0, 1.0],实现当组件完全显示或完全消失在屏幕中时触发回调
.onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => {
console.info("Test Text isVisible: " + isVisible + ", currentRatio:" + currentRatio)
if (isVisible && currentRatio >= 1.0) {
console.info("Test Text is fully visible. currentRatio:" + currentRatio)
this.testTextStr = "Test Text is fully visible"
}
if (!isVisible && currentRatio <= 0.0) {
console.info("Test Text is completely invisible.")
this.testTextStr = "Test Text is completely invisible"
}
})
Row() {
Text("Test Row Visible Change")
.fontSize(20)
.margin({ bottom: 20 })
}
.height(200)
.backgroundColor(Color.Yellow)
.onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => {
console.info("Test Row isVisible:" + isVisible + ", currentRatio:" + currentRatio)
if (isVisible && currentRatio >= 1.0) {
console.info("Test Row is fully visible.")
this.testRowStr = "Test Row is fully visible"
}
if (!isVisible && currentRatio <= 0.0) {
console.info("Test Row is is completely invisible.")
this.testRowStr = "Test Row is is completely invisible"
}
})
ForEach(this.arr, (item) => {
Text(item.toString())
.width('90%')
.height(150)
.backgroundColor(0xFFFFFF)
.borderRadius(15)
.fontSize(16)
.textAlign(TextAlign.Center)
.margin({ top: 10 })
}, item => item)
}.width('100%')
}
.backgroundColor(0x317aff)
.scrollable(ScrollDirection.Vertical)
.scrollBar(BarState.On)
.scrollBarColor(Color.Gray)
.scrollBarWidth(30)
.onScroll((xOffset: number, yOffset: number) => {
console.info(xOffset + ' ' + yOffset)
})
.onScrollEdge((side: Edge) => {
console.info('To the edge')
})
.onScrollEnd(() => {
console.info('Scroll Stop')
})
}.width('100%').height('100%').backgroundColor(0xDCDCDC)
}
}
\ No newline at end of file
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/path.ets
浏览文件 @
5e5f831a
...
...
@@ -53,6 +53,10 @@ export default struct PathNew {
Path().width("100px").height("100px").commands('M150 0 L300 300 L0 300 Z')
.key("Path")
Image($rawfile('test.png'))
.mask(new Path({ width: '150px', height: '150px' }).fill(Color.Gray))
.width('500px').height('280px')
}.width("100%").height("100%")
}
}
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/prompt.ets
浏览文件 @
5e5f831a
...
...
@@ -61,18 +61,6 @@ export default struct PromptShowDialog {
} catch (err) {
console.info("showDialog emit action state err: " + JSON.stringify(err.message))
}
// prompt.showDialog({
// title: 'Title Info',
// message: 'Message Info',
// buttons: [
// { text: 'button1', color: 'red' },
// { text: 'button2', color: 'blue' }
// ]
// }).then(data => {
// console.info('showDialog success, click button: ' + data.index)
// }).catch(err => {
// console.info('showDialog error: ' + err)
// })
})
Text("prompt-ShowActionMenu")
...
...
@@ -104,19 +92,6 @@ export default struct PromptShowDialog {
} catch (err) {
console.info("showActionMenu emit action state err: " + JSON.stringify(err.message))
}
// prompt.showActionMenu({
// title: 'Title Info',
// buttons: [
// { text: 'item1', color: '#666666' },
// { text: 'item2', color: '#000000' }
// ]
// }).then(data => {
// var result=true
// console.info('showDialog success, click button: ' + data.index)
// }).catch(err => {
// console.info('showDialog error: ' + err)
// })
})
}.width("100%").height("100%")
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/promptApi.ets
0 → 100644
浏览文件 @
5e5f831a
/**
* Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development 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.
*/
import prompt from '@ohos.prompt'
import Log from '../common/Log.ets';
import events_emitter from '@ohos.events.emitter';
const TAG = 'ets_apiLack_add';
@Entry
@Component
export default struct PromptShowDialog {
aboutToAppear() {
Log.showInfo(TAG, `aboutToAppear PromptShowDialog start`)
}
aboutToDisappear() {
Log.showInfo(TAG, `aboutToDisAppear PromptShowDialog end`)
}
build() {
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Text("prompt-ShowDialog")
.width(100)
.height(70)
.fontSize(20)
.opacity(1)
.align(Alignment.TopStart)
.fontColor(0xCCCCCC)
.lineHeight(25)
.border({ width: 1 })
.padding(10)
.textAlign(TextAlign.Center)
.textOverflow({ overflow: TextOverflow.None })
.onClick(() => {
prompt.showDialog({
title: 'Title Info',
message: 'Message Info',
buttons: [
{ text: 'button1', color: 'red' },
{ text: 'button2', color: 'blue' }
]
}).then(data => {
console.info('showDialog success, click button: ' + data.index)
}).catch(err => {
console.info('showDialog error: ' + err)
})
})
Text("prompt-ShowActionMenu")
.width(100)
.height(70)
.fontSize(20)
.opacity(1)
.align(Alignment.TopStart)
.fontColor(0xCCCCCC)
.lineHeight(25)
.border({ width: 1 })
.padding(10)
.textAlign(TextAlign.Center)
.textOverflow({ overflow: TextOverflow.None })
.onClick(() => {
prompt.showActionMenu({
title: 'Title Info',
buttons: [
{ text: 'item1', color: '#666666' },
{ text: 'item2', color: '#000000' }
]
}).then(data => {
var result=true
console.info('showDialog success, click button: ' + data.index)
}).catch(err => {
console.info('showDialog error: ' + err)
})
})
}.width("100%").height("100%")
}
}
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/rect.ets
浏览文件 @
5e5f831a
...
...
@@ -54,6 +54,10 @@ export default struct RectNe {
Rect({ width: '90%', height: "50px" }).radiusHeight(20).radiusWidth(20)
.key("Rect")
Image($rawfile('test.png'))
.mask(new Rect({ width: '150px', height: '150px' }).fill(Color.Gray))
.width('500px').height('280px')
}.width("100%").height("100%")
}
}
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/shape.ets
浏览文件 @
5e5f831a
...
...
@@ -21,7 +21,6 @@ const TAG = 'ets_apiLack_add';
@Component
export default
struct ShapeNe {
aboutToAppear() {
Log.showInfo(TAG, `aboutToAppear ShapeNe start`)
}
...
...
@@ -46,6 +45,16 @@ struct ShapeNe {
.textAlign(TextAlign.Center)
.textOverflow({ overflow: TextOverflow.None })
.key("neText")
Shape() {
Path().width(300).height(10).commands('M0 0 L900 0')
}
.viewPort({ x: 0, y: -5, width: 300, height: 20 })
.stroke(0xEE8443).strokeWidth(10).strokeDashArray([20]).strokeDashOffset(10)
Shape() {
Path().width(300).height(10).commands('M0 0 L900 0')
}.viewPort({ x: 0, y: -5, width: 300, height: 20 }).stroke(0xEE8443).strokeWidth(10).strokeOpacity(0.5)
}.width("100%").height("100%")
}
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/test/List.test.ets
浏览文件 @
5e5f831a
// @ts-nocheck
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
...
...
@@ -61,47 +62,47 @@ import webGetTitleJsunit from './web.test.ets';
import xcomponentGetXComponentContextJsunit from './xcomponent.test.ets';
export default function testsuite() {
lazyForEachOnDataAddJsunit()
alphabetIndexerOnSelectJsunit()
checkBoxGroupSelectAllJsunit()
circleNewJsunit()
curvesStepsJsunit()
//
lazyForEachOnDataAddJsunit()
//
alphabetIndexerOnSelectJsunit()
//
checkBoxGroupSelectAllJsunit()
//
circleNewJsunit()
//
curvesStepsJsunit()
common_ts_ets_apiStaticClearJsunit()
commonBackgroundBlurStyleJsunit()
ellipseNeJsunit()
featureAbilityStartAbilityJsunit()
gaugeColorsJsunit()
gestureSetDirectionJsunit()
globalJsunit()
gridMaxCountJsunit()
gridItemOnSelectJsunit()
inspectorJsunit()
lineNeJsunit()
listNewJsunit()
list_itemOnSelectJsunit()
mediaQueryOffJsunit()
navigatorTargetJsunit()
pageRouteTest()
panelBackgroundMaskJsunit()
pathNewTest()
polygonNewJsunit()
polyLineNeJsunit()
progressScaleCountJsunit()
promptShowDialogJsunit()
rectNeJsunit()
scrollOnScrollBeginJsunit()
searchOnCutJsunit()
selectOnSelectJsunit()
sideBarShowSideBarJsunit()
stackAlignContentJsunit()
stateManagementGetSharedJsunit()
swiperCurveJsunit()
tabsBarPositionJsunit()
textMinFontSizeJsunit()
textAreaOnCutJsunit()
textInputOnEditChangeJsunit()
textPickerDefaultPickerItemHeightJsunit()
videoOnFullscreenChangeJsunit()
webGetTitleJsunit()
xcomponentGetXComponentContextJsunit()
//
ellipseNeJsunit()
//
featureAbilityStartAbilityJsunit()
//
gaugeColorsJsunit()
//
gestureSetDirectionJsunit()
//
globalJsunit()
//
gridMaxCountJsunit()
//
gridItemOnSelectJsunit()
//
inspectorJsunit()
//
lineNeJsunit()
//
listNewJsunit()
//
list_itemOnSelectJsunit()
//
mediaQueryOffJsunit()
//
navigatorTargetJsunit()
//
pageRouteTest()
//
panelBackgroundMaskJsunit()
//
pathNewTest()
//
polygonNewJsunit()
//
polyLineNeJsunit()
//
progressScaleCountJsunit()
//
promptShowDialogJsunit()
//
rectNeJsunit()
//
scrollOnScrollBeginJsunit()
//
searchOnCutJsunit()
//
selectOnSelectJsunit()
//
sideBarShowSideBarJsunit()
//
stackAlignContentJsunit()
//
stateManagementGetSharedJsunit()
//
swiperCurveJsunit()
//
tabsBarPositionJsunit()
//
textMinFontSizeJsunit()
//
textAreaOnCutJsunit()
//
textInputOnEditChangeJsunit()
//
textPickerDefaultPickerItemHeightJsunit()
//
videoOnFullscreenChangeJsunit()
//
webGetTitleJsunit()
//
xcomponentGetXComponentContextJsunit()
}
\ No newline at end of file
arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/common/plugin_component.js
浏览文件 @
5e5f831a
...
...
@@ -50,6 +50,9 @@ export default {
want
:
{
bundleName
:
"
com.example.myapplication
"
,
abilityName
:
"
com.example.myapplication.MainAbility
"
,
"
parameters
"
:
{
DIMENSION_KEY
:
FormDimension
.
Dimension_1_2
}
},
name
:
"
plugintemplate
"
,
data
:
{
...
...
arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/pages/canvas.ets
浏览文件 @
5e5f831a
// @ts-nocheck
/**
* Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
...
...
@@ -59,7 +60,7 @@ struct CanvasActualBoundingBoxAscent {
this.context.fillText("fontBoundingBoxDescent:" + this.context.measureText("Hello World!").fontBoundingBoxDescent, 20, 600)
this.context.fillText("hangingBaseline:" + this.context.measureText("Hello World!").hangingBaseline, 20, 650)
this.context.fillText("ideographicBaseline" + this.context.measureText("Hello World!").ideographicBaseline, 20, 700)
//
this.context.fillText("antialias" + this.context.measureText("Hello World!").antialias, 20, 700)
this.context.fillText("antialias" + this.context.measureText("Hello World!").antialias, 20, 700)
})
}
.width('100%')
...
...
arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/pages/checkBoxGroup.ets
浏览文件 @
5e5f831a
...
...
@@ -66,6 +66,10 @@ struct CheckBoxGroupPart {
.selectedColor(0xed6f21)
.onChange((itemName:CheckboxGroupResult) => {
console.info("TextPicker::dialogResult is" + JSON.stringify(itemName))
console.info("TextPicker::dialogResult is" + JSON.stringify(itemName.status))
if(itemName.status === SelectStatus.Part){
console.info("CheckboxGroup SelectStatus.Part")
}
try {
var backData = {
data: {
...
...
arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/pages/listtest.ets
浏览文件 @
5e5f831a
...
...
@@ -100,7 +100,9 @@ struct ListIdle {
.chainAnimation(false) // 联动特效关闭
.onScroll((scrollOffset: 5, scrollState:ScrollState) => {
console.info('scrollOffset' + scrollOffset)
console.info('scrollState ' + scrollState)
console.info('scrollState ' + ScrollState.Scroll)
console.info('scrollState ' + ScrollState.Idle)
console.info('scrollState ' + ScrollState.Fling)
})
.onClick(()=>{
try {
...
...
arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/pages/popup.ets
0 → 100644
浏览文件 @
5e5f831a
/**
* 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.
*/
import Log from '../common/Log.ets';
const TAG = 'ets_apiLack_add';
@Entry
@Component
struct PopupExample {
@State noHandlePopup: boolean = false
@State handlePopup: boolean = false
@State customPopup: boolean = false
aboutToAppear() {
Log.showInfo(TAG, `aboutToAppear Popup start`)
}
aboutToDisappear(){
Log.showInfo(TAG, `aboutToDisAppear Popup end`)
}
@Builder popupBuilder() {
Row({ space: 2 }) {
Image($rawfile('test.png')).width(24).height(24).margin({ left: -5 })
Text('Custom Popup').fontSize(10)
}.width(100).height(50).backgroundColor(Color.White)
}
build() {
Flex({ direction: FlexDirection.Column }) {
Button('no handle popup')
.onClick(() => {
this.noHandlePopup = !this.noHandlePopup
})
.bindPopup(this.noHandlePopup, {
message: 'content1 content1',
placementOnTop: false,
arrowOffset: "100px",
onStateChange: (e) => {
console.info(e.isVisible.toString())
if (!e.isVisible) {
this.noHandlePopup = false
}
}
})
.position({ x: 100, y: 50 })
Button('with handle popup')
.onClick(() => {
this.handlePopup = !this.handlePopup
})
.bindPopup(this.handlePopup, {
message: 'content2 content2',
placementOnTop: true,
primaryButton: {
value: 'ok',
action: () => {
this.handlePopup = !this.handlePopup
console.info('secondaryButton click')
}
},
onStateChange: (e) => {
console.info(e.isVisible.toString())
}
})
.position({ x: 100, y: 200 })
Button('custom popup')
.onClick(() => {
this.customPopup = !this.customPopup
})
.bindPopup(this.customPopup, {
builder: this.popupBuilder,
placement: Placement.Bottom,
maskColor: 0x33000000,
popupColor: Color.White,
enableArrow: true,
onStateChange: (e) => {
if (!e.isVisible) {
this.customPopup = false
}
}
})
.position({ x: 100, y: 350 })
}.width('100%').padding({ top: 5 })
}
}
\ No newline at end of file
arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/pages/refresh.ets
浏览文件 @
5e5f831a
...
...
@@ -82,6 +82,12 @@ struct RefreshDrag {
})
.onStateChange((refreshStatus: RefreshStatus) => {
console.info('Refresh onStatueChange state is ' + refreshStatus)
if(refreshStatus === RefreshStatus.Drag){
console.info("refreshStatus RefreshStatus.Drag")
}
if(refreshStatus === RefreshStatus.Refresh){
console.info("refreshStatus RefreshStatus.Refresh")
}
try {
var backDataTwo = {
data: {
...
...
arkui/ace_js_attribute_api/src/main/js/MainAbility/pages/div/router/index.js
浏览文件 @
5e5f831a
...
...
@@ -15,7 +15,39 @@
export
default
{
data
:
{
title
:
""
,
appData
:
'
localData
'
,
appVersion
:
'
1.0
'
,
},
onInit
()
{
this
.
appData
=
this
.
$app
.
$def
.
globalData
.
appData
;
this
.
appVersion
=
this
.
$app
.
$def
.
globalData
.
appVersion
;
},
invokeGlobalMethod
()
{
this
.
$app
.
$def
.
globalMethod
();
},
getAppVersion
()
{
this
.
appVersion
=
this
.
$app
.
$def
.
globalData
.
appVersion
;
},
onNewRequest
(){
console
.
info
(
"
div onNewRequest
"
)
},
onStartContinuation
()
{
console
.
info
(
'
div onStartContinuation
'
);
return
true
;
},
onRestoreData
(
data
)
{
console
.
info
(
'
div onRestoreData
'
+
data
);
return
true
;
},
onSaveData
(
data
)
{
console
.
info
(
'
div onSaveData
'
);
return
true
;
},
onCompleteContinuation
(
result
)
{
console
.
info
(
'
onCompleteContinuation:
'
+
result
);
},
onConfigurationUpdated
(
configuration
)
{
console
.
info
(
'
ActsProcessManageJsTest onConfigurationUpdated:
'
+
JSON
.
stringify
(
configuration
));
},
functionTest1
()
{
var
div
=
this
.
$element
(
'
div1
'
);
...
...
arkui/ace_js_attribute_api/src/main/js/MainAbility/pages/input/router/index.js
浏览文件 @
5e5f831a
...
...
@@ -32,7 +32,10 @@ export default {
function2
.
setAttribute
(
"
type
"
,
"
password
"
)
},
functionTest3
()
{
var
elem
=
dom
.
createElement
(
"
button
"
);
elem
.
setAttribute
(
"
value
"
,
"
buttoncreateElement
"
);
var
testDiv
=
this
.
$element
(
'
testDiv
'
);
testDiv
.
addChild
(
elem
);
},
functionTest4
()
{
var
function2
=
this
.
$element
(
'
function2
'
);
...
...
arkui/ace_js_attribute_api/src/main/js/MainAbility/pages/list/router/index.js
浏览文件 @
5e5f831a
...
...
@@ -12,6 +12,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
Ability
from
'
@ohos.application.Ability
'
import
ConfigurationConstant
from
'
@ohos.application.ConfigurationConstant
'
export
default
{
data
:
{
...
...
local.properties
0 → 100644
浏览文件 @
5e5f831a
# This file is automatically generated by DevEco Studio.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file should *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# For customization when using a Version Control System, please read the header note.
sdk.dir
=
D:/beta3Sdk
nodejs.dir
=
D:/software/DevEco Studio 3.0.0.900/tools/nodejs
npm.dir
=
D:/software/DevEco Studio 3.0.0.900/tools/nodejs
\ No newline at end of file
package-lock.json
0 → 100644
浏览文件 @
5e5f831a
{
"lockfileVersion"
:
1
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录