useTenantKey 
- Category: 
Composables - Relate: 
getTenantKey - Dependencies: 
@lark-base-open/js-sdk - Last Changed: yesterday
 
提示
该函数需要在一个多维表格中使用,请将本文档作为一个插件在多维表格上使用以查看演示。
演示 
显示演示代码
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
用法 
useTenantKey 是对 getTenantKey 的封装,用于获取当前 租户 ID。
ts
import { useTenantKey } from "@qww0302/use-bitable"
const tenantKey = useTenantKey()1
2
3
2
3
类型声明 
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