x-editable:如何使用字段值更新postURL本身?
我试图发布的API构造如下: /device/invoiceNumber/{invoiceNumber}/{portableUnitId}
括号中的值必须替换为bootstrap-table中动态添加的值。 我可以在另一个函数中生成自定义URL,但我在这里没有工作:
$(this).data('url', postInvNumUrl);
有任何想法吗?
我找到了解决方案,您必须更新editable
本身的选项:
// This is where the magic happens $(this).editable('option', 'url', postInvNumUrl); // Not sure if this is needed anymore $(this).data('url', postInvNumUrl);