Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>FlyThings SupportNew to Visual Studio Code? Get it now.
FlyThings Support

FlyThings Support

FlyThings

|
1 install
| (0) | Free
Vue-styled .fui/.fv markup language support with automated C++ code generation.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

FlyThings Developer Tools

VS Code 扩展,为 FlyThings 框架的 .fv 文件提供语法高亮、事件函数导航和自动创建。

功能

语法高亮

.fv 文件继承 VS Code HTML 语法高亮,支持:

  • HTML 元素和属性
  • CSS 内联样式
  • 内嵌 JavaScript / TypeScript

事件函数导航

按住 Ctrl 键悬停在事件函数名上,会显示悬浮框:

  • 显示该事件的类型描述和对应的 C++ 函数签名
  • 若函数已实现,显示完整函数体,末尾显示可点击的文件名:行号链接
  • 若函数未实现,显示 [创建函数] 链接

Ctrl + 左键点击可直接跳转到 logic.cpp 中的函数实现。

自动创建函数 Stub

对于 fly 中声明但尚未实现的事件,悬停后点击 [创建函数] 链接,将自动在对应的 logic.cpp 文件中插入函数骨架(FLY_LOGIC_CLASS_END 之前)。

支持的事件属性

事件 描述 生成签名
@click 按钮点击事件 void onXxx()
@change 值变化事件 void onXxx(int idx)
@page-change 页面切换事件 void onXxx(int idx)
@long-click 长按事件 void onXxx()
@obtain 列表项获取事件 void onXxx(ZKListView::ZKListItem* item, int idx)
@count 列表项查询数量事件 int onXxx()

以上事件均支持 @event 和 v-on:event 两种写法。

配置

设置 默认值 说明
flythings-project-support.projectRoots [] 手动指定项目根目录(为空时自动检测)
flythings-project-support.logicDir src/logic 相对于项目根目录的逻辑代码路径

项目结构约定

projectRoot/
├── ui/
│   └── login/
│       └── index.fv          ← 事件声明
└── src/
    └── logic/
        └── login/
            └── index_logic.cpp ← 事件实现

逻辑函数需定义在 FV_LOGIC_CLASS_BEGIN 和 FV_LOGIC_CLASS_END 之间。

许可

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft