Commit cd0cb983 authored by dsq's avatar dsq

返回按钮

parent e695749c
...@@ -650,7 +650,7 @@ code + .copy-button { ...@@ -650,7 +650,7 @@ code + .copy-button {
<script type="text/javascript"> <script type="text/javascript">
function configurationCacheProblems() { return ( function configurationCacheProblems() { return (
// begin-report-data // begin-report-data
{"diagnostics":[{"locations":[{"pluginId":"org.jetbrains.kotlin.multiplatform"}],"problem":[{"text":"Default Kotlin Hierarchy Template Not Applied Correctly"}],"severity":"WARNING","problemDetails":[{"text":"The Default Kotlin Hierarchy Template was not applied to 'project ':shared'':\nExplicit .dependsOn() edges were configured for the following source sets:\n[ohosArm64Main, ohosX64Main]\n\nConsider removing dependsOn-calls or disabling the default template by adding\n 'kotlin.mpp.applyDefaultHierarchyTemplate=false'\nto your gradle.properties"}],"contextualLabel":"Default Kotlin Hierarchy Template Not Applied Correctly","documentationLink":"https://kotl.in/hierarchy-template","problemId":[{"name":"KGP:MISCONFIGURATION","displayName":"Kotlin Gradle Plugin Misconfiguration"},{"name":"KOTLIN","displayName":"Kotlin"},{"name":"KotlinDefaultHierarchyFallbackDependsOnUsageDetected","displayName":"Default Kotlin Hierarchy Template Not Applied Correctly"}],"solutions":[[{"text":"Please remove the dependsOn-calls or disable the default template."}]]},{"locations":[{},{"pluginId":"com.android.internal.library"}],"problem":[{"text":"The StartParameter.isConfigurationCacheRequested property has been deprecated."}],"severity":"WARNING","problemDetails":[{"text":"This is scheduled to be removed in Gradle 10.0."}],"contextualLabel":"The StartParameter.isConfigurationCacheRequested property has been deprecated.","documentationLink":"https://docs.gradle.org/8.14.3/userguide/upgrading_version_8.html#deprecated_startparameter_is_configuration_cache_requested","problemId":[{"name":"deprecation","displayName":"Deprecation"},{"name":"the-startparameter-isconfigurationcacherequested-property-has-been-deprecated","displayName":"The StartParameter.isConfigurationCacheRequested property has been deprecated."}],"solutions":[[{"text":"Please use 'configurationCache.requested' property on 'BuildFeatures' service instead."}]]}],"problemsReport":{"totalProblemCount":2,"buildName":"NoComposeDemo","requestedTasks":":shared:publishDebugBinariesToHarmonyApp","documentationLink":"https://docs.gradle.org/8.14.3/userguide/reporting_problems.html","documentationLinkCaption":"Problem report","summaries":[]}} {"diagnostics":[{"locations":[{"pluginId":"org.jetbrains.kotlin.multiplatform"}],"problem":[{"text":"Default Kotlin Hierarchy Template Not Applied Correctly"}],"severity":"WARNING","problemDetails":[{"text":"The Default Kotlin Hierarchy Template was not applied to 'project ':shared'':\nExplicit .dependsOn() edges were configured for the following source sets:\n[ohosArm64Main, ohosX64Main]\n\nConsider removing dependsOn-calls or disabling the default template by adding\n 'kotlin.mpp.applyDefaultHierarchyTemplate=false'\nto your gradle.properties"}],"contextualLabel":"Default Kotlin Hierarchy Template Not Applied Correctly","documentationLink":"https://kotl.in/hierarchy-template","problemId":[{"name":"KGP:MISCONFIGURATION","displayName":"Kotlin Gradle Plugin Misconfiguration"},{"name":"KOTLIN","displayName":"Kotlin"},{"name":"KotlinDefaultHierarchyFallbackDependsOnUsageDetected","displayName":"Default Kotlin Hierarchy Template Not Applied Correctly"}],"solutions":[[{"text":"Please remove the dependsOn-calls or disable the default template."}]]},{"locations":[{},{"pluginId":"com.android.internal.library"}],"problem":[{"text":"The StartParameter.isConfigurationCacheRequested property has been deprecated."}],"severity":"WARNING","problemDetails":[{"text":"This is scheduled to be removed in Gradle 10.0."}],"contextualLabel":"The StartParameter.isConfigurationCacheRequested property has been deprecated.","documentationLink":"https://docs.gradle.org/8.14.3/userguide/upgrading_version_8.html#deprecated_startparameter_is_configuration_cache_requested","problemId":[{"name":"deprecation","displayName":"Deprecation"},{"name":"the-startparameter-isconfigurationcacherequested-property-has-been-deprecated","displayName":"The StartParameter.isConfigurationCacheRequested property has been deprecated."}],"solutions":[[{"text":"Please use 'configurationCache.requested' property on 'BuildFeatures' service instead."}]]}],"problemsReport":{"totalProblemCount":2,"buildName":"NoComposeDemo","requestedTasks":":shared:publishReleaseBinariesToHarmonyApp","documentationLink":"https://docs.gradle.org/8.14.3/userguide/reporting_problems.html","documentationLinkCaption":"Problem report","summaries":[]}}
// end-report-data // end-report-data
);} );}
</script> </script>
......
import testNapi from 'libentry.so'; import testNapi from 'libentry.so';
import router from '@ohos.router';
@Entry @Entry
@Component @Component
...@@ -58,11 +59,19 @@ struct ContinuousLogPage { ...@@ -58,11 +59,19 @@ struct ContinuousLogPage {
build() { build() {
Column() { Column() {
// 标题 // 顶部返回栏
Text('大量持续日志输出') Row() {
.fontSize(24)
.fontWeight(FontWeight.Bold) Text('大量持续日志输出')
.margin({ top: 50, bottom: 30 }) .fontSize(24)
.fontWeight(FontWeight.Bold)
.layoutWeight(1)
.textAlign(TextAlign.Center)
.margin({ right: 60 })
}
.width('100%')
.padding({ left: 20, right: 20, top: 20, bottom: 10 })
.justifyContent(FlexAlign.Start)
// 说明文字 // 说明文字
Text('点击开始后每 100ms 生成一条随机日志') Text('点击开始后每 100ms 生成一条随机日志')
...@@ -108,6 +117,17 @@ struct ContinuousLogPage { ...@@ -108,6 +117,17 @@ struct ContinuousLogPage {
.width('80%') .width('80%')
.justifyContent(FlexAlign.SpaceEvenly) .justifyContent(FlexAlign.SpaceEvenly)
.margin({ top: 20 }) .margin({ top: 20 })
// 返回按钮
Button('返回')
.width('40%')
.margin({ top: 20 })
.height(50)
.backgroundColor('#007DFF')
.onClick(() => {
router.back();
})
} }
.width('100%') .width('100%')
.height('100%') .height('100%')
......
import router from '@ohos.router';
import testNapi from 'libentry.so'; import testNapi from 'libentry.so';
@Entry @Entry
...@@ -24,9 +25,19 @@ struct FaultPage { ...@@ -24,9 +25,19 @@ struct FaultPage {
.width('80%') .width('80%')
.height(50) .height(50)
.backgroundColor('#FF4444') .backgroundColor('#FF4444')
.margin({ bottom: 20 })
.onClick(() => { .onClick(() => {
testNapi.FaultOut(); testNapi.FaultOut();
}) })
// 返回按钮
Button('返回')
.width('80%')
.height(50)
.backgroundColor('#007DFF')
.onClick(() => {
router.back();
})
} }
.width('100%') .width('100%')
.height('100%') .height('100%')
......
...@@ -40,7 +40,6 @@ kotlin { ...@@ -40,7 +40,6 @@ kotlin {
binaries { binaries {
sharedLib { sharedLib {
baseName = "kn" baseName = "kn"
// 链接静态库目录和库名,使用 --whole-archive 强制包含静态库所有符号
freeCompilerArgs += listOf("-Xbinary=sanitizer=address") freeCompilerArgs += listOf("-Xbinary=sanitizer=address")
} }
staticLib { staticLib {
...@@ -184,9 +183,7 @@ arrayOf("debug", "release").forEach { type -> ...@@ -184,9 +183,7 @@ arrayOf("debug", "release").forEach { type ->
from(project.file("build/bin/ohosX64/${type}Shared/libkn.so")) { // 复制共享库文件 from(project.file("build/bin/ohosX64/${type}Shared/libkn.so")) { // 复制共享库文件
into("/entry/libs/x86_64/") // 指定目标目录 into("/entry/libs/x86_64/") // 指定目标目录
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment