Skip to content
Hacker News front pagefrizlab

ElementaryUI – Swift, in the Browser

ElementaryUI 让 Swift 代码直接在浏览器中运行,示例用 @View 结构体和 @State 状态构建交互界面。该示例通过 button 的 onClick 修改 count,在 count 小于 10 时显示 "More Love" 按钮,达到 10 后切换为 "Enough love for you!" 与重置按钮。

Read the original ↗Export Markdown