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

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

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