merge: 基础框架合并
This commit is contained in:
parent
1668cbfea9
commit
c680b15eeb
|
@ -1,13 +1,12 @@
|
|||
/**
|
||||
* Created on 2024/9/10
|
||||
*/
|
||||
package ohos_app_cangjie_entry.components
|
||||
package ohos_app_cangjie_entry.components.chat
|
||||
|
||||
internal import ohos.component.*
|
||||
internal import ohos.state_manage.*
|
||||
internal import ohos.base.*
|
||||
import ohos.state_macro_manage.*
|
||||
import ohos_app_cangjie_entry.components.Chat.*
|
||||
|
||||
@Component
|
||||
public class ChatList {
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* Created on 2024/9/10
|
||||
*/
|
||||
package ohos_app_cangjie_entry.components.Chat
|
||||
package ohos_app_cangjie_entry.components.chat
|
||||
|
||||
import std.collection.*
|
||||
import ohos.component.*
|
|
@ -7,13 +7,11 @@ internal import ohos.base.*
|
|||
internal import ohos.component.*
|
||||
internal import ohos.state_manage.*
|
||||
import ohos.state_macro_manage.*
|
||||
import ohos_app_cangjie_entry.utils.Logger
|
||||
|
||||
@Component
|
||||
public class HomePage {
|
||||
private let TAG = "HomePage"
|
||||
protected func aboutToAppear() {
|
||||
Logger(TAG).info("aboutToAppear")
|
||||
}
|
||||
func build() {
|
||||
Row()
|
||||
|
|
|
@ -7,13 +7,11 @@ internal import ohos.base.*
|
|||
internal import ohos.component.*
|
||||
internal import ohos.state_manage.*
|
||||
import ohos.state_macro_manage.*
|
||||
import ohos_app_cangjie_entry.utils.Logger
|
||||
|
||||
@Component
|
||||
public class SidePage {
|
||||
private let TAG: String = "SidePage"
|
||||
protected func aboutToAppear() {
|
||||
Logger(this.TAG).info("aboutToAppear")
|
||||
}
|
||||
func build() {
|
||||
Row()
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
/**
|
||||
* Created on 2024/9/7
|
||||
*/
|
||||
package ohos_app_cangjie_entry.utils
|
||||
|
||||
import std.log.*
|
||||
import log.*
|
||||
import std.console.*
|
||||
|
||||
public class Logger {
|
||||
private let TAG: String
|
||||
private static let logger = SimpleLogger()
|
||||
private static let isOutputFile: Bool = false
|
||||
private static let outputFilePath: String = './logger.log'
|
||||
public init(TAG: String) {
|
||||
logger.setOutput(Console.stdOut)
|
||||
this.TAG = TAG + ": "
|
||||
}
|
||||
|
||||
public func debug(message: String) {
|
||||
logger.debug(this.TAG + message)
|
||||
logger.flush()
|
||||
}
|
||||
|
||||
public func info(msg: String) {
|
||||
logger.info(this.TAG + msg)
|
||||
logger.flush()
|
||||
}
|
||||
public func warn(msg: String) {
|
||||
logger.warn(this.TAG + msg)
|
||||
}
|
||||
public func error(msg: String) {
|
||||
logger.error(this.TAG + msg)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user