📜  lwc 获取用户 ID - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:44.712000             🧑  作者: Mango

代码示例1
import { LightningElement } from 'lwc';
import uId from '@salesforce/user/Id';
export default class CurrentUser extends LightningElement {
    userId = uId;
}