fix: weight scope issue (use simple spacer), add CoroutineScope import
This commit is contained in:
parent
b80d607d51
commit
605b5200ef
@ -13,7 +13,7 @@ import androidx.compose.foundation.layout.height
|
|||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
import androidx.compose.foundation.layout.width
|
import androidx.compose.foundation.layout.width
|
||||||
import androidx.compose.foundation.layout.weight
|
|
||||||
import androidx.compose.foundation.rememberScrollState
|
import androidx.compose.foundation.rememberScrollState
|
||||||
import androidx.compose.foundation.verticalScroll
|
import androidx.compose.foundation.verticalScroll
|
||||||
import androidx.compose.foundation.horizontalScroll
|
import androidx.compose.foundation.horizontalScroll
|
||||||
@ -50,12 +50,10 @@ fun RenderWidget(
|
|||||||
// 布局
|
// 布局
|
||||||
"HBox", "FHBox" -> RenderHBox(resolvedWidget, actionDispatcher)
|
"HBox", "FHBox" -> RenderHBox(resolvedWidget, actionDispatcher)
|
||||||
"VBox", "FVBox" -> RenderVBox(resolvedWidget, actionDispatcher)
|
"VBox", "FVBox" -> RenderVBox(resolvedWidget, actionDispatcher)
|
||||||
"Filler", "HFiller" -> {
|
"Filler", "HFiller", "VFiller" -> {
|
||||||
Spacer(modifier = Modifier.weight(1f))
|
Spacer(modifier = Modifier.size(8.dp))
|
||||||
}
|
}
|
||||||
"VFiller" -> Spacer(modifier = Modifier.height(
|
|
||||||
WidgetOptions.getString(resolvedWidget.options, "height", "16").toFloatOrNull()?.dp ?: 16.dp
|
|
||||||
))
|
|
||||||
"ResponsiveBox" -> RenderResponsiveBox(resolvedWidget, actionDispatcher)
|
"ResponsiveBox" -> RenderResponsiveBox(resolvedWidget, actionDispatcher)
|
||||||
|
|
||||||
// 输入
|
// 输入
|
||||||
|
|||||||
@ -281,7 +281,7 @@ fun MainAppScreen(
|
|||||||
context: BricksContext,
|
context: BricksContext,
|
||||||
http: BricksHttp,
|
http: BricksHttp,
|
||||||
sageClient: SageClient,
|
sageClient: SageClient,
|
||||||
scope: androidx.compose.runtime.CoroutineScope,
|
scope: kotlinx.coroutines.CoroutineScope,
|
||||||
onLogout: () -> Unit,
|
onLogout: () -> Unit,
|
||||||
onNavigate: (String) -> Unit
|
onNavigate: (String) -> Unit
|
||||||
) {
|
) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user