For AI agents: the complete documentation index is available at https://payhon.github.io/AppKernia/llms.txt, the full documentation bundle is available at https://payhon.github.io/AppKernia/llms-full.txt, and this page is available as Markdown at https://payhon.github.io/AppKernia/mobile-components/text-field.md.

ak-text-field

统一标签、输入、密码显隐、禁用和字段错误。组件发出 update:modelValue,业务校验仍由 feature schema 管理。

<ak-text-field
  v-model="form.email"
  :label="t('auth.fields.email')"
  :placeholder="t('auth.fields.emailPlaceholder')"
  :error="errors.email"
  :disabled="submitting"
/>

<ak-text-field
  v-model="form.password"
  :label="t('auth.fields.password')"
  :password="true"
  :error="errors.password"
/>

Props

属性类型默认值说明
modelValueString''当前值
labelString''非空时显示字段标签
placeholderString''占位提示,不能代替标签
errorString''非空时显示错误文案
passwordBooleanfalse传给原生 input 的密码模式
disabledBooleanfalse禁止输入且不发送更新

Events

update:modelValue(value: string):原生输入变化且组件未禁用时触发。

安全提示

密码、OTP 与 MFA 输入不得进入日志、埋点、剪贴板监控或普通 Storage。服务端字段错误应映射为本地翻译,不直接展示内部错误。