-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
53f04be
commit 3960385
Showing
15 changed files
with
672 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 78 additions & 0 deletions
78
packages/products/tdesign-miniprogram/src/watermark/props.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
/* eslint-disable */ | ||
|
||
/** | ||
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC | ||
* */ | ||
|
||
import { TdWatermarkProps } from './type'; | ||
const props: TdWatermarkProps = { | ||
/** 水印整体透明度,取值范围 [0-1] */ | ||
alpha: { | ||
type: Number, | ||
value: 1, | ||
}, | ||
/** 水印所覆盖的内容节点 */ | ||
content: { | ||
type: String, | ||
}, | ||
/** 水印高度 */ | ||
height: { | ||
type: Number, | ||
}, | ||
/** 水印是否重复出现 */ | ||
isRepeat: { | ||
type: Boolean, | ||
value: true, | ||
}, | ||
/** 行间距,只作用在多行(`content` 配置为数组)情况下 */ | ||
lineSpace: { | ||
type: Number, | ||
value: 16, | ||
}, | ||
/** 水印是否可移动 */ | ||
movable: { | ||
type: Boolean, | ||
value: false, | ||
}, | ||
/** 水印发生运动位移的间隙,单位:毫秒 */ | ||
moveInterval: { | ||
type: Number, | ||
value: 3000, | ||
}, | ||
/** 水印在画布上绘制的水平和垂直偏移量,正常情况下水印绘制在中间位置,即 `offset = [gapX / 2, gapY / 2]` */ | ||
offset: { | ||
type: Array, | ||
}, | ||
/** 水印是否可被删除 */ | ||
removable: { | ||
type: Boolean, | ||
value: true, | ||
}, | ||
/** 水印旋转的角度,单位 ° */ | ||
rotate: { | ||
type: Number, | ||
value: -22, | ||
}, | ||
/** 水印内容,需要显示多行情况下可配置为数组 */ | ||
watermarkContent: { | ||
type: null, | ||
}, | ||
/** 水印宽度 */ | ||
width: { | ||
type: Number, | ||
}, | ||
/** 水印之间的水平间距 */ | ||
x: { | ||
type: Number, | ||
}, | ||
/** 水印之间的垂直间距 */ | ||
y: { | ||
type: Number, | ||
}, | ||
/** 水印元素的 `z-index`,默认值写在 CSS 中 */ | ||
zIndex: { | ||
type: Number, | ||
}, | ||
}; | ||
|
||
export default props; |
161 changes: 161 additions & 0 deletions
161
packages/products/tdesign-miniprogram/src/watermark/type.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,161 @@ | ||
/* eslint-disable */ | ||
|
||
/** | ||
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC | ||
* */ | ||
|
||
export interface TdWatermarkProps { | ||
/** | ||
* 水印整体透明度,取值范围 [0-1] | ||
* @default 1 | ||
*/ | ||
alpha?: { | ||
type: NumberConstructor; | ||
value?: number; | ||
}; | ||
/** | ||
* 水印所覆盖的内容节点 | ||
*/ | ||
content?: { | ||
type: StringConstructor; | ||
value?: string; | ||
}; | ||
/** | ||
* 水印高度 | ||
*/ | ||
height?: { | ||
type: NumberConstructor; | ||
value?: number; | ||
}; | ||
/** | ||
* 水印是否重复出现 | ||
* @default true | ||
*/ | ||
isRepeat?: { | ||
type: BooleanConstructor; | ||
value?: boolean; | ||
}; | ||
/** | ||
* 行间距,只作用在多行(`content` 配置为数组)情况下 | ||
* @default 16 | ||
*/ | ||
lineSpace?: { | ||
type: NumberConstructor; | ||
value?: number; | ||
}; | ||
/** | ||
* 水印是否可移动 | ||
* @default false | ||
*/ | ||
movable?: { | ||
type: BooleanConstructor; | ||
value?: boolean; | ||
}; | ||
/** | ||
* 水印发生运动位移的间隙,单位:毫秒 | ||
* @default 3000 | ||
*/ | ||
moveInterval?: { | ||
type: NumberConstructor; | ||
value?: number; | ||
}; | ||
/** | ||
* 水印在画布上绘制的水平和垂直偏移量,正常情况下水印绘制在中间位置,即 `offset = [gapX / 2, gapY / 2]` | ||
*/ | ||
offset?: { | ||
type: ArrayConstructor; | ||
value?: Array<number>; | ||
}; | ||
/** | ||
* 水印是否可被删除 | ||
* @default true | ||
*/ | ||
removable?: { | ||
type: BooleanConstructor; | ||
value?: boolean; | ||
}; | ||
/** | ||
* 水印旋转的角度,单位 ° | ||
* @default -22 | ||
*/ | ||
rotate?: { | ||
type: NumberConstructor; | ||
value?: number; | ||
}; | ||
/** | ||
* 水印内容,需要显示多行情况下可配置为数组 | ||
*/ | ||
watermarkContent?: { | ||
type: null; | ||
value?: WatermarkText | WatermarkImage | Array<WatermarkText | WatermarkImage>; | ||
}; | ||
/** | ||
* 水印宽度 | ||
*/ | ||
width?: { | ||
type: NumberConstructor; | ||
value?: number; | ||
}; | ||
/** | ||
* 水印之间的水平间距 | ||
*/ | ||
x?: { | ||
type: NumberConstructor; | ||
value?: number; | ||
}; | ||
/** | ||
* 水印之间的垂直间距 | ||
*/ | ||
y?: { | ||
type: NumberConstructor; | ||
value?: number; | ||
}; | ||
/** | ||
* 水印元素的 `z-index`,默认值写在 CSS 中 | ||
*/ | ||
zIndex?: { | ||
type: NumberConstructor; | ||
value?: number; | ||
}; | ||
} | ||
|
||
export interface WatermarkText { | ||
/** | ||
* 水印文本文字颜色 | ||
* @default rgba(0,0,0,0.1) | ||
*/ | ||
fontColor?: string; | ||
/** | ||
* 水印文本文字字体 | ||
* @default '' | ||
*/ | ||
fontFamily?: string; | ||
/** | ||
* 水印文本文字大小 | ||
* @default 16 | ||
*/ | ||
fontSize?: number; | ||
/** | ||
* 水印文本文字粗细 | ||
* @default normal | ||
*/ | ||
fontWeight?: 'normal' | 'lighter' | 'bold' | 'bolder'; | ||
/** | ||
* 水印文本内容 | ||
* @default '' | ||
*/ | ||
text?: string; | ||
} | ||
|
||
export interface WatermarkImage { | ||
/** | ||
* 水印图片是否需要灰阶显示 | ||
* @default false | ||
*/ | ||
isGrayscale?: boolean; | ||
/** | ||
* 水印图片源地址,为了显示清楚,建议导出 2 倍或 3 倍图 | ||
* @default '' | ||
*/ | ||
url?: string; | ||
} |
15 changes: 15 additions & 0 deletions
15
packages/products/tdesign-mobile-react/src/watermark/defaultProps.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC | ||
* */ | ||
|
||
import { TdWatermarkProps } from './type'; | ||
|
||
export const watermarkDefaultProps: TdWatermarkProps = { | ||
alpha: 1, | ||
isRepeat: true, | ||
lineSpace: 16, | ||
movable: false, | ||
moveInterval: 3000, | ||
removable: true, | ||
rotate: -22, | ||
}; |
Oops, something went wrong.