update js defination,use Partical insted of IView
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Group, Panel, gravity, Color, LayoutSpec, vlayout, scroller, layoutConfig, IVLayout, IText, statusbar, StatusBarMode } from "doric";
|
||||
import { Group, Panel, gravity, Color, LayoutSpec, vlayout, scroller, layoutConfig, statusbar, StatusBarMode } from "doric";
|
||||
import { title, label, colors } from "./utils";
|
||||
|
||||
@Entry
|
||||
@@ -16,7 +16,7 @@ class StatusBarDemo extends Panel {
|
||||
onClick: () => {
|
||||
statusbar(context).setHidden(false)
|
||||
}
|
||||
} as IText),
|
||||
}),
|
||||
label('hide').apply({
|
||||
width: 200,
|
||||
height: 50,
|
||||
@@ -27,18 +27,18 @@ class StatusBarDemo extends Panel {
|
||||
onClick: () => {
|
||||
statusbar(context).setHidden(true)
|
||||
}
|
||||
} as IText),
|
||||
}),
|
||||
label('light').apply({
|
||||
width: 200,
|
||||
height: 50,
|
||||
backgroundColor: colors[0],
|
||||
textSize: 30,
|
||||
textColor: Color.WHITE,
|
||||
layoutConfig: layoutConfig().just().configMargin({top: 30}),
|
||||
layoutConfig: layoutConfig().just().configMargin({ top: 30 }),
|
||||
onClick: () => {
|
||||
statusbar(context).setMode(StatusBarMode.LIGHT)
|
||||
}
|
||||
} as IText),
|
||||
}),
|
||||
label('dark').apply({
|
||||
width: 200,
|
||||
height: 50,
|
||||
@@ -49,18 +49,18 @@ class StatusBarDemo extends Panel {
|
||||
onClick: () => {
|
||||
statusbar(context).setMode(StatusBarMode.DARK)
|
||||
}
|
||||
} as IText),
|
||||
}),
|
||||
label('white').apply({
|
||||
width: 200,
|
||||
height: 50,
|
||||
backgroundColor: colors[0],
|
||||
textSize: 30,
|
||||
textColor: Color.WHITE,
|
||||
layoutConfig: layoutConfig().just().configMargin({top: 30}),
|
||||
layoutConfig: layoutConfig().just().configMargin({ top: 30 }),
|
||||
onClick: () => {
|
||||
statusbar(context).setColor(Color.parse("#ffffff"))
|
||||
}
|
||||
} as IText),
|
||||
}),
|
||||
label('black').apply({
|
||||
width: 200,
|
||||
height: 50,
|
||||
@@ -71,12 +71,12 @@ class StatusBarDemo extends Panel {
|
||||
onClick: () => {
|
||||
statusbar(context).setColor(Color.parse("#000000"))
|
||||
}
|
||||
} as IText),
|
||||
}),
|
||||
]).apply({
|
||||
layoutConfig: layoutConfig().most().configHeight(LayoutSpec.FIT),
|
||||
gravity: gravity().center(),
|
||||
space: 10,
|
||||
} as IVLayout)).apply({
|
||||
})).apply({
|
||||
layoutConfig: layoutConfig().most(),
|
||||
}).in(rootView)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user