File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ ' alita ' : patch
3+ ---
4+
5+ fix: qrcode get port error
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ export default (api: IApi) => {
66 api . onDevCompileDone ( async ( { isFirstCompile } ) => {
77 if ( api . userConfig . appType === 'pc' ) return ;
88 if ( ! isFirstCompile ) return ;
9- const port = process . env . PORT || 8000 ;
9+ const port = api . appData . port || 8000 ;
1010 const isHTTPS = process . env . HTTPS || api . args ?. https ;
1111 const lanIp = address . ip ( ) ;
1212 const protocol = isHTTPS ? 'https' : 'http' ;
@@ -24,10 +24,6 @@ export default (api: IApi) => {
2424 small : true ,
2525 } ) ;
2626 }
27- // TODO: port 要去动态的 port
28- logger . info (
29- '这里有一个 bug 取不到动态的 port,所以先保证你运行的 dev 服务是在 8000 端口' ,
30- ) ;
3127 logger . event ( `Network: ${ chalk . cyan ( lanUrl ) } ` ) ;
3228 } ) ;
3329} ;
Original file line number Diff line number Diff line change 1010 < / For >
1111 ```
1212
13+ ``` ts
14+ {
15+ items .map ((item , index ) => <div data -index ={index()}>{item }< / div > )
16+ }
17+ ```
18+
1319## Show
1420
1521``` typescript
1824< / Show >
1925```
2026
27+ ``` ts
28+ {
29+ bool && <div >show !! < / div >
30+ ! bool && <div >hidden ! < / div >
31+ }
32+ ```
33+
2134## Switch
2235
2336``` typescript
3144< / Switch >
3245```
3346
47+ ``` ts
48+ {
49+ state .route === ' home' && <Home />
50+ state .route === ' settings' && <Settings />
51+ (state .route !== ' home' && state .route !== ' settings' ) && <FourOhFour />
52+ }
53+ ```
3454## ErrorBoundary
3555
3656``` typescript
5575< / ErrorBoundary >
5676```
5777
78+ ## Page
79+ ## Header
80+
81+ ## Content
82+ ## Footer
83+
5884
5985参考api https://www.solidjs.com/docs/latest/api
6086
You can’t perform that action at this time.
0 commit comments