hookehuyr

只读模式下,提交按钮隐藏

<!--
* @Date: 2022-07-18 10:22:22
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-06-14 16:01:58
* @LastEditTime: 2024-06-17 11:19:43
* @FilePath: /data-table/src/views/index.vue
* @Description: 首页
-->
......@@ -446,6 +446,7 @@ onMounted(async () => {
// 设置读写权限 read_only read_write
if (form_type === 'readonly') {
item.component_props.readonly = true;
PCommit.value.visible = false; // 只读模式下,提交按钮隐藏
}
}
}
......@@ -824,7 +825,7 @@ const onSubmit = async (values) => {
if (model === 'edit') {
console.warn(postData.value);
}
if (model === 'edit' || model === 'preview') return false;
if (model === 'edit' || model === 'preview' || form_type === 'readonly') return false;
// 提交按钮禁用
submitStatus.value = true;
// iframe传值openid
......