src/main/webapp/assets/expand/module/selectPlus/selectPlus.js

(开头部分) 14KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/**
 * @ Name:selectPlus 加强版的选择框,可以多选、单选以及通过ulr导入数据
 * @ Author: YWang
 * @ License: MIT 
 */

layui.define('form', function (exports) {
  var $ = layui.$,
    form = layui.form,
    hint = layui.hint()
    // 字符常量
    ,
    MOD_NAME = 'selectPlus',
    SELECT = 'layui-form-select',
    SELECTED = 'layui-form-selected'

    ,
    selectPlus = {
      index: layui.selectPlus ? layui.selectPlus.index : 0

        // 设置全局项
        ,
      set: function (options) {
          var that = this;
          that.config = $.extend({}, that.config, options);
          return that;
        }

        // 事件监听
        ,
      on: function (events, callback) {
        return layui.onevent.call(this, MOD_NAME, events, callback);
      }
    }

    // 操作当前实例
    ,
    thisIns = function () {
      var that = this,
        options = that.config;

      return {
        // 获取数据
        getChecked: function () {
          return that.getChecked.call(that);
        },
        // 配置数据
        config: options
      }
    }

    // 构造器
    ,
    Class = function (options) {
      var that = this;
      that.index = ++selectPlus.index;
      that.config = $.extend({}, that.config, selectPlus.config, options);
      that.render();
    };

后面还有 442 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。