7.5.2.66. useLabelsModel
提供回调的 hook,以启动模态来编辑 Kubernetes 资源标签。
Example
const PodLabelsButton = ({ pod }) => {
const { t } = useTranslation();
const launchLabelsModal = useLabelsModal<PodKind>(pod);
return <button onClick={launchLabelsModal}>{t('Edit Pod Labels')}</button>
}
| 参数名称 | 描述 |
|---|---|
|
| 用于编辑标签的资源,这是 K8sResourceCommon 类型的对象。 |
返回
启动一个模态来编辑资源标签的功能。