0.0.3 • Published 4 years ago

v-demo-tools v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

typescript-tools-rollup

A tools project

工具类

import { watermark } from 'v-demo-tools'
// 页面DOM加载完毕之后调用
watermark({})
  • 配置项
const DEFAULT_SETTINGS = {
  id: 'water_mark_id', // 水印id
  text: '水印文本', // 水印的内容
  color: '#333', // 颜色
  opacity: 0.1, // 透明度
  fontSize: 20, // 字体
  width: 200, // 单个水印宽度
  height: 200, // 单个水印长度
  left: 0, // 水印整体左边距离
  top: 0, // 水印整体顶边距离
  right: 0, // 水印整体右边距离
  bottom: 0, // 水印整体顶边距离
  slope: -15, // 水印倾斜度数
  parentId: null // 水印插件挂载的父元素id,默认挂在body上
}

自定义指令

  import { directives } from 'v-demo-tools'
  import Vue from 'vue'

  const directivesKey = Object.keys(directives)
  directivesKey.map((item) => {
    Vue.directive(item, directives[item])
  })
0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago