@farris/ui-vue
Version:
Farris Vue, a Farris Design based Vue3 component library.
39 lines (38 loc) • 1.36 kB
TypeScript
/**
* Capsule提供了一个具有视图切换功能的胶囊按钮 。
*
* @example
* ```vue
* <script setup lang="ts">
* import { ref } from 'vue';
* import { CapsuleItem } from '../../components/capsule';
*
* const items: CapsuleItem[] = [
* { name: '升序', value: 'asc', icon: 'f-icon f-icon-col-ascendingorder' },
* { name: '降序', value: 'desc', icon: 'f-icon f-icon-col-descendingorder' },
* { name: '无序', value: 'normal', icon: 'f-icon f-icon-col-descendingorder' }
*
* ];
* const activeValue = ref('desc');
* function onChange(latestValue: any) {
* console.log(latestValue);
* }
* </script>
* <template>
* <f-capsule :items="items" v-model="activeValue" @change="onChange"></f-capsule>
* </template>
* ```
*
* @public
*/
declare const _default: import("vue").DefineComponent<{
[x: string]: any;
}, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").PublicProps, Readonly<{
[x: string]: any;
}> & Readonly<{
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
onChange?: ((...args: any[]) => any) | undefined;
}>, {
[x: string]: any;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
export default _default;