zhuoyuan.wang
2024-06-19 15ebe96f28cadec6a726c5324593a40bbf56205f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<template>
  <app-layout-row>
    <app-layout-col :span="5">
      <group-list v-bind="groupListProps"/>
    </app-layout-col>
    <app-layout-col :span="19" :padding-left="15">
      <param-table v-bind="paramTableProps"/>
    </app-layout-col>
  </app-layout-row>
</template>
 
<script setup>
 
import GroupList from './GroupList';
import ParamTable from './ParamTable';
 
const groupListRef = ref();
const paramTableRef = ref();
 
const props = defineProps({
  subCurrent: {
    type: Function,
    default: () => {
    }
  }
});
 
const paramTableProps = {
  ref: paramTableRef,
  subCurrent(row) {
   props.subCurrent(row);
  }
}
 
const groupListProps = {
  ref: groupListRef,
  subActive(active) {
    props.subCurrent({add: active});
    paramTableRef.value.onActive(active);
  }
}
 
const onReload = (bool) => {
  paramTableRef.value.onReload(bool);
}
 
defineExpose({
  onReload
});
 
</script>