-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor BadgeHelper codes
- Loading branch information
Showing
5 changed files
with
127 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
在直播区中, 可从功能面板中直接切换勋章和头衔. 默认显示 256 个 (同时也是上限), 可在选项中修改. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { OptionsOfMetadata, defineOptionsMetadata } from '@/components/define' | ||
import { getNumberValidator } from '@/core/utils' | ||
|
||
export const badgeHelperOptions = defineOptionsMetadata({ | ||
autoMatchMedal: { | ||
defaultValue: true, | ||
displayName: '自动佩戴当前直播间勋章', | ||
}, | ||
maxBadgeCount: { | ||
defaultValue: 256, | ||
displayName: '最大显示数量', | ||
validator: getNumberValidator(1, 256), | ||
}, | ||
defaultMedalID: { | ||
displayName: '默认勋章ID', | ||
hidden: true, | ||
defaultValue: 0, | ||
}, | ||
grayEffect: { | ||
displayName: '显示勋章的未点亮状态', | ||
defaultValue: true, | ||
}, | ||
}) | ||
export type BadgeHelperOptions = OptionsOfMetadata<typeof badgeHelperOptions> |