1.0.1 • Published 3 years ago

dl-vue-directives v1.0.1

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

dl-directives

介绍

dl-directives是一个vue自定义指令库,上传到npm上供大家下载使用。 下载命令:npm i dl-vue-directives 仓库地址:https://gitee.com/w913026/dl-directives.git

安装教程

  1. npm i dl-vue-directives
  2. 在main.js中: import { directive } from 'dl-vue-directives' Vue.use(directive)
  3. 配置一些配置项

使用说明

  1. v-default指令,用于数据展示兜底,使用方法: 参数说明:1.value,可选,数据为undefined, null, 'NaN', ''时展示的值;不填时默认展示"--"。
  2. v-dialog指令,用于弹窗内input框输入时会被软键盘挡住的情况,使用方法: 参数说明:1.value,必填,需要整体往上弹的元素(例如弹窗内容的父元素)的选择器,例如:'#id','.class'。
  3. v-download指令,用于下载文件,目前支持pdf,img,支持下载链接和base64,使用方法: 1.下载链接:
  4. v-updown指令,用于数据涨跌展示,使用方法: 1.在main.js里设置涨跌颜色值,不设置默认为defaultColor: '#333333',downColor: '#FF3E4C',upColor: '#5BAE00' window.upDownColor = ({ defaultColor: 'xxx', downColor: 'xxx', upColor: 'xxx' }) 2.在需要的元素上添加v-updown指令

1.0.1

3 years ago

1.0.0

3 years ago