2017-04-21 34 views
2

我尝试发布的API构造如下:/device/invoiceNumber/{invoiceNumber}/{portableUnitId}x-editable:如何使用字段值更新帖子网址本身?

其中括号中的值必须用bootstrap-table中的动态添加值替换。我可以生成另一个函数的自定义URL,但我在这里是行不通的:

$(this).data('url', postInvNumUrl);

任何想法?

+0

我有同样的问题。你找到解决方案吗? –

回答

1

我找到了解决办法,你必须对自己editable更新的选项:

// This is where the magic happens 
$(this).editable('option', 'url', postInvNumUrl); 

// Not sure if this is needed anymore 
$(this).data('url', postInvNumUrl);