import { defineComponent, onMounted, reactive } from 'vue'; import styles from './index.module.less'; import { NButton, NForm, NFormItem, NSpace } from 'naive-ui'; import iconAdd from '../../images/icon-add.svg'; import TheSearch from '/src/components/TheSearch'; import { resourceTypeArray } from '/src/utils/searchArray'; import { useCatchStore } from '/src/store/modules/catchData'; export default defineComponent({ name: 'search-group', emits: ['search', 'add'], setup(props, { emit }) { const catchStore = useCatchStore(); const forms = reactive({ type: 'MUSIC', // keyword: '', bookVersionId: null, subjectId: null }); const onSearch = () => { emit('search', forms); }; onMounted(async () => { // 获取教材分类列表 await catchStore.getMusicSheetCategory(); // 获取声部列表 await catchStore.getSubjects(); }); return () => (