Browse Source

详情页面优化 隐藏禁用和输入框

wu 4 months ago
parent
commit
ee5d61bf38

+ 1 - 1
src/components/Generator/parser/Parser.vue

@@ -236,7 +236,7 @@ function renderFrom(h) {
         ref={formConfCopy.formRef}
         // model不能直接赋值 https://github.com/vuejs/jsx/issues/49#issuecomment-472013664
         props={{ model: this[formConfCopy.formModel] }}
-        rules={this[formConfCopy.formRules]}
+        rules={this[formConfCopy.formRules]} class={this.detailType === 'detail' ? 'detailForm' : ''}
       >
         <el-row gutter={formConfCopy.gutter} class={formConfCopy.formStyle} type="flex" style="flex-wrap:wrap">
           {renderFormItem.call(this, h, formConfCopy.fields)}

+ 11 - 0
src/views/basic/dynamicModel/list/Form.vue

@@ -159,6 +159,7 @@
       </div>
       <inputForm v-show="formVisible" ref="relationForm" />
     </template>
+<!--    弃用-->
     <template v-if="formData.popupType === 'fullScreen'">
       <transition name="el-zoom-in-center">
         <div class="JNPF-preview-main">
@@ -846,4 +847,14 @@ export default {
 ::v-deep .el-form-item__error {
   line-height: 5px;
 }
+::v-deep .detailForm .el-form-item__content {
+  .el-input-number,.el-input span{
+    display: none;
+  }
+  .el-input-number,.el-input *{
+    background: none;
+    border:none;
+    cursor: revert;
+  }
+}
 </style>