feat: 合并星图和聊天页面为 MainPage,响应式 GridRow 布局
- 新建 MainPage.ets,用 GridRow 响应式布局组合星图+聊天 - Index.ets 改为 2 Tab(TrulyMEM + 设置) - GraphPage/ChatPage 接收 @Prop db 从父组件传入 - 恢复 README.md / README_EN.md 的特别鸣谢部分
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
import GraphPage from './GraphPage';
|
||||
import ChatPage from './ChatPage';
|
||||
import SettingsPage from './SettingsPage';
|
||||
import { MainPage } from './MainPage';
|
||||
import { SettingsPage } from './SettingsPage';
|
||||
import { GraphDatabase } from '../model/GraphDatabase';
|
||||
|
||||
@Entry
|
||||
@ -17,14 +16,9 @@ struct Index {
|
||||
Column() {
|
||||
Tabs({ index: this.currentIndex, barPosition: BarPosition.End }) {
|
||||
TabContent() {
|
||||
GraphPage({ db: this.db })
|
||||
MainPage({ db: this.db })
|
||||
}
|
||||
.tabBar('🌌 星图')
|
||||
|
||||
TabContent() {
|
||||
ChatPage({ db: this.db })
|
||||
}
|
||||
.tabBar('💬 聊天')
|
||||
.tabBar('🌌 TrulyMEM')
|
||||
|
||||
TabContent() {
|
||||
SettingsPage()
|
||||
@ -33,9 +27,7 @@ struct Index {
|
||||
}
|
||||
.width('100%')
|
||||
.height('100%')
|
||||
.onChange((index: number) => {
|
||||
this.currentIndex = index;
|
||||
})
|
||||
.onChange((index: number) => { this.currentIndex = index; })
|
||||
}
|
||||
.width('100%')
|
||||
.height('100%')
|
||||
|
||||
Reference in New Issue
Block a user