|
|
|
|
@ -7,7 +7,7 @@ import { uploadSize } from "@/settings";
|
|
|
|
|
import axios from 'axios';
|
|
|
|
|
import { flowList } from "@/api/flow";
|
|
|
|
|
/**
|
|
|
|
|
* @param {String} device 'desktop' or 'mobile'
|
|
|
|
|
* @param {String} device 'desktop' | 'mobile'
|
|
|
|
|
* @param {Object} info field参数
|
|
|
|
|
* @param {CreateElement} h
|
|
|
|
|
* @param {Object} row 子表单的row
|
|
|
|
|
@ -949,6 +949,7 @@ export default function formBuilder(device, info, h, row, pWrite = false,pReadab
|
|
|
|
|
value: row ? row[info.name] : this.form[info.name],
|
|
|
|
|
clearable: true,
|
|
|
|
|
placeholder: info.help_text,
|
|
|
|
|
rules: this.rules[info.name]
|
|
|
|
|
},
|
|
|
|
|
attrs: {
|
|
|
|
|
placeholder: info.help_text,
|
|
|
|
|
@ -971,6 +972,7 @@ export default function formBuilder(device, info, h, row, pWrite = false,pReadab
|
|
|
|
|
value: row ? row[info.name] : this.form[info.name],
|
|
|
|
|
clearable: true,
|
|
|
|
|
placeholder: info.help_text,
|
|
|
|
|
rules: this.rules[info.name]
|
|
|
|
|
},
|
|
|
|
|
attrs: {
|
|
|
|
|
placeholder: info.help_text,
|
|
|
|
|
@ -994,6 +996,7 @@ export default function formBuilder(device, info, h, row, pWrite = false,pReadab
|
|
|
|
|
value: row ? row[info.name] : this.form[info.name],
|
|
|
|
|
clearable: true,
|
|
|
|
|
placeholder: info.help_text,
|
|
|
|
|
rules: this.rules[info.name]
|
|
|
|
|
},
|
|
|
|
|
attrs: {
|
|
|
|
|
placeholder: info.help_text,
|
|
|
|
|
@ -1017,6 +1020,8 @@ export default function formBuilder(device, info, h, row, pWrite = false,pReadab
|
|
|
|
|
value: row ? row[info.name] : this.form[info.name],
|
|
|
|
|
clearable: true,
|
|
|
|
|
placeholder: info.help_text,
|
|
|
|
|
rules: this.rules[info.name],
|
|
|
|
|
required: !!this.rules[info.name]?.find(j => j.required)
|
|
|
|
|
},
|
|
|
|
|
on: {
|
|
|
|
|
click: (_) => {
|
|
|
|
|
@ -1042,6 +1047,7 @@ export default function formBuilder(device, info, h, row, pWrite = false,pReadab
|
|
|
|
|
value: typeof findSelect === "object" ? findSelect.name : findSelect,
|
|
|
|
|
clearable: true,
|
|
|
|
|
placeholder: info.help_text,
|
|
|
|
|
rules: this.rules[info.name]
|
|
|
|
|
},
|
|
|
|
|
on: {
|
|
|
|
|
click: (_) => {
|
|
|
|
|
@ -1072,6 +1078,7 @@ export default function formBuilder(device, info, h, row, pWrite = false,pReadab
|
|
|
|
|
value: (findChoice instanceof Array) ? (findChoice.map(i => typeof i === "object" ? i.name : i).toString()) : (typeof findChoice === "object" ? findChoice.name : findChoice),
|
|
|
|
|
clearable: true,
|
|
|
|
|
placeholder: info.help_text,
|
|
|
|
|
rules: this.rules[info.name]
|
|
|
|
|
},
|
|
|
|
|
on: {
|
|
|
|
|
click: (_) => {
|
|
|
|
|
@ -1092,6 +1099,7 @@ export default function formBuilder(device, info, h, row, pWrite = false,pReadab
|
|
|
|
|
formItem = h('van-cell',{
|
|
|
|
|
props: {
|
|
|
|
|
title: info.label,
|
|
|
|
|
rules: this.rules[info.name]
|
|
|
|
|
}
|
|
|
|
|
},[
|
|
|
|
|
h(
|
|
|
|
|
@ -1236,6 +1244,7 @@ export default function formBuilder(device, info, h, row, pWrite = false,pReadab
|
|
|
|
|
value: typeof findFlow === "object" ? (findFlow.name || findFlow.title) : findFlow,
|
|
|
|
|
clearable: true,
|
|
|
|
|
placeholder: info.help_text,
|
|
|
|
|
rules: this.rules[info.name]
|
|
|
|
|
},
|
|
|
|
|
on: {
|
|
|
|
|
click: (_) => {
|
|
|
|
|
@ -1306,6 +1315,7 @@ export default function formBuilder(device, info, h, row, pWrite = false,pReadab
|
|
|
|
|
h(
|
|
|
|
|
"van-form",
|
|
|
|
|
{
|
|
|
|
|
ref: "vanForm",
|
|
|
|
|
props: {
|
|
|
|
|
"scroll-to-error": true,
|
|
|
|
|
},
|
|
|
|
|
|