当我将x-editable元素渲染为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>
弹出窗口的位置是正确的。
但是,当我将其渲染为数字时,
<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>
弹出窗口显示在错误的位置。
答案 0 :(得分:0)
使用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>