Browse Source

必填项添加红色*号

duanqichao 4 years ago
parent
commit
20d27fa199
1 changed files with 21 additions and 7 deletions
  1. 21 7
      components/page-component/app-diy-form/app-diy-form.vue

+ 21 - 7
components/page-component/app-diy-form/app-diy-form.vue

xqd xqd xqd xqd xqd xqd xqd
@@ -37,7 +37,9 @@
                                   :class="[`text-align-${labelTextAlign}`]"
                                   :style="{
                                   'color': labelColor
-                                  }">{{item.name}}
+                                  }">
+								  <text style="color: red;" v-if="item.is_required == 1 || item.is_required == '1'">*</text>
+								  {{item.name}}
                             </view>
                         </view>
                         <view class="box-grow-1">
@@ -69,7 +71,9 @@
                                   :class="[`text-align-${labelTextAlign}`]"
                                   :style="{
                                   'color': labelColor
-                                  }">{{item.name}}
+                                  }">
+								  <text style="color: red;" v-if="item.is_required == 1 || item.is_required == '1'">*</text>
+								  {{item.name}}
                             </view>
                         </view>
                         <view class="box-grow-1">
@@ -100,7 +104,9 @@
                                   :class="[`text-align-${labelTextAlign}`]"
                                   :style="{
                                   'color': labelColor
-                                  }">{{item.name}}
+                                  }">
+								  <text style="color: red;" v-if="item.is_required == 1 || item.is_required == '1'">*</text>
+								  {{item.name}}
                             </view>
                         </view>
                         <view class="box-grow-1">
@@ -139,7 +145,9 @@
                                   :class="[`text-align-${labelTextAlign}`]"
                                   :style="{
                                   'color': labelColor
-                                  }">{{item.name}}
+                                  }">
+								  <text style="color: red;" v-if="item.is_required == 1 || item.is_required == '1'">*</text>
+								  {{item.name}}
                             </view>
                         </view>
                         <view class="box-grow-1">
@@ -179,7 +187,9 @@
                                   :class="[`text-align-${labelTextAlign}`]"
                                   :style="{
                                   'color': labelColor
-                                  }">{{item.name}}
+                                  }">
+								  <text style="color: red;" v-if="item.is_required == 1 || item.is_required == '1'">*</text>
+								  {{item.name}}
                             </view>
                         </view>
                         <view class="box-grow-1" :style="{
@@ -205,7 +215,9 @@
                                   :class="[`text-align-${labelTextAlign}`]"
                                   :style="{
                                   'color': labelColor
-                                  }">{{item.name}}
+                                  }">
+								  <text style="color: red;" v-if="item.is_required == 1 || item.is_required == '1'">*</text>
+								  {{item.name}}
                             </view>
                         </view>
                         <view class="box-grow-1 dir-left-wrap" :style="{
@@ -232,7 +244,9 @@
                                   :class="[`text-align-${labelTextAlign}`]"
                                   :style="{
                                   'color': labelColor
-                                  }">{{item.name}}
+                                  }">
+								  <text style="color: red;" v-if="item.is_required == 1 || item.is_required == '1'">*</text>
+								  {{item.name}}
                             </view>
                         </view>
                         <view class="box-grow-1 dir-left-wrap" :style="{