Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

json数据类型,使用list方式展示表单,在关联表时js失效 #452

Closed
ttlmm opened this issue Aug 19, 2020 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@ttlmm
Copy link

ttlmm commented Aug 19, 2020

  • Laravel Version: #.#.#
  • PHP Version: #.#.#
  • Dcat Admin Version: #.#.#

Description:

两张表marketing和marketing_vote(该表中有form字段,类型为json),
表单中$form->list('marketing_vote.form'); 这样时该组件js失效,无法添加行、删除行。

Steps To Reproduce:

@ttlmm
Copy link
Author

ttlmm commented Aug 19, 2020

ListField.php文件中,
`var index = {$number};
$('.{$this->column}-add').on('click', function () {
var tpl = $('template.{$this->column}-tpl').html().replace('{key}', index);
$('tbody.list-{$this->column}-table').append(tpl);

    index++;
});
$('tbody').on('click', '.{$this->column}-remove', function () {
    $(this).closest('tr').remove();
});`

这个地方的筛选用的class类型。与列名中的 . 冲突了

@jqhph jqhph added the bug Something isn't working label Aug 20, 2020
@jqhph
Copy link
Owner

jqhph commented Aug 20, 2020

感谢反馈,后续版本中会修复这个问题

@jqhph jqhph closed this as completed in 8d39969 Aug 21, 2020
@jqhph
Copy link
Owner

jqhph commented Aug 21, 2020

已修复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants