---
title: "公文正文字段显示下载正文按钮(基线20250301以上)"
publicId: "6966c23c-81c7-4135-9876-7d33b2fc3c7a"
source: "https://weapp.eteams.cn/build/techdoc/wdoc/index.html#/public/doc/6966c23c-81c7-4135-9876-7d33b2fc3c7a"
---
需要复写组件props，实现自定义方法，根据方法的返回值，控制是否显示下载按钮

```javascript
import { regOvProps } from '@weapp/utils';

regOvProps('weappOdoc', 'OdocFiledInForm', props => {
  
  props.showDownLoadBtn = (param) => {
    /*
     * showOdocText：是否显示正文
     * docId：正文文档ID
     */
    const { showOdocText, docId } = param;
    return showOdocText && Number(docId) > 0;
  };
  return props;
});
```
