|
@@ -96,8 +96,8 @@ export const formConfig: Config = {
|
|
{
|
|
{
|
|
type: 'input',
|
|
type: 'input',
|
|
field: 'defaultValue',
|
|
field: 'defaultValue',
|
|
- label: '默认值',
|
|
|
|
- title: '默认值',
|
|
|
|
|
|
+ label: '提示词',
|
|
|
|
+ title: '提示词',
|
|
on: {
|
|
on: {
|
|
change: (val: string) => {
|
|
change: (val: string) => {
|
|
rule.value = val
|
|
rule.value = val
|
|
@@ -107,22 +107,20 @@ export const formConfig: Config = {
|
|
]
|
|
]
|
|
},
|
|
},
|
|
},
|
|
},
|
|
- input: {
|
|
|
|
- append: true,
|
|
|
|
- rule(rule) {
|
|
|
|
- return [
|
|
|
|
- {
|
|
|
|
- type: 'rc-switch',
|
|
|
|
- field: 'synchronize_field',
|
|
|
|
- label: '高级功能',
|
|
|
|
- title: '高级功能',
|
|
|
|
- props: {
|
|
|
|
- rule,
|
|
|
|
- },
|
|
|
|
|
|
+ input: (rule) => {
|
|
|
|
+ return [
|
|
|
|
+ {
|
|
|
|
+ type: 'rc-switch',
|
|
|
|
+ field: 'synchronize_field',
|
|
|
|
+ label: '高级功能',
|
|
|
|
+ title: '高级功能',
|
|
|
|
+ props: {
|
|
|
|
+ rule,
|
|
},
|
|
},
|
|
- ]
|
|
|
|
- },
|
|
|
|
|
|
+ },
|
|
|
|
+ ]
|
|
},
|
|
},
|
|
|
|
+
|
|
textarea: {
|
|
textarea: {
|
|
append: true,
|
|
append: true,
|
|
rule(rule) {
|
|
rule(rule) {
|
|
@@ -189,8 +187,6 @@ const formatOptions = (result: any) => {
|
|
options: result.original.options,
|
|
options: result.original.options,
|
|
form_content: result.rule
|
|
form_content: result.rule
|
|
.map((item: any) => {
|
|
.map((item: any) => {
|
|
- console.log(item)
|
|
|
|
-
|
|
|
|
const formContentValue = {
|
|
const formContentValue = {
|
|
field_name: item.title, // 字段名称
|
|
field_name: item.title, // 字段名称
|
|
field_type: item.type.startsWith('rc-') ? item.type.substring(3) : item.type, // rc- 前缀
|
|
field_type: item.type.startsWith('rc-') ? item.type.substring(3) : item.type, // rc- 前缀
|
|
@@ -202,6 +198,7 @@ const formatOptions = (result: any) => {
|
|
tags: op.tags.map((i: any) => i.tag_id),
|
|
tags: op.tags.map((i: any) => i.tag_id),
|
|
})),
|
|
})),
|
|
synchronize_field: item.synchronize_field,
|
|
synchronize_field: item.synchronize_field,
|
|
|
|
+ submit_count: 0,
|
|
}
|
|
}
|
|
|
|
|
|
if (item.props?.type === 'textarea') {
|
|
if (item.props?.type === 'textarea') {
|