📌  相关文章
📜  如何使用 jQuery EasyUI Mobile 为文件设计树结构?

📅  最后修改于: 2021-11-25 04:31:48             🧑  作者: Mango

EasyUI是一个 HTML5 框架,用于使用基于 jQuery、React、Angular 和 Vue 技术的用户界面组件。它有助于为交互式 Web 和移动应用程序构建功能,为开发人员节省大量时间。它有助于为交互式 Web 和移动应用程序构建功能,为开发人员节省大量时间。

从官方网站下载所有需要的预编译文件并将其保存在您的工作文件夹中。请在代码实现过程中注意文件路径。

jQuery EasyUI 官方网站:

https://www.jeasyui.com/download/index.php

示例 1:以下示例使用 jQuery EasyUI框架演示了移动设备中文件或目录的基本树状结构。在“ul”标签中,使用的类是easyui-tree ,为文件提供树状的感觉。

HTML


  

    
    
  
    
    
    
          
    
    
    
    
    

  

    
        
                         
                
File structure
            
        
        
                
  •                 My Documents                 
                          
    •                         Photos                         
                                    
      •                                 Official                             
      •                             
      •                                 Trips                             
      •                             
      •                                 FamilynFriends                             
      •                         
                              Files                         
                                    
      • Personal
      •                             
      • Official
      •                         
                          
    •                     
    •                         Program Files                         
                                    
      • PHP
      •                             
      • JavaScript
      •                             
      • MySQL
      •                             
      • Tutorials
      •                         
                          
    •                     
    • home.html
    •                     
    • about.html
    •                     
    • contact.html
    •                     
    • welcome.html
    •                 
                
  •         
    
  


HTML



    
    
      
    
        
    
      
    
    
    


   

      Drag Drop Tree Nodes using jQuery EasyUI Mobile      

    
        
                       
                
Drag/Drop Tree Nodes
            
        
                   
                
  •                 My Documents                 
                          
    •                         Photos                         
                                    
      •                                 Official                             
      •                             
      •                                 Trips                             
      •                             
      •                                 FamilynFriends                             
      •                         
                              Files                         
                                  
      • Personal
      •                           
      • Official
      •                         
                          
    •                     
    •                         Program Files                         
                                    
      • PHP
      •                             
      • JavaScript
      •                             
      • MySQL
      •                             
      • Tutorials
      •                         
                          
    •                     
    • home.html
    •                     
    • about.html
    •                     
    • contact.html
    •                     
    • welcome.html
    •                 
                
  •         
    


输出:

示例 2:以下示例使用 jQuery EasyUI框架演示了树中文件节点的“拖放”功能。

HTML




    
    
      
    
        
    
      
    
    
    


   

      Drag Drop Tree Nodes using jQuery EasyUI Mobile      

    
        
                       
                
Drag/Drop Tree Nodes
            
        
                   
                
  •                 My Documents                 
                          
    •                         Photos                         
                                    
      •                                 Official                             
      •                             
      •                                 Trips                             
      •                             
      •                                 FamilynFriends                             
      •                         
                              Files                         
                                  
      • Personal
      •                           
      • Official
      •                         
                          
    •                     
    •                         Program Files                         
                                    
      • PHP
      •                             
      • JavaScript
      •                             
      • MySQL
      •                             
      • Tutorials
      •                         
                          
    •                     
    • home.html
    •                     
    • about.html
    •                     
    • contact.html
    •                     
    • welcome.html
    •                 
                
  •         
    

输出: