瀏覽代碼

必填项添加红色*号

duanqichao 4 年之前
父節點
當前提交
20d27fa199
共有 1 個文件被更改,包括 21 次插入7 次删除
  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="{