Browse Source

表单增加title项

cz 1 year ago
parent
commit
df4dabf987

+ 11 - 0
src/components/testForm/index.vue

@@ -11,6 +11,13 @@
     >
       <van-cell-group inset>
         <div v-for="(i, index) in formConfig" :key="index">
+          <van-field v-if="i.type == 'title'">
+            <template #input>
+              <div class="_title">
+                {{ i.title }}
+              </div>
+            </template>
+          </van-field>
           <van-field
             v-if="i.type == 'input'"
             v-model="formData[i.prop]"
@@ -846,4 +853,8 @@ watch(
   align-items: center;
   padding: 0 15px;
 }
+._title {
+  font-size: 18px;
+  font-weight: 700;
+}
 </style>

+ 4 - 0
src/views/MES/produceManage/completeProject1/index.vue

@@ -94,6 +94,10 @@ const formOption = reactive({
 
 const formConfig = reactive([
   {
+    type: "title",
+    title: "text",
+  },
+  {
     type: "input",
     itemType: "text",
     label: "姓名",