Files
mp-vue/src/views/bszx/bszxGrade/components/search.vue
赵忠林 82ac209505 style(api): 统一代码风格并修复语法问题
- 统一import语句的空格格式
- 修复分号缺失问题
- 调整函数参数换行格式以符合规范
- 删除多余空行保持代码整洁
- 修复字符串拼接的换行格式问题
2026-01-21 00:26:14 +08:00

57 lines
1.3 KiB
Vue

<!-- 搜索表单 -->
<template>
<a-space :size="10" style="flex-wrap: wrap">
<a-button type="primary" class="ele-btn-icon" @click="add">
<template #icon>
<PlusOutlined />
</template>
<span>添加</span>
</a-button>
<a-radio-group v-model:value="where.branch" @change="handleSearch">
<a-radio-button :value="1">初中部</a-radio-button>
<a-radio-button :value="2">高中部</a-radio-button>
</a-radio-group>
</a-space>
</template>
<script lang="ts" setup>
import { PlusOutlined } from '@ant-design/icons-vue';
import useSearch from '@/utils/use-search';
import { watch } from 'vue';
import { BszxGradeParam } from '@/api/bszx/bszxGrade/model';
const props = withDefaults(
defineProps<{
// 选中的角色
selection?: [];
}>(),
{}
);
const emit = defineEmits<{
(e: 'search', where?: BszxGradeParam): void;
(e: 'add'): void;
(e: 'remove'): void;
(e: 'batchMove'): void;
}>();
// 表单数据
const { where } = useSearch<BszxGradeParam>({
branch: undefined,
keywords: ''
});
// 新增
const add = () => {
emit('add');
};
const handleSearch = () => {
emit('search', where);
};
watch(
() => props.selection,
() => {}
);
</script>