
Security News
PodRocket Podcast: Inside the Recent npm Supply Chain Attacks
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
@dzc/formula-edit
Advanced tools
react计算公式编辑器
安装
npm install @dzc/formula-edit
使用
<FormulaEdit
theme="day" // 主题
height={200} // 高度
defaultValue={defaultCode} // 初始化值
fieldList={fieldList} // @唤起
methodList={methodList} // #唤起
normalList={normalList} // 自定义无需校验关键词
readOnly={false} // 是否只读
lineNumber={true} // 是否显示列数
onChange={getCode} // 回调
/>
fieldList: [
{ name: "放款金额", value: "fkje"},
{ name: "实际放款金额", value: "sjfkje"},
{ name: "借款人姓名", value: "jkrxm"},
{ name: "借款人手机号", value: "jkrsjh"},
{ name: "借款人身份证", value: "jkrsfz"},
],
methodList: [
{ name: "平均值", value: "平均值(,)", realValue: "avg" },
{ name: "最大值", value: "最大值(,)", realValue: "max" },
{ name: "最小值", value: "最小值(,)", realValue: "min" },
{ name: "求和", value: "求和(,)", realValue: "sum" }
],
normalList: [
{ name: "且", value: "and" },
{ name: "或", value: "or" }
],
参数 | 类型 | 默认值 | 是否必填 | 说明 |
---|---|---|---|---|
defaultValue | string | 无 | 非必填 | 初始化赋值 |
height | number | 300 | 非必填 | 高度设置 |
theme | string | day | 非必填 | 主题: 目前只支持两种:day,night |
readOnly | boolean | false | 非必填 | 设置只读 |
lineNumber | boolean | false | 非必填 | 设置行号 |
fieldList | array | 无 | 非必填 | 字段列表 |
methodList | array | 无 | 非必填 | 方法列表 |
normalList | array | 无 | 非必填 | 自定义关键词列表 |
onChange | function(code, obj) | 无 | 非必填 | 返回code, obj |
方法 | 类型 | 说明 |
---|---|---|
fullScreen() | function | 全屏 |
exitFullScreen() | function | 退出全屏 |
insertValue(value) | function | 光标处插入值 |
MIT
FAQs
react计算公式编辑器
The npm package @dzc/formula-edit receives a total of 3 weekly downloads. As such, @dzc/formula-edit popularity was classified as not popular.
We found that @dzc/formula-edit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.