0.9.12 • Published 7 years ago

rj-component-vue v0.9.12

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

rj-component-vue-example

npm npm vue2

rainjoy font-end component library based on vue.js

英文中文0 - 未开发 1 - 试验性 2 - 稳定文档
General基础组件⚡️⚡️
button按钮1
cell单元格1
icon字体图标1
loadingicon加载图标1
mask蒙层1
rowflex布局1?
Form表单组件⚡️⚡️
checklist多选按钮1?
radio单选按钮1?
star星星打分评级1
switcher开关切换1
upload上传按钮1
Display视图组件⚡️⚡️
actionsheet操作表1
avatar头像1
bandge徽章切换(竖型tab)1
card卡片1
image图片1
imagepreview图片预览1
mapper地图1
pagelist上滑滚动分页加载1?
swiper轮播1
tab标签切换1
uploader上传照片1
Feedback反馈组件⚡️⚡️
loading加载界面1
loadingdirective加载指令1
loadingmethod加载方法1
msgbox消息弹出框1
popup模态弹窗1
toast消息提示框1
JS APIJS 组件⚡️⚡️
asyncload异步加载JS1
avatarview万像优图+过滤协议+webp+默认头像1
dateformate时间格式化1
fetch发送请求或者获取资源(同构)1
imageoptimizer万像优图1
imageview万像优图+过滤协议+webp1
issupportwebp是否支持webp1
lazyloading懒加载1
log当开启调试模式,页面链接带有rj_debug=on或cookie里面包含rj_debug=on,控制台输出1
map高德地图SDK1
protocol过滤协议1
scroll滚动指令1
title修改页面标题1
xhtml富文本处理1

USE

Install

npm install === yarn add

npm install -S rj-component-vue
npm install git+https://github.com/zhouyu1993/rj-component-vue.git

或者

npm install git+ssh://git@github.com:zhouyu1993/rj-component-vue.git

Import all components

import Vue from 'vue'
import rjcv from 'rj-component-vue'

Vue.use(rjcv)

Import specific component

import Vue from 'vue'
import Test from 'rj-component-vue/lib/Test'

import 'rj-component-vue/lib/Test/style.css'

Vue.component(Test.name, Test)

⚠️Use babel-plugin-component

  • Auto import css file
  • Modular import component

Install babel-plugin-component

npm install -D babel-plugin-component

Set the configuration of babel-plugin-component in .babelrc

{
  "plugins": [
    [
      "component",
      [
        {
          "libraryName": "rj-component-vue",
          "style": true
        }
      ]
    ]
  ]
}

Then import rj-component-vue

import Vue from 'vue'
import { Test } from 'rj-component-vue'

Vue.component(Test.name, Test)