jQuery EasyUI 基础插件 - Resizable 可调整尺寸

jQuery EasyUI 教程 · 2019-04-07 11:39:22

通过 $.fn.resizable.defaults 重写默认的 defaults。

用法

通过标记创建可调整尺寸(resizable)对象。

<div class="easyui-resizable" style="width:100px;height:100px;border:1px solid #ccc;"
    data-options="maxWidth:800,maxHeight:600">
</div>

使用 javascript 创建可调整尺寸(resizable)对象。

<div id="rr" style="width:100px;height:100px;border:1px solid #ccc;"></div>
$('#rr').resizable({
    maxWidth:800,
    maxHeight:600
});

属性

名称 类型 描述 默认值
disabled boolean 如果设置为 true,则禁止调整尺寸。 false
handles string 指可调整尺寸(resizable)的方向,'n' 是北,'e' 是东,等等。 n, e, s, w, ne, se, sw, nw, all
minWidth number 调整尺寸时最小宽度。 10
minHeight number 调整尺寸时最小高度。 10
maxWidth number 调整尺寸时最大宽度。 10000
maxHeight number 调整尺寸时最大高度。 10000
edge number 被调整尺寸的边框的边缘。 5

事件

名称 参数 描述
onStartResize e 开始调整尺寸时触发。
onResize e 调整尺寸期间触发。返回 false 时,DOM 元素将不进行实际的调整尺寸动作。
onStopResize e 停止调整尺寸时触发。

方法

名称 参数 描述
options none 返回可调整尺寸(resizable)选项(options)。
enable none 启用可调整尺寸(resizable)特性。
disable none 禁用可调整尺寸(resizable)特性。

点击查看所有 jQuery EasyUI 教程 文章: https://www.codercto.com/courses/l/42.html

查看所有标签

How to Design Programs

How to Design Programs

Matthias Felleisen、Robert Bruce Findler、Matthew Flatt、Shriram Krishnamurthi / The MIT Press / 2001-2-12 / 71.00美元

This introduction to programming places computer science in the core of a liberal arts education. Unlike other introductory books, it focuses on the program design process. This approach fosters a var......一起来看看 《How to Design Programs》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

URL 编码/解码
URL 编码/解码

URL 编码/解码

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换