Commit 444aea85 authored by 张媛's avatar 张媛

canvas组件添加

parent b62a3705
...@@ -18,6 +18,8 @@ interface TestProps { ...@@ -18,6 +18,8 @@ interface TestProps {
labels:Array<string>; labels:Array<string>;
/**坐标系统样式*/ /**坐标系统样式*/
style:any; style:any;
/**坐标值 */
value:string;
} }
export const PolygonSystemCom = (args:TestProps)=>{ export const PolygonSystemCom = (args:TestProps)=>{
createStage(); createStage();
...@@ -34,7 +36,8 @@ export const PolygonSystemCom = (args:TestProps)=>{ ...@@ -34,7 +36,8 @@ export const PolygonSystemCom = (args:TestProps)=>{
); );
stage.removeAllChildren(); stage.removeAllChildren();
stage.addChild(polygonAxiosSystem); stage.addChild(polygonAxiosSystem);
polygonAxiosSystem.updateData(50 + "," + 50 + "," + 50); console.log(args.value)
polygonAxiosSystem.updateData(args.value);
}) })
return ( return (
<div></div> <div></div>
......
...@@ -31,6 +31,7 @@ Primary.args = { ...@@ -31,6 +31,7 @@ Primary.args = {
unitLength:30, //坐标系统的单位长度,一个刻度多长。 unitLength:30, //坐标系统的单位长度,一个刻度多长。
rotateDeg:90, rotateDeg:90,
labels:["haha","heihei"], labels:["haha","heihei"],
value:"70,100,90",
style:{ style:{
gridStyle: { gridStyle: {
color: 0xb46e42, color: 0xb46e42,
...@@ -44,6 +45,7 @@ Primary.args = { ...@@ -44,6 +45,7 @@ Primary.args = {
color: "#7c3c23", color: "#7c3c23",
size: 24, size: 24,
}, },
} }
}; };
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