
Company News
Jerod Santo Joins Socket as Head of Media
Allow myself to introduce... myself.
@thtf/wj-designer
Advanced tools
Vue 2.6.14+
Element-UI 2.15.8+
npm install @thtf/wj-designer
<wj-designer
style="height: 100vh"
/>
// 引用
import WjDesigner from '@thtf/wj-designer'
// 注册
Vue.use(WjDesigner)
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|---|---|---|---|---|
| modelType | 模式 | Number | 0:设计 1:再设计 2:填报 3:只读 4:预览 | 0 |
| formJSON | 表样数据 | Object | —— | {} |
| fillJSON | 填报数据 | Object | —— | {} |
| regionsApiUrl | 省市区接口地址 | String | —— | '' |
| cityId | 省市 id | String | —— | '' |
| areaId | 省市区 id | String | —— | '' |
| validateObj | 校验对象 | Object | —— | {} |
| cityArray | 原始省市数据 | Array | —— | [] |
| areaArray | 原始省市区数据 | Array | —— | [] |
| showSubmit | 显示提交按钮 | Boolean | —— | true |
| showHold | 显示暂存按钮 | Boolean | —— | false |
| submitTxt | 提交按钮文字 | String | —— | 提交 |
| stripe | 斑马条纹 | Boolean | —— | true |
| fileUploadApi | 上传文件接口 | Promise | —— | |
| fileDeleteApi | 上传删除接口 | Promise | —— | |
| baseUrl | 文件下载前缀 | String | —— | '' |
| designDialogObj | 弹框属性对象 | Object | —— | {center: true,closeOnClickModal: true} |
| 事件名称 | 说明 | 回调参数 |
|---|---|---|
| designSubmit | 表样提交 | 表样数据: formJSON |
| submit | 表单提交 | 填报数据: fillJSON |
| hold | 暂存 | 填报数据:fillJSON |
| validate | 表单校验 | 1:校验未通过 |
| repeatValidate | 重复判断 | 校验对象:validateObj |
| onCamera | 点击拍照 | 控件 id |
let validateObj = {
id: '',
isRepeat: false,
};
let validateObj = {
formId: '',
id: '',
type: '',
value: '',
};
let validateObj = {
// 表单id
formId: '',
// 表单题目列表
subjectList: {
// 普通题id
subjectId: [
{
// 题目选项或填空控件对应的id
valueId: '',
// 题目选项或填空的值
value: '',
},
],
},
};
| 方法名 | 说明 | 参数 |
|---|---|---|
| emitSubmit | 提交表单 | - |
| emitHold | 暂存 | - |
| setCameraPath | 设置照片路径 | - |
npm run build
npm login
npm publish
/src
/packages
FAQs
### 依赖
The npm package @thtf/wj-designer receives a total of 30 weekly downloads. As such, @thtf/wj-designer popularity was classified as not popular.
We found that @thtf/wj-designer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.

Company News
Allow myself to introduce... myself.

Research
/Security News
A Twitch browser extension on Chrome and Firefox forwards users’ live OAuth session tokens through proxies controlled by a Russian bot service.

Security News
Anthropic found biased reasoning and recklessness drove Claude Mythos 5 to publish malware on PyPI and compromise a security vendor.