当前位置:首页>python>全网首发没有之二,国产可视化Python开发工具PyMe API大全

全网首发没有之二,国产可视化Python开发工具PyMe API大全

  • 2026-03-03 02:16:36
全网首发没有之二,国产可视化Python开发工具PyMe API大全

之前分享了(国产可视化Python工具 PyMe 初体验:拖拖拽拽做桌面应用),PyMe解决了用拖拽(可视化)的方式设计UI,其封装了 tkinter,在编写PyMe事件代码时可能需要调用PyMe封装的API函数,本文主要分享PyMe封装的API接口,以供大家开发应用程序参考。

注:本文API对应的PyMe版本为“PythonIDE-PyMe-1.5.1.6”。

目录

  1. 界面管理
  2. 控件操作
  3. 数据操作
  4. 界面导航
  5. 对话框与消息
  6. 文件操作
  7. 画布绘图
  8. 高级控件
  9. 事件处理
  10. 工具函数

1. 界面管理

1.1 RunApplication

功能:运行PyMe工程,启动主界面

参数

  • uiClass:界面类名
  • deiconify:是否显示窗口 (bool)
  • projName:项目名称
  • InitCheckFunc:初始化检查函数

返回值:无

示例

if __name__ == '__main__':    Fun.RunApplication(stock_holders)

1.2 DestroyUI

功能:销毁指定界面

参数

  • uiName:界面类名
  • result:返回值
  • animation:销毁动画('fadeout'或'zoomout')

返回值:无

示例

Fun.DestroyUI("stock_holders"0"fadeout")

1.3 GetElement

功能:获取指定控件的实例

参数

  • uiName:界面类名
  • elementName:控件名称(支持别名)

返回值:控件对象或None

示例

button = Fun.GetElement("stock_holders""button_query")

1.4 IsUIExist

功能:判断界面是否存在

参数

  • uiName:界面类名

返回值:bool

示例

if Fun.IsUIExist("stock_holders"):    print("界面已存在")

1.5 SetVisible

功能:设置控件显示或隐藏

参数

  • uiName:界面类名
  • elementName:控件名称
  • Visible:True显示,False隐藏

返回值:无

示例

Fun.SetVisible(uiName, "listbox_holders"True)

1.6 SetEnable

功能:设置控件可用或禁用

参数

  • uiName:界面类名
  • elementName:控件名称
  • Enable:True可用,False禁用

返回值:无

示例

Fun.SetEnable(uiName, "button_query"False)

1.7 SetWindowTitle

功能:设置窗口标题

参数

  • uiName:界面类名
  • title:标题文字

返回值:无

示例

Fun.SetWindowTitle(uiName, "十大股东查询系统")

1.8 SetWindowTransparency

功能:设置窗口透明度

参数

  • uiName:界面类名
  • alpha:透明度值(0-255)

返回值:无

示例

Fun.SetWindowTransparency(uiName, 200)

2. 控件操作

2.1 SetText

功能:设置控件的文本内容

支持控件:Label、Button、RadioButton、CheckButton、Entry、Text、ComboBox、SpinBox

参数

  • uiName:界面类名
  • elementName:控件名称
  • textValue:文本内容

返回值:无

示例

Fun.SetText(uiName, "input_code""sz000001")Fun.SetText(uiName, "label_status""查询成功")

2.2 GetText

功能:获取控件的文本内容

参数

  • uiName:界面类名
  • elementName:控件名称

返回值:字符串

示例

code = Fun.GetText(uiName, "input_code")date = Fun.GetText(uiName, "input_date")

2.3 SetBGColor

功能:设置控件背景色

参数

  • uiName:界面类名
  • elementName:控件名称
  • RGBColor:颜色值(如"#FFFFFF")

返回值:无

示例

Fun.SetBGColor(uiName, "button_query""#5D9CEC")

2.4 SetTextColor

功能:设置控件文字颜色

参数

  • uiName:界面类名
  • elementName:控件名称
  • RGBColor:颜色值

返回值:无

示例

Fun.SetTextColor(uiName, "label_status""#ED5565")

2.5 SetFont

功能:设置控件字体

参数

  • uiName:界面类名
  • elementName:控件名称
  • fontName:字体名称
  • fontSize:字体大小
  • fontWeight:字重('normal'/'bold')
  • fontSlant:倾斜('roman'/'italic')
  • fontUnderline:下划线(0/1)
  • fontOverstrike:删除线(0/1)

返回值:无

示例

Fun.SetFont(uiName, "listbox_holders""Microsoft YaHei UI"14"bold")

2.6 SetImage

功能:设置控件的背景图片

参数

  • uiName:界面类名
  • elementName:控件名称
  • imagePath:图片路径
  • autoSize:是否自动缩放(默认True)
  • format:图片格式(默认'RGBA')
  • state:状态('normal'/'selected')

返回值:无

示例

Fun.SetImage(uiName, "button_query""Resources/search.png"True)

2.7 SetCursor

功能:设置控件光标样式

参数

  • uiName:界面类名
  • elementName:控件名称
  • cursor:光标样式('hand2', 'arrow', 'plus'等)

返回值:无

示例

Fun.SetCursor(uiName, "button_query""hand2")

2.8 SetRoundedRectangle

功能:设置控件圆角

参数

  • uiName:界面类名
  • elementName:控件名称
  • WidthEllipse:圆角宽度
  • HeightEllipse:圆角高度

返回值:无

示例

Fun.SetRoundedRectangle(uiName, "button_query"1010)

3. 数据操作

3.1 SetCurrentValue

功能:设置控件的当前值(选中值)

支持控件:RadioButton、CheckButton、Scale、Progress、ListBox、ComboBox、SpinBox、SwitchButton

