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