(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-11177076"],{"16fc":function(t,i,e){"use strict";e.r(i);var s=function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("div",{staticClass:"components-container"},[t._m(0),e("div",{staticClass:"editor-container"},[e("dnd-list",{attrs:{list1:t.list1,list2:t.list2,"list1-title":"List","list2-title":"Article pool"}})],1)])},n=[function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("aside",[t._v("drag-list base on "),e("a",{attrs:{href:"https://github.com/SortableJS/Vue.Draggable",target:"_blank"}},[t._v("Vue.Draggable")])])}],a=(e("a434"),function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("div",{staticClass:"dndList"},[e("div",{staticClass:"dndList-list",style:{width:t.width1}},[e("h3",[t._v(t._s(t.list1Title))]),e("draggable",{staticClass:"dragArea",attrs:{"set-data":t.setData,list:t.list1,group:"article"}},t._l(t.list1,(function(i){return e("div",{key:i.id,staticClass:"list-complete-item"},[e("div",{staticClass:"list-complete-item-handle"},[t._v(" "+t._s(i.id)+"["+t._s(i.author)+"] "+t._s(i.title)+" ")]),e("div",{staticStyle:{position:"absolute",right:"0px"}},[e("span",{staticStyle:{float:"right","margin-top":"-20px","margin-right":"5px"},on:{click:function(e){return t.deleteEle(i)}}},[e("i",{staticClass:"el-icon-delete",staticStyle:{color:"#ff4949"}})])])])})),0)],1),e("div",{staticClass:"dndList-list",style:{width:t.width2}},[e("h3",[t._v(t._s(t.list2Title))]),e("draggable",{staticClass:"dragArea",attrs:{list:t.list2,group:"article"}},t._l(t.list2,(function(i){return e("div",{key:i.id,staticClass:"list-complete-item"},[e("div",{staticClass:"list-complete-item-handle2",on:{click:function(e){return t.pushEle(i)}}},[t._v(" "+t._s(i.id)+" ["+t._s(i.author)+"] "+t._s(i.title)+" ")])])})),0)],1)])}),l=[],r=e("0402"),c=(e("d3b7"),e("1980")),u=e.n(c),d={name:"DndList",components:{draggable:u.a},props:{list1:{type:Array,default:function(){return[]}},list2:{type:Array,default:function(){return[]}},list1Title:{type:String,default:"list1"},list2Title:{type:String,default:"list2"},width1:{type:String,default:"48%"},width2:{type:String,default:"48%"}},methods:{isNotInList1:function(t){return this.list1.every((function(i){return t.id!==i.id}))},isNotInList2:function(t){return this.list2.every((function(i){return t.id!==i.id}))},deleteEle:function(t){var i,e=Object(r["a"])(this.list1);try{for(e.s();!(i=e.n()).done;){var s=i.value;if(s.id===t.id){var n=this.list1.indexOf(s);this.list1.splice(n,1);break}}}catch(a){e.e(a)}finally{e.f()}this.isNotInList2(t)&&this.list2.unshift(t)},pushEle:function(t){var i,e=Object(r["a"])(this.list2);try{for(e.s();!(i=e.n()).done;){var s=i.value;if(s.id===t.id){var n=this.list2.indexOf(s);this.list2.splice(n,1);break}}}catch(a){e.e(a)}finally{e.f()}this.isNotInList1(t)&&this.list1.push(t)},setData:function(t){t.setData("Text","")}}},o=d,f=(e("7f49"),e("2877")),h=Object(f["a"])(o,a,l,!1,null,"005c1ad2",null),p=h.exports,m=e("2423"),v={name:"DndListDemo",components:{DndList:p},data:function(){return{list1:[],list2:[]}},created:function(){this.getData()},methods:{getData:function(){var t=this;this.listLoading=!0,Object(m["b"])().then((function(i){t.list1=i.data.items.splice(0,5),t.list2=i.data.items}))}}},g=v,b=Object(f["a"])(g,s,n,!1,null,null,null);i["default"]=b.exports},2423:function(t,i,e){"use strict";e.d(i,"b",(function(){return n})),e.d(i,"c",(function(){return a})),e.d(i,"a",(function(){return l})),e.d(i,"d",(function(){return r}));var s=e("b775");function n(t){return Object(s["a"])({url:"/vue-element-admin/article/list",method:"get",params:t})}function a(t){return Object(s["a"])({url:"/vue-element-admin/article/pv",method:"get",params:{pv:t}})}function l(t){return Object(s["a"])({url:"/vue-element-admin/article/create",method:"post",data:t})}function r(t){return Object(s["a"])({url:"/vue-element-admin/article/update",method:"post",data:t})}},"7f49":function(t,i,e){"use strict";e("b447")},b447:function(t,i,e){}}]);