参数

  • uiName:界面类名
  • elementName:控件名称
  • value:要设置的值

返回值:无

示例

Fun.SetCurrentValue(uiName, "scale_1"50)

3.2 GetCurrentValue

功能:获取控件的当前值(选中值)

参数

  • uiName:界面类名
  • elementName:控件名称

返回值:控件的当前值

示例

value = Fun.GetCurrentValue(uiName, "scale_1")

3.3 SetCurrentIndex

功能:设置ListBox、ComboBox的选中索引

参数

  • uiName:界面类名
  • elementName:控件名称
  • index:索引值

返回值:无

示例

Fun.SetCurrentIndex(uiName, "combobox_1"0)

3.4 GetCurrentIndex

功能:获取ListBox、ComboBox的选中索引

参数

  • uiName:界面类名
  • elementName:控件名称

返回值:索引值

示例

idx = Fun.GetCurrentIndex(uiName, "combobox_1")

3.5 SetValueList

功能:设置ListBox、ComboBox的值列表

参数

  • uiName:界面类名
  • elementName:控件名称
  • valueList:值列表

返回值:无

示例

Fun.SetValueList(uiName, "combobox_1", ["选项1""选项2""选项3"])

3.6 GetValueList

功能:获取ListBox、ComboBox的值列表

参数

  • uiName:界面类名
  • elementName:控件名称

返回值:值列表

示例

items = Fun.GetValueList(uiName, "listbox_holders")

3.7 AddUserData

功能:为控件添加用户数据

参数

  • uiName:界面类名
  • elementName:控件名称
  • dataName:数据名称
  • datatype:数据类型('int','float','string','list','dictionary')
  • datavalue:数据值
  • isMapToText:是否映射到控件的text属性

返回值:无

示例

Fun.AddUserData(uiName, "listbox_holders""data""list", [1,2,3], 0)

3.8 GetUserData

功能:获取控件的用户数据

参数

  • uiName:界面类名
  • elementName:控件名称
  • dataName:数据名称

返回值:数据值

示例

data = Fun.GetUserData(uiName, "listbox_holders""data")

3.9 AddTKVariable

功能:为控件添加Tkinter变量

参数

  • uiName:界面类名
  • elementName:控件名称
  • defaultValue:默认值

返回值:Tkinter变量对象

示例

var = Fun.AddTKVariable(uiName, "input_code""默认值")

3.10 SetTKVariable

功能:设置控件的Tkinter变量值

参数

  • uiName:界面类名
  • elementName:控件名称
  • value:要设置的值

返回值:无

示例

Fun.SetTKVariable(uiName, "input_code""sz000001")

4. 列表/树形控件

4.1 AddLineText

功能:为Text控件或ListBox控件增加一行文字

参数

  • uiName:界面类名
  • elementName:控件名称
  • text:文字内容
  • lineIndex:目标行号(默认"end")
  • textTag:标记名称
  • set_see:是否滚动到该行

返回值:无

示例

# 添加表头Fun.AddLineText(uiName, "listbox_holders""序号 股东名称                                    持股数量(股)    持股比例(%)    股本性质")# 添加数据行Fun.AddLineText(uiName, "listbox_holders""1    平安银行股份有限公司                       1000000         2.5%           流通A股")

4.2 DelAllLines

功能:清空Text控件或ListBox控件的所有内容

参数

  • uiName:界面类名
  • elementName:控件名称

返回值:无

示例

Fun.DelAllLines(uiName, "listbox_holders")

4.3 Clear

功能:清空控件的所有内容(支持ListBox、Text、TreeView、ComboBox)

参数

  • uiName:界面类名
  • elementName:控件名称

返回值:无

示例

Fun.Clear(uiName, "listbox_holders")

4.4 AddTreeItem

功能:增加树形控件项

参数

  • uiName:界面类名
  • elementName:控件名称
  • parentItem:父结点(""表示根节点)
  • insertItemPosition:插入位置(默认"end")
  • itemName:项目名称
  • itemText:项目显示文本
  • itemValues:项目值
  • iconName:图标名称
  • tag:标记名称

返回值:创建的项对象

示例

