This commit is contained in:
2025-10-17 14:34:50 +08:00
parent cdfee67960
commit 4c4851b393
7 changed files with 81 additions and 10 deletions

View File

@@ -0,0 +1,16 @@
import { type App } from 'vue';
import { KintoneRestAPIClient } from '@kintone/rest-api-client';
// 创建注入的 Symbol用于类型安全
export const KintoneClientInjectionKey = Symbol('kintone-client');
// 插件安装函数
export const kintoneClientPlugin = {
install(app: App) {
// 创建客户端实例(不需要参数)
const client = new KintoneRestAPIClient();
// 提供给整个应用使用
app.provide(KintoneClientInjectionKey, client);
},
};