Giter Club home page Giter Club logo

vue-icui's Introduction

概述

vue-icui 是一套基于vue.js 的移动端组件库,封装了一系列组件,方便日常的开发工作。同时为了和底端的样式完全解耦,并提高样式文件的通用性,我们采用了直接封装icui.css的形式,这样在非vue环境,也可以直接使用icui.css文件,同时也减少了vue组件开发的负担。

为了加快开发速度,本组件结构大量参考了we-vue

使用说明

目前可以通过npm的方式来引入,引入后通过vue.use(icuiVue)的方式来使用

// npm
$ npm install vue-icui -S

在main.js里

import 'vue-icui/lib/style.css'
import icuiVue from 'vue-icui'

Vue.use(icuiVue)

开发说明

克隆代码,安装依赖,并运行本地服务

$ clone https://github.com/zhyjor/vue-icui
$ cd vue-icui && npm install
$ npm run dev
  • 开发的工作空间在src/componets,在该目录下添加vue组件,组件文件不包含样式,按照现有组件的格式写组件
  • src/index.js是入口文件,但是该文件是通过build/bin/build-enrty.js自动生成的,不需修改。新添加的组件脚本会自动识别,并添加引用到该文件里

api组件的开发

对于picker,toast,dialog组件的开发原则是api组件,即不必再页面引入组件,直接通过api调用的形式开发,请参考dialog组件,其api调用方式如下

this.dialog = this.$createDialog({
  type: 'confirm',
  title: '我是标题',
  content: '我是内容'
})
this.dialog.show()

调试说明

调试demo也是通过一个vue项目进行

  • 调试的工作空间是example/,在~/pages里添加测试模块
  • 路由通过~/router/nav.json配置

vue-icui's People

Contributors

zhyjor avatar susan007 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.