File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -62,14 +62,12 @@ function openCreateGroupModal() {
6262 showGroupModal .value = true ;
6363}
6464
65- function handleGroupCreated(_group : Group ) {
65+ function handleGroupCreated(group : Group ) {
6666 showGroupModal .value = false ;
67- emit (" refresh" );
68- }
69-
70- function handleSwitchToGroup(groupId : number ) {
71- // 创建成功后,通知父组件刷新并切换到新创建的分组
72- emit (" refresh-and-select" , groupId );
67+ if (group && group .id ) {
68+ // 创建成功后,通知父组件刷新并切换到新创建的分组
69+ emit (" refresh-and-select" , group .id );
70+ }
7371}
7472 </script >
7573
@@ -132,7 +130,6 @@ function handleSwitchToGroup(groupId: number) {
132130 <group-form-modal
133131 v-model:show =" showGroupModal"
134132 @success =" handleGroupCreated"
135- @switch-to-group =" handleSwitchToGroup"
136133 />
137134 </div >
138135</template >
You can’t perform that action at this time.
0 commit comments