Skip to content
Raymond edited this page Feb 16, 2023 · 1 revision

Basic Usage

<FormKit type="form" value="data">
  <FormKit type="el-select" label="select" name="input1" :options="cities">
</FormKit>

Custom template

<template>
  <FormKit type="form" value="data">
    <FormKit type="el-select" label="select (Custom template)" name="input1" :options="cities">
        <template #option="{ item }">
            <span style="float: left">{{ item.label }}</span>
            <span style="
                float: right;
                color: var(--el-text-color-secondary);
                font-size: 13px;
                ">{{ item.value }}
            </span>
        </template>
    </FormKit>
  </FormKit>
<template>
Clone this wiki locally