Commit 16c6ea91 authored by 田翔's avatar 田翔

fix: 防止出现重新取字段名问题

parent a17408a5
{
"name": "panda-xform",
"version": "1.6.4",
"description": "1.6.4: 下拉框配置联动逻辑修复,前端处理这个问题",
"version": "1.6.5",
"description": "1.6.5: 防止出现重新取字段名问题",
"keywords": [
"panda-xform"
],
......
......@@ -38,6 +38,15 @@ export function getStationListByUserID(id, isAll) {
});
}
//人员选择器获取
export function getUserSelector(role, userID) {
return request({
// url: `/PandaWorkFlow/WorkFlow/WorkFlow/GetUserSelector?${role ? 'role=' + role : ''}${userID ? '$userID=' + userID : ''}`,
url: `/PandaWorkFlow/WorkFlow/WorkFlow/GetUserSelector`,
method: 'get',
});
}
// 人员选择器查询
export function getUserListForRole(params) {
return request({
......
......@@ -795,13 +795,10 @@ const selectWidgets = [
},
soruceType: {
title: '来源方式',
name: '来源方式',
name: '下拉框',
type: 'string',
// widget: 'select',
widget: 'SoruceType',
default: '手动输入',
// enum: ['手动输入', '数据字典', '表数据', '站点'],
// enumNames: ['手动输入', '数据字典', '表数据', '站点'],
displayType: 'row',
labelWidth: 80,
},
......@@ -1001,13 +998,6 @@ const selectWidgets = [
displayType: 'row',
labelWidth: 80,
},
// placeholder: {
// title: '提示语',
// type: 'string',
// // widget: 'Placeholder',
// displayType: 'row',
// labelWidth: 80,
// },
presetValue: {
title: '默认值',
type: 'string',
......@@ -1021,12 +1011,10 @@ const selectWidgets = [
},
soruceType: {
title: '来源方式',
name: '来源方式',
name: '单选框',
type: 'string',
widget: 'select',
widget: 'SoruceType',
default: '手动输入',
enum: ['手动输入', '数据字典'],
enumNames: ['手动输入', '数据字典'],
displayType: 'row',
labelWidth: 80,
},
......@@ -1034,6 +1022,7 @@ const selectWidgets = [
title: '',
name: '选项',
type: 'array',
required: '{{formData.soruceType === "手动输入"}}',
hidden: '{{formData.soruceType !== "手动输入"}}',
default: [],
widget: 'simpleList',
......@@ -1066,7 +1055,7 @@ const selectWidgets = [
dictionary: {
title: '{{formData.soruceType}}',
name: '{{formData.soruceType}}',
// required: true,
required: '{{formData.soruceType === "数据字典"}}',
hidden: '{{formData.soruceType !== "数据字典"}}',
type: 'string',
widget: 'Dictionary',
......@@ -1179,12 +1168,10 @@ const selectWidgets = [
},
soruceType: {
title: '来源方式',
name: '来源方式',
name: '复选框',
type: 'string',
widget: 'select',
widget: 'SoruceType',
default: '手动输入',
enum: ['手动输入', '数据字典'],
enumNames: ['手动输入', '数据字典'],
displayType: 'row',
labelWidth: 80,
},
......@@ -1192,6 +1179,7 @@ const selectWidgets = [
title: '',
name: '选项',
type: 'array',
required: '{{formData.soruceType === "手动输入"}}',
hidden: '{{formData.soruceType !== "手动输入"}}',
default: [],
widget: 'simpleList',
......@@ -1224,7 +1212,7 @@ const selectWidgets = [
dictionary: {
title: '{{formData.soruceType}}',
name: '{{formData.soruceType}}',
// required: true,
required: '{{formData.soruceType === "数据字典"}}',
hidden: '{{formData.soruceType !== "数据字典"}}',
type: 'string',
widget: 'Dictionary',
......@@ -1735,10 +1723,12 @@ const businessWidgets = [
interactiveType: {
title: '交互方式',
type: 'string',
enum: ['下拉框', '分组模态'],
widget: 'select',
enum: ['下拉框', '分组模态', '树形模态'],
default: '下拉框',
enumNames: ['下拉框', '分组模态'],
widget: 'radio',
enumNames: ['下拉框', '分组模态', '树形模态'],
displayType: 'row',
labelWidth: 80,
},
width: {
title: '元素宽度',
......
......@@ -21,6 +21,17 @@ const FormDesigner = (props, ref) => {
const designerRef = useRef(null)
const formRenderRef = useRef(null)
const settingsParent = useMemo(() => {
let settingsParent = []
settings.forEach(v => {
v.widgets.forEach(s => {
s.schema = { ...s.schema, tableNameParent: tableName }
})
settingsParent.push(v)
})
return settingsParent
}, [settings, tableName])
const getJSON = (json, tableName) => {
let parent = json?.properties
if (isObject(parent)) {
......@@ -155,7 +166,7 @@ const FormDesigner = (props, ref) => {
ref={designerRef}
extraButtons={extraButtons}
widgets={widgets}
settings={settings}
settings={settingsParent}
commonSettings={baseSettings}
globalSettings={globalSettings}
onSchemaChange={onSchemaChange}
......
import React, { useEffect, useMemo, useState } from 'react'
import { Select, Input, message, Modal, Spin, Checkbox, Row, Col, Radio } from 'antd'
import { UserAddOutlined } from '@ant-design/icons'
import styles from '../index.less'
import { getMenTreeByRole, getUserListForRole } from '../../../../../apis/process'
const UserGroup = (props) => {
const userID = window?.globalConfig?.userInfo?.OID || 1
const { value, onChange, schema, addons } = props
const { disabled, isMultiple, placeholder, presetValue, role, isStoreID } = schema
const [groupPerson, setGroupPerson] = useState([])
const [visible, setVisible] = useState(false)
const [loading, setLoading] = useState(false)
const [check, setCheck] = useState([])
const [radio, setRadio] = useState(null)
const [search, setSearch] = useState(null)
const groupPersonShow = useMemo(() => {
if (search) {
let array = []
groupPerson.forEach(v => {
let userList = []
let noShowParent = !v.ouName.includes(search)
console.log(noShowParent, v.ouName, search)
v.userList.forEach(s => {
let noShow = !s.userName.includes(search)
if (!noShow) {
noShowParent = false
}
userList.push({ ...s, noShow: !noShowParent ? noShowParent : noShow })
})
array.push({ ...v, userList, noShow: noShowParent })
})
return array
}
return groupPerson
}, [search, groupPerson])
const onOk = () => {
if (addons) {
addons.setValue(addons.dataPath, isMultiple ? check.join(',') : radio)
}
setVisible(false)
}
const inputChange = (value) => {
setSearch(value)
}
const checkChange = (value) => {
setCheck(value)
}
const radioChange = (e) => {
setRadio(e.target.value)
}
const checkGroup = (v, type) => {
let array = v.userList.map(v => v.userName)
if (type === 'true') {
setCheck(check.filter(v => !array.includes(v)))
} else {
setCheck(Array.from(new Set([...check, ...array])))
}
}
const getGorupType = (v, checkCount) => {
if (checkCount === 0) {
return 'false'
} else if (v.userList.length === checkCount) {
return 'true'
}
return 'other'
}
const inputFocus = async () => {
if (addons) {
setVisible(true)
setLoading(true)
const { code, data, msg } = await getUserListForRole({})
if (code === 0) {
if (Array.isArray(data)) {
setGroupPerson(data)
}
} else {
message.error(msg)
}
setLoading(false)
}
}
const getCount = (v) => {
let array = v.userList.filter(s => check.includes(s.userName))
if (Array.isArray(array)) {
return array.length
}
return 0
}
useEffect(() => {
if (isMultiple) {
setCheck(value ? value.split(',') : [])
} else {
setRadio(value)
}
}, [isMultiple, value])
return (
<div className={styles.personGroup}>
<Input
disabled={disabled}
value={isMultiple ? (value ? value.split(',') : []) : value}
placeholder={disabled ? null : placeholder}
onClick={inputFocus}
addonAfter={disabled ? null : <UserAddOutlined style={{ color: 'rgba(0, 0, 0, 0.25)' }} onClick={inputFocus} />}
style={{ width: '100%' }}
/>
<Modal
title='人员选择器'
visible={visible}
bodyStyle={{ height: 450 }}
onCancel={() => setVisible(false)}
onOk={onOk}
getContainer={false}
>
<Spin
spinning={loading}
>
<Input.Search
placeholder='请输入姓名'
allowClear
enterButton
value={search}
onChange={(e) => inputChange(e.target.value)}
/>
{
isMultiple ?
<Checkbox.Group
style={{ width: '100%', height: '400px', overflow: 'auto', marginTop: '10px' }}
value={check}
onChange={checkChange}
>
{
groupPersonShow.map(v => {
let checkCount = getCount(v)
let type = getGorupType(v, checkCount)
return (
<div className={styles.groupUser} style={{ display: v.noShow ? 'none' : 'block' }}>
<div className={styles.groupName} onClick={() => checkGroup(v, type)}>
<span className={styles.groupCheck} type={type}></span>
<span>{v.ouName + `${checkCount}/${v.userList.length}`}</span>
</div>
<Row style={{ paddingLeft: '40px' }}>
{
v.userList.map(s => {
return (
<Col span={8} key={s.userID} style={{ margin: '8px 0', display: s.noShow ? 'none' : 'block' }}>
<Checkbox
value={s.userName}
>
<div>{s.userName}</div>
</Checkbox>
</Col>
)
})
}
</Row>
</div>
)
})
}
</Checkbox.Group>
:
<Radio.Group
value={radio}
onChange={radioChange}
style={{ width: '100%', height: '400px', overflow: 'auto', marginTop: '10px' }}
>
{
groupPersonShow.map(v => {
let checkCount = getCount(v)
let type = getGorupType(v, checkCount)
return (
<div className={styles.groupUser} style={{ display: v.noShow ? 'none' : 'block' }} key={v.ouid}>
<div className={styles.groupName}>
<span style={{ fontSize: '14px', fontWeight: 'bold' }}>{v.ouName}</span>
</div>
<Row style={{ paddingLeft: '40px' }}>
{
v.userList.map(s => {
return (
<Col span={8} style={{ margin: '8px 0', display: s.noShow ? 'none' : 'block' }} key={s.userID}>
<Radio
value={s.userName}
>
<div>{s.userName}</div>
</Radio>
</Col>
)
})
}
</Row>
</div>
)
})
}
</Radio.Group>
}
</Spin>
</Modal>
</div>
)
}
export default UserGroup
\ No newline at end of file
import React, { useEffect, useMemo, useState } from 'react'
import { Select, Input, message, Modal, Spin, Checkbox, Row, Col, Radio } from 'antd'
import { UserAddOutlined } from '@ant-design/icons'
import { getMenTreeByRole, getUserListForRole } from '../../../../../apis/process'
const UserSelect = (props) => {
const userID = window?.globalConfig?.userInfo?.OID || 1
const { value, onChange, schema, addons } = props
const { disabled, isMultiple, placeholder, role, isStoreID } = schema
const [pullDown, setPullDown] = useState([])
const selectFocus = async () => {
if (!role) {
return message.error('请配置机构角色!')
}
const { code, data, msg } = await getMenTreeByRole({ userID, role: role })
if (code === 0) {
if (data && data.childNodes) {
setPullDown(data.childNodes)
} else {
setPullDown([])
}
} else {
message.info(msg)
}
}
const selectChange = (value) => {
if (addons) {
onChange(isMultiple ? value.join(',') : value)
}
}
return (
<Select
mode={isMultiple ? 'multiple' : null}
placeholder={disabled ? null : placeholder}
value={isMultiple ? (value ? value.split(',') : []) : value}
disabled={disabled}
showArrow={!disabled}
showSearch={true}
style={{ width: '100%' }}
onFocus={selectFocus}
onChange={selectChange}
>
{pullDown.map(v => <Select.Option key={v.value} value={v.value}>{v.text}</Select.Option>)}
</Select>
)
}
export default UserSelect
\ No newline at end of file
import React, { useEffect, useMemo, useState } from 'react'
import { Input, Modal, Tree, message, Table } from 'antd'
import { UserAddOutlined, DownOutlined } from '@ant-design/icons'
import { getUserSelector } from '../../../../../apis/process'
import styles from '../index.less'
const columns = [
{
title: '序号',
render: (r, t, i) => i + 1
},
{
title: '用户名',
dataIndex: 'loginName',
key: 'loginName',
},
{
title: '用户名',
dataIndex: 'userName',
key: 'userName',
}
]
const getUserList = (treeData, treeKey) => {
let array = []
if (Array.isArray(treeData)) {
treeData.forEach(v => {
if (v.ouCode === treeKey[0]) {
if (Array.isArray(v.userList)) {
array.push(...v.userList)
}
}
array.push(...getUserList(v.children, treeKey))
})
}
return array
}
const getSelectUser = (treeData, selectKeys, property) => {
let array = []
if (Array.isArray(treeData)) {
treeData.forEach(v => {
if (Array.isArray(v.userList)) {
v.userList.forEach(s => {
if (selectKeys.includes(s[property])) {
array.push(s)
}
})
}
// if (v.ouCode === treeKey[0]) {
// if (Array.isArray(v.userList)) {
// array.push(...v.userList)
// }
// }
array.push(...getSelectUser(v.children, selectKeys, property))
})
}
return array
}
const UserTree = (props) => {
const userID = window?.globalConfig?.userInfo?.OID || 1
const { value, onChange, schema, addons } = props
const { disabled, isMultiple, placeholder, presetValue, role, isStoreID } = schema
const property = isStoreID ? 'userID' : 'userName'
const [visible, setVisible] = useState(false)
const [treeData, setTreeData] = useState([])
const [treeKey, setTreeKey] = useState([])
const [users, setUsers] = useState([])
const userList = useMemo(() => {
return getUserList(treeData, treeKey)
}, [treeData, treeKey])
const selectKeys = useMemo(() => {
return value ? value.split(',') : []
}, [value, property])
const selectUser = useMemo(() => {
return getSelectUser(treeData, selectKeys, property)
}, [treeData, selectKeys, property])
const inputFocus = async () => {
setVisible(true)
const { code, data, msg } = await getUserSelector()
if (code === 0) {
setTreeData(data.treeList)
} else {
message.error(msg)
}
}
const onOk = () => {
}
const treeChange = (value) => {
setTreeKey(value)
}
return (
<div className={styles.userTree}>
<Input
disabled={disabled}
value={isMultiple ? (value ? value.split(',') : []) : value}
placeholder={disabled ? null : placeholder}
onClick={inputFocus}
addonAfter={disabled ? null : <UserAddOutlined style={{ color: 'rgba(0, 0, 0, 0.25)' }} onClick={inputFocus} />}
style={{ width: '100%' }}
/>
<Modal
width='60%'
title='人员选择器'
visible={visible}
bodyStyle={{ height: '600px' }}
onCancel={() => setVisible(false)}
onOk={onOk}
getContainer={false}
>
<div className={styles.box}>
<div className={styles.left}>
<div className={styles.title}>部门列表</div>
<div className={styles.tree}>
<Tree
value={treeKey}
fieldNames={{ title: 'ouName', key: 'ouCode' }}
showIcon
defaultExpandAll
defaultSelectedKeys={['0-0-0']}
switcherIcon={<DownOutlined />}
treeData={treeData}
onSelect={treeChange}
/>
</div>
</div>
<div className={styles.right}>
<div className={styles.title}>
<Input.Search placeholder='请输入姓名进行查找' style={{ width: '300px' }} />
</div>
<div className={styles.list}>
<div className={styles.userList}>
<div className={styles.userStatus}>待选人员</div>
<Table
rowKey={r => r[property]}
size='small'
columns={columns}
dataSource={userList}
pagination={false}
bordered
rowSelection={{
type: 'checkbox',
selectedRowKeys: selectKeys,
onChange: (select) => {
console.log('select', select)
let array = value ? value.split(',') : []
let users = array.concat(select)
onChange(users.join(','))
}
}}
scroll={{ y: 180 }}
/>
</div>
<div className={styles.selectList}>
<div className={styles.userStatus}>已选人员</div>
<Table
rowKey={r => r[property]}
rowSelection={{
type: 'checkbox',
selectedRowKeys: selectKeys,
onChange: (select) => {
onChange(select.join(','))
}
}}
size='small'
columns={columns}
dataSource={selectUser}
pagination={false}
bordered
scroll={{ y: 180 }}
/>
</div>
</div>
</div>
</div>
</Modal>
</div>
)
}
export default UserTree
\ No newline at end of file
import React, { useEffect, useMemo, useState } from 'react'
import { Select, Input, message, Modal, Spin, Checkbox, Row, Col, Radio } from 'antd'
import { UserAddOutlined } from '@ant-design/icons'
import { getMenTreeByRole, getUserListForRole } from '../../../../apis/process'
import styles from './index.less'
import React, { useEffect } from 'react'
import UserSelect from './components/UserSelect'
import UserGroup from './components/UserGroup'
import UserTree from './components/UserTree'
const PersonSelector = (props) => {
const userID = window?.globalConfig?.userInfo?.OID || 1
const { value, onChange, schema, addons } = props
const { disabled, interactiveType, isMultiple, placeholder, presetValue, role, isStoreID } = schema
const [pullDown, setPullDown] = useState([])
const [groupPerson, setGroupPerson] = useState([])
const [visible, setVisible] = useState(false)
const [loading, setLoading] = useState(false)
const [check, setCheck] = useState([])
const [radio, setRadio] = useState(null)
const [search, setSearch] = useState(null)
const groupPersonShow = useMemo(() => {
if (search) {
let array = []
groupPerson.forEach(v => {
let userList = []
let noShowParent = !v.ouName.includes(search)
console.log(noShowParent, v.ouName, search)
v.userList.forEach(s => {
let noShow = !s.userName.includes(search)
if (!noShow) {
noShowParent = false
}
userList.push({ ...s, noShow: !noShowParent ? noShowParent : noShow })
})
array.push({ ...v, userList, noShow: noShowParent })
})
return array
}
return groupPerson
}, [search, groupPerson])
const onOk = () => {
if (addons) {
addons.setValue(addons.dataPath, isMultiple ? check.join(',') : radio)
}
setVisible(false)
}
const inputChange = (value) => {
setSearch(value)
}
const checkChange = (value) => {
setCheck(value)
}
const radioChange = (e) => {
setRadio(e.target.value)
}
const checkGroup = (v, type) => {
let array = v.userList.map(v => v.userName)
if (type === 'true') {
setCheck(check.filter(v => !array.includes(v)))
} else {
setCheck(Array.from(new Set([...check, ...array])))
}
}
const getGorupType = (v, checkCount) => {
if (checkCount === 0) {
return 'false'
} else if (v.userList.length === checkCount) {
return 'true'
}
return 'other'
}
const selectFocus = async () => {
if (!role) {
return message.error('请配置机构角色!')
}
const { code, data, msg } = await getMenTreeByRole({ userID, role: role })
if (code === 0) {
if (data && data.childNodes) {
setPullDown(data.childNodes)
} else {
setPullDown([])
}
} else {
message.info(msg)
}
}
const selectChange = (value) => {
if (addons) {
onChange(isMultiple ? value.join(',') : value)
// addons.setValue(addons.dataPath, isMultiple ? value.join(',') : value)
}
}
const inputFocus = async () => {
if (addons) {
setVisible(true)
setLoading(true)
const { code, data, msg } = await getUserListForRole({})
if (code === 0) {
if (Array.isArray(data)) {
setGroupPerson(data)
}
} else {
message.error(msg)
}
setLoading(false)
}
}
const getCount = (v) => {
let array = v.userList.filter(s => check.includes(s.userName))
if (Array.isArray(array)) {
return array.length
}
return 0
}
const { onChange, schema, addons } = props
const { presetValue, interactiveType } = schema
useEffect(() => {
if (addons) {
......@@ -130,137 +16,14 @@ const PersonSelector = (props) => {
}
}, [presetValue])
useEffect(() => {
if (isMultiple) {
setCheck(value ? value.split(',') : [])
} else {
setRadio(value)
}
}, [isMultiple, value])
if (interactiveType === '分组模态') {
return (
<div className={styles.personGroup}>
<Input
disabled={disabled}
value={isMultiple ? (value ? value.split(',') : []) : value}
placeholder={disabled ? null : placeholder}
onClick={inputFocus}
addonAfter={disabled ? null : <UserAddOutlined style={{ color: 'rgba(0, 0, 0, 0.25)' }} onClick={inputFocus} />}
style={{ width: '100%' }}
/>
<Modal
title='人员选择器'
visible={visible}
bodyStyle={{ height: 450 }}
onCancel={() => setVisible(false)}
onOk={onOk}
getContainer={false}
>
<Spin
spinning={loading}
>
<Input.Search
placeholder='请输入姓名'
allowClear
enterButton
value={search}
onChange={(e) => inputChange(e.target.value)}
/>
{
isMultiple ?
<Checkbox.Group
style={{ width: '100%', height: '400px', overflow: 'auto', marginTop: '10px' }}
value={check}
onChange={checkChange}
>
{
groupPersonShow.map(v => {
let checkCount = getCount(v)
let type = getGorupType(v, checkCount)
return (
<div className={styles.groupUser} style={{ display: v.noShow ? 'none' : 'block' }}>
<div className={styles.groupName} onClick={() => checkGroup(v, type)}>
<span className={styles.groupCheck} type={type}></span>
<span>{v.ouName + `${checkCount}/${v.userList.length}`}</span>
</div>
<Row style={{ paddingLeft: '40px' }}>
{
v.userList.map(s => {
return (
<Col span={8} key={s.userID} style={{ margin: '8px 0', display: s.noShow ? 'none' : 'block' }}>
<Checkbox
value={s.userName}
>
<div>{s.userName}</div>
</Checkbox>
</Col>
)
})
}
</Row>
</div>
)
})
}
</Checkbox.Group>
:
<Radio.Group
value={radio}
onChange={radioChange}
style={{ width: '100%', height: '400px', overflow: 'auto', marginTop: '10px' }}
>
{
groupPersonShow.map(v => {
let checkCount = getCount(v)
let type = getGorupType(v, checkCount)
return (
<div className={styles.groupUser} style={{ display: v.noShow ? 'none' : 'block' }} key={v.ouid}>
<div className={styles.groupName}>
<span style={{ fontSize: '14px', fontWeight: 'bold' }}>{v.ouName}</span>
</div>
<Row style={{ paddingLeft: '40px' }}>
{
v.userList.map(s => {
return (
<Col span={8} style={{ margin: '8px 0', display: s.noShow ? 'none' : 'block' }} key={s.userID}>
<Radio
value={s.userName}
>
<div>{s.userName}</div>
</Radio>
</Col>
)
})
}
</Row>
</div>
)
})
}
</Radio.Group>
}
</Spin>
</Modal>
</div>
)
return <UserGroup {...props} />
} else if (interactiveType === '树形模态') {
return <UserTree {...props} />
} else if (interactiveType === '下拉框') {
return <UserSelect {...props} />
}
return (
<Select
mode={isMultiple ? 'multiple' : null}
placeholder={disabled ? null : placeholder}
value={isMultiple ? (value ? value.split(',') : []) : value}
disabled={disabled}
showArrow={!disabled}
showSearch={true}
style={{ width: '100%' }}
onFocus={selectFocus}
onChange={selectChange}
>
{pullDown.map(v => <Select.Option key={v.value} value={v.value}>{v.text}</Select.Option>)}
</Select>
)
return null
}
......
......@@ -57,4 +57,59 @@
}
}
}
}
.userTree {
.box {
width: 100%;
height: 100%;
display: flex;
.left {
width: 300px;
border: 1px solid #ede9e9;
margin-right: 10px;
.title {
font-weight: bold;
height: 40px;
line-height: 40px;
padding-left: 10px;
font-size: 14px;
border-bottom: 1px solid #ede9e9;
}
.tree {
height: calc(100% - 40px);
overflow: auto;
padding: 10px;
}
}
.right {
flex: 1;
border: 1px solid #ede9e9;
.title {
padding-left: 10px;
padding-top: 3px;
height: 40px;
border-bottom: 1px solid #ede9e9;
}
.list {
padding: 10px;
.userList {
height: 260px;
.userStatus {
font-size: 12px;
font-weight: bold;
padding-bottom: 10px;
}
}
.selectList {
height: 260px;
.userStatus {
font-size: 12px;
font-weight: bold;
padding-bottom: 10px;
}
}
}
}
}
}
\ No newline at end of file
......@@ -7,7 +7,7 @@ const NumerDefault = (props) => {
return (
<InputNumber
value={value}
value={Number(value)}
onChange={value => onChange(Number(value))}
/>
)
......
import React, { useMemo } from 'react'
import { Select } from 'antd'
const options = [
const initOptions = [
{ label: '手动输入', value: '手动输入' },
{ label: '数据字典', value: '数据字典' },
{ label: '表数据', value: '表数据' },
......@@ -11,6 +11,14 @@ const options = [
const SoruceType = (props) => {
const { value, onChange, schema, addons } = props
const { name } = schema
const options = useMemo(() => {
if ('下拉框' === name) {
return initOptions
}
return initOptions.splice(0, 2)
}, [name])
const selectChange = (e) => {
if (value === '手动输入') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment