晚上好。
如何使用v-model获取值?以下SmartSelect:
<f7-list-item
title="Sexo"
:smart-select="true" :smart-select-params="{openIn: 'sheet', sheetCloseLinkText: 'Cerrar'}"
ref="id_select"
>
<select
name="sex_name"
:value="perfil.apellidos"
@input="perfil.apellidos = $event.target.value"
>
<option value="masculino" selected>Masculino</option>
<option value="femenino">Femenino</option>
</select>
</f7-list-item>
agregue :value="perfil.apellidos"
和@input="perfil.apellidos = $event.target.value"
是因为这样,我在处理输入时会得到它们。
示例:
<f7-list-input
label="Apellidos"
floating-label
type="textarea"
:value="perfil.apellidos"
@input="perfil.apellidos = $event.target.value"
placeholder="Apellidos"
clear-button
resizable
>
</f7-list-input>
But in the SmartSelect the same thing does not happen regarding v-model.
还要如何预定义值并定义选择的值,例如,在ajax请求中,如果我得到“女性”信息,则必须在SmartSelect中选择该选项
谢谢