sparrow ui
vious version of pnpm code
?每个细节都有强大的主题定制。
?超强适应能力
IE / 边缘 | 火狐浏览器 | 铬合金 | 狩猎之旅 | 电子 |
|---|---|---|---|---|
| IE11、边缘 | 最后 2 个版本 | 最后 2 个版本 | 最后 2 个版本 | 最后 2 个版本 |
npm i @sparrowend/ui yarn add @sparrowend/ui pnpm add @sparrowend/uijsx
import { Button } from '@sparrowend/ui' ;
const App = ( ) => (
< >
< Button type = "primary" > PRESS ME </ Button >
</ >
) ;并手动导入样式:
import '@sparrowend/ui/dist/spui.css' ;
// or
// import '@sparrowend/ui/es/button/style';html
< html >
< link href = 'dist/spui.css' > </ link >
< script src = "dist/spui.js" > </ script >
or
< script type = "module" >
import { Message } from 'dist/spui-es.js';
Message.error('the end');
</ script >
< sp-button > click me </ sp-button >
</ html >导入地图
< html >
< link href = 'dist/spui.css' > </ link >
< script type = "importmap" >
{
"imports" : {
"sparrow-ui" : "dist/spui-es.js"
}
}
</ script >
< script type = "module" >
import { Message } from 'sparrow-ui';
Message.error('sucessful');
</ script >
</ html >节点(编译 ---> 任何)
<!--layout.art-->
< ! doctype html >
< html >
< head >
< meta charset = "utf-8" >
< title > { { block 'title' } } My Site { { / block } } </ title >
< link href = 'dist/spui.css' > </ link >
< script src = "dist/spui.js" > </ script >
{ { block 'head' } }
< link rel = "stylesheet" href = "main.css" >
{ { / block } }
</ head >
< body >
{ { block 'content' } } { { / block } }
</ body >
</ html > { { if user } }
< h2 > { { user . name } } </ h2 >
< sp - button > Thanks ! </ sp - button >
{ { / if}}使用 Gitpod,一个免费的 GitHub 在线开发环境。
或者克隆到本地:
$ git clone [email protected]:lianglei-git/sparrow-ui.git
$ cd sparrow-ui
$ npm install
$ npm run start我欢迎所有的贡献。请联系我: [email protected]