当我将x可编辑元素呈现为type = text时,

<a data-csrf="" data-pk="2031" data-role="x-editable" data-type="text" data-url="./ajax/update/" data-value="" href="#" id="account_budget" name="account_budget" class="editable editable-click editable-empty" data-original-title="" title="">Empty</a>


jquery - X-editable data-type = number导致弹出窗口位于错误的位置。-LMLPHP

弹出窗口的位置正确。

但是,当我将其渲染为数字时,

<a data-csrf="" data-pk="2031" data-role="x-editable" data-step="any" data-type="number" data-url="./ajax/update/" data-value="" href="#" id="account_budget" name="account_budget" class="editable editable-click editable-empty editable-open" data-original-title="" title="" aria-describedby="popover90342">Empty</a>


jquery - X-editable data-type = number导致弹出窗口位于错误的位置。-LMLPHP

弹出窗口显示在错误的位置。

有人看过这个问题吗?

最佳答案

使用data-step =“ 0.01”。
例如:

<a data-csrf="" data-pk="2031" data-role="x-editable" data-step="0.01" data-type="number" data-url="./ajax/update/" data-value="" href="#" id="account_budget" name="account_budget" class="editable editable-click editable-empty editable-open" data-original-title="" title="" aria-describedby="popover90342">Empty</a>

关于jquery - X-editable data-type = number导致弹出窗口位于错误的位置。,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/47314748/

10-12 19:49