@finapi/embeddable-web-form

中文文档
2.104.0发布于 2026/11/11MIT零依赖近 30 天下载 2463

用于整合 finAPI 可嵌入的 Web 格式的 Javascript 库

中文使用文档

一般情况

您可以使用我们的 npm 软件包整合可嵌入的网络形式 .

该包包含两个入门点——Javascript文件,和Typescript文件. 需要选择的入口由您决定 - 如果您的应用程序支持 Typescript 语言, 那么您可以随意使用 用于使用 finapi-embeddable-web-form. 组件.ts 文档. 如果您的应用程序不支持 Typescript 语言 - 请使用 finapi-embeddable-web-form.js (英语) 要导入库的文件.

为了使用我们包的最新版本, 请将版本值设置为 时间轴: 在您的主包。 json 文件.

整合示例

  • 请将以下作为可嵌入的网络形式与Angular app之间这种融合的例子:
import {Component, OnInit} from '@angular/core';
import {WebFormBuilder} from "@finapi/embeddable-web-form/finapi-embeddable-web-form";

@Component({
    selector: 'app-webform',
    templateUrl: '../../../node_modules/@finapi/embeddable-web-form/finapi-embeddable-web-form.component.html',
})
export class WebformComponent implements OnInit {
    private webFormToken: string;
    constructor() {
        this.webFormToken = 'web-form-token was here';
    }

    ngOnInit(): void {
        console.log('WebForm library has been imported');

        var webFormComponents =
            new WebFormBuilder(this.webFormToken, 'http://kraken:8085')
                .withCallbackUrl('http://127.0.0.1/dummy')
                .withOwnerDocument(document)
                .build();
        webFormComponents.startWebFormComponents();
    }

}
  • 可嵌入的web-form和ReactJS应用程序的整合的另一个实例:
import React from 'react';
import {WebFormBuilder} from '@finapi/embeddable-web-form/finapi-embeddable-web-form'

const serverUrl = 'http://kraken:8085';
const webFormToken = 'whatever';

function getWebForm() {
    let embeddableWebForm =
        new WebFormBuilder(webFormToken, serverUrl)
            .withOwnerDocument(document)
            .build();
    embeddableWebForm.startWebFormComponents();
}

const App = () => {
    return (
        <div>
            <button onClick={() => getWebForm()}>Render finAPI Web Form</button>
            <web-form-element></web-form-element>
        </div>
    );
};

export default App;

版本与发布记录

@finapi/embeddable-web-form 共发布 446 个版本,首次发布于 2020/06/30;过去 12 个月发布了 76 个版本。

版本发布日期距今
2.104.0latest2026/11/114 天前
2.103.22026/11/0410 天前
2.103.12026/10/2916 天前
2.103.02026/10/2718 天前
2.102.42026/10/2718 天前
2.102.32026/10/2223 天前

关于 @finapi/embeddable-web-form 的常见问题

@finapi/embeddable-web-form 是什么?

用于整合 finAPI 可嵌入的 Web 格式的 Javascript 库

如何安装 @finapi/embeddable-web-form?

在项目目录运行 npm install @finapi/embeddable-web-form,或使用 pnpm add / yarn add / bun add。

@finapi/embeddable-web-form 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/finapi__embeddable-web-form 是否存在。

@finapi/embeddable-web-form 可以商用吗?

@finapi/embeddable-web-form 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@finapi/embeddable-web-form 的下载量有多少?

根据 npm 官方下载统计,@finapi/embeddable-web-form 在 2026/10/15 – 2026/11/13 这 30 天内被下载 2,463 次,日均约 82 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@finapi/embeddable-web-form 还在维护吗?

最新版本 2.104.0 发布于 2026/11/11(4 天前);至今共发布 446 个版本,其中过去 12 个月发布了 76 个;首次发布于 2020/06/30。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。