Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 JsonForms 在 React 中创建表单。我正在创建一个测试 r 并且想知道为什么它需要一个排名?
import { rankWith, scopeEndsWith } from '@jsonforms/core'; export default rankWith( 3, // what’s the use for this? scopeEndsWith('rating') );
排名是它在渲染列表中应该有多高。
如果您有一个组件与一个等级为 1 的测试器
export default rankWith( 1, scopeEndsWith('rating') );
和另一个等级为 2 的测试者
export default rankWith( 2, scopeEndsWith('rating') )
那么将使用具有等级 1 的测试仪的组件,而不是具有等级 2 的组件