【问题标题】:disable multiple selection in UniSharp package laravel在 UniSharp 包 laravel 中禁用多项选择
【发布时间】:2020-07-25 05:54:49
【问题描述】:

如何在 UniSharp 包 laravel 中禁用多项选择? 查看图片我只需要选择一张图片!

【问题讨论】:

    标签: laravel multi-select unisharp-file-manager


    【解决方案1】:

    我解决了, 在视图中,

    window.open(route_prefix + '?type=' + options.type+'?&multiple=false' || 'file', 'FileManager', 'width=900,height=600');

    而不是

    window.open(route_prefix + '?type=' + options.type|| 'file', 'FileManager', 'width=900,height=600');

    并打开 vendor\unisharp\laravel-filemanager\public\js\script.js 文件

    更新这些行:

    var myParam = location.search.split('multiple=')[1];//new
    //alert(myParam);//new
    if(myParam == 'false'){ //new
      multi_selection_enabled = multi_selection_enabled;//
    }else{
        multi_selection_enabled = !multi_selection_enabled;//here
    }
    

    代替:

    multi_selection_enabled = !multi_selection_enabled;

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-09-10
      • 1970-01-01
      • 2015-10-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-12-18
      • 1970-01-01
      相关资源
      最近更新 更多