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

!7881 test:fix compile mistake

Merge pull request !7881 from 李伟明/fix_issue
......@@ -25,7 +25,7 @@ const TAG = 'ets_apiLack_add';
struct Second {
private content: string = "这是第二页"
@State text: string = router.getParams()['text']
@State data: any = router.getParams()['data']
@State data: number[] = router.getParams()['data']
@State secondData : string = ''
build() {
......@@ -37,7 +37,7 @@ struct Second {
.fontSize(30)
.key("DataText")
.onClick(()=>{
this.secondData = (this.data.array[1]).toString()
this.secondData = (this.data[1]).toString()
try {
var backData = {
data: {
......
......@@ -25,7 +25,7 @@ const TAG = 'ets_apiLack_add';
struct Second {
private content: string = "这是第二页"
@State text: string = router.getParams()['text']
@State data: any = router.getParams()['data']
@State data: number[] = router.getParams()['data']
@State secondData : string = ''
build() {
......@@ -37,7 +37,7 @@ struct Second {
.fontSize(30)
.key("SingleDataText")
.onClick(()=>{
this.secondData = (this.data.array[1]).toString()
this.secondData = (this.data[1]).toString()
try {
var backData = {
data: {
......
......@@ -30,9 +30,7 @@ struct RouterStandard {
url: 'pages/page1',
params: {
text: '这是第一页的值',
data: {
array: [12, 45, 78]
}
data: [12, 45, 78]
}
}
try {
......
......@@ -17,7 +17,7 @@ import {MessageManager,Callback} from './../../../../common/MessageManager';
@Entry
@Component
struct AlignCenter_AddOffset {
@State OneOffset: any = { x: 0, y: 0 }
@State OneOffset: object = { x: 0, y: 0 }
messageManager:MessageManager = new MessageManager()
onPageShow() {
console.info('AlignSpaceEvenly_AddOffset onPageShow');
......
......@@ -17,7 +17,7 @@ import {MessageManager,Callback} from './../../../../common/MessageManager';
@Entry
@Component
struct AlignEnd_AddOffset {
@State OneOffset: any = { x: 0, y: 0 }
@State OneOffset: object = { x: 0, y: 0 }
messageManager:MessageManager = new MessageManager()
onPageShow() {
console.info('AlignSpaceEvenly_AddOffset onPageShow');
......
......@@ -17,7 +17,7 @@ import {MessageManager,Callback} from './../../../../common/MessageManager';
@Entry
@Component
struct AlignSpaceEvenly_AddOffset {
@State OneOffset: any = { x: 0, y: 0 }
@State OneOffset: object = { x: 0, y: 0 }
messageManager:MessageManager = new MessageManager()
onPageShow() {
console.info('AlignSpaceEvenly_NoSpace onPageShow');
......
......@@ -17,7 +17,7 @@ import {MessageManager,Callback} from './../../../../common/MessageManager';
@Entry
@Component
struct AlignStart_AddOffset {
@State OneOffset: any = { x: 0, y: 0 }
@State OneOffset: object = { x: 0, y: 0 }
messageManager:MessageManager = new MessageManager()
onPageShow() {
console.info('AlignSpaceEvenly_AddOffset onPageShow');
......
......@@ -101,9 +101,9 @@ export default function flexExceed_AutoJsunit() {
expect(textExceed01.bottom - textExceed01.top).assertEqual(vp2px(50))
expect(textExceed02.bottom - textExceed02.top).assertEqual(vp2px(100))
expect(textExceed03.bottom - textExceed03.top).assertEqual(vp2px(150))
expect(textExceed01.right - textExceed01.left).assertEqual(vp2px(440/3))
expect(textExceed02.right - textExceed02.left).assertEqual(vp2px(440/3))
expect(textExceed03.right - textExceed03.left).assertEqual(vp2px(440/3))
expect(Math.round(textExceed01.right - textExceed01.left)).assertEqual(Math.round(vp2px(440/3)))
expect(Math.round(textExceed02.right - textExceed02.left)).assertEqual(Math.round(vp2px(440/3)))
expect(Math.round(textExceed03.right - textExceed03.left)).assertEqual(Math.round(vp2px(440/3)))
expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row')
expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto')
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_0700 END');
......
......@@ -102,9 +102,9 @@ export default function flexPadding_AutoJsunit() {
expect(textFlexPadding01.bottom - textFlexPadding01.top).assertEqual(vp2px(50))
expect(textFlexPadding02.bottom - textFlexPadding02.top).assertEqual(vp2px(100))
expect(textFlexPadding03.bottom - textFlexPadding03.top).assertEqual(vp2px(150))
expect(textFlexPadding01.right - textFlexPadding01.left).assertEqual(vp2px(440/3))
expect(textFlexPadding02.right - textFlexPadding02.left).assertEqual(vp2px(440/3))
expect(textFlexPadding03.right - textFlexPadding03.left).assertEqual(vp2px(440/3))
expect(Math.round(textFlexPadding01.right - textFlexPadding01.left)).assertEqual(Math.round(vp2px(440/3)))
expect(Math.round(textFlexPadding02.right - textFlexPadding02.left)).assertEqual(Math.round(vp2px(440/3)))
expect(Math.round(textFlexPadding03.right - textFlexPadding03.left)).assertEqual(Math.round(vp2px(440/3)))
expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row')
expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto')
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_0400 END');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册