Skip to content

Commit

Permalink
fix: 解决命名冲突
Browse files Browse the repository at this point in the history
  • Loading branch information
lc-soft committed Jan 26, 2025
1 parent 7a4460c commit affb31f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/app-plugin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ export default class AppPlugin {
int main(int argc, char *argv[])
{
lcui_app_init();
app_init();
${router.initCode.map((line) => ` ${line}`).join("\n")}
// Write code here to initialize your application,
// such as loading configuration files, initializing functional modules
// ...
return lcui_app_run();
return app_run();
}
`
);
Expand All @@ -62,7 +62,7 @@ ${[...router.includeCode, ...components.includeCode, ...router.globalCode].join(
"\n"
)}
static void lcui_app_init(void)
static void app_init(void)
{
lcui_init();
${[
Expand All @@ -76,7 +76,7 @@ ${[
.join("\n")}
}
static int lcui_app_run(void)
static int app_run(void)
{
return lcui_run();
}
Expand Down
4 changes: 2 additions & 2 deletions src/app-plugin/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function compileAppRoute(appRoute: RouteConfig, context: string) {
compileRoute({ page: appRoute.page, children: [] }, "", "NULL");
return [
"",
"static void lcui_app_router_init(void)",
"static void app_router_init(void)",
"{",
[
`router_config_t *config`,
Expand Down Expand Up @@ -157,7 +157,7 @@ export class AppRouterCompiler {
}
return {
includeCode: ["#include <router.h>"],
baseInitCode: ["lcui_app_router_init();"],
baseInitCode: ["app_router_init();"],
componentsInitCode: [],
initCode: [
'ui_widget_set_attr(ui_root(), "router", "AppRouter");',
Expand Down

0 comments on commit affb31f

Please sign in to comment.