@@ -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>
@@ -94,6 +94,10 @@ const formOption = reactive({
const formConfig = reactive([
{
+ type: "title",
+ title: "text",
+ },
+ {
type: "input",
itemType: "text",
label: "姓名",