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 33 "displayName" : " lowcode" ,
44 "description" : " lowcode tool, support ChatGPT and other LLM" ,
55 "author" :
" wjkang <[email protected] >" ,
6- "version" : " 1.8.3 " ,
6+ "version" : " 1.8.4 " ,
77 "icon" : " asset/icon.png" ,
88 "publisher" : " wjkang" ,
99 "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) => {
5454 }
5555 } else {
5656 props . onOk ( {
57- updateModelImmediately : true ,
57+ updateModelImmediately : false ,
5858 onlyUpdateParams : false ,
5959 model : result , // 旧版本只返回 model
6060 } ) ;
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import 'swiper/swiper.css';
1111import 'viewerjs/dist/viewer.css' ;
1212
1313export default ( props : {
14- blockItem : Model [ 'materials' ] [ 0 ] ;
14+ blockItem : NonNullable < Model [ 'materials' ] > [ 0 ] ;
1515 onDefaultClick : ( ) => void ;
1616} ) => {
1717 const viewer = useRef < Viewer | undefined > ( ) ;
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ export default () => {
2020 < div style = { { textAlign : 'center' , marginBottom : '20px' } } >
2121 < Search
2222 placeholder = "输入关键字查询"
23+ value = { model . searchValue }
2324 onChange = { ( el ) => {
2425 const { value } = el . target ;
2526 model . setSearchValue ( value ) ;
Original file line number Diff line number Diff line change @@ -19,7 +19,9 @@ export const useModel = () => {
1919 } [ ]
2020 | undefined
2121 > ( undefined ) ;
22- const [ oriMaterials , setOriMaterials ] = useState < typeof materials > ( [ ] ) ;
22+ const [ oriMaterials , setOriMaterials ] = useState <
23+ NonNullable < typeof materials >
24+ > ( [ ] ) ;
2325
2426 const [ selectedMaterial , setSelectedMaterial ] = useState <
2527 NonNullable < typeof materials > [ 0 ]
Original file line number Diff line number Diff line change @@ -54,9 +54,23 @@ export default class Service {
5454 typeof s . preview . img === 'string' ? [ s . preview . img ] : s . preview . img ,
5555 } ,
5656 } ) ) ;
57- this . model . setMaterials ( list ) ;
57+
5858 this . model . setOriMaterials ( list ) ;
5959 this . model . setSelectedCategory ( [ ] ) ;
6060 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+ }
6175 }
6276}
You can’t perform that action at this time.
0 commit comments