(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d22c14e"],{f25a:function(t,i,e){"use strict";e.r(i);var n=function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("div",{staticClass:"app-container"},[e("el-button",{attrs:{size:"mini",type:"primary"},on:{click:t.add}},[t._v("添加")]),t._v(" "),e("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{"margin-top":"16px"},attrs:{data:t.list,"element-loading-text":"加载中",border:""}},[e("el-table-column",{attrs:{label:"操作",align:"center",fixed:"left",width:"160"},scopedSlots:t._u([{key:"default",fn:function(i){return[e("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(e){return t.edit(i.$index)}}},[t._v("编辑")]),t._v(" "),e("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(e){return t.del(i.$index)}}},[t._v("删除")])]}}])}),t._v(" "),e("el-table-column",{attrs:{align:"center",prop:"title",label:"标题",width:"300"}}),t._v(" "),e("el-table-column",{attrs:{align:"left",prop:"time",label:"注册时间"}})],1),t._v(" "),e("el-dialog",{staticClass:"ao-el-dialog",attrs:{width:"60%",top:"1vh",title:"编辑",center:!1,visible:t.dialogVisible},on:{"update:visible":function(i){t.dialogVisible=i}}},[e("tinymce-form-content",{attrs:{form:t.form},on:{save:t.saveOk}})],1)],1)},l=[],s=e("b7c5"),a=e("a0d8"),o={components:{TinymceFormContent:s["a"]},data:function(){return{form:{},listLoading:!1,list:[],index:-1,type:"gonggao",dialogVisible:!1}},mounted:function(){var t=this;this.listLoading=!0,Object(a["b"])({type:this.type}).then(function(i){t.listLoading=!1,t.list=i})},methods:{saveOk:function(t){-1===this.index?this.list.push(t):this.list[this.index]=t,this.dialogVisible=!1},edit:function(t){this.index=t,this.form=-1===t?{type:this.type}:this.list[t],this.dialogVisible=!0},add:function(){this.edit(-1)},del:function(t){var i=this;Object(a["a"])({type:this.type,id:this.list[t].id}).then(function(e){i.list.splice(t,1),i.dialogVisible=!1})}}},d=o,r=e("2877"),c=Object(r["a"])(d,n,l,!1,null,null,null);i["default"]=c.exports}}]);