feat: add more expose methods for apiComponent (#5958)

* 为ApiComponent组件添加getOptions和getValue导出方法。
This commit is contained in:
Netfan
2025-04-15 15:32:30 +08:00
parent 091596eda8
commit b8f145aa7f
2 changed files with 6 additions and 0 deletions

View File

@@ -242,6 +242,10 @@ function emitChange() {
}
const componentRef = ref();
defineExpose({
/** 获取options数据 */
getOptions: () => unref(getOptions),
/** 获取当前值 */
getValue: () => unref(modelValue),
/** 获取被包装的组件实例 */
getComponentRef: <T = any,>() => componentRef.value as T,
/** 更新Api参数 */