fix: 图片或附加文件字段点击清除后自动保存
This commit is contained in:
parent
718a9cb8b4
commit
66677e1a5c
@ -68,6 +68,13 @@ async function onChange(e: Event) {
|
||||
function clearValue() {
|
||||
if (!props.canEdit) return
|
||||
;(props.record as any)[props.df.fieldname] = ''
|
||||
try {
|
||||
if (typeof props.ctx?.save === 'function') {
|
||||
props.ctx.save()
|
||||
}
|
||||
} catch (_err) {
|
||||
// ignore autosave failures
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -64,6 +64,13 @@ async function onChange(e: Event) {
|
||||
function clearValue() {
|
||||
if (!props.canEdit) return
|
||||
;(props.record as any)[props.df.fieldname] = ''
|
||||
try {
|
||||
if (typeof props.ctx?.save === 'function') {
|
||||
props.ctx.save()
|
||||
}
|
||||
} catch (_err) {
|
||||
// ignore autosave failures
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user