怎么删除 schema 定义 "bsonType": "file", 里面的内容,求指教
场景:把上传的图片删除,存入数据库的时候删除不掉
代码片段
"code": {
"bsonType": "file",
"label": "二维码",
"description": "微信二维码图",
"order": 3,
"fileMediaType": "image",
"trim": "both",
"componentForEdit": {
"name": "uni-file-picker"
}
},
<uni-forms-item name="code" label="二维码">
<uni-file-picker ref="code" file-mediatype="image" return-type="object" :limit="1" :auto-upload="false"
v-model="formData.code" title="最多选择1张图片" mode="grid" :sizeType="sizeType"
@progress="progress"></uni-file-picker>
</uni-forms-item>
// 入数据库时 删除图 this.formData.code 为 null ,修改是成功了,没报错,但是 数据库的值还是原来的,没变
value["code"] = this.formData.code;