Skip to content

Commit bbfe530

Browse files
committed
✨ feat(作业编辑器-干员列表): 添加技能使用次数的展示
1 parent 67b8405 commit bbfe530

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/components/editor/operator/EditorOperatorItem.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import clsx from 'clsx'
44

55
import type { CopilotDocV1 } from 'models/copilot.schema'
66

7-
import { OPERATORS, findOperatorSkillUsage } from '../../../models/operator'
7+
import { OPERATORS, getSkillUsageTitle } from '../../../models/operator'
88
import { SortableItemProps } from '../../dnd'
99
import { CardDeleteOption, CardEditOption } from '../CardOptions'
1010
import { OperatorAvatar } from './EditorOperator'
@@ -26,7 +26,10 @@ export const EditorOperatorItem = ({
2626
listeners,
2727
}: EditorOperatorItemProps) => {
2828
const id = OPERATORS.find(({ name }) => name === operator.name)?.id
29-
const skillUsage = findOperatorSkillUsage(operator.skillUsage).title
29+
const skillUsage = getSkillUsageTitle(
30+
operator.skillUsage as CopilotDocV1.SkillUsageType,
31+
operator.skillTimes,
32+
)
3033

3134
const skill = `${
3235
[null, '一', '二', '三'][operator.skill ?? 1] ?? '未知'

0 commit comments

Comments
 (0)