Explorar el Código

fix:字表换行

zhangjingyuan hace 3 años
padre
commit
65ca27748c

+ 10 - 3
src/business/platform/form/formrender/dynamic-form/dynamic-form-field.vue

@@ -3,7 +3,7 @@
         <!-- 单行文本、 多行文本、数字-->
         <!-- 单行文本、 多行文本、数字-->
         <template v-if="fieldType === 'text' || fieldType === 'textarea' || fieldType === 'number'">
         <template v-if="fieldType === 'text' || fieldType === 'textarea' || fieldType === 'number'">
             <template v-if="readonlyText">
             <template v-if="readonlyText">
-                <div :class="isTable ? '' : dataModel ? 'ibps-field-text' : 'ibps-field-text-no'">{{ dataModel || '/' }}</div>
+                <div :class="isTable ? '' : dataModel ? 'ibps-field-text' : 'ibps-field-text-no'" class="jbd-wrap">{{ dataModel || '/' }}</div>
             </template>
             </template>
 
 
             <el-dropdown
             <el-dropdown
@@ -12,6 +12,7 @@
                 size="mini"
                 size="mini"
                 placement="top-start"
                 placement="top-start"
                 trigger="click"
                 trigger="click"
+                class="jbd-wrap"
                 @command="handleCommand"
                 @command="handleCommand"
             >
             >
             <!-- <el-dropdown
             <!-- <el-dropdown
@@ -35,6 +36,7 @@
                     :style="{ width: width }"
                     :style="{ width: width }"
                     clearable
                     clearable
                     v-on="$listeners"
                     v-on="$listeners"
+                    class="jbd-wrap"
                 />
                 />
 
 
                 <!-- <el-button
                 <!-- <el-button
@@ -71,6 +73,7 @@
                 :readonly="readonly"
                 :readonly="readonly"
                 clearable
                 clearable
                 v-on="$listeners"
                 v-on="$listeners"
+                class="jbd-wrap"
             />
             />
         </template>
         </template>
 
 
@@ -99,7 +102,7 @@
         <!-- 单项选择 -->
         <!-- 单项选择 -->
         <template v-else-if="fieldType === 'radio'">
         <template v-else-if="fieldType === 'radio'">
             <template v-if="readonlyText">
             <template v-if="readonlyText">
-                <div v-if="$utils.isNotEmpty(dataModel)" :class="isTable ? '' : dataModel ? 'ibps-field-text' : 'ibps-field-text-no'">
+                <div v-if="$utils.isNotEmpty(dataModel)" :class="isTable ? '' : dataModel ? 'ibps-field-text' : 'ibps-field-text-no'" class="jbd-wrap">
                     {{ dataModel | optionsFilter(dataOptions, 'label', 'val') }}
                     {{ dataModel | optionsFilter(dataOptions, 'label', 'val') }}
                 </div>
                 </div>
                 <div v-else :class="isTable ? '' : 'ibps-field-text-no'">/</div>
                 <div v-else :class="isTable ? '' : 'ibps-field-text-no'">/</div>
@@ -129,7 +132,7 @@
         <template v-else-if="fieldType === 'checkbox'">
         <template v-else-if="fieldType === 'checkbox'">
             <template v-if="readonlyText">
             <template v-if="readonlyText">
                 <template v-if="checkboxDataModel && checkboxDataModel.length > 0">
                 <template v-if="checkboxDataModel && checkboxDataModel.length > 0">
-                    <div :class="isTable ? '' : readonlyText ? 'ibps-field-text' : ''">
+                    <div :class="isTable ? '' : readonlyText ? 'ibps-field-text' : ''" class="jbd-wrap">
                         <span v-for="(v, i) in checkboxDataModel" :key="i" class="ibps-mr-5">
                         <span v-for="(v, i) in checkboxDataModel" :key="i" class="ibps-mr-5">
                             {{ v | optionsFilter(dataOptions, 'label', 'val') }}
                             {{ v | optionsFilter(dataOptions, 'label', 'val') }}
                         </span>
                         </span>
@@ -1191,6 +1194,10 @@
     }
     }
 </script>
 </script>
 <style>
 <style>
+/* zhang 换行 */
+    .jbd-wrap {
+        white-space:  break-spaces;;
+    }
     .el-form-item {
     .el-form-item {
         margin-bottom: 6px !important;
         margin-bottom: 6px !important;
     }
     }