xverse-components-avatar-select
v1.0.9
Published
xverse components avatar-select
Downloads
84
Readme
API
| 参数名 | 类型 | 说明 | 默认值 | 是否必填 | 备注 | | --------------------- | -------------------------------------------- | ------------------------------------------ | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | | avatars | IAvatarConfig[] | 玩家配置信息 | - | false | - | | skipSelectWhenReEnter | boolean | 第二次进入时,是否跳过角色选择 | - | false | - | | needNickname | boolean | 是否需要昵称输入框 | true | false | - | | defaultNickName | string | 玩家默认昵称 | - | false | 所有用户的默认昵称 都取这个值 | | useBuiltInNickname | boolean | 当没有默认昵称时,默认昵称是否使用随机昵称 | true | false | - | | nicknameList | string | 随机昵称配置表 | - | false | - | | disabledNicknameInput | boolean | 是否禁止昵称输入框输入内容 | - | false | - | | randomNicknameIcon | string | 随机昵称图标 | - | false | 配置随机昵称图片,则点击随机昵称图标,昵称输入框内自动创建一个内置的随机昵称 | | namePlaceholder | string | 昵称输入框 placeholder | - | false | - | | nameSuffix | string | 用户最终输入后的昵称后缀 | - | false | 当需要在用户最终输入昵称后,添加其他内容作为后缀,比如老师、同学,最终的昵称是 XX 老师、XX 同学,注意昵称总长度不超过 17,如果输入昵称超过总长度则后缀不显示 | | nextBtnProps | IButtonProps | 下一步按钮 | - | false | - | | className | string | css 类名 | - | false | - | | style | CSSProperties | | - | false | - | | onSelect | (avatarId: string) => void | 点击角色时回调 | - | false | - | | onNext | (avatarId: string, nickname: string) => void | 角色选择完成时回调 | - | false | - |