我习惯使用jQuery.在我目前的项目中,我使用zepto.js.Zepto没有position()像jQuery那样提供方法.Zepto只附带offset().
知道如何使用纯js或Zepto检索容器相对于父级的偏移量吗?
如何@ref在循环内添加到 Blazor 组件?
@for (int i = 0; i < 10; i++)
{
<MyComponent @ref="???"/> // I want to add this component to the list
}
@code
{
List<MyComponent> components = new List<MyComponent>();
}
Run Code Online (Sandbox Code Playgroud)