Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

msa-form

Package Overview
Dependencies
Maintainers
4
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

msa-form

MSA 动态表单

latest
Source
npmnpm
Version
0.0.18
Version published
Weekly downloads
5.1K
301.57%
Maintainers
4
Weekly downloads
 
Created
Source

msa-form

组件功能描述

Install

$ npm i msa-form  --save

Usage

import DynamicForm from 'msa-form';

自定义组件开发规范

组件名称规则: Component::${product}::${componentName} 组件源代码: /src/component/custom/${product}/ 组件中调用接口: /src/actions/${product}/index.ts 文档: /docs/${product}.md

开发规范

  • 支持受控模式

let value, onChange;
const formConfig = {
    "Title": "标题",
    "Envs": {},
    "Parameters": {
        "CustomComponent": {
            "Label": {
                "Zh-cn": "自定义组件",
                "En": "Custom Component"
            },
            "Component": "Component::${product}::${componentName}",
            "ComponentProps": {
                "Value": value,
                "Onchange": onChange,
            }
        }
    }
}

注意:ComponentProps中的value onchange事件需要放到field.init的第三个参数上。

  • 业务组件为选择框的需要使用 ResourceSelect。如自定义组件选中的资源依赖于其他资源(VPC,Region等),则需监听依赖资源变化情况,并通过ref 触发ResourceSelect组件的 getList事件,从而更新datasource。

Keywords

ice

FAQs

Package last updated on 21 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts