File tree Expand file tree Collapse file tree 6 files changed +22
-5
lines changed Expand file tree Collapse file tree 6 files changed +22
-5
lines changed Original file line number Diff line number Diff line change 3
3
"displayName" : " lowcode" ,
4
4
"description" : " lowcode tool, support ChatGPT and other LLM" ,
5
5
"author" : " wjkang <ruoxieme@gmail.com>" ,
6
- "version" : " 1.8.3 " ,
6
+ "version" : " 1.8.4 " ,
7
7
"icon" : " asset/icon.png" ,
8
8
"publisher" : " wjkang" ,
9
9
"repository" : " https://github.com/lowcoding/lowcode-vscode" ,
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ const RunScript: React.FC<IProps> = (props) => {
54
54
}
55
55
} else {
56
56
props . onOk ( {
57
- updateModelImmediately : true ,
57
+ updateModelImmediately : false ,
58
58
onlyUpdateParams : false ,
59
59
model : result , // 旧版本只返回 model
60
60
} ) ;
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import 'swiper/swiper.css';
11
11
import 'viewerjs/dist/viewer.css' ;
12
12
13
13
export default ( props : {
14
- blockItem : Model [ 'materials' ] [ 0 ] ;
14
+ blockItem : NonNullable < Model [ 'materials' ] > [ 0 ] ;
15
15
onDefaultClick : ( ) => void ;
16
16
} ) => {
17
17
const viewer = useRef < Viewer | undefined > ( ) ;
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ export default () => {
20
20
< div style = { { textAlign : 'center' , marginBottom : '20px' } } >
21
21
< Search
22
22
placeholder = "输入关键字查询"
23
+ value = { model . searchValue }
23
24
onChange = { ( el ) => {
24
25
const { value } = el . target ;
25
26
model . setSearchValue ( value ) ;
Original file line number Diff line number Diff line change @@ -19,7 +19,9 @@ export const useModel = () => {
19
19
} [ ]
20
20
| undefined
21
21
> ( undefined ) ;
22
- const [ oriMaterials , setOriMaterials ] = useState < typeof materials > ( [ ] ) ;
22
+ const [ oriMaterials , setOriMaterials ] = useState <
23
+ NonNullable < typeof materials >
24
+ > ( [ ] ) ;
23
25
24
26
const [ selectedMaterial , setSelectedMaterial ] = useState <
25
27
NonNullable < typeof materials > [ 0 ]
Original file line number Diff line number Diff line change @@ -54,9 +54,23 @@ export default class Service {
54
54
typeof s . preview . img === 'string' ? [ s . preview . img ] : s . preview . img ,
55
55
} ,
56
56
} ) ) ;
57
- this . model . setMaterials ( list ) ;
57
+
58
58
this . model . setOriMaterials ( list ) ;
59
59
this . model . setSelectedCategory ( [ ] ) ;
60
60
this . model . setCategoryList ( categoryList ) ;
61
+ if ( list . some ( ( s ) => s . privateMaterials ) ) {
62
+ const notPrivate = list . find ( ( s ) => ! s . privateMaterials ) ;
63
+ if ( notPrivate ) {
64
+ setTimeout ( ( ) => {
65
+ const projectName = notPrivate . name ;
66
+ this . model . setSearchValue ( projectName ) ;
67
+ this . search ( ) ;
68
+ } , 1000 ) ;
69
+ } else {
70
+ this . model . setMaterials ( list ) ;
71
+ }
72
+ } else {
73
+ this . model . setMaterials ( list ) ;
74
+ }
61
75
}
62
76
}
You can’t perform that action at this time.
0 commit comments