add license check for desktop/mobile
This commit is contained in:
@@ -1,16 +1,19 @@
|
||||
import { type App } from 'vue';
|
||||
import { KintoneRestAPIClient } from '@kintone/rest-api-client';
|
||||
|
||||
// 创建客户端实例(单例)
|
||||
const client = new KintoneRestAPIClient();
|
||||
|
||||
// 创建注入的 Symbol(用于类型安全)
|
||||
export const KintoneClientInjectionKey = Symbol('kintone-client');
|
||||
|
||||
// 插件安装函数
|
||||
export const kintoneClientPlugin = {
|
||||
install(app: App) {
|
||||
// 创建客户端实例(不需要参数)
|
||||
const client = new KintoneRestAPIClient();
|
||||
|
||||
// 提供给整个应用使用
|
||||
app.provide(KintoneClientInjectionKey, client);
|
||||
},
|
||||
};
|
||||
|
||||
// 导出客户端实例作为默认
|
||||
export default client;
|
||||
|
||||
Reference in New Issue
Block a user