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

handledetail无法使用,即详情页面依然可以编辑 #1027

Closed
Aimn opened this issue Mar 25, 2020 · 3 comments
Closed

handledetail无法使用,即详情页面依然可以编辑 #1027

Aimn opened this issue Mar 25, 2020 · 3 comments

Comments

@Aimn
Copy link

Aimn commented Mar 25, 2020

版本号:

最新版本号

问题描述:

online自动生成代码,配置好以后,配置详情按钮,点击详情进入handledetail方法,但是modal依然可以点击输入,与方法设计的不可点击有冲突。
在online表单开发里面使用功能测试生成的auto表单的详情页不可点击。

截图&代码:

<a @click="handleDetail(record)">详情
通过online表单自动生成的代码,自己配置好的业务页面
image
image

通过online表单生成的auto表单页面
image
image

友情提示: 未按格式要求发帖,会直接删掉。

@Aimn
Copy link
Author

Aimn commented Mar 25, 2020

JeecgListMixin里面的handledetail方法是
handleDetail:function(record){
this.$refs.modalForm.edit(record);
this.$refs.modalForm.title="详情";
this.$refs.modalForm.disableSubmit = true;
},

而OnlCgFormAutoList里面的方法是
handleDetail(record){
this.$refs.modal.detail(this.formTemplate,record.id);
}

@tygithub1
Copy link

代码生成器没有处理handleDetail,要想自己处理,
1.弹窗页面vue data里面声明 disableSubmit:false
2.在每个表单元素上加 :readOnly="disableSubmit" 但是这里需要注意的是,并不是每个组件都是可以通过设置readOnly实现不可编辑,详见具体组件的使用手册

@zhangdaiscott
Copy link
Member

简单实现开发表单禁用方案
使用 通过参数disabled

参考示例:
image

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

3 participants