Fun.AddTreeItem(uiName, "treeview_1""""end""item1""根节点""""folder.png")Fun.AddTreeItem(uiName, "treeview_1""item1""end""child1""子节点""""file.png")

4.5 ExpandTreeView

功能:展开树形控件的所有节点

参数

  • uiName:界面类名
  • elementName:控件名称

返回值:无

示例

Fun.ExpandTreeView(uiName, "treeview_1")

4.6 AddRowText

功能:为ListView插入一行

参数

  • uiName:界面类名
  • elementName:控件名称
  • rowIndex:行索引(默认'end')
  • values:行值(元组或逗号分隔字符串)
  • tag:标记名称

返回值:行索引

示例

Fun.AddRowText(uiName, "listview_1""end"    ("1""平安银行""1000000""2.5%""流通A股"))

4.7 AddMultiRowText

功能:批量添加多行数据到ListView

参数

  • uiName:界面类名
  • elementName:控件名称
  • rowIndex:起始行索引(默认'end')
  • rowValuesList:行值列表
  • tagList:标记列表

返回值:起始行索引

示例

data = [    ("1""平安银行""1000000""2.5%""流通A股"),    ("2""深发展""500000""1.2%""流通A股")]Fun.AddMultiRowText(uiName, "listview_1""end", data)

4.8 GetAllRowTextList

功能:获取ListView所有行和列数据

参数

  • uiName:界面类名
  • elementName:控件名称

返回值:二维列表

示例

all_data = Fun.GetAllRowTextList(uiName, "listview_1")for row in all_data:    print(row)

4.9 DeleteRow

功能:删除ListView指定行

参数

  • uiName:界面类名
  • elementName:控件名称
  • rowIndex:行索引

返回值:无

示例

Fun.DeleteRow(uiName, "listview_1"0)

4.10 DeleteAllRows

功能:清空ListView所有行

参数

  • uiName:界面类名
  • elementName:控件名称

返回值:无

示例

Fun.DeleteAllRows(uiName, "listview_1")

4.11 SortListView

功能:按指定列对ListView排序

参数

  • uiName:界面类名
  • elementName:控件名称
  • columnIndex:列索引
  • reverse:是否降序(默认False)
  • sortkeyDict:排序键映射字典

返回值:无

示例

Fun.SortListView(uiName, "listview_1"2True)  # 按持股数量降序排序

4.12 SetRowStyle

功能:设置ListView的行样式

参数

  • uiName:界面类名
  • elementName:控件名称
  • rowIndex:行索引('even','odd','all'或数字)
  • bgColor:背景色
  • fgColor:文字颜色
  • textFont:字体

返回值:无

示例

# 设置偶数行样式Fun.SetRowStyle(uiName, "listview_1""even""#F5F5F5""#000000")# 设置奇数行样式Fun.SetRowStyle(uiName, "listview_1""odd""#FFFFFF""#000000")# 设置悬停行样式Fun.SetRowStyle(uiName, "listview_1""hover""#E8F0FE""#000000")

4.13 SetCellEntry

功能:将ListView单元格设置为可编辑输入框

参数

  • uiName:界面类名
  • elementName:控件名称
  • rowIndex:行索引
  • columnIndex:列索引
  • callback:编辑完成后的回调函数

返回值:无

示例

defon_cell_edit(row, col, text):    print(f"单元格({row},{col})内容变更为:{text}")Fun.SetCellEntry(uiName, "listview_1"02, on_cell_edit)

4.14 SetCellComboBox

功能:将ListView单元格设置为下拉框

参数

  • uiName:界面类名
  • elementName:控件名称
  • rowIndex:行索引
  • columnIndex:列索引
  • initList:下拉选项列表
  • callback:选择完成后的回调函数

返回值:无

示例

options = ["流通A股""流通B股""限售A股"]Fun.SetCellComboBox(uiName, "listview_1"04, options)

5. 界面导航

5.1 CallUIDialog

功能:调用显示一个模式对话框

参数

  • uiName:界面类名
  • topmost:是否置最前(默认1)
  • toolwindow:是否有标题栏(默认1)
  • grab_set:是否独占消息(默认1)
  • wait_window:是否等待窗口关闭(默认1)
  • animation:动画类型('fadein','zoomin')
  • params:传递给对话框的参数

返回值:对话框返回的数据字典

示例

result = Fun.CallUIDialog("input_dialog"1111"fadein")

5.2 LoadUIDialog

功能:在指定控件上嵌入加载一个界面

参数

  • uiName:当前界面类名
  • elementName:目标控件名称
  • targetUIName:要加载的界面名称
  • params:传递给加载界面的参数
  • ignoreSameUI:是否忽略重复加载相同界面(默认True)

返回值:加载的界面实例

示例

Fun.LoadUIDialog(uiName, "frame_content""detail_page")

5.3 GoToUIDialog

功能:从当前界面跳转到另一个界面(替换当前界面)

参数

  • uiName:当前界面类名
  • targetUIName:目标界面类名
  • params:传递给目标界面的参数

返回值:无

示例

Fun.GoToUIDialog(uiName, "main_page")

5.4 AddUIDialog

功能:在指定控件上添加一个界面(可指定位置)

参数

  • uiName:当前界面类名
  • elementName:目标控件名称
  • targetUIName:要添加的界面名称
  • x:x坐标
  • y:y坐标
  • params:传递给添加界面的参数

返回值:添加的界面实例

示例

Fun.AddUIDialog(uiName, "canvas_1""child_page"5050)

5.5 AddPage

功能:为NoteBook控件增加选项页

参数

  • uiName:界面类名
  • elementName:NoteBook控件名称
  • title:页面标题
  • iconFile:页面图标文件
  • importUI:要加载的界面文件

返回值:无

示例

Fun.AddPage(uiName, "notebook_1""股东列表""icon.png""holders_page")Fun.AddPage(uiName, "notebook_1""财务数据""""finance_page")

5.6 SelectPage

功能:选中NoteBook的指定页

参数

  • uiName:界面类名
  • elementName:NoteBook控件名称
  • index:页面索引

返回值:无

示例

Fun.SelectPage(uiName, "notebook_1"0)

5.7 GetSelectedPageIndex

功能:获取NoteBook当前选中的页面索引

参数

  • uiName:界面类名
  • elementName:NoteBook控件名称

返回值:页面索引

示例

idx = Fun.GetSelectedPageIndex(uiName, "notebook_1")

6. 对话框与消息

6.1 MessageBox

功能:弹出一个信息对话框

参数

  • text:显示文字
  • title:标题文字
  • type:对话框类型('info','warning','error')
  • parent:父窗口

返回值:无

示例

Fun.MessageBox("查询成功""提示""info")Fun.MessageBox("输入有误""错误""error")

6.2 AskBox

功能:弹出一个Yes/No选择对话框

参数

  • title:标题文字
  • text:显示文字
  • parent:父窗口

返回值:True(Yes)/False(No)

示例

if Fun.AskBox("确认""确定要退出吗?"):    Fun.ExitApplication()

6.3 AskCancelBox

功能:弹出一个Yes/No/Cancel选择对话框

参数

  • title:标题文字
  • text:显示文字
  • parent:父窗口

返回值:"Yes"/"No"/"Cancel"

示例

result = Fun.AskCancelBox("保存""是否保存修改?")if result == "Yes":    save_data()elif result == "No":    exit_without_save()

6.4 InputBox

功能:弹出一个输入对话框

参数

  • title:标题文字
  • prompt:提示文字
  • initialvalue:默认值
  • parent:父窗口

返回值:用户输入的字符串

示例

code = Fun.InputBox("输入股票代码""请输入股票代码(如:sz000001)""sz000001")

6.5 InputDialog

功能:自定义输入对话框,可设置大小和多行输入

参数

  • width:对话框宽度
  • lines:行数(>1时为多行输入)
  • bgColor:背景色
  • titleText:标题文字
  • promptText:提示文字
  • defaultText:默认文本
  • callBackFunction:回调函数

返回值:用户输入的文本

示例

defon_input(text):    print(f"输入内容:{text}")text = Fun.InputDialog(4005"#f8f9fa""输入备注""请输入备注信息""", on_input)

6.6 SelectDirectory

功能:打开目录选择对话框

参数

  • title:标题
  • initDir:初始目录
  • parent:父窗口

返回值:选择的目录路径

示例

path = Fun.SelectDirectory("选择保存目录""C:\\")

6.7 OpenFile

功能:打开文件选择对话框

参数

  • title:标题
  • filetypes:文件类型过滤
  • initDir:初始目录
  • multi:是否允许多选

返回值:选择的文件路径(多选时返回列表)

示例

file_path = Fun.OpenFile("选择数据文件", [('Excel文件','*.xlsx'),('所有文件','*.*')])

6.8 SaveFile

功能:打开文件保存对话框

参数

  • title:标题
  • filetypes:文件类型过滤
  • initDir:初始目录
  • initialFile:默认文件名
  • defaultextension:默认扩展名

返回值:保存的文件路径

示例

save_path = Fun.SaveFile("保存数据", [('CSV文件','*.csv')], "C:\\""data""csv")

6.9 SelectColor

功能:打开颜色选择对话框

参数

  • title:标题

返回值:颜色值

示例

color = Fun.SelectColor("选择背景色")

7. 文件操作

7.1 ReadFromFile

功能:从文件中读取内容

参数

  • filePath:文件路径
  • encoding:编码(默认'utf-8')
  • autoEval:是否自动执行eval转换

返回值:文件内容

示例

content = Fun.ReadFromFile("data.txt""utf-8")json_data = Fun.ReadFromFile("config.json""utf-8"True)

7.2 WriteToFile

功能:将内容写入文件

参数

  • filePath:文件路径
  • content:写入内容
  • encoding:编码(默认'utf-8')
  • append:是否追加模式(默认False)

返回值:成功返回True,失败返回False

示例

Fun.WriteToFile("output.txt""查询结果""utf-8")Fun.WriteToFile("log.txt""新日志""utf-8"True)

7.3 CopyFile

功能:复制文件

参数

  • srcFile:源文件
  • dstFile:目标文件
  • coverMode:是否覆盖已存在文件

返回值:成功返回True,失败返回False

示例

Fun.CopyFile("source.txt""backup.txt"True)

7.4 MoveFile

功能:移动文件

参数

  • srcFile:源文件
  • dstFile:目标文件
  • coverMode:是否覆盖已存在文件

返回值:成功返回True,失败返回False

示例

Fun.MoveFile("temp.txt""archive/temp.txt")

7.5 DeleteFile

功能:删除文件

参数

  • dstFile:要删除的文件

返回值:无

示例

Fun.DeleteFile("temp.txt")

7.6 CreateDir

功能:创建目录

参数

  • dstDir:目录路径
  • coverMode:是否覆盖已存在目录

返回值:成功返回True,失败返回False

示例

Fun.CreateDir("data/output"True)

7.7 DeleteDir

功能:删除目录

参数

  • srcDir:目录路径

返回值:无

示例

Fun.DeleteDir("temp")

7.8 WalkAllResFiles

功能:遍历目录获取所有指定类型的文件

参数

  • parentPath:根目录
  • alldirs:是否进入子目录
  • extName:扩展名筛选(字符串或列表)

返回值:文件路径列表

示例

# 获取所有py文件py_files = Fun.WalkAllResFiles("."True"py")# 获取图片文件img_files = Fun.WalkAllResFiles("Resources"True, ["png""jpg""gif"])

7.9 GetFileMD5

功能:获取文件的MD5值

参数

  • srcFile:文件路径

返回值:MD5字符串

示例

md5 = Fun.GetFileMD5("data.txt")print(f"文件MD5:{md5}")

7.10 CompareFileMD5

功能:比较两个文件的MD5值是否一致

参数

  • srcFile:源文件
  • dstFile:目标文件

返回值:True一致,False不一致

示例

if Fun.CompareFileMD5("source.txt""backup.txt"):    print("文件相同")

8. 画布绘图

8.1 DrawLine

功能:在画布上画线

参数

  • uiName:界面类名
  • drawCanvasName:画布名称
  • x1,y1:起点坐标
  • x2,y2:终点坐标
  • Anchor:锚点('nw','center'等)
  • color:线条颜色
  • width:线条宽度
  • dash:虚线模式 (dash1,dash2)
  • shapeTag:图形标签

返回值:图形标签

示例

Fun.DrawLine(uiName, "canvas_1"1010100100"nw""#FF0000"2)

8.2 DrawRectangle

功能:在画布上画矩形

参数

  • uiName:界面类名
  • drawCanvasName:画布名称
  • x1,y1:左上角坐标
  • x2,y2:右下角坐标
  • Anchor:锚点
  • color:填充颜色
  • outlinecolor:边框颜色
  • outlinewidth:边框宽度
  • dash:虚线模式
  • shapeTag:图形标签

