-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d83babe
commit 6e644f6
Showing
8 changed files
with
178 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,28 @@ | ||
export function 绑定窗口事件(c, 组件) { | ||
import { | ||
E获取系统时间 | ||
} from "../../wailsjs/go/main/App"; | ||
|
||
export function 绑定窗口事件(c, 组件) { | ||
const 程序集变量 = { | ||
time: null | ||
} | ||
c.按钮2被单击 = function () { | ||
console.log("按钮2被单击") | ||
组件.编辑框1.内容 = "祖国你好!" | ||
} | ||
|
||
c.按钮_获取时间被单击 = async () => { | ||
console.log("按钮_获取时间被单击") | ||
//js | ||
//组件.编辑框_时间.内容 = new Date().toLocaleString() | ||
//go | ||
组件.编辑框_时间.内容 = await E获取系统时间() | ||
|
||
clearInterval(程序集变量.time) | ||
程序集变量.time = setInterval(async () => { ( | ||
组件.编辑框_时间.内容 = await E获取系统时间() | ||
) }, 1000) | ||
|
||
} | ||
//事件函数位置不要删除 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.