我尝试在Hyperstack中使用移动步进器组件(https://material-ui.com/demos/steppers/#mobile-stepper-progress),但得到以下错误:
Failed prop type: Invalid prop `nextButton` supplied to `MobileStepper`, expected a ReactNode. in MobileStepper
它只呈现进度条,而不呈现按钮。
尝试了各种方法,例如:
Mui.MobileStepper( variant: "progress", steps: 6, position: "static",
nextButton: lambda { Mui.Button(size: "small") {'next'} },
backButton: lambda { Mui.Button(size: "small") {'back'} })发布于 2019-04-16 02:23:32
您希望将完整的ReactNode传递给nextButton和backButton属性。您还需要将组件转换为原生javascript。您可以在任何Hyperstack组件上调用to_n以将其转换为本机react类。
Mui.MobileStepper( variant: "progress", steps: 6, position: "static",
nextButton: Mui.Button(size: "small") {'next'}.to_n,
backButton: Mui.Button(size: "small") {'back'}.to_n)https://stackoverflow.com/questions/55694753
复制相似问题