返回值:图形标签

示例

Fun.DrawRectangle(uiName, "canvas_1"1010200100"nw""#5D9CEC""#333333"1)

8.3 DrawCircle

功能:在画布上画圆

参数

  • uiName:界面类名
  • drawCanvasName:画布名称
  • x1,y1:外接矩形左上角
  • x2,y2:外接矩形右下角
  • Anchor:锚点
  • color:填充颜色
  • outlinecolor:边框颜色
  • outlinewidth:边框宽度
  • dash:虚线模式
  • shapeTag:图形标签

返回值:图形标签

示例

Fun.DrawCircle(uiName, "canvas_1"5050150150"nw""#ED5565")

8.4 DrawText

功能:在画布上写文字

参数

  • uiName:界面类名
  • drawCanvasName:画布名称
  • x,y:坐标
  • Anchor:锚点
  • text:文字内容
  • textFont:字体
  • color:文字颜色
  • anchor:对齐方式
  • shapeTag:图形标签

返回值:图形标签

示例

font = Fun.CreateFont("Microsoft YaHei UI"16True)Fun.DrawText(uiName, "canvas_1"10050"nw""十大股东", font, "#000000")

8.5 DrawImage

功能:在画布上显示图片

参数

  • uiName:界面类名
  • drawCanvasName:画布名称
  • x1,y1:图片左上角
  • x2,y2:图片右下角
  • Anchor:锚点
  • imagefile:图片文件
  • shapeTag:图形标签

返回值:图形标签

示例

Fun.DrawImage(uiName, "canvas_1"00100100"nw""logo.png")

8.6 DrawRoundedRectangle

功能:绘制圆角矩形

参数

  • uiName:界面类名
  • drawCanvasName:画布名称
  • x1,y1:左上角
  • x2,y2:右下角
  • Anchor:锚点
  • color:填充颜色
  • outlinecolor:边框颜色
  • outlinewidth:边框宽度
  • dash:虚线模式
  • roundRadius:圆角半径
  • shapeTag:图形标签

返回值:图形标签

示例

Fun.DrawRoundedRectangle(uiName, "canvas_1"101020050"nw""#5D9CEC""#333333"1, (0,0), 10)

8.7 DeleteShape

功能:删除画布中的图形

参数

  • uiName:界面类名
  • drawCanvasName:画布名称
  • shapeTag:图形标签

返回值:无

示例

Fun.DeleteShape(uiName, "canvas_1""rect_1")

8.8 SetShapeFillColor

功能:设置图形填充颜色

参数

  • uiName:界面类名
  • drawCanvasName:画布名称
  • shapeTag:图形标签
  • color:颜色值

返回值:无

示例

Fun.SetShapeFillColor(uiName, "canvas_1""rect_1""#FF0000")

8.9 SetShapeText

功能:设置画布文字内容

参数

  • uiName:界面类名
  • drawCanvasName:画布名称
  • shapeTag:图形标签
  • text:文字内容
  • color:文字颜色

返回值:无

示例

Fun.SetShapeText(uiName, "canvas_1""text_1""更新后的文字""#00FF00")

8.10 GetShapeRect

功能:获取图形位置和大小

参数

  • uiName:界面类名
  • canvasName:画布名称
  • shapeTag:图形标签

返回值:元组 (x1,y1,x2,y2)

示例

x1, y1, x2, y2 = Fun.GetShapeRect(uiName, "canvas_1""rect_1")

9. 高级控件

9.1 Calendar(日历控件)

功能:日历选择控件

方法

  • SetBGColor(color):设置背景色
  • SetDatebarBGColor(color):设置日期栏背景色
  • SetDatebarFGColor(color):设置日期栏文字色
  • SetSelectedBGColor(color):设置选中日期背景色
  • SetSelectedFGColor(color):设置选中日期文字色
  • GetDate():获取选中日期
  • SetDate(year,month,day):设置显示日期
  • SetRangeOfYears(year_from,year_to):设置年份范围
  • SetBtnCallBackFunction(func,uiName,widgetName):设置按钮回调

示例

calendar = Fun.GetElement(uiName, "calendar_1")calendar.SetBGColor("#FFFFFF")calendar.SetDatebarBGColor("#5D9CEC")calendar.SetRangeOfYears(20202030)date = calendar.GetDate()

9.2 DatePicker(日期选择器)

功能:下拉式日期选择控件

方法

  • SetBGColor(color):设置背景色
  • SetFGColor(color):设置文字色
  • SetCalendarBGColor(color):设置日历背景色
  • SetSeparatorChar(char):设置日期分隔符('-'或'/')
  • GetDate():获取选中日期
  • SetDate(year,month,day):设置日期
  • SetBtnCallBackFunction(func,uiName,widgetName):设置回调

示例

datepicker = Fun.GetElement(uiName, "datepicker_1")datepicker.SetSeparatorChar("-")datepicker.SetDate(2025930)selected = datepicker.GetDate()

9.3 SwitchButton(开关按钮)

功能:开关按钮控件

方法

  • SetCurrValue(value):设置当前值(True/False)
  • GetCurrValue():获取当前值
  • SetOnStateBGColor(color):设置开启时背景色
  • SetOffStateBGColor(color):设置关闭时背景色
  • SetOnStateText(text):设置开启时文字
  • SetOffStateText(text):设置关闭时文字
  • SetOnStateTextColor(color):设置开启时文字颜色
  • SetOffStateTextColor(color):设置关闭时文字颜色
  • SetSwitchMode(mode,framedelay):设置切换模式(0立即/1动画)
  • SetSwitchCallBackFunction(func,uiName,widgetName):设置切换回调

