1
지금은 Gridstack.js으로 작업하고 있지만 나에게 도움이되지만 (항상 있지만 그렇습니다) 누군가 JSON 배열에 정의 된대로 grid-stack-item을 배치하는 방법을 알고 있습니다. ?Gridstack.js JSON에서 위치 가져 오기
예 HTML
<div class="grid-stack">
<div id="1" class="grid-stack-item">
<div class="grid-stack-item-content"></div>
</div>
<div id="2" class="grid-stack-item">
<div class="grid-stack-item-content"></div>
</div>
<div id="3" class="grid-stack-item">
<div class="grid-stack-item-content"></div>
</div>
</div>
내 JSON은
[{"widgetId":"1","x":0,"y":2,"width":3,"height":4},{"widgetId":"2","x":1,"y":6,"width":3,"height":1},{"widgetId":"3","x":0,"y":7,"width":3,"height":4}]
나는 설명서에서 그것에 대해 아무것도 찾을 수 없습니다. 그리고 나는 가능하지 않다.
어쩌면 내가 할 수있는 "add_widget (엘, 엑스, y, 너비, 높이, auto_position)"add_widget 사용할 수 있습니까? 함수를 사용하여 JSON을 반복하면됩니까? 아니면 그렇게 할 방법이 아닌가? – D3F