@@ -68,6 +68,7 @@ const handleSave = () => {
6868 createPoint (createPointForm .value ).then ((res : any ) => {
6969 if (res .code == 200 ) {
7070 emit (' updateCode' , res .data .code )
71+ slotStore .getSlots ()
7172 statusStore .setLoading (false )
7273 } else {
7374 statusStore .setLoading (false )
@@ -104,13 +105,12 @@ const isJavaIdentifierValid = (name: String) => {
104105
105106 return ! javaKeywords .has (name );
106107}
107- const handleSlotChange = (newSlot ) => {
108- // createPointForm.value = {
109- // ...createPointForm.value,
110- // ...newSlot
111- // }
112- console .log (newSlot )
113- createPointForm .value .slotId = newSlot .slotId
108+ const handleSlotChange = (value ) => {
109+ if (typeof value === ' string' ) {
110+ createPointForm .value .slotId = value
111+ } else if (typeof value === ' object' ){
112+ createPointForm .value .slotId = value .slotId
113+ }
114114}
115115const handleSubmit = async () => {
116116 const {valid} = await form .value .validate ();
@@ -167,9 +167,6 @@ const rules = [
167167 return t (' slot.rule.empty' )
168168 },
169169]
170- const customFilter = (item , queryText ) => {
171- return item .raw .slotId .toLowerCase ().includes (queryText .toLowerCase ())
172- }
173170 </script >
174171<template >
175172 <v-dialog class =" hotSwap" v-model =" dialog" max-width =" 480" >
@@ -197,6 +194,7 @@ const customFilter = (item, queryText) => {
197194 item-value =" slotId"
198195 item-title =" slotId"
199196 aria-autocomplete =" none"
197+ @update:modelValue =" handleSlotChange"
200198 >
201199 </v-combobox >
202200 </v-list-item-subtitle >
0 commit comments