{"id":19204516,"url":"https://github.com/hyy1115/react-watermark-module","last_synced_at":"2025-06-26T11:34:16.985Z","repository":{"id":57347549,"uuid":"116339113","full_name":"hyy1115/react-watermark-module","owner":"hyy1115","description":"React水印组件，支持图片水印，文字水印。","archived":false,"fork":false,"pushed_at":"2018-01-06T10:57:37.000Z","size":18,"stargazers_count":34,"open_issues_count":1,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-15T09:52:18.402Z","etag":null,"topics":["logo","module","react","text","watermark"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hyy1115.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-05T03:56:42.000Z","updated_at":"2024-01-26T16:05:42.000Z","dependencies_parsed_at":"2022-08-28T04:00:49.872Z","dependency_job_id":null,"html_url":"https://github.com/hyy1115/react-watermark-module","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hyy1115/react-watermark-module","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyy1115%2Freact-watermark-module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyy1115%2Freact-watermark-module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyy1115%2Freact-watermark-module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyy1115%2Freact-watermark-module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyy1115","download_url":"https://codeload.github.com/hyy1115/react-watermark-module/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyy1115%2Freact-watermark-module/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262056496,"owners_count":23251683,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["logo","module","react","text","watermark"],"created_at":"2024-11-09T13:08:30.732Z","updated_at":"2025-06-26T11:34:16.953Z","avatar_url":"https://github.com/hyy1115.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-watermark-module\n\nReact水印组件，支持图片水印，文字水印。\n\n### 安装\n\n```npm\nnpm i --save react-watermark-module\n```\n\n### 用法\n\n```javascript\nimport ReactWatermark from 'react-watermark-module'\nconst imagePath = require('imagePath.png')\nconst logoPath = require('logoPath.jpg')\n```\n\n### 文字水印\n\n1、支持左上、左下、右上、右下、居中等位置\n\n2、支持任意位置\n\n3、多行文字（暂不支持）\n\n**简易API**\n```javascript\n\u003cReactWatermark\n    imagePath={} //必须，对象，背景图片\n    textData={'红掌拨清波'} //必须，字符串，水印内容\n    type={'text'} //必须，水印类型\n/\u003e\n```\n\n**所有API**\n```javascript\n\u003cReactWatermark\n    ID={'watermark'} //非必须，字符串，id\n    color={'#f00'} //非必须，字符串，水印颜色\n    font={'28px serif'} //非必须，字符串，水印字号、字体\n    imagePath={} //必须，对象，背景图片\n    textData={'红掌拨清波'} //必须，字符串，水印内容\n    textPosition={[100, 40]} //水印位置，默认右下角，支持字符串：leftTop、leftBottom、rightTop、rightBottom、center，也支持自定义位置，用数组表示 [x, y]\n    transparent={0.4} //非必须，文字透明度\n    type={'text'} //必须，水印类型\n/\u003e\n```\n\n### 图片水印\n\n1、支持左上、左下、右上、右下、居中等位置\n\n2、支持任意位置\n\n3、多个logo水印（暂不支持）\n\n当type是logo时，对文字水印的字体设置无效，请不要混淆。\n\n**简易API**\n```javascript\n\u003cReactWatermark\n    imagePath={} //必须，对象，背景图片\n    logoPath={} //必须，logo水印的路径，用require或import导入\n    type={'logo'} //必须，水印类型\n/\u003e\n```\n\n**所有API**\n```javascript\n\u003cReactWatermark\n    ID={'watermark'} //非必须，字符串，id\n    imagePath={} //必须，对象，背景图片\n    logoPath={} //必须，logo水印的路径，用require或import导入\n    textPosition={[100, 40]} //水印位置，默认右下角，支持字符串：leftTop、leftBottom、rightTop、rightBottom、center，也支持自定义位置，用数组表示 [x, y]\n    transparent={0.4} //非必须，logo透明度\n    type={'logo'} //必须，水印类型\n/\u003e\n```\n\n### 疑问\n\n插件目前只支持单文本和单logo水印，后续有多文本和多logo水印，以及更多新的功能，也欢迎你参与项目的迭代。","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyy1115%2Freact-watermark-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyy1115%2Freact-watermark-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyy1115%2Freact-watermark-module/lists"}