关于 react-native 中的 Svg 行,我可以将 x1、y1 设置为变量吗?

问题描述

一般情况下,坐标(如x1,...,y2)编码如下,

<Svg height="330" width="330>
   <Line x1="165" y1="165" x2="165" y2="0" stroke="black" strokeWidth="2" />
</Svg>

我想通过变量设置坐标。 例如,

const A=165;
<Svg height="330" width="330>
   <Line x1="A" y1="165" x2="165" y2="0" stroke="black" strokeWidth="2" />
</Svg>

我试过了……但是没有用……

如何将坐标设置为变量?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)