
Security News
Researcher Exposes Zero-Day Clickjacking Vulnerabilities in Major Password Managers
Hacker Demonstrates How Easy It Is To Steal Data From Popular Password Managers
wok-ui 是一个前端 UI 组件库,简洁易用,响应式设计,无第三方依赖。wok-ui is a front-end UI component library that is simple and easy to use, responsive design, and no third party dependencies.
wok-ui 是一个前端 UI 组件库,简洁易用,响应式设计,无第三方依赖,基于 Typescript 有完整的类型约束。
优点:
缺点:
正常使用 npm 安装
npm i wok-ui --save
在国内有时候会因为网络问题无法使用 npm 来安装,经常出现 ETIMEDOUT 错误, 也因为这个问题新版本可能无法及时发布到 npm 官方仓库。 若急需使用新版本,可以使用 git 仓库来安装。
npm install git+https://gitee.com/tai/wok-ui.git --save
入口文件 src/main.ts 代码示例
import 'wok-ui/dist/style.css'
import { DivModule, Text } from 'wok-ui'
// 页面模块,可以继承 Module 或 DivModule 来构建一个新的模块
class Page extends DivModule {
constructor() {
super()
this.addChild(new Text('Hello world !'))
}
}
// 创建页面模块的实例,然后挂载到 body 上
new Page().mount(document.body)
如果要使用路由,可以使用 initRouter 函数,函数返回一个 Router 实例,也是一个模块,可以直接挂载到 body 上。
import 'wok-ui/dist/style.css'
import { DivModule, Text } from 'wok-ui'
// 首页模块,对于复杂度高的项目,页面需要分拆到不同的文件中
class HomePage extends DivModule {
constructor() {
super()
this.addChild(new Text('Hello world !'))
}
}
initRouter({
mode: 'hash',
rules: [{ path: '/', module: () => new HomePage() }]
}).mount(document.body)
更多的使用方法,请查看文档。
FAQs
wok-ui 是一个前端 UI 组件库,简洁易用,响应式设计,无第三方依赖。wok-ui is a front-end UI component library that is simple and easy to use, responsive design, and no third party dependencies.
We found that wok-ui demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Hacker Demonstrates How Easy It Is To Steal Data From Popular Password Managers
Security News
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.