增加自动重复,新增留言列表

This commit is contained in:
augushong
2021-03-30 12:58:53 +08:00
parent 4b985dc382
commit fd411bda6b
4 changed files with 147 additions and 91 deletions

View File

@@ -74,7 +74,19 @@
</div>
</div>
<script>
layui.use(['element','form'])
function renderRepeat(elem) {
$(elem).find('[data-repeat]').each(function () {
for (let index = 1; index < $(this).data('repeat'); index++) {
var clone = $(this).clone()
clone.insertAfter(this)
renderRepeat(clone)
}
})
}
renderRepeat('body')
layui.use(['element', 'form'])
</script>
</body>