
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
vue3-form-design
Advanced tools
基于 Vue3.0 + TS 的自定义表单生成器。支持 npm 与 cdn 引入的方式。UI 库支持 ant-design-vue 与 element-plus。
不想在全局安装也可以在组件内直接使用相应的组件。
import {
AntdDesignForm,
ElDesignForm,
AntdGenerateForm,
ElGenerateForm
} from 'vue-form-create'
npm 引入
import { createApp } from 'vue'
import antd from 'ant-design-vue'
import App from './App.vue'
import DesignForm from 'vue-form-create'
import 'ant-design-vue/dist/antd.css'
createApp(App)
.use(antd)
.use(DesignForm)
.mount('#app')
<template>
<AntdDesignForm ref="designForm" />
</template>
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
preview | 设计器预览操作按钮 | boolean | true |
generateCode | 设计器生成代码按钮 | boolean | true |
generateJson | 设计器生成 Json 按钮 | boolean | true |
uploadJson | 设计器导入 JSON 按钮 | boolean | true |
clearable | 设计器清空按钮 | boolean | true |
basicFields | 设计器左侧基础字段配置 | array | - |
advanceFields | 设计器左侧高级字段配置 | array | - |
layoutFields | 设计器左侧布局字段配置 | array | - |
通过 ref 可以获取到实例并调用实例方法
方法名 | 说明 | 参数 |
---|---|---|
getJson() | 获取设计器配置的 JSON 数据 | - |
setJson(value) | 设置设计器的配置信息 | 通过 getJson 获取的数据 |
clear() | 清空设计器 | |
getTemplate(type) | 获取设计器生成的可以直接使用的代码 | type 的类型为 'vue' 或 'html' |
基础字段(basicFields)
type | 字段名 |
---|---|
input | 单行文本 |
password | 密码框 |
textarea | 多行文本 |
number | 计数器 |
radio | 单选框组 |
checkbox | 多选框组 |
time | 时间选择器 |
date | 日期选择器 |
rate | 评分 |
select | 下拉选择框 |
switch | 开关 |
slider | 滑块 |
text | 文字 |
高级字段(advanceFields)
type | 字段名 |
---|---|
img-upload | 图片 |
richtext-editor | 富文本编辑器 |
cascader | 级联选择器 |
布局字段(layoutFields)
type | 字段名 |
---|---|
grid | 栅格布局 |
<template>
<AntdGenerateForm ref="generateForm" />
</template>
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
data | 表单 json 配置数据(从表单设计器获取的 json) | object | - |
value | 表单数据(从表单生成器获取的 value) | object | - |
disabled | 是否禁用 | boolean | false |
通过 ref 可以获取到实例并调用实例方法
方法名 | 说明 | 参数 |
---|---|---|
getData() | 获取表单数据(返回 Promise) | - |
reset() | 重置表单数据 | 通过 getJson 获取的数据 |
单选框,多选框,下拉选择框、级联选择器等选择项需要通过数据生成,这时可以配置远端数据。
设置远端方法地址与返回值。
填写服务器上传地址、参数名等配置信息。
FAQs
一个基于Vue3.0 + TS 的表单设计器
We found that vue3-form-design demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.