fix(watermark): [watermark] fix watermark documents (#1234)

* fix(tag-group): [tag-group] fix tag-group documents

* fix(watermark): [watermark] fix watermark documents
This commit is contained in:
wuyiping0628 2023-12-29 10:12:56 +08:00 committed by GitHub
parent 68f6fd516b
commit 8017538a1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 33 additions and 17 deletions

View File

@ -13,7 +13,7 @@ export default {
return {
data: [
{
name: '标签一',
name: '标签一'
},
{
name: '标签二',

View File

@ -11,13 +11,21 @@ export default {
{
'demoId': 'basic',
'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' },
'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example ' },
'desc': {
'zh-CN':
'<p>通过 <code>content</code> 属性设置水印的文字。</br>通过 <code>font</code> 属性设置水印的样式</p>。',
'en-US':
'Set the text of the watermark through the <code>content</code> attribute.</br> Set the style of the watermark through the <code>font</code> attribute. '
},
'codeFiles': ['basic-usage.vue']
},
{
'demoId': 'image',
'name': { 'zh-CN': '图片水印', 'en-US': 'Basic Usage Image' },
'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example ' },
'desc': {
'zh-CN': '<p>通过 <code>image</code> 属性设置水印的图片。</p>',
'en-US': 'Set the watermark image through the <code>image</code> property. '
},
'codeFiles': ['image.vue']
}
],
@ -31,7 +39,7 @@ export default {
'type': 'number',
'defaultValue': '120',
'desc': {
'zh-CN': '水印的宽度, 最小宽度120',
'zh-CN': '水印的宽度, 最小宽度120px',
'en-US': 'The width of the watermark, minimum width 120'
},
'demoId': 'basic'
@ -41,7 +49,7 @@ export default {
'type': 'number',
'defaultValue': '64',
'desc': {
'zh-CN': '水印的高度, 最小高度64',
'zh-CN': '水印的高度, 最小高度64px',
'en-US': 'The height of the watermark, minimum height 120'
},
'demoId': 'basic'
@ -61,7 +69,7 @@ export default {
'type': 'number',
'defaultValue': '9',
'desc': {
'zh-CN': '追加的水印元素的 `z-index `',
'zh-CN': "追加的水印元素的 'z-index' ",
'en-US': 'The z-index of the appended watermark element'
},
'demoId': 'basic'
@ -71,7 +79,7 @@ export default {
'type': 'string',
'defaultValue': '',
'desc': {
'zh-CN': '图片源,建议导出 2 倍或 3 倍图,优先级高 (支持 base64 格式),此属性高于content',
'zh-CN': '图片源,建议导出 2 倍或 3 倍图,优先级高(支持 base64 格式),此属性高于 content ',
'en-US': 'Image source, it is recommended to export 2x or 3x image, high priority, higher content'
},
'demoId': 'image'
@ -81,23 +89,18 @@ export default {
'type': 'string',
'defaultValue': '',
'desc': {
'zh-CN': '水印文字内容,此属性低于image',
'zh-CN': '水印文字内容,此属性低于 image',
'en-US': 'Watermark text content, lower image'
},
'demoId': 'basic'
},
{
'name': 'font',
'type': 'object',
'type': 'Font',
'defaultValue': '',
'typeAnchorName': 'Font',
'desc': {
'zh-CN': `文字样式,可配置字段如下{
color:'rgba(0,0,0,.15)',
fontSize:'16',
"fontWeight":'normal',
"fontFamily":'sans-serif',
"fontStyle":'normal'
}`,
'zh-CN': `水印文字样式`,
'en-US': 'Text style'
},
'demoId': 'basic'
@ -117,7 +120,7 @@ export default {
'type': 'array',
'defaultValue': '[20, 20] ',
'desc': {
'zh-CN': '水印距离容器左上角的偏移量,默认为`20 `',
'zh-CN': '水印距离容器左上角的偏移量',
'en-US': 'The offset of the watermark from the upper left corner of the container. '
},
'demoId': 'basic'
@ -136,5 +139,18 @@ export default {
'events': [],
'slots': []
}
],
types: [
{
name: 'Font',
type: 'type',
code: `type Font = {
color:string,
fontSize:number,
fontWeight:string,
fontFamily:string,
fontStyle:string
}`
}
]
}