import{n as a,a6 as c}from"./index-b54f5418.js";import"./three-dc46505d.js";var l=function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("div",{staticClass:"containerOperation-container"},[t("div",{directives:[{name:"show",rawName:"v-show",value:e.loading,expression:"loading"}],staticClass:"loading-mask"},[t("vis-icon",{staticClass:"ani",attrs:{code:"#iconxuanzhuan"}}),t("span",[e._v("正在加载...")])],1),!e.loading&&!e.floderChildren.length?t("div",{staticClass:"empty-tips"},[t("span",[e._v("这里暂时是空的哦")]),e.currentFloder.url==="/"?t("el-button",{staticClass:"operate-classify",attrs:{type:"primary",size:"mini",icon:"el-icon-circle-plus"},on:{click:e.addOneClassify}},[e._v(" 新增一个分类 ")]):e._e()],1):e._l(e.floderChildren,function(i,o){return t("div",{directives:[{name:"tooltip",rawName:"v-tooltip.bottom",value:`${i.name}`,expression:"`${item.name}`",modifiers:{bottom:!0}}],key:o,staticClass:"file-item-box",on:{click:function(r){return e.chouseFile(i)}}},[i.dir?[t("vis-icon",{attrs:{size:e.iconSize,code:"#iconwenjianjia"}})]:[t("img",{attrs:{src:i.preview}}),t("div",{directives:[{name:"show",rawName:"v-show",value:e.selected.id===i.id,expression:"selected.id === item.id"}],staticClass:"item-selected-mask",on:{click:function(r){return r.stopPropagation(),e.$store.commit("appLibrary/cancelSelected")}}},[t("vis-icon",{staticClass:"item-selected",attrs:{size:"60px",code:"#icongou"}})],1)],t("span",{staticClass:"item-title",domProps:{textContent:e._s(i.name)}}),t("vis-icon",{directives:[{name:"tooltip",rawName:"v-tooltip.bottom",value:"删除",expression:"`删除`",modifiers:{bottom:!0}}],staticClass:"item-delete",attrs:{size:"16px",code:"#iconshanchu"},nativeOn:{click:function(r){return r.stopPropagation(),e.remove(i)}}})],2)}),t("div",{staticClass:"file-item-placeholder",style:{display:e.floderChildren.length%2!==0?"block":"none",flex:1}})],2)},d=[];const p={data(){return{iconSize:"35px",timer:"",fileIcon:{mtl:"#iconmtl"}}},computed:{loading(){return this.$store.getters["appLibrary/loading"]},currentFloder(){return this.$store.getters["appLibrary/currentFloder"]},floderChildren(){return this.currentFloder.children},currentScene(){return this.$store.getters["scene/currentScene"]},selected(){return this.$store.getters["appLibrary/selected"]}},methods:{chouseFile(e){e.dir?this.$store.commit("appLibrary/currentFloder",e):this.$store.commit("appLibrary/select",e)},remove(e){return this.$tool.devTips()},addOneClassify(){this.$prompt("输入分类名称","新增分类").then(({value:e})=>{e.trim()?c.addClassify({name:e.trim(),parentId:this.currentFloder.id}).then(s=>{this.$store.commit("appLibrary/addChildren",s),this.$message.success("添加分类成功！")}):this.$message.warning("无效的分类名称。")}).catch(()=>{})}}},n={};var m=a(p,l,d,!1,u,"ecb1a47a",null,null);function u(e){for(let s in n)this[s]=n[s]}const _=function(){return m.exports}();export{_ as default};
