fix warning
This commit is contained in:
@@ -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(),
|
||||
|
Reference in New Issue
Block a user