Skip to content

为新版本大瞳引擎提供的ui工具库,包括了右击菜单等

License

Notifications You must be signed in to change notification settings

tong3d/tong-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

tong-tools

为新版本大瞳引擎提供的ui工具库,包括了右击菜单等 技术选型采用 Vue+ElementUI image

使用

右击菜单显示为例

菜单对显示的层数没有限制,对v-for循环进行取巧处理,实现类似函数自调用的循环遍历

import Tools from "./tong-tools"
Vue.use(Tools)
<tong-popup-menu ref="popupContext" @select="onPopupSelect" :data="popupDatas"></tong-popup-menu>
  //显示菜单
  this.$refs.popupContext.open(clientX,clientY)
  //右击菜单数据
   popupDatas:{
     color:'#aaa',
     children:[
         {
           label:'新增',
           icon:'el-icon-plus',
           callback:null,
           children:[
               {
                 label:'JavaScript',
                 icon:'iconfont tong-iconjs'
               },
               {
                 label:'Glsl',
                 icon:'iconfont tong-icons'
               },
               {
                 label:'Animation',
                 icon:'iconfont tong-iconrunlog'
               },
               {
                 label:'Json',
                 icon:'iconfont tong-iconjsongeshihua'
               },
               {
                 label:'Text',
                 icon:'iconfont tong-iconTEXT'
               },
               {
                 label: 'Folder',
                 icon: 'iconfont tong-iconfolder1'
               }
           ]}
         ,
         {
           label:'删除',
           icon:'el-icon-delete',
           disabled:false
         },
         {
           label:'修改',
           icon:'el-icon-edit',
           disabled:false,
           children:[]
         },
         {
           label:'导入',
           icon:'el-icon-more-outline',
           disabled:false,
           children:[]
         },
         {
           label:'上传',
           icon:'el-icon-upload',
           disabled:false,
           children:[]
         }
     ]
   }
   //选择菜单按钮响应
    onPopupSelect(data,itemCom){
       let selectType=data.label
       if(selectType==="删除"){
         //.....
       }
    }

About

为新版本大瞳引擎提供的ui工具库,包括了右击菜单等

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published