UNPKG

@farris/ui-vue

Version:

Farris Vue, a Farris Design based Vue3 component library.

44 lines (43 loc) 1.34 kB
/** * Radio Group 是一个单选一组枚举值的输入组件。 * * @example * ```vue * <script setup lang="ts"> * import { ref } from 'vue'; * * const radioEnumData = [ * { id: 'first', text: 'Fist Item' }, * { id: 'second', text: 'Second Item' }, * { id: 'third', text: 'Third Item' } * ]; * const value = ref('first'); * const name = '单选项'; * const textField = 'text'; * const valueField = 'id'; * function onValueChanged(event: any) { * console.log(`value changed: ${event}`); * } * </script> * <template> * <div> * <f-radio-group id="basic" :name="name" :value-field="valueField" :text-field="textField" * :options="radioEnumData" v-model="value" @change-value="onValueChanged"> * </f-radio-group> * <div class="my-2"> * <span>当前选中值: {{ value }}</span> * </div> * </div> * </template> * ``` * * @public */ declare const _default: import("vue").DefineComponent<{ [x: string]: any; }, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{ [x: string]: any; }> & Readonly<{}>, { [x: string]: any; }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>; export default _default;