示例

switch = Fun.GetElement(uiName, "switch_1")switch.SetOnStateBGColor("#2F9F00")switch.SetOffStateBGColor("#333333")switch.SetOnStateText("ON")switch.SetOffStateText("OFF")value = switch.GetCurrValue()

9.4 Slider(滑动条)

功能:滑块控件

方法

  • SetMinValue(min):设置最小值
  • SetMaxValue(max):设置最大值
  • SetCurrValue(value):设置当前值
  • GetCurrValue():获取当前值
  • SetBarBGColor1(color):设置滑块右边背景色
  • SetBarBGColor2(color):设置滑块左边背景色
  • SetBarButtonColor(color):设置滑块颜色
  • SetBarImage1(fileName):设置左边背景图
  • SetBarImage2(fileName):设置右边背景图
  • SetButtonBGImage(fileName):设置滑块背景图
  • SetValueChangedFunction(func,uiName,widgetName):设置值变化回调

示例

slider = Fun.GetElement(uiName, "slider_1")slider.SetMinValue(0)slider.SetMaxValue(100)slider.SetCurrValue(50)value = slider.GetCurrValue()

9.5 ProgressDial(进度转盘)

功能:圆形进度指示器

方法

  • SetBGColor(color):设置背景色
  • SetBGColor_Center(color):设置中心背景色
  • SetFillColor(color):设置填充颜色
  • SetFillWidth(width):设置填充宽度
  • SetBeginAngle(angle):设置起始角度
  • SetEndAngle(angle):设置结束角度
  • SetMaxValue(max):设置最大值
  • SetCurrValue(value):设置当前值
  • SetSections(section):设置分段数
  • SetPersentage(isPersentage):是否显示百分比
  • SetFont(font):设置字体
  • SetTextColor(color):设置文字颜色

示例

dial = Fun.GetElement(uiName, "progress_1")dial.SetMaxValue(100)dial.SetCurrValue(75)dial.SetFillColor("#5D9CEC")dial.SetPersentage(True)

9.6 Navigation(导航栏)

功能:导航栏控件,支持水平和垂直方向

方法

  • AddItem(text,icon,page):添加导航项
  • DelItem(index):删除导航项
  • Clear():清空所有项
  • SetCurrentIndex(index):设置当前选中项
  • GetCurrentIndex():获取当前选中索引
  • GetCurrentItemText():获取当前项文本
  • GetCurrentItemValue():获取当前项值
  • SetDirection(direction):设置方向(HORIZONTAL/VERTICAL)
  • SetAnchor(anchor):设置锚点
  • SetCompound(compound):设置图标位置
  • SetItemBGColor(color):设置项背景色
  • SetItemFGColor(color):设置项文字色
  • SetItemFont(font):设置项字体
  • SetItemImage(fileName):设置项图标
  • SetNavigationCallBackFunction(func,uiName,widgetName):设置点击回调

示例

nav = Fun.GetElement(uiName, "navigation_1")nav.SetDirection(tkinter.HORIZONTAL)nav.AddItem("股东列表""icon1.png""holders")nav.AddItem("财务数据""icon2.png""finance")nav.SetCurrentIndex(0)defon_nav_click(uiName, widgetName, text, page):    print(f"点击了{text},跳转到{page}")nav.SetNavigationCallBackFunction(on_nav_click, uiName, "navigation_1")

9.7 ListMenu(列表菜单)

功能:树形列表菜单控件

方法

  • AddTitle(title,icon,page):添加一级菜单
  • AddItem(item,title,icon,page):添加二级菜单项
  • DelTitle(title):删除一级菜单
  • DelItem(title,item):删除二级菜单项
  • Clear():清空所有
  • ExpandAllTitle(expand):展开/收缩所有标题
  • IsTitleExpand(title):判断标题是否展开
  • SetTitleBGColor(color):设置标题背景色
  • SetTitleFGColor(color):设置标题文字色
  • SetTitleFont(font):设置标题字体
  • SetItemBGColor(color):设置项背景色
  • SetItemFGColor(color):设置项文字色
  • SetItemFont(font):设置项字体
  • SetListMenuCallBackFunction(func,uiName,widgetName):设置点击回调

示例

menu = Fun.GetElement(uiName, "listmenu_1")menu.AddTitle("股东信息""folder.png""")menu.AddItem("十大股东""股东信息""file.png""holders")menu.AddItem("高管持股""股东信息""file.png""executives")menu.AddTitle("财务数据""folder.png""")menu.ExpandAllTitle(True)defon_menu_click(uiName, widgetName, item, page):    print(f"点击了{item},页面:{page}")menu.SetListMenuCallBackFunction(on_menu_click, uiName, "listmenu_1")

9.8 SwitchPage(切换页面)

功能:图片轮播控件

方法

  • AddPage(title,image,page):添加页面
  • DelPage(index):删除页面
  • Clear():清空所有
  • SetCurrentIndex(index):设置当前显示页
  • GetCurrentIndex():获取当前索引
  • SetProgressBarLeft(left):设置进度条X位置
  • SetProgressBarTop(top):设置进度条Y位置
  • SetProgressBarButtonRadius(radius):设置按钮圆点半径
  • SetPageClickCallBackFunction(func,uiName,widgetName):设置页面点击回调
  • Play(delay):开始自动轮播

示例

switcher = Fun.GetElement(uiName, "switchpage_1")switcher.AddPage("股东列表""holders.jpg""holders")switcher.AddPage("财务图表""finance.jpg""finance")switcher.AddPage("公司公告""notice.jpg""notice")switcher.SetProgressBarLeft(300)switcher.SetProgressBarTop(200)switcher.Play(3000)  # 3秒轮播一次

