table_class
This commit is contained in:
@@ -7,17 +7,71 @@ from requests.exceptions import RequestException
|
||||
|
||||
class MainPage(ft.View):
|
||||
|
||||
|
||||
|
||||
def __init__(self,page:ft.Page,route:str,bgcolor:str):
|
||||
self.page = page
|
||||
|
||||
table=ft.DataTable(
|
||||
|
||||
)
|
||||
|
||||
dd = ft.Dropdown(
|
||||
label="таблица",
|
||||
options=[
|
||||
ft.DropdownOption(text="Сollection_form_opk")
|
||||
]
|
||||
)
|
||||
|
||||
rail = ft.NavigationRail(
|
||||
selected_index=0,
|
||||
label_type=ft.NavigationRailLabelType.ALL,
|
||||
#extended=True,
|
||||
height=1000,
|
||||
min_width=100,
|
||||
min_extended_width=200,
|
||||
bgcolor=color[3],
|
||||
group_alignment=-0.4,
|
||||
destinations=[
|
||||
ft.NavigationRailDestination(
|
||||
icon=ft.Icons.HOME_OUTLINED,
|
||||
selected_icon=ft.Icons.HOME_SHARP,
|
||||
label="Home"
|
||||
),
|
||||
ft.NavigationRailDestination(
|
||||
icon=ft.Icon(ft.Icons.BOOKMARK_BORDER),
|
||||
selected_icon=ft.Icon(ft.Icons.BOOKMARK),
|
||||
label="Second",
|
||||
),
|
||||
ft.NavigationRailDestination(
|
||||
icon=ft.Icons.SETTINGS_OUTLINED,
|
||||
selected_icon=ft.Icon(ft.Icons.SETTINGS),
|
||||
label="Second",
|
||||
),
|
||||
|
||||
],
|
||||
|
||||
on_change=lambda e: print("Selected destination:", e.control.selected_index),
|
||||
)
|
||||
super().__init__(
|
||||
route=route,
|
||||
bgcolor=bgcolor,
|
||||
|
||||
vertical_alignment=ft.MainAxisAlignment.CENTER,
|
||||
horizontal_alignment=ft.CrossAxisAlignment.CENTER,
|
||||
controls=[
|
||||
|
||||
ft.Row(
|
||||
expand=True,
|
||||
controls=[
|
||||
rail,
|
||||
ft.VerticalDivider(width=1),
|
||||
ft.Column(
|
||||
alignment=ft.MainAxisAlignment.START,
|
||||
expand=True,
|
||||
controls=[
|
||||
ft.Text("Добро пожаловать!"),
|
||||
dd
|
||||
],
|
||||
),
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user