Commit 0009a7cb authored by rockyl's avatar rockyl

修复背景色的问题

parent 3e4c88f3
......@@ -6,10 +6,7 @@
"license": "MIT",
"scripts": {
"dev": "tsc -w",
"build": "tsc",
"release": "npm run build && pvi && npm publish"
},
"devDependencies": {
"package-version-increment": "^1.0.2"
"build": "tsc --target es5",
"release": "npm run build && npm version patch && npm publish"
}
}
\ No newline at end of file
......@@ -283,6 +283,7 @@ function drawBackgroundColor(data: INodeData, ctx: CanvasRenderingContext2D, sca
ctx.fillStyle = backgroundColor
let borderRadius = parseFloat(borderRadiusTxt) * scale
ctx.beginPath()
if (borderRadius) {//有圆角,画遮罩,暂时只管一个
borderRadiusPath(data, ctx, scale)
ctx.fill()
......
......@@ -32,6 +32,11 @@
font-size: 0;
}
.img{
width: 100%;
height: 100%;
}
.p {
font-size: 1rem;
font-family: hanti;
......@@ -102,7 +107,8 @@
<script type="text/babel">
ReactDOM.render(
<div id="poster" className="poster">
<p className="p">我也!</p>
<img className="img" src="//yun.duiba.com.cn/aurora/14e3d0fa0e1ff54553a2c8c094b1caffd90f0a43.png"/>
<div><p className="ppp">hello</p></div>
</div>,
document.getElementById('app')
);
......
{
"compilerOptions": {
"module": "ES6",
"target": "ES5",
"target": "ESNext",
"outDir": "dist",
"declaration": true,
"moduleResolution": "Node",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment