useTenantKey 
- Category: 
Composables - Relate: 
getTenantKey - Dependencies: 
@lark-base-open/js-sdk - Last Changed: yesterday
 
Notice
This function needs to use in Base, please use this website as a plugin in a Base to see the demo.
Demo 
Show demo code
vue
<script setup lang="ts">
import { useTenantKey } from "@qww0302/use-bitable"
const tenantId = useTenantKey()
</script>
<template>
  <p>TenantKey: {{ tenantId ?? "null" }}</p>
</template>1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
Usage 
useTenantKey is a wrapper of getTenantKey, used to get the current TenantId.
ts
import { useTenantKey } from "@qww0302/use-bitable"
const tenantKey = useTenantKey()1
2
3
2
3
Type Declarations 
ts
/**
 * Get current tenant ID
 *
 * 获取当前租户 ID
 *
 * @returns
 */
export declare function useTenantKey(): import("vue").Ref<
  string | null,
  string | null
>1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11