像 flutter 风格用纯粹 js 构建页面
Go to file
2024-05-14 16:28:49 +08:00
.gitignore init 2024-01-12 04:22:52 +08:00
index.html 发布配置 2024-01-12 04:38:20 +08:00
index.js 发布配置 2024-01-12 04:38:20 +08:00
LICENSE Initial commit 2024-01-12 01:04:22 +08:00
main.js 增加 HTML5 语义标签 2024-05-14 16:28:24 +08:00
package.json 增加 HTML5 语义标签 2024-05-14 16:28:24 +08:00
README.md 更新 README.md 2024-05-14 14:57:46 +08:00

widgets

像 flutter 风格用纯粹 js 构建页面 { createElement List ListItem Span Button Img Input TextArea Avatar Dialog }

npm i @laniakeasupercluster/widgets
import { createElement, Button, Span } from '@laniakeasupercluster/widgets'

document.body.appendChild(createElement({
    style: { width: 320, height: 320, padding: 64 },
    children: [
        Span({ textContent: 'hello world!' })
        Button({
            textContent: 'click',
            onclick: event => {
                const randomNumber = Math.floor(Math.random() * 100)
                event.traget.textContent = 'click' + randomNumber
            }
        })
    ]
}))

dev

git clone git@git.satori.love:LaniakeaSupercluster/widgets.git
npm i
npm run dev