提交 | 用户 | 时间
|
820397
|
1 |
<template> |
H |
2 |
<div class="flex h-full items-stretch"> |
|
3 |
<!-- 模式 --> |
|
4 |
<Mode class="flex-none" @generate-music="generateMusic"/> |
|
5 |
<!-- 音频列表 --> |
|
6 |
<List ref="listRef" class="flex-auto"/> |
|
7 |
</div> |
|
8 |
</template> |
|
9 |
|
|
10 |
<script lang="ts" setup> |
|
11 |
import Mode from './mode/index.vue' |
|
12 |
import List from './list/index.vue' |
|
13 |
|
|
14 |
defineOptions({ name: 'Index' }) |
|
15 |
|
|
16 |
const listRef = ref<Nullable<{generateMusic: (...args) => void}>>(null) |
|
17 |
|
|
18 |
/* |
|
19 |
*@Description: 拿到左侧配置信息调用右侧音乐生成的方法 |
|
20 |
*@MethodAuthor: xiaohong |
|
21 |
*@Date: 2024-07-19 11:13:38 |
|
22 |
*/ |
|
23 |
function generateMusic (args: {formData: Recordable}) { |
|
24 |
unref(listRef)?.generateMusic(args.formData) |
|
25 |
} |
|
26 |
</script> |