我正在使用这个小部件在我的 Titanium Alloy 应用程序中显示 SVG:
https://github.com/appcelerator-services/VectorImage
SVG 显示得很好,但是当我在 iOS 上点击 SVG 时不会触发 onClick 事件。Onclick 确实适用于 Android。我尝试将 onClick 应用于小部件本身以及将其应用于包含元素。我可以单击包含元素,但不能单击 SVG。
<View class="dashboardGridCell" onClick="goToPayBill">
<View class="dashboardIcon">
<Widget class="dashboardIconSvg" src="com.capnajax.vectorimage" svg="svg/circle-check.svg" style="svg/white-fill.css" onClick="goToPayBill"/>
</View>
<Label class="dashboardIconLabel">Pay Bill</Label>
</View>
是否有更好的小部件来显示 SVG,或者我在应用 onclick 时做错了什么?