12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ae8d9124"],{"129d":function(t,e,a){"use strict";var n=a("46fc"),i=a.n(n);i.a},"1f13":function(t,e,a){},"46fc":function(t,e,a){},6993: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-form",{attrs:{"label-width":"80px",inline:!0,size:"small"}},[a("el-form-item",{attrs:{label:"文章标题"}},[a("el-input",{attrs:{placeholder:"请输入文章标题",clearable:""},model:{value:t.form.title,callback:function(e){t.$set(t.form,"title",e)},expression:"form.title"}})],1),a("el-form-item",[a("el-button",{attrs:{type:"primary",icon:"el-icon-search"},on:{click:t.getData}},[t._v("搜索")]),a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.$router.push({path:"/addArticle"})}}},[t._v("新增文章")])],1)],1)],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:"title",label:"文章标题"}}),a("el-table-column",{attrs:{prop:"ctime",label:"创建时间"}}),a("el-table-column",{attrs:{prop:"zip",width:"400",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:"/addArticle",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=[],l=a("9973"),s={name:"articles",components:{Page:l["a"]},data:function(){return{form:{title:"",page:1,page_size:20},total:1,list:[],loading:!1}},methods:{gopage:function(t){t&&(this.form.page_size=t),this.form.page=this.$refs.pageButton.page,this.getData()},getData:function(){var t=this;this.loading=!0;var e=this.form;this.$api.getArticleList(e).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.delArticle({id:t}).then((function(t){e.$message({message:"删除成功",type:"success"}),e.getData()}))}))}},created:function(){this.getData()}},r=s,o=(a("9683"),a("4023")),c=Object(o["a"])(r,n,i,!1,null,null,null);e["default"]=c.exports},9683:function(t,e,a){"use strict";var n=a("1f13"),i=a.n(n);i.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=[],l={data:function(){return{page:1}},props:{total:""},methods:{getData:function(t){this.page=t,this.$emit("pageChange")},handleSizeChange:function(t){this.$emit("pageChange",t)}}},s=l,r=(a("129d"),a("4023")),o=Object(r["a"])(s,n,i,!1,null,null,null);e["a"]=o.exports}}]);
- //# sourceMappingURL=chunk-ae8d9124.6c6e1371.js.map
|