From 1fea3eea7c99962b3ff5758e9fd0752fe3f24873 Mon Sep 17 00:00:00 2001 From: dntzhang Date: Sun, 3 Dec 2023 18:04:24 +0800 Subject: [PATCH] docs: readme --- packages/omi-weui/README.md | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/packages/omi-weui/README.md b/packages/omi-weui/README.md index 8e0f0fe3fc..d4bdd58ff0 100644 --- a/packages/omi-weui/README.md +++ b/packages/omi-weui/README.md @@ -3,25 +3,36 @@ OMI 版本 WeUI 是一套同微信原生视觉体验一致的基础样式库,由微信官方设计团队为微信内网页和微信小程序量身设计,令用户的使用感知更加统一。 -## Installation +## 安装 ```bash npm i omi-weui ``` -## Usage +## 使用 ```tsx -import '@omi-weui/button' +import { WeButton } from 'omi-weui' +WeButton.define('we-button') ``` 在各个框架中使用: ```tsx -按钮 // omi -按钮 // vue -按钮 // html +按钮 // omi +按钮 // vue +按钮 // react +按钮 // html ``` +或者直接: + +```tsx +const btn = document.createElement('we-button') +btn.innerText = '按钮' +document.body.appendChild(btn) +``` + + ## License