9.9 ShowCase(列表页)

功能:网格列表展示控件

方法

  • AddItem(text,icon,page):添加项目
  • AddItemUI(targetUIName,params):添加界面项目
  • DelItem(index):删除项目
  • Clear():清空所有
  • SetCurrentIndex(index):设置当前选中项
  • GetCurrentIndex():获取当前索引
  • SetItemWidth(width):设置项宽度
  • SetItemHeight(height):设置项高度
  • SetItemSpacing(spacing):设置项间距
  • SetItemBGColor(color):设置项背景色
  • SetItemFGColor(color):设置项文字色
  • SetItemFont(font):设置项字体
  • SetClickItemCallBackFunction(func,uiName,widgetName):设置点击回调

示例

showcase = Fun.GetElement(uiName, "showcase_1")showcase.SetItemWidth(220)showcase.SetItemHeight(60)showcase.SetItemSpacing(10)showcase.AddItem("平安银行""bank.png""000001")showcase.AddItem("万科A""estate.png""000002")showcase.AddItem("贵州茅台""wine.png""600519")defon_item_click(uiName, widgetName, text, page):    print(f"点击了{text},代码:{page}")showcase.SetClickItemCallBackFunction(on_item_click, uiName, "showcase_1")

9.10 CustomEntry(自定义输入框)

功能:带图标和提示的输入框

方法

  • SetText(text):设置文本
  • GetText():获取文本
  • SetFont(font):设置字体
  • SetBGColor(color):设置背景色
  • SetFGColor(color):设置文字色
  • SetTipText(text):设置提示文字
  • SetTipFGColor(color):设置提示文字颜色
  • SetRestriction(restriction):设置输入限制('number','letter','alphanumeric','integer','phone','email')
  • SetLeftIcon(iconFile):设置左侧图标
  • SetRightIcon(iconFile):设置右侧图标
  • SetLeftIconClickFunction(func,uiName,widgetName):设置左侧图标点击回调
  • SetRightIconClickFunction(func,uiName,widgetName):设置右侧图标点击回调
  • SetTextChangedFunction(func,uiName,widgetName):设置文本变化回调

示例

entry = Fun.GetElement(uiName, "input_code")entry.SetTipText("请输入股票代码")entry.SetLeftIcon("search.png")entry.SetRestriction("alphanumeric")defon_text_change(uiName, widgetName, text):    print(f"输入内容:{text}")entry.SetTextChangedFunction(on_text_change, uiName, "input_code")

9.11 CustomText(自定义文本框)

功能:带滚动条的多行文本框

方法

  • SetText(text):设置文本
  • GetText():获取文本
  • SetFont(font):设置字体
  • SetBGColor(color):设置背景色
  • SetFGColor(color):设置文字色
  • SetAutoWrap(autoWrap):设置自动换行
  • SetHScrollBar():显示横向滚动条
  • SetVScrollBar():显示纵向滚动条
  • RemoveHScrollBar():隐藏横向滚动条
  • RemoveVScrollBar():隐藏纵向滚动条
  • InsertText(position,text,tag):插入文本
  • DeleteContent(fromPosition,toPosition):删除内容
  • GetCurrentLine():获取当前行号

示例

textbox = Fun.GetElement(uiName, "text_1")textbox.SetText("十大股东信息:\n1. 平安银行\n2. 深发展")textbox.SetAutoWrap(True)textbox.SetVScrollBar()

10. 事件处理

10.1 SetBindEventFunction

功能:设置控件的事件响应函数

参数

  • uiName:界面类名
  • elementName:控件名称
  • eventName:事件名称('Command','FocusOut','KeyPress'等)
  • callbackFunction:回调函数

返回值:无

示例

defon_focus_out(event, uiName, widgetName):    print("焦点离开")Fun.SetBindEventFunction(uiName, "input_code""FocusOut", on_focus_out)

10.2 CreateToolTip

功能:为控件创建提示信息

参数

  • uiName:界面类名
  • elementName:控件名称
  • tipText:提示文字
  • bgColor:背景色
  • fgColor:文字色
  • inTop:是否置顶

返回值:无

示例

Fun.CreateToolTip(uiName, "button_query""点击查询十大股东信息""#333333""#FFFFFF"True)

10.3 SetControlAcceptDrop

功能:设置控件接受拖拽文件

参数

  • uiName:界面类名
  • elementName:控件名称
  • functionCallback:回调函数

返回值:无

示例

defon_file_drop(fileList, uiName, widgetName):for file in fileList:        print(f"拖拽文件:{file}")Fun.SetControlAcceptDrop(uiName, "listbox_holders", on_file_drop)

10.4 SetElementScrollbar

功能:为控件设置滚动条

参数

  • uiName:界面类名
  • elementName:控件名称
  • orient:方向(VERTICAL/HORIZONTAL)

返回值:无

示例

Fun.SetElementScrollbar(uiName, "listbox_holders", tkinter.VERTICAL)Fun.SetElementScrollbar(uiName, "listbox_holders", tkinter.HORIZONTAL)

11. 工具函数

11.1 GetCurrTime

功能:获取当前时间

参数

  • splitChar:分隔符(默认':')

返回值:时间字符串

示例

time_str = Fun.GetCurrTime()print(time_str)  # 输出:14:30:25

11.2 GetCurrDate

功能:获取当前日期

参数

  • splitChar:分隔符(默认':')

返回值:日期字符串

示例

date_str = Fun.GetCurrDate("-")print(date_str)  # 输出:2025-9-30

11.3 Sleep

功能:程序暂停等待

参数

  • second:等待秒数(默认1)

返回值:无

示例

Fun.Sleep(2)  # 暂停2秒

11.4 RandNumber

