0.0.9 • Published 4 years ago

af-elements v0.0.9

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

af-element

UI-开源组件库,会封装一些element-ui的组件,使其更方便达到我们的需求, 也会独自开发一些组件使用,因时间有限不定期更新中 项目无法启动请下载后自行查看代码使用

安装

npm i af-elements
npm i element-ui -S

在main.js引入

import afComponents from 'af-element'
import ElementUI from 'element-ui';
Vue.use(ElementUI);
Vue.use(afComponents)

使用示例

<af-button ><af-button/>

按钮

参数说明类型可选值默认值
size按钮sizeStringmini/small/mediummini
type按钮类型Stringprimary/success/info/warning/danger无类型
round是否圆角Booleantrue/falsefalse
@click点击事件---

slot

名称说明
-自定义内容

biglog弹框(使用element封装)

参数说明类型可选值默认值
show显示隐藏Booleantrue/falsefalse
title主标题名String自定义新建方案向导
tabs左侧标签页Array[]
ruleFun内部校验回调Functionfalse

tabs预览

  var tabs=[
          {
            label:'xxx1',//tabs名字
            name:"1",//第一步 必须是"1"
            disable:false,//是否禁用
            slot:'setmsg'//父组件具名插槽名称
          },
          {
            label:'xxx2',
            name:"2",
            disable:true,
            slot:'setmonth'
          },
          {
            label:'xxx3',
            name:"3",
            disable:true,
            slot:'setpower'
          },
          {
            label:'xxx4',
            name:"4",
            disable:true,
            slot:'setbuy'
          },
        ]

总体预览

  <af-biglog
        ref="bigLog"
        :title="digTitle"
        :show.sync="digShow"
        @nextCallback="nextCallback"
  
        @computedSave ="computedSave"
        :tabs.sync="tabs"
        :ruleFun="ruleFun"
    >
          <!--nextCallback为下一步回调返回值res为第几步-->
         <!--computedSave未保存回调-->
      <div slot="setmsg" class="biglog-class">
        
      </div>
      <div slot="setmonth">
     
      </div>
      <div slot="setpower"> </div>
      <div slot="setbuy"> </div>
    </af-biglog>

drawer查询面板(使用element封装)

参数说明类型可选值默认值
name名称String自定义查询面板
modal显示隐藏Booleantrue,falsefalse
    <base-drawer >
   
    </base-drawer>

导出(使用element封装)

记得引入axios

参数说明类型可选值默认值
buttonName按钮名称String自定义导出
path接口路径String自定义''
data接口参数Object{}
type接口类型get/postget
fileName文件名字String自定义文件
fileSuffix文件后缀String自定义.xls

大屏标签展示

<af-tabCard
  :data="data"
  :topStyle="topStyle"
  :bottomStyle="bottomStyle"
/>
参数说明类型可选值默认值
data数据结构Object{val:'',text:''}{}
topStyle上文字样式String自定义'font-size: 32px;'
bottomStyle下文字样式String自定义'font-size: 16px;color: #a9a9a9;'

slot:自定义

以列为表头的表格(可包含子集)

      <div style="width: 100%">
        <automaticTable
            :header="header"
            :body="body"
        />
      </div>
参数说明类型可选值默认值
header表头Arrayheader:{title:'123'},{title:'qaq'},{title:'qwe'}[]
bodyArraybody:[{list:'测试1',2,3,4, level:1},{list:'测试2',6,7,8, level:2},{list:'测试3',29,39,49, level:3}[]

注若以列为表头可设置header=[],body可以为[qaq:{chidren:[]}]包含chidren的格式内部有做数组扁平化操作 import { delayer } from '@/assets/js/tool' 可以去我的github引入tools.js github地址:https://github.com/PleaseStartYourPerformance/js-tools/tree/master/src

Vue富文本编译器vue-quill-editor组件封装

     <edit
     :noun="noun"
     >
     </edit>
参数说明类型可选值默认值
nounString自定义null
editorOption工具栏Object自定义{}

学习文章----https://blog.csdn.net/div_ma/article/details/79536634

Echarts组件封装

 <charts 
     style="height: 200px" 
     :option="lineOption" 
     id="pieChart1" />
参数说明类型可选值默认值
id用到得id不传会使用随机数String自定义随机数
optionoptionObject自定义{}
citys地图jsonObject自定义{}
classNameclass类String自定义chart
widthString自定义'100%'
heightString自定义'100%'

日历组件-vue版本

含有接口联调具体请看具体代码默认数据都包含

左侧弹框组件

 <diglogLeft 
     :diglog_tab1_style="diglog_tab1_style" 
    :diglog_tab2_style="diglog_tab2_style" 
    :show_style="0"
    :show_style="200"
     />
参数说明类型可选值默认值
diglog_tab1_style自定义最外层div样式(可设置宽高)Object自定义{}
diglog_tab2_style自定义按钮div样式Object自定义{}
show_style弹出距离(原理margin-left)String自定义'0'
hide_style隐藏的距离String自定义'0'

结语 持续更新中

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago