2.0.0 • Published 3 years ago

cll-vue-components v2.0.0

Weekly downloads
5
License
MIT
Repository
github
Last release
3 years ago

vue components

  • vue 组件

Install

npm install cll-vue-components --save

USE

/** 全部引用 */
import CllVueComponents from 'cll-vue-components'
Vue.use(CllVueComponents[, options])

/** 单个引用 */
// 插件 example:
import Tooltip from 'cll-vue-components/plugins/tooltip'
Vue.use(Tooltip)

// 组件 example:
import Pagination from 'cll-vue-components/lib/pagination'
<pagination />

Plugins

文字提示 demo

tooltip

import Tooltip from 'cll-vue-components/plugins/tooltip'
Vue.use(Tooltip)
<div v-tooltip.top.click="'top'">top</div>
方法说明
auto默认,自动显示
top上方显示
left左方显示
right右方显示
bottom下方显示
click点击显示


树形数据 demo

ztree

import CZtree from 'cll-vue-components/plugins/ztree'
Vue.use(CZtree)
<c-ztree @click="clickEvent" @select="selectEvent" :d="data" :int="int" select="true" />
参数类型说明
d<Array>数据源 扁平化数据 通过id、pid字段构建树形结构
select<String>是否有复选框 false/true
eventType<String>鼠标点击事件触发类型 member/all
click<Function>(Object)点击名称回调事件
select<Function>(Arrry)点击复选框回调事件
int<Number>数据源更换时 改变该值 进行刷新 不监听数据源降低性能消耗


提示信息 demo

message alert

import Message from 'cll-vue-components/plugins/message'
Vue.use(Message)
this.$message.success('成功的显示一段文字!', 5)
this.$message.error('成功的显示一段文字!', 5)
this.$message.warning('成功的显示一段文字!', 5)
this.$message.info('成功的显示一段文字!', 5)
this.$alert('内容', '标题', () => {this.$message.info('关闭', 2)})
this.$confirm({
  title: '标题',
  message: '<div><i></i>内容 </div>',
  callback: () => this.$message.info('确定', 4),
  cancel: () => this.$message.info('取消', 4),
  close: () => this.$message.info('关闭', 4)
})


加载动画 demo

loading loading-twopoints loading-phone

import Loading from 'cll-vue-components/plugins/loading'
Vue.use(Loading, { skin: 'twopoints' })
this.$loading.show('数据加载中...')
this.$loading.hide()
or
<div loadingText='数据加载中...' v-loading='load'>load</div>
参数
skintwopoints/phone/default


日历 demo

datepicker-range datepicker datepicker-month datepicker-year calendar

import CDatePicker from 'cll-vue-components/plugins/datePicker'
Vue.use(CDatePicker)

<c-date-picker type="range" startDate="2018/12/31 12:12:13" endDate="2019/01/14 12:13:14" format="yyyy/MM/dd HH:mm:ss" :quickSelection='quickSelection' @change='timeChange' @preOpen='' />
// or
<c-date-picker-calendar :marks='marks' color='#ffffff' backgroundColor='#26374f' size='16' rowHeight='50' :int='int' @change='change' :year='year' :month='month' :day='day' @changePage='changePage' />
参数
typerange/dateTime
startDate开始时间 默认当前
endDate结束时间 默认当前
format时间格式化 默认 yyyy-MM-dd HH:mm:ss
quickSelection快速选择类型
change时间发生更改回调方法
preOpen打开面板前执行
min最小可选时间,仅支持天,格式 yyyy/MM/dd 或 yyyy-MM-dd
max最大可选时间,仅支持天,格式 yyyy/MM/dd 或 yyyy-MM-dd


下载 demo

download

import Download from 'cll-vue-components/plugins/download'
Vue.use(Download)
<div class="box" v-download="url" fileName="图片.png" >下载</div>


折叠面板 demo

collapse

import Collapse from 'cll-vue-components/plugins/collapse'
Vue.use(Collapse)
<div class="title" @click="collapseState=!collapseState">标题1</div>
<div v-collapse="collapseState" >
  <-- 内容 -->
</div>
<div v-collapse-group='0' >
  <div class="title" @click="r1=!r1">标题1</div>
  <div class="body" v-collapse >
    <-- 内容 -->
  </div>
</div>


components

动画 demo

canvas

import CCanvasAnimate from 'cll-vue-components/lib/canvasAnimate'
<c-canvas-animate icon='polygon-3' height=200 width=200 color="#fff000" speed=2000/>
参数类型说明
icon<String>图形 circle、polygon-n、stars-n、rotate-n、image://+图片路径(n 为正整数)
height<String/Number>高度
width<String/Number>宽度
color<String>颜色
speed<String/Number>动画循环一次时间周期


拖拽 demo

drag

import CDragable from 'cll-vue-components/lib/dragable'
<c-dragable :top='top' :left='left'>
  <div class="boxing">
    <div dragalow >拖拽的触发容器</div>
    ...
  </div>
</c-dragable>
参数类型说明
top<Number>初始化top值
left<Number>初始化left值
alowdragnull拖拽鼠标目标


简易图片轮播 demo

easy-img

import CEasyImg from 'cll-vue-components/lib/easyImg'
<c-easy-img :int="int" :d="d" type="real" :speed="speed" :radio="radio" />


图片播放 demo

img

import CImgPlay from 'cll-vue-components/lib/imgPlay'
<c-img-play :int="int" :d="d" :config="config" />


可操作图片 demo

img

import CImgShow from 'cll-vue-components/lib/imgShow'
<c-img-show :img="img" :title="title" />


播放轴 demo

img

import CPlayBar from 'cll-vue-components/lib/playBar'
<c-play-bar :int="playInt" :d="data" :config="playConfig" @change="imgChange" />


概化图 demo

map

import CEasyMap from 'cll-vue-components/lib/easyMap'
<c-easy-map :d="d" :int="int" :config="config" @click="clickEvent" @hover="hover">
  <div class="legend" slot="bottomRight">图例</div>
</c-easy-map>


表格 demo

table

import CEasyTable from 'cll-vue-components/lib/easyTable'
<c-easy-table :int="int" :d="d" :config="config" :clickEvent="tableClick" />


步骤 demo

step

import CStep from 'cll-vue-components/lib/step'
<c-step :steps="steps" v-model="step" height="70" width="800" />


分页 demo

pagination

import CPagination from 'cll-vue-components/lib/pagination'
<c-pagination :textAlign='textAlign' :pageSize='pageSize' :current='current' :total='total' @change='change' />


上传 demo

upload

import CUpload from 'cll-vue-components/lib/upload'
<c-upload :url="url" :headers="headers" :success="success" :error="error" multiple='true' />


导航树 demo

nav-tree

import CNavTree from 'cll-vue-components/lib/navTree'
<c-nav-tree @change="确定事件" :d="数据源" :int="int" :current='初始化选中' />


颜色选择器 demo

colorpicker

import CColorPicker from 'cll-vue-components/lib/colorPicker'
<c-color-picker v-model="color" :predefineColors='ColorArray' />


按钮 demo

button

import CButton from 'cll-vue-components/lib/button'
<c-button disabled type="primary">名称</c-button>


下拉选择 demo

select

import CSelect from 'cll-vue-components/lib/select'
<c-select v-model="mValue" filter :options="options" placeholder="placeholder" disabled :width='width'>名称</c-select>
2.0.0

3 years ago

0.1.42

3 years ago

0.1.41

3 years ago

0.1.40

3 years ago

0.1.39

3 years ago

0.1.38

3 years ago

0.1.37

4 years ago

0.1.36

4 years ago

0.1.35

4 years ago

0.1.34

4 years ago

0.1.33

4 years ago

0.1.32

4 years ago

0.1.31

4 years ago

0.1.30

4 years ago

0.1.29

4 years ago

0.1.28

4 years ago

0.1.27

4 years ago

0.1.26

4 years ago

0.1.25

4 years ago

0.1.24

5 years ago

0.1.23

5 years ago

0.1.22

5 years ago

0.1.21

5 years ago

0.1.20

5 years ago

0.1.19

5 years ago

0.1.18

5 years ago

0.1.17

5 years ago

0.1.16

5 years ago

0.1.15

5 years ago

0.1.14

5 years ago

0.1.13

5 years ago

0.1.12

5 years ago

0.1.11

5 years ago

0.1.10

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.28

5 years ago

0.0.27

5 years ago

0.0.26

5 years ago

0.0.25

5 years ago

0.0.24

5 years ago

0.0.23

5 years ago

0.0.22

5 years ago

0.0.21

5 years ago

0.0.20

5 years ago

0.0.19

5 years ago

0.0.18

5 years ago

0.0.17

5 years ago

0.0.16

5 years ago

0.0.15

5 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago