2 Star 11 Fork 4

武松 / flow-chart

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
selectArea.md 959 Bytes
一键复制 编辑 原始数据 按行查看 历史
newpanjing 提交于 2019-03-08 18:03 . Initial commit

select.area.js

js div 创建选区

用法:

    new SelectArea(options).register(el)

options:

名称 参数 说明
onBegin data 选区结束
onHandler data 选区拉伸中
onEnd data 选区开始

支持jquery


$.fn.selectArea=function() {
    var options={
        onBegin:function(data) {
          
        },
        onEnd:function(data) {
          
        },
        onHandler:function(data) {
          
        }
    }
  new SelectArea(options).register(this);
}

jquery使用:

 $(".aa").selectArea();

支持vue


    Vue.directive('selectarea', {
        inserted(el, binding) {
            var options={};
            new Resize(options).register(el);
        }});

vue使用:

<div v-selectarea="{aa:123}"></div>

PS: 为什么不适用驼峰大小写?

vue会报错,具体原因还没来得及去看文档。

JavaScript
1
https://gitee.com/tompeppa/flow-chart.git
git@gitee.com:tompeppa/flow-chart.git
tompeppa
flow-chart
flow-chart
master

搜索帮助