fix warning
This commit is contained in:
parent
bdfab3ab29
commit
7f9c4bc663
@ -6,8 +6,6 @@ import { BusinessError } from '@ohos.base';
|
||||
import { Log } from '@devwiki/base';
|
||||
import { BaseLocalStorage, ScreenUtil } from '@devwiki/base';
|
||||
import { HomeItem, HomeItemGroup } from '../model/Home';
|
||||
import { Context } from '@kit.AbilityKit';
|
||||
import { Calculator } from '@devwiki/hmcalculate';
|
||||
import { MyApp } from '../MyApp';
|
||||
|
||||
import('./animation/LoadingPage')
|
||||
@ -31,7 +29,8 @@ struct Index {
|
||||
name: 'Component',
|
||||
items: [
|
||||
{name: 'InputPage', page: 'pages/component/InputPage'},
|
||||
{name: 'ToastPage', page: 'pages/component/ToastPage'}
|
||||
{name: 'ToastPage', page: 'pages/component/ToastPage'},
|
||||
{name: 'TextPage', page: 'pages/component/TextPage'}
|
||||
]
|
||||
},
|
||||
// 布局
|
||||
|
@ -4,7 +4,7 @@ import { curves } from '@kit.ArkUI';
|
||||
|
||||
@Entry({ routeName: PageName.loadingPage })
|
||||
@Component
|
||||
export struct LoadingPage {
|
||||
struct LoadingPage {
|
||||
@State animate: boolean = false;
|
||||
@State rotateValue: number = 0;
|
||||
|
||||
|
@ -2,7 +2,7 @@ import { CommonRes } from '@devwiki/common_ui/Index'
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
export struct SVGPage {
|
||||
struct SVGPage {
|
||||
build() {
|
||||
Column() {
|
||||
Text().width(96).height(96).backgroundColor($r('app.media.ic_eye_off'))
|
||||
|
@ -3,6 +3,27 @@
|
||||
@Component
|
||||
struct TextPage {
|
||||
|
||||
@State states: string[] = ['1', '2', '3', '4'];
|
||||
|
||||
build() {
|
||||
Column(){
|
||||
Button('Change').onClick(() => {
|
||||
this.states[3] = '999'
|
||||
})
|
||||
List(){
|
||||
ForEach(this.states, (state: string, index: number) => {
|
||||
ListItem(){
|
||||
Column(){
|
||||
Text(state).width(this.getWidth(state, index))
|
||||
Divider().width('90%')
|
||||
}
|
||||
}
|
||||
})
|
||||
}.height('100%').width('100')
|
||||
}.width('100%')
|
||||
}
|
||||
|
||||
getWidth(title: string, index: number): Length {
|
||||
return 0;
|
||||
}
|
||||
}
|
@ -12,7 +12,7 @@ class ToastViewMode {
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
export struct ToastPage {
|
||||
struct ToastPage {
|
||||
|
||||
@Provide toastVM: ToastViewMode = new ToastViewMode();
|
||||
|
||||
|
@ -3,7 +3,7 @@ import { ComponentConst } from '@devwiki/common_ui/Index'
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
export struct RelativeContainerPage {
|
||||
struct RelativeContainerPage {
|
||||
|
||||
build() {
|
||||
RelativeContainer() {
|
||||
@ -12,7 +12,7 @@ export struct RelativeContainerPage {
|
||||
top: { anchor: ComponentConst.ContainerId, align: VerticalAlign.Top },
|
||||
left: { anchor: ComponentConst.ContainerId, align: HorizontalAlign.Start },
|
||||
bottom: { anchor: ComponentConst.ContainerId, align: VerticalAlign.Bottom }
|
||||
}).id('left_menu')
|
||||
}).id('left_menu0')
|
||||
|
||||
Button(){
|
||||
Text("2222").height(64)
|
||||
@ -21,7 +21,7 @@ export struct RelativeContainerPage {
|
||||
top: { anchor: ComponentConst.ContainerId, align: VerticalAlign.Top },
|
||||
right: { anchor: ComponentConst.ContainerId, align: HorizontalAlign.End },
|
||||
bottom: { anchor: ComponentConst.ContainerId, align: VerticalAlign.Bottom }
|
||||
}).id('right_menu')
|
||||
}).id('right_menu0')
|
||||
}.height(64).width('100%').backgroundColor(Color.Red)
|
||||
}
|
||||
}
|
@ -137,7 +137,7 @@ async function release() {
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
export struct AudioPlayerPage {
|
||||
struct AudioPlayerPage {
|
||||
|
||||
build() {
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { Emitter, EmitterItem } from '@devwiki/base';
|
||||
import { Toast } from '../../../../../../common_ui/src/main/ets/utils/Toast';
|
||||
import { Toast } from '@devwiki/common_ui';
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
export struct HomePage {
|
||||
struct HomePage {
|
||||
|
||||
@Provide tv1ViewModel: TabView1ViewModel = new TabView1ViewModel();
|
||||
@Provide tv2ViewModel: TabView2ViewModel = new TabView2ViewModel();
|
||||
|
@ -6,7 +6,7 @@ const TAG = '[RestAPIPage]'
|
||||
|
||||
@Entry({routeName: "RestAPIPage"})
|
||||
@Component
|
||||
export struct RestAPIPage {
|
||||
struct RestAPIPage {
|
||||
|
||||
@State viewModel: RestAPIViewModel = new RestAPIViewModel();
|
||||
|
||||
|
@ -60,7 +60,7 @@ class TcpSocket {
|
||||
|
||||
@Component
|
||||
@Entry
|
||||
export struct TcpSocketPage {
|
||||
struct TcpSocketPage {
|
||||
|
||||
tcpSocket: TcpSocket = new TcpSocket();
|
||||
|
||||
|
@ -3,7 +3,7 @@ import { common, Want } from '@kit.AbilityKit';
|
||||
|
||||
@Component
|
||||
@Entry
|
||||
export struct SchemePage {
|
||||
struct SchemePage {
|
||||
build() {
|
||||
Column() {
|
||||
TitleBar({
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
@Entry({routeName: "TimerPage"})
|
||||
@Component
|
||||
export struct TimerPage {
|
||||
struct TimerPage {
|
||||
build() {
|
||||
}
|
||||
}
|
@ -5,12 +5,12 @@ import { TitleBar } from '@devwiki/common_ui/src/main/ets/component/TitleBar';
|
||||
@CustomDialog
|
||||
export struct WebPageDialog {
|
||||
@StorageLink(ScreenUtil.isPortraitKey) isPortrait: boolean = true;
|
||||
dialogController: CustomDialogController;
|
||||
dialogController?: CustomDialogController;
|
||||
|
||||
build() {
|
||||
WebPage({
|
||||
onTitleBarLeftClick: () => {
|
||||
this.dialogController.close();
|
||||
this.dialogController?.close();
|
||||
}
|
||||
}).height(this.isPortrait ? '95%' : '90%').width(this.isPortrait ? '100%' : '50%')
|
||||
}
|
||||
@ -18,7 +18,7 @@ export struct WebPageDialog {
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
export struct WebDialogPage {
|
||||
struct WebDialogPage {
|
||||
|
||||
dialogController: CustomDialogController = new CustomDialogController({
|
||||
builder: WebPageDialog(),
|
||||
|
@ -8,7 +8,6 @@ function textInputStyle() {
|
||||
.padding(5)
|
||||
}
|
||||
|
||||
@Preview
|
||||
@Component
|
||||
export struct PhoneInput {
|
||||
@Prop countryCode: string = "+86"
|
||||
|
@ -15,11 +15,10 @@ export enum TitleBarMenuType{
|
||||
Text = 2
|
||||
}
|
||||
|
||||
@Preview
|
||||
@Component
|
||||
export struct TitleBar {
|
||||
|
||||
@Prop title: ResourceStr;
|
||||
@Prop title: ResourceStr = '';
|
||||
|
||||
@Prop barHeight: number = 48;
|
||||
@Prop menuPadding: number = 8;
|
||||
|
@ -1,5 +0,0 @@
|
||||
import localUnitTest from './LocalUnit.test';
|
||||
|
||||
export default function testsuite() {
|
||||
localUnitTest();
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
|
||||
|
||||
export default function localUnitTest() {
|
||||
describe('localUnitTest',() => {
|
||||
// Defines a test suite. Two parameters are supported: test suite name and test suite function.
|
||||
beforeAll(() => {
|
||||
// Presets an action, which is performed only once before all test cases of the test suite start.
|
||||
// This API supports only one parameter: preset action function.
|
||||
});
|
||||
beforeEach(() => {
|
||||
// Presets an action, which is performed before each unit test case starts.
|
||||
// The number of execution times is the same as the number of test cases defined by **it**.
|
||||
// This API supports only one parameter: preset action function.
|
||||
});
|
||||
afterEach(() => {
|
||||
// Presets a clear action, which is performed after each unit test case ends.
|
||||
// The number of execution times is the same as the number of test cases defined by **it**.
|
||||
// This API supports only one parameter: clear action function.
|
||||
});
|
||||
afterAll(() => {
|
||||
// Presets a clear action, which is performed after all test cases of the test suite end.
|
||||
// This API supports only one parameter: clear action function.
|
||||
});
|
||||
it('assertContain', 0, () => {
|
||||
// Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function.
|
||||
let a = 'abc';
|
||||
let b = 'b';
|
||||
// Defines a variety of assertion methods, which are used to declare expected boolean conditions.
|
||||
expect(a).assertContain(b);
|
||||
expect(a).assertEqual(a);
|
||||
});
|
||||
});
|
||||
}
|
Loading…
Reference in New Issue
Block a user