hookehuyr

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

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