Commit 25dd0a7c authored by 田翔's avatar 田翔

fix: 增加图片水印配置

parent 59cc18cf
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "4.9.5", "version": "4.9.6",
"description": "4.9.5 预览配置时修改本人姓名的显示", "description": "4.9.6 增加图片水印配置",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
......
...@@ -2109,10 +2109,19 @@ const fileWidgets = [ ...@@ -2109,10 +2109,19 @@ const fileWidgets = [
photo: { photo: {
title: '允许从相册选取', title: '允许从相册选取',
type: 'boolean', type: 'boolean',
widget: 'checkbox', widget: 'BooleanSwitch',
description: '仅支持移动端',
default: false, default: false,
hidden: "{{!['图片', '视频'].includes(formData.fileType)}}" hidden: "{{!['图片', '视频'].includes(formData.fileType)}}"
}, },
watermark: {
title: '水印',
type: 'boolean',
widget: 'BooleanSwitch',
description: '图片是否添加水印(仅支持移动端)',
default: false,
hidden: "{{!['图片'].includes(formData.fileType)}}"
},
groupStyle: { groupStyle: {
title: '控件样式', title: '控件样式',
type: 'object', type: 'object',
......
...@@ -14,7 +14,7 @@ const RichTextDefault = (props, ref) => { ...@@ -14,7 +14,7 @@ const RichTextDefault = (props, ref) => {
const { schema, onChange, value, addons } = props const { schema, onChange, value, addons } = props
const { title } = addons?.formData || {} const { title } = addons?.formData || {}
const { presetValue, disabled, placeholder } = schema const { disabled, placeholder } = schema
const [text, setText] = useState('') const [text, setText] = useState('')
const [visible, setVisible] = useState(false) const [visible, setVisible] = useState(false)
...@@ -34,10 +34,6 @@ const RichTextDefault = (props, ref) => { ...@@ -34,10 +34,6 @@ const RichTextDefault = (props, ref) => {
setVisible(false) setVisible(false)
} }
useEffect(() => {
onChange(presetValue)
}, [presetValue])
useEffect(() => { useEffect(() => {
return () => { return () => {
if (editor == null) return if (editor == null) return
......
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