1
0
Fork 0
phizclip-desktop-demo/examples/electron/README.md

59 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# finclip-electron-demo
## 通用步骤与功能介绍
快速开始前请先阅读以下链接
[Finclip桌面版Demo集成指引与功能介绍](https://github.com/finogeeks/finclip-desktop-demo/tree/master/examples/README.md)
## 快速开始
```
npm i
npm run start
```
## 调用finclip api
1. 引入finclip依赖包
注意只能在electron的主进程使用
```
const finclip = require('finclip');
```
2. 设置启动参数
```
finclip.setDomain('xxx');
finclip.setAppkey('xxx');
finclip.setAppid('xxx');
finclip.setSecret('xxx');
```
3. 打开finclip窗口
finclipPath为finclip.exe所在位置需转换成绝对路径
```
finclip.start({
handle: 0,
finclipPath,
});
```
4. 关闭finclip窗口
```
finclip.close();
```
5. 设置finclip窗口的位置和大小
```
finclip.setPosition({ width: 800, height: 800, left: 0, top: 0 });
```
## 修改finclip依赖包
如果默认的finclip包无法满足需求可以在此项目的`src/npm`下修改并编译需要先配置C++环境