功能:生成随机数

参数

  • begin:起始值(默认0)
  • end:结束值(默认100)

返回值:随机整数

示例

num = Fun.RandNumber(110)print(f"随机数:{num}")

11.5 IsMobilePhone

功能:判断是否为手机号

参数

  • text:要判断的字符串

返回值:True/False

示例

if Fun.IsMobilePhone("13800138000"):    print("是手机号")

11.6 IsEmail

功能:判断是否为邮箱地址

参数

  • text:要判断的字符串

返回值:True/False

示例

if Fun.IsEmail("test@example.com"):    print("是邮箱")

11.7 IsNumeric

功能:判断是否为数字字符串

参数

  • text:要判断的字符串

返回值:True/False

示例

if Fun.IsNumeric("123.45"):    print("是数字")

11.8 GetParentCallFunc

功能:获取堆栈中上层调用函数的名称和参数

参数:无

返回值:[函数名, 参数列表]

示例

func_name, args = Fun.GetParentCallFunc()print(f"调用者:{func_name}")

11.9 CreateFont

功能:创建字体对象

参数

  • fontName:字体名称
  • fontSize:字体大小
  • fontWeight:字重(True/False或'normal'/'bold')
  • fontSlant:倾斜(True/False或'roman'/'italic')
  • fontUnderline:下划线(True/False)
  • fontOverstrike:删除线(True/False)

返回值:字体对象

示例

font = Fun.CreateFont("Microsoft YaHei UI"14TrueFalseFalseFalse)

11.10 EnumFontName

功能:枚举系统所有可用字体

参数:无

返回值:字体名称列表

示例

fonts = Fun.EnumFontName()for font in fonts[:10]:  # 显示前10个    print(font)

12. 综合示例:十大股东查询

# stock_holders_cmd.pyimport akshare as akimport FunuiName = "stock_holders"defForm_1_onLoad(uiName, threadings=0):"""界面加载时初始化"""    Fun.SetText(uiName, "input_code""sz000001")    Fun.SetText(uiName, "input_date""20250930")    Fun.SetText(uiName, "label_status""股票代码sh上海,sz深圳,日期格式:20250930")    Fun.CreateToolTip(uiName, "input_code""请输入股票代码,如:sz000001""#333333""#FFFFFF")defbutton_query_onCommand(uiName, widgetName, threadings=0):"""查询按钮点击事件"""    code = Fun.GetText(uiName, "input_code").strip()    date = Fun.GetText(uiName, "input_date").strip()ifnot code ornot date:        Fun.SetText(uiName, "label_status""请输入股票代码和日期")return    Fun.SetText(uiName, "label_status"f"正在查询 {code}{date}...")    Fun.Clear(uiName, "listbox_holders")try:# 调用akshare获取数据        df = ak.stock_gdfx_top_10_em(symbol=code, date=date)if df isNoneor df.empty:            Fun.SetText(uiName, "label_status"f"未找到 {code} 的股东数据")return# 添加表头        Fun.AddLineText(uiName, "listbox_holders""序号 股东名称                                    持股数量(股)    持股比例(%)    股本性质")        Fun.AddLineText(uiName, "listbox_holders""-" * 80)# 添加数据for _, row in df.iterrows():            rank = str(row.get("序号"""))            name = str(row.get("股东名称"""))[:20]            shares = str(row.get("持股数"""))            ratio = str(row.get("占总股本持股比例"""))            holder_type = str(row.get("股份类型"""))[:8]            line = f"{rank:<4}{name:<20}{shares:<15}{ratio:<12}{holder_type}"            Fun.AddLineText(uiName, "listbox_holders", line)        Fun.SetText(uiName, "label_status"f"查询成功,共{len(df)}条记录")except Exception as e:        Fun.SetText(uiName, "label_status""查询失败")        print(f"错误:{e}")        Fun.MessageBox(f"查询失败:{str(e)}""错误""error")

版本信息

  • 文档版本:1.0.0
  • 最后更新:2026年2月27日
  • 适用PyMe版本:PythonIDE-PyMe-1.5.1.6

如有疑问请参考您项目下的源代码Fun.py。


作者简介:码上工坊,探索用编程为己赋能,定期分享编程知识和项目实战经验。持续学习、适应变化、记录点滴、复盘反思、成长进步。

重要提示:本文主要是记录自己的学习与实践过程,所提内容或者观点仅代表个人意见,只是我以为的,不代表完全正确,欢迎交流讨论。

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-03-03 04:17:46 HTTP/2.0 GET : https://f.mffb.com.cn/a/477659.html
  2. 运行时间 : 0.120587s [ 吞吐率:8.29req/s ] 内存消耗:5,024.70kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=bd40f2e80bbdb8fb825082e90193c40e
  1. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/runtime/temp/067d451b9a0c665040f3f1bdd3293d68.php ( 11.98 KB )
  140. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.001073s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001658s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000724s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000689s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.001454s ]
  6. SELECT * FROM `set` [ RunTime:0.000612s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.001549s ]
  8. SELECT * FROM `article` WHERE `id` = 477659 LIMIT 1 [ RunTime:0.003097s ]
  9. UPDATE `article` SET `lasttime` = 1772482666 WHERE `id` = 477659 [ RunTime:0.004156s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000618s ]
  11. SELECT * FROM `article` WHERE `id` < 477659 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.001519s ]
  12. SELECT * FROM `article` WHERE `id` > 477659 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.010608s ]
  13. SELECT * FROM `article` WHERE `id` < 477659 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.002452s ]
  14. SELECT * FROM `article` WHERE `id` < 477659 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.001898s ]
  15. SELECT * FROM `article` WHERE `id` < 477659 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.002606s ]
0.124389s