Commit 59cc18cf authored by 田翔's avatar 田翔

fix: 预览配置时修改本人姓名的显示

parent ed047532
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "4.9.4", "version": "4.9.5",
"description": "4.9.4 富文本默认值修复", "description": "4.9.5 预览配置时修改本人姓名的显示",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
......
...@@ -116,6 +116,10 @@ const FormDesigner = (props, ref) => { ...@@ -116,6 +116,10 @@ const FormDesigner = (props, ref) => {
if (tableName) { if (tableName) {
getTableConfig(tableName) getTableConfig(tableName)
} }
sessionStorage.setItem('FormRender', 'preview')
return () => {
sessionStorage.removeItem('FormRender')
}
}, [tableName]) }, [tableName])
const clear = () => { const clear = () => {
......
...@@ -23,7 +23,8 @@ const debounce = (fn) => { ...@@ -23,7 +23,8 @@ const debounce = (fn) => {
const TextInput = (props) => { const TextInput = (props) => {
const userInfo = window?.globalConfig?.userInfo || { fullName: '【本人姓名】', depart: { name: '【本人部门】' } } const preview = sessionStorage.getItem('FormRender')
const userInfo = preview === 'preview' ? { fullName: '【本人姓名】', depart: { name: '【本人部门】' } } : window?.globalConfig?.userInfo || { fullName: '【本人姓名】', depart: { name: '【本人部门】' } }
const { value, onChange, schema, addons } = props const { value, onChange, schema, addons } = props
const { title, disabled, placeholder, presetValue, addonBefore, addonAfter, maxLength, rules, uniqueVerify, tableName, fieldName, isStoreID, textInputDefalut } = schema const { title, disabled, placeholder, presetValue, addonBefore, addonAfter, maxLength, rules, uniqueVerify, tableName, fieldName, isStoreID, textInputDefalut } = schema
...@@ -95,6 +96,7 @@ const TextInput = (props) => { ...@@ -95,6 +96,7 @@ const TextInput = (props) => {
return ( return (
<div className={styles.textInput} isdisabled={JSON.stringify(disabled)}> <div className={styles.textInput} isdisabled={JSON.stringify(disabled)}>
<Input <Input
style={{ color: ['【本人姓名】', '【本人部门】'].includes(value) ? 'blue' : '' }}
disabled={disabled} disabled={disabled}
value={valueShow} value={valueShow}
maxLength={maxLength} maxLength={maxLength}
......
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