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

Add new row to detail page but can't edit #16

Closed
lvchaoin opened this issue Oct 29, 2019 · 5 comments
Closed

Add new row to detail page but can't edit #16

lvchaoin opened this issue Oct 29, 2019 · 5 comments

Comments

@lvchaoin
Copy link

Hi 你好,

我研究了明细关联表的操作,但是有些关键点可能还是没找到,有两个问题请指点一下

  1. 生成model有的字段会有标注editable,具体应该是哪个地方的设置才能生成model的字段是editable的
  2. 添加明细到表格中但是无法编辑,示例是可以的,关键设置没找到
    image

感谢 !

@lvchaoin
Copy link
Author

不能编辑貌似跟如下有关,没有生成出来
image

@cq-panda
Copy link
Owner

1、将主表生成好
2、将明细表的代码生成界面配置好并保存,vue页面可生成也可不要
3、在主表上需要再次点击生成vue页面

@lvchaoin
Copy link
Author

感谢!
这个我大概能搞定了,多一个问题,这个框架使用时数据表的主外键关联是有约定的,目前是主表的主键字段名跟从表的外键字段名必须相同。我这边的已有的数据表所有表的主键字段都叫ID,从表的外键是主表名称+ID, 查询的地方我更改了一下,目前可用,正在想办法修改更新等动作,请问下有没有什么更好的建议

image

@cq-panda
Copy link
Owner

感谢!
这个我大概能搞定了,多一个问题,这个框架使用时数据表的主外键关联是有约定的,目前是主表的主键字段名跟从表的外键字段名必须相同。我这边的已有的数据表所有表的主键字段都叫ID,从表的外键是主表名称+ID, 查询的地方我更改了一下,目前可用,正在想办法修改更新等动作,请问下有没有什么更好的建议

image

按现有的设计,你这样改可能是最简单的

@lvchaoin
Copy link
Author

感谢,已修改能用。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants