AyaWo.Web/Content/zui/dist/lib/sortable/zui.sortable.js
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*!
* ZUI: 排序 - v1.7.0 - 2017-06-17
* http://zui.sexy
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2017 cnezsoft.com; Licensed MIT
*/
/* ========================================================================
* ZUI: sortable.js
* http://zui.sexy
* ========================================================================
* Copyright (c) 2014-2016 cnezsoft.com; Licensed MIT
* ======================================================================== */
+ function($, window, document) {
'use strict';
if(!$.fn.droppable) {
console.error('Sortable requires droppable.js');
return;
}
var NAME = 'zui.sortable',
DEFAULTS = {
selector : 'li,div',
dragCssClass : 'invisible',
sortingClass : 'sortable-sorting'
},
STR_ORDER = 'order';
var Sortable = function(element, options) {
var that = this;
that.$ = $(element);
that.options = $.extend({}, DEFAULTS, that.$.data(), options);
that.init();
};
Sortable.DEFAULTS = DEFAULTS;
Sortable.NAME = NAME;
Sortable.prototype.init = function() {
var that = this,
$root = that.$,
options = that.options,
selector = options.selector,
sortingClass = options.sortingClass,
dragCssClass = options.dragCssClass,
isReverse = options.reverse;
var markOrders = function($items) {
$items = $items || that.getItems(1);
var orders = [];
$items.each(function() {
var order = $(this).data(STR_ORDER);
if(typeof order === 'number') {
orders.push(order);
}
});
后面还有 109 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。