@@ -55,7 +55,7 @@ class App(UserControl):
elif e.control.selected_index == 2:
content.controls.append(ft.Text("商品库!"))
elif e.control.selected_index == 3:
- fig = ChartPage().DrawChart()
+ fig = ChartPage().draw_chart()
# fig.show()
content.controls.append(PlotlyChart(fig, expand=True))
elif e.control.selected_index == 4:
@@ -12,7 +12,7 @@ from flet.matplotlib_chart import MatplotlibChart
class ChartPage():
'''chart page '''
- def DrawChart(self):
+ def draw_chart(self):
''' draw chart '''
x = ['day 1', 'day 1', 'day 1', 'day 1', 'day 1', 'day 1',
'day 2', 'day 2', 'day 2', 'day 2', 'day 2', 'day 2']
@@ -6,6 +6,7 @@ class TodoPage(Column):
''' todo page '''
def add_clicked(self, e):
+ '''增加点击事件'''
if self.new_task.value:
self.list.controls.append(ft.Checkbox(label=self.new_task.value))
self.new_task.value = ""