chunk-21e0730a.9dbab1a5.js 2.9 KB

12
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-21e0730a"],{"114a":function(t,e,a){},"129d":function(t,e,a){"use strict";var n=a("46fc"),i=a.n(n);i.a},"29d4":function(t,e,a){"use strict";var n=a("114a"),i=a.n(n);i.a},"392a":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("section",{staticClass:"apply"},[a("p",[t._v("内容管理 > 栏目管理")]),a("div",{staticClass:"filter"},[a("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.$router.push({path:"/addContent"})}}},[t._v("新增栏目")])],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"table",staticStyle:{width:"100%"},attrs:{data:t.list,border:""}},[a("el-table-column",{attrs:{prop:"name",label:"栏目名称"}}),a("el-table-column",{attrs:{prop:"ctime",label:"创建时间"}}),a("el-table-column",{attrs:{prop:"operation",width:"200",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{size:"mini",type:"warning"},on:{click:function(a){return t.$router.push({path:"/addContent",query:{id:e.row.id}})}}},[t._v("编辑")]),a("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(a){return t.del(e.row.id)}}},[t._v("删除")])]}}])})],1),a("Page",{ref:"pageButton",attrs:{total:t.total},on:{pageChange:t.gopage}})],1)},i=[],s=a("9973"),o={name:"contents",components:{Page:s["a"]},data:function(){return{total:1,list:[],loading:!1,page:1,page_size:20}},methods:{gopage:function(t){t&&(this.page_size=t),this.page=this.$refs.pageButton.page,this.getData()},getData:function(){var t=this;this.loading=!0,this.$api.getContentList({page:this.page,page_size:this.page_size}).then((function(e){t.loading=!1,200==e.status?(t.list=e.data.data.list,t.total=e.data.data.total):t.$message({message:e.message,type:"error"})}))},del:function(t){var e=this;this.$confirm("确定删除吗","提示",{type:"warning"}).then((function(){e.$api.delContent({id:t}).then((function(t){e.$message({message:"删除成功",type:"success"}),e.getData()}))}))}},created:function(){this.getData()}},l=o,r=(a("29d4"),a("4023")),c=Object(r["a"])(l,n,i,!1,null,null,null);e["default"]=c.exports},"46fc":function(t,e,a){},9973:function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-pagination",{attrs:{background:"","page-size":20,"page-sizes":[20,30,40,50,60,70,80,90,100],layout:"sizes,total,prev, pager, next",total:t.total},on:{"current-change":t.getData,"size-change":t.handleSizeChange}})},i=[],s={data:function(){return{page:1}},props:{total:""},methods:{getData:function(t){this.page=t,this.$emit("pageChange")},handleSizeChange:function(t){this.$emit("pageChange",t)}}},o=s,l=(a("129d"),a("4023")),r=Object(l["a"])(o,n,i,!1,null,null,null);e["a"]=r.exports}}]);
  2. //# sourceMappingURL=chunk-21e0730a.9dbab1a5.js.map