mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-26 16:46:19 +08:00
refactor: ApiComponent
with docs (#5099)
* refactor: `ApiComponent` with docs * docs: remove invalid docs * docs: remove duplicate prop docs * docs: update `ApiComponent` docs
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import type { AnyPromiseFunction } from '@vben/types';
|
||||
|
||||
import { computed, ref, unref, useAttrs, type VNode, watch } from 'vue';
|
||||
import { type Component, computed, ref, unref, useAttrs, watch } from 'vue';
|
||||
|
||||
import { LoaderCircle } from '@vben/icons';
|
||||
import { get, isEqual, isFunction } from '@vben-core/shared/utils';
|
||||
@@ -18,7 +18,7 @@ type OptionsItem = {
|
||||
|
||||
interface Props {
|
||||
/** 组件 */
|
||||
component: VNode;
|
||||
component: Component;
|
||||
/** 是否将value从数字转为string */
|
||||
numberToString?: boolean;
|
||||
/** 获取options数据的函数 */
|
||||
@@ -53,7 +53,7 @@ interface Props {
|
||||
modelPropName?: string;
|
||||
}
|
||||
|
||||
defineOptions({ name: 'ApiSelect', inheritAttrs: false });
|
||||
defineOptions({ name: 'ApiComponent', inheritAttrs: false });
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
labelField: 'label',
|
@@ -0,0 +1 @@
|
||||
export { default as ApiComponent } from './api-component.vue';
|
@@ -1 +0,0 @@
|
||||
export { default as ApiSelect } from './api-select.vue';
|
@@ -1,4 +1,4 @@
|
||||
export * from './api-select';
|
||||
export * from './api-component';
|
||||
export * from './captcha';
|
||||
export * from './ellipsis-text';
|
||||
export * from './icon-picker';
|
||||
|
Reference in New Issue
Block a user