|
@@ -6,7 +6,7 @@ import {
|
|
|
NCascader,
|
|
|
NDataTable,
|
|
|
NDescriptions,
|
|
|
- NDescriptionsItem,
|
|
|
+ NDescriptionsItem, NDropdown,
|
|
|
NFormItem,
|
|
|
NIcon,
|
|
|
NImage,
|
|
@@ -82,6 +82,7 @@ export default defineComponent({
|
|
|
musicData: {} as any,
|
|
|
musicSheetCategories: [] as any,
|
|
|
musicPreview: false,
|
|
|
+ musicPreviewScoreType: 'staff', // 预览谱面类型
|
|
|
musicScore: null as any,
|
|
|
showUseProject: false, // 适用项目
|
|
|
useProjectData: [] as any, // 适用项目行数据
|
|
@@ -245,17 +246,26 @@ export default defineComponent({
|
|
|
render(row: any) {
|
|
|
return (
|
|
|
<NSpace>
|
|
|
- <NButton
|
|
|
- type="primary"
|
|
|
- size="small"
|
|
|
- text
|
|
|
- onClick={() => {
|
|
|
- state.musicPreview = true
|
|
|
- state.musicScore = row
|
|
|
- }}
|
|
|
+ <NDropdown
|
|
|
+ trigger="hover"
|
|
|
+ options={[
|
|
|
+ { label: '五线谱', key: 'staff' },
|
|
|
+ { label: '首调', key: 'firstTone' },
|
|
|
+ { label: '固定调', key: 'fixedTone' }
|
|
|
+ ]}
|
|
|
+ onSelect={(key: string) => {
|
|
|
+ state.musicPreview = true
|
|
|
+ state.musicScore = row
|
|
|
+ state.musicPreviewScoreType = key
|
|
|
+ }}
|
|
|
>
|
|
|
- 预览
|
|
|
- </NButton>
|
|
|
+ <NButton type="primary"
|
|
|
+ size="small"
|
|
|
+ text
|
|
|
+ onClick={(e: Event) => e.stopPropagation()}>
|
|
|
+ 预览
|
|
|
+ </NButton>
|
|
|
+ </NDropdown>
|
|
|
<NButton
|
|
|
type="primary"
|
|
|
size="small"
|
|
@@ -831,7 +841,7 @@ export default defineComponent({
|
|
|
title={'曲目预览'}
|
|
|
style={{ width: 'auto' }}
|
|
|
>
|
|
|
- <MusicPreView item={state.musicScore} isMove={1} />
|
|
|
+ <MusicPreView item={state.musicScore} isMove={1} scoreType={state.musicPreviewScoreType} />
|
|
|
</NModal>
|
|
|
|
|
|
<NModal
|