0

我试过这个但得到一个错误“TypeError:this._viewCreator [type]不是一个函数”。

我不应该从 React Native 导入还是使用其他库?

import {ART} from 'react-native'

const {
  Shape,
  Path,
} = ART

class Circle extends React.Component {
  render() {
    const {radius, ...rest} = this.props

    const circle = Path()
      .move(radius, 0)
      .arc(0, radius * 2, radius)
      .arc(0, radius * -2, radius)

    return <Shape {...rest} d={circle} />
  }

...

<Circle radius={10} fill={blue} />

谢谢!

4

1 回答 1

0

您可以使用Cylinder0 dimHeight

 <Cylinder
   radiusTop={1}
   dimHeight={0}
   segments={32}
 />
于 2018-04-24T20:50:43.713 回答