Vue.js添加占位符

时间:2019-09-10 15:30:51

标签: javascript vue.js

我有此代码,必须根据占位符中的数组值添加 如何使用v-bind:占位符?应该在哪里

请插入“值”

            <template  v-if="formProperty.type.name === 'string'"    >
                <label :for="formProperty._id" class="col-md-3 col-form-label">
                <div v-if="formProperty.name === 'Givenname'" class="text-muted ml-1">{{formProperty.name = 'Nome'}}</div>
                <div v-if="formProperty.name === 'Sn'" class="text-muted ml-1">{{formProperty.name = 'Cognome'}}</div>
                <div v-if="formProperty.name === 'Mail'" class="text-muted ml-1">{{formProperty.name = 'Indirizzo Email'}}</div>
                <div v-if="formProperty.name === 'Telephonenumber'" class="text-muted ml-1">{{formProperty.name = 'Telefono Aziendale'}}</div>
                <div v-if="formProperty.name === 'Telephoneoffice'" class="text-muted ml-1">{{formProperty.name = 'Telefono Ufficio'}}</div>
                <div v-if="formProperty.name === 'Numordine'" class="text-muted ml-1">{{formProperty.name = 'Numero Ordine'}}</div>
                <div v-if="formProperty.name === 'Numposizione'" class="text-muted ml-1">{{formProperty.name = 'Numero Posizione'}}</div>
                <div v-if="formProperty.name === 'Accountexpires'" class="text-muted ml-1">{{formProperty.name = 'Data di Scadenza'}}</div>
                <div v-if="formProperty.name === 'Manager'" class="text-muted ml-1">{{formProperty.name = 'Email del Manager'}}</div>
                <div v-if="formProperty.name === 'Numeroticket'" class="text-muted ml-1">{{formProperty.name = 'Numero Ticket'}}</div>
                {{formProperty.name}}<small v-if="!formProperty.required" class="text-muted ml-1">{{$t('pages.profile.editProfile.optional')}}</small>
                </label>
                <div  class="col-md-9">
                    <input
                        v-bind:placeholder=?
                        :class="[{'is-invalid': errors.has(formProperty._id)}, 'form-control']"
                        :name="formProperty._id"
                        :data-vv-as="formProperty.name"
                        data-vv-validate-on="none"
                        type="text"
                        v-model="formData[formProperty._id]"
                        style="margin-top:11px;height:70%;width:75%; border-radius: .25rem;border: 1px solid #AAAAAA;"

                        v-validate="addValidationProps(formProperty)">
                        <ValidationError :validatorErrors="errors" :fieldName="formProperty._id"></ValidationError>
                    </input>
                </div>
            </template>

0 个答案:

没有答案