特性
基于
Vue
开发的 UI 组件基于 npm + webpack + babel 的工作流,支持 ES2015
CSS 样式独立,保证不同的框架实现都能保持统一的 UI 风格( 详见:AT-UI Style )
提供友好的 API,可灵活的使用组件
浏览器支持
现代浏览器和 IE9 及以上
Electron
安装
推荐使用 npm 安装
npm install at-ui
也可以使用
<script>
全局引用
<script type="text/javascript" src="at.min.js"></script>
使用
npm install at-ui-style
<link rel="stylesheet" href="at.min.css" />
全局组件使用
import Vue from 'vue'
import AtComponents from 'at-ui'
import 'at-ui-style' // 引入组件样式
// import 'at-ui-style/src/index.scss' // 或者引入未构建的 scss 样式
Vue.use(AtComponents)
this.$Message.success(config)
this.$Notify(config)
this.$Loading.start()
this.$Modal.alert(config)
单个组件使用
import { AtInput } from 'at-ui'
export default {
components: {
AtInput
},
data () {
return {
value: 'O2Team'
}
}
}
<template>
<div>
<at-input v-model="value" placeholder="请输入..."></at-input>
</div>
</template>
本地开发
$ git clone git@github.com:o2team/at-ui.git
$ npm install
$ npm run dev
贡献
本文分享自微信公众号 - 凹凸实验室(AOTULabs)。
如有侵权,请联系 support@oschina.cn 删除。
本文参与“OSC源创计划”,欢迎正在阅读的你也加入,一起分享。