lex 2 سال پیش
والد
کامیت
2effe1a19f
1فایلهای تغییر یافته به همراه13 افزوده شده و 1 حذف شده
  1. 13 1
      src/components/VueFormMaking/components/GenerateFormItem.vue

+ 13 - 1
src/components/VueFormMaking/components/GenerateFormItem.vue

@@ -12,7 +12,7 @@
         : widget.name
     "
     :prop="propValue"
-    :class="parentForm"
+    :class="[parentForm, preview && widget.type == 'text' && 'dataModelText']"
     :style="subformIndex !== undefined ? { 'margin-bottom': '0' } : {}"
   >
     <template v-if="preview">
@@ -137,6 +137,11 @@
       <template v-else-if="widget.type === 'textarea'">
         <span v-html="dataFormatBr(dataModel)"></span>
       </template>
+      <template v-else-if="widget.type === 'text'">
+        <span class="dataModelText">{{
+          dataModel
+        }}</span>
+      </template>
       <template v-else>
         <div v-if="dataModel">
           <template v-if="widget.type == 'organ' || widget.type == 'school'">
@@ -953,4 +958,11 @@ export default {
   .el-input__icon.el-icon-arrow-down:before {
   content: "";
 }
+
+.dataModelText {
+  color: #e7af84;
+}
+.dataModelText .el-form-item__label {
+  color: #e7af84;
+}
 </style>