This commit is contained in:
tcy
2025-08-23 06:31:22 +08:00
parent dbb649d1ce
commit cfb6085bbf
4 changed files with 21 additions and 9 deletions

View File

@ -14,13 +14,17 @@
<script setup name="MonthPlan" lang="ts">
import { ref, watch, computed } from 'vue';
import purchPage from './comm/purchPage.vue';
import { on } from 'events';
// 引用子组件
const activeName = ref('1');
const purchPageRef1 = ref<InstanceType<typeof purchPage> | null>(null);
const purchPageRef2 = ref<InstanceType<typeof purchPage> | null>(null);
const handleClick = (val) => {
purchPageRef1.value.getList(val.props.name); //子组件方法
if (val.props.name == '1') {
purchPageRef1.value.getList(val.props.name); //子组件方法
} else {
purchPageRef2.value.getList(val.props.name); //子组件方法
}
};
onMounted(() => {
purchPageRef1.value?.getList('1'); //初始加载