text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-134ef324"],{"86db":function(t,e,a){"use strict";var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("a-drawer",{attrs:{title:"文章设置",width:t.isMobile()?"100%":"480",placement:"right",closable:"",destroyOnClose:"",visible:t.visible,afterVisibleChange:t.handleAfterVisibleChanged},on:{close:t.onClose}},[a("div",{staticClass:"post-setting-drawer-content"},[a("div",{staticClass:"mb-4"},[a("h3",{staticClass:"post-setting-drawer-title"},[t._v("基本设置")]),a("div",{staticClass:"post-setting-drawer-item"},[a("a-form",{attrs:{layout:"vertical"}},[t.needTitle?a("a-form-item",{attrs:{label:"文章标题："}},[a("a-input",{model:{value:t.selectedPost.title,callback:function(e){t.$set(t.selectedPost,"title",e)},expression:"selectedPost.title"}})],1):t._e(),a("a-form-item",{attrs:{label:"文章别名：",help:t.fullPath}},[a("a-input",{model:{value:t.selectedPost.slug,callback:function(e){t.$set(t.selectedPost,"slug",e)},expression:"selectedPost.slug"}})],1),a("a-form-item",{attrs:{label:"发表时间："}},[a("a-date-picker",{attrs:{showTime:"",defaultValue:t.pickerDefaultValue,format:"YYYY-MM-DD HH:mm:ss",placeholder:"选择文章发表时间"},on:{change:t.onPostDateChange,ok:t.onPostDateOk}})],1),a("a-form-item",{attrs:{label:"开启评论："}},[a("a-radio-group",{attrs:{defaultValue:!1},model:{value:t.selectedPost.disallowComment,callback:function(e){t.$set(t.selectedPost,"disallowComment",e)},expression:"selectedPost.disallowComment"}},[a("a-radio",{attrs:{value:!1}},[t._v("开启")]),a("a-radio",{attrs:{value:!0}},[t._v("关闭")])],1)],1),a("a-form-item",{attrs:{label:"是否置顶："}},[a("a-radio-group",{attrs:{defaultValue:0},model:{value:t.selectedPost.topPriority,callback:function(e){t.$set(t.selectedPost,"topPriority",e)},expression:"selectedPost.topPriority"}},[a("a-radio",{attrs:{value:1}},[t._v("是")]),a("a-radio",{attrs:{value:0}},[t._v("否")])],1)],1),t.customTpls.length>0?a("a-form-item",{attrs:{label:"自定义模板："}},[a("a-select",{model:{value:t.selectedPost.template,callback:function(e){t.$set(t.selectedPost,"template",e)},expression:"selectedPost.template"}},[a("a-select-option",{key:"",attrs:{value:""}},[t._v("无")]),t._l(t.customTpls,(function(e){return a("a-select-option",{key:e,attrs:{value:e}},[t._v(t._s(e))])}))],2)],1):t._e()],1)],1)]),a("a-divider"),a("div",{staticClass:"mb-4"},[a("h3",{staticClass:"post-setting-drawer-title"},[t._v("分类目录")]),a("div",{staticClass:"post-setting-drawer-item"},[a("a-form",{attrs:{layout:"vertical"}},[a("a-form-item",[a("category-tree",{attrs:{categories:t.categories},model:{value:t.selectedCategoryIds,callback:function(e){t.selectedCategoryIds=e},expression:"selectedCategoryIds"}})],1),t.categoryFormVisible?a("a-form-item",[a("category-select-tree",{attrs:{categories:t.categories},model:{value:t.categoryToCreate.parentId,callback:function(e){t.$set(t.categoryToCreate,"parentId",e)},expression:"categoryToCreate.parentId"}})],1):t._e(),t.categoryFormVisible?a("a-form-item",[a("a-input",{attrs:{placeholder:"分类名称"},model:{value:t.categoryToCreate.name,callback:function(e){t.$set(t.categoryToCreate,"name",e)},expression:"categoryToCreate.name"}})],1):t._e(),t.categoryFormVisible?a("a-form-item",[a("a-input",{attrs:{placeholder:"分类路径"},model:{value:t.categoryToCreate.slug,callback:function(e){t.$set(t.categoryToCreate,"slug",e)},expression:"categoryToCreate.slug"}})],1):t._e(),a("a-form-item",[a("a-space",[t.categoryFormVisible?a("a-button",{attrs:{type:"primary"},on:{click:t.handlerCreateCategory}},[t._v("保存")]):t._e(),t.categoryFormVisible?t._e():a("a-button",{attrs:{type:"dashed"},on:{click:function(e){t.categoryFormVisible=!0}}},[t._v("新增")]),t.categoryFormVisible?a("a-button",{on:{click:function(e){t.categoryFormVisible=!1}}},[t._v("取消")]):t._e()],1)],1)],1)],1)]),a("a-divider"),a("div",{staticClass:"mb-4"},[a("h3",{staticClass:"post-setting-drawer-title"},[t._v("标签")]),a("div",{staticClass:"post-setting-drawer-item"},[a("a-form",{attrs:{layout:"vertical"}},[a("a-form-item",[a("TagSelect",{model:{value:t.selectedTagIds,callback:function(e){t.selectedTagIds=e},expression:"selectedTagIds"}})],1)],1)],1)]),a("a-divider"),a("div",{staticClass:"mb-4"},[a("h3",{staticClass:"post-setting-drawer-title"},[t._v("摘要")]),a("div",{staticClass:"post-setting-drawer-item"},[a("a-form",{attrs:{layout:"vertical"}},[a("a-form-item",[a("a-input",{attrs:{type:"textarea",autoSize:{minRows:5},placeholder:"如不填写，会从文章中自动截取"},model:{value:t.selectedPost.summary,callback:function(e){t.$set(t.selectedPost,"summary",e)},expression:"selectedPost.summary"}})],1)],1)],1)]),a("a-divider"),a("div",{staticClass:"mb-4"},[a("h3",{staticClass:"post-setting-drawer-title"},[t._v("封面图")]),a("div",{staticClass:"post-setting-drawer-item"},[a("div",{staticClass:"post-thumb"},[a("img",{staticClass:"img",attrs:{src:t.selectedPost.thumbnail||"/images/placeholder.jpg"},on:{click:function(e){t.thumbDrawerVisible=!0}}}),a("a-form",{attrs:{layout:"vertial"}},[a("a-form-item",[a("a-input",{attrs:{placeholder:"点击封面图选择图片，或者输入外部链接"},model:{value:t.selectedPost.thumbnail,callback:function(e){t.$set(t.selectedPost,"thumbnail",e)},expression:"selectedPost.thumbnail"}})],1)],1),a("a-button",{staticClass:"post-thumb-remove",attrs:{type:"dashed"},on:{click:function(e){t.selectedPost.thumbnail=null}}},[t._v("移除")])],1)])]),a("a-divider",{staticClass:"divider-transparent"})],1),a("AttachmentSelectDrawer",{attrs:{drawerWidth:480},on:{listenToSelect:t.handleSelectPostThumb},model:{value:t.thumbDrawerVisible,callback:function(e){t.thumbDrawerVisible=e},expression:"thumbDrawerVisible"}}),a("a-drawer",{attrs:{title:"高级设置",width:t.isMobile()?"100%":"480",placement:"right",closable:"",destroyOnClose:"",visible:t.advancedVisible},on:{close:function(e){t.advancedVisible=!1}}},[a("div",{staticClass:"post-setting-drawer-content"},[a("div",{staticClass:"mb-4"},[a("h3",{staticClass:"post-setting-drawer-title"},[t._v("加密设置")]),a("div",{staticClass:"post-setting-drawer-item"},[a("a-form",{attrs:{layout:"vertical"}},[a("a-form-item",{attrs:{label:"访问密码："}},[a("a-input-password",{attrs:{autocomplete:"new-password"},model:{value:t.selectedPost.password,callback:function(e){t.$set(t.selectedPost,"password",e)},expression:"selectedPost.password"}})],1)],1)],1)]),a("a-divider"),a("div",{staticClass:"mb-4"},[a("h3",{staticClass:"post-setting-drawer-title"},[t._v("SEO 设置")]),a("div",{staticClass:"post-setting-drawer-item"},[a("a-form",{attrs:{layout:"vertical"}},[a("a-form-item",{attrs:{label:"自定义关键词："}},[a("a-input",{attrs:{placeholder:"多个关键词以英文逗号隔开，如不填写，将自动使用标签作为关键词"},model:{value:t.selectedPost.metaKeywords,callback:function(e){t.$set(t.selectedPost,"metaKeywords",e)},expression:"selectedPost.metaKeywords"}})],1),a("a-form-item",{attrs:{label:"自定义描述："}},[a("a-input",{attrs:{type:"textarea",autoSize:{minRows:5},placeholder:"如不填写，会从文章中自动截取"},model:{value:t.selectedPost.metaDescription,callback:function(e){t.$set(t.selectedPost,"metaDescription",e)},expression:"selectedPost.metaDescription"}})],1)],1)],1)]),a("a-divider"),a("div",{staticClass:"mb-4"},[a("h3",{staticClass:"post-setting-drawer-title"},[t._v("元数据")]),a("a-form",{attrs:{layout:"vertical"}},[t._l(t.selectedMetas,(function(e,s){return a("a-form-item",{key:s,attrs:{prop:"metas."+s+".value"}},[a("a-row",{attrs:{gutter:5}},[a("a-col",{attrs:{span:12}},[a("a-input",{model:{value:e.key,callback:function(a){t.$set(e,"key",a)},expression:"meta.key"}},[a("i",{attrs:{slot:"addonBefore"},slot:"addonBefore"},[t._v("K")])])],1),a("a-col",{attrs:{span:12}},[a("a-input",{model:{value:e.value,callback:function(a){t.$set(e,"value",a)},expression:"meta.value"}},[a("i",{attrs:{slot:"addonBefore"},slot:"addonBefore"},[t._v("V")]),a("a",{attrs:{slot:"addonAfter",href:"javascript:void(0);"},on:{click:function(a){return a.preventDefault(),t.handleRemovePostMeta(e)}},slot:"addonAfter"},[a("a-icon",{attrs:{type:"close"}})],1)])],1)],1)],1)})),a("a-form-item",[a("a-button",{attrs:{type:"dashed"},on:{click:t.handleInsertPostMeta}},[t._v("新增")])],1)],2)],1),a("a-divider",{staticClass:"divider-transparent"})],1),a("div",{staticClass:"bottom-control"},[a("a-space",[a("a-button",{attrs:{type:"primary"},on:{click:function(e){t.advancedVisible=!1}}},[t._v("返回")])],1)],1)]),a("div",{staticClass:"bottom-control"},[a("a-space",[a("a-button",{attrs:{type:"dashed"},on:{click:function(e){t.advancedVisible=!0}}},[t._v("高级")]),t.saveDraftButton?a("ReactiveButton",{attrs:{type:"danger",loading:t.draftSaving,errored:t.draftSavedErrored,text:"保存草稿",loadedText:"保存成功",erroredText:"保存失败"},on:{click:t.handleDraftClick,callback:t.handleSavedCallback}}):t._e(),a("ReactiveButton",{attrs:{loading:t.saving,errored:t.savedErrored,text:t.selectedPost.id?"保存":"发布",loadedText:(t.selectedPost.id?"保存":"发布")+"成功",erroredText:(t.selectedPost.id?"保存":"发布")+"失败"},on:{click:function(e){return t.handlePublishClick()},callback:t.handleSavedCallback}})],1)],1)],1)},r=[],o=(a("8e6e"),a("456d"),a("ac6a"),a("7f7f"),a("ade3")),c=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("a-tree",{attrs:{checkable:"",treeData:t.categoryTree,defaultExpandAll:!0,checkedKeys:t.categoryIds},on:{check:t.onCheck}})},i=[],n=a("c405"),l={name:"CategoryTree",model:{prop:"categoryIds",event:"check"},props:{categoryIds:{type:Array,required:!1,default:function(){return[]}},categories:{type:Array,required:!1,default:function(){return[]}}},computed:{categoryTree:function(){return n["a"].concreteTree(this.categories)}},methods:{onCheck:function(t,e){this.$log.debug("Chekced keys",t),this.$log.debug("e",e);var a=e.checkedNodes.filter((function(t){return t.data.props.isLeaf})).map((function(t){return t.key}));this.$log.debug("Effectively selected category ids",a),this.$emit("check",a)}}},d=l,u=a("2877"),h=Object(u["a"])(d,c,i,!1,null,null,null),m=h.exports,f=a("fa25"),p=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("a-select",{staticClass:"w-full",attrs:{allowClear:"",mode:"tags",placeholder:"选择或输入标签"},on:{change:t.handleChange},model:{value:t.selectedTagNames,callback:function(e){t.selectedTagNames=e},expression:"selectedTagNames"}},t._l(t.tags,(function(e){return a("a-select-option",{key:e.id,attrs:{value:e.name}},[t._v(t._s(e.name))])})),1)],1)},g=[],v=a("d28d"),b=a("bc3a"),y=a.n(b),P={name:"TagSelect",model:{prop:"tagIds",event:"change"},props:{tagIds:{type:Array,required:!1,default:function(){return[]}}},data:function(){return{tags:[],selectedTagNames:[]}},created:function(){this.handleListTags()},watch:{tags:function(t){var e=this;t&&(this.selectedTagNames=this.tagIds.map((function(t){return e.tagIdMap[t].name})))}},computed:{tagIdMap:function(){var t={};return this.tags.forEach((function(e){t[e.id]=e})),t},tagNameMap:function(){var t={};return this.tags.forEach((function(e){t[e.name]=e})),t}},methods:{handleListTags:function(t){var e=this;v["a"].listAll(!0).then((function(a){e.tags=a.data.data,t&&t()}))},handleChange:function(){var t=this;this.$log.debug("Changed");var e=this.selectedTagNames.filter((function(e){return!t.tagNameMap[e]}));if(this.$log.debug("Tag names to create",e),e!==[]){var a=e.map((function(t){return v["a"].createWithName(t)}));y.a.all(a).then(y.a.spread((function(){t.handleListTags((function(){t.$log.debug("Tag name map",t.tagNameMap);var e=t.selectedTagNames.map((function(e){return t.tagNameMap[e].id}));t.$emit("change",e)}))})))}else{var s=this.selectedTagNames.map((function(e){return t.tagNameMap[e].id}));this.$emit("change",s)}}}},C=P,T=Object(u["a"])(C,p,g,!1,null,null,null),w=T.exports,k=a("1a86"),D=a("9158"),I=a("5974"),O=a.n(I),_=a("2f62"),S=a("caf6"),x=a("12de");function j(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,s)}return a}function E(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?j(Object(a),!0).forEach((function(e){Object(o["a"])(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):j(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}var $={name:"PostSettingDrawer",mixins:[k["a"],k["b"]],components:{CategoryTree:m,CategorySelectTree:f["a"],TagSelect:w},data:function(){return{thumbDrawerVisible:!1,categoryFormVisible:!1,advancedVisible:!1,selectedPost:this.post,selectedTagIds:this.tagIds,selectedCategoryIds:this.categoryIds,categories:[],categoryToCreate:{},customTpls:[],saving:!1,savedErrored:!1,draftSaving:!1,draftSavedErrored:!1}},props:{post:{type:Object,required:!0},tagIds:{type:Array,required:!0},categoryIds:{type:Array,required:!0},metas:{type:Array,required:!0},needTitle:{type:Boolean,required:!1,default:!1},saveDraftButton:{type:Boolean,required:!1,default:!0},visible:{type:Boolean,required:!1,default:!0}},watch:{post:function(t){this.selectedPost=t},selectedPost:function(t){this.$emit("onRefreshPost",t)},tagIds:function(t){this.selectedTagIds=t},selectedTagIds:function(t){this.$emit("onRefreshTagIds",t)},categoryIds:function(t){this.selectedCategoryIds=t},selectedCategoryIds:function(t){this.$emit("onRefreshCategoryIds",t)},selectedMetas:function(t){this.$emit("onRefreshPostMetas",t)}},computed:E(E({},Object(_["c"])(["options"])),{},{selectedMetas:function(){return this.metas},pickerDefaultValue:function(){if(this.selectedPost.createTime){var t=new Date(this.selectedPost.createTime);return Object(D["a"])(t,"YYYY-MM-DD HH:mm:ss")}return Object(D["a"])(new Date,"YYYY-MM-DD HH:mm:ss")},fullPath:function(){var t=this.options.post_permalink_type,e=this.options.blog_url,a=this.options.archives_prefix,s=this.options.path_suffix?this.options.path_suffix:"";switch(t){case"DEFAULT":return"".concat(e,"/").concat(a,"/").concat(this.selectedPost.slug?this.selectedPost.slug:"{slug}").concat(s);case"YEAR":return"".concat(e).concat(Object(D["a"])(this.selectedPost.createTime?this.selectedPost.createTime:new Date,"/YYYY/")).concat(this.selectedPost.slug?this.selectedPost.slug:"{slug}").concat(s);case"DATE":return"".concat(e).concat(Object(D["a"])(this.selectedPost.createTime?this.selectedPost.createTime:new Date,"/YYYY/MM/")).concat(this.selectedPost.slug?this.selectedPost.slug:"{slug}").concat(s);case"DAY":return"".concat(e).concat(Object(D["a"])(this.selectedPost.createTime?this.selectedPost.createTime:new Date,"/YYYY/MM/DD/")).concat(this.selectedPost.slug?this.selectedPost.slug:"{slug}").concat(s);case"ID":return"".concat(e,"/?p=").concat(this.selectedPost.id?this.selectedPost.id:"{id}");case"ID_SLUG":return"".concat(e,"/").concat(a,"/").concat(this.selectedPost.id?this.selectedPost.id:"{id}").concat(s);default:return""}}}),methods:{handleAfterVisibleChanged:function(t){t&&(this.handleListCategories(),this.handleListPresetMetasField(),this.handleListCustomTpls(),this.handleSetPinyinSlug())},handleListCategories:function(){var t=this;n["a"].listAll().then((function(e){t.categories=e.data.data}))},handleListPresetMetasField:function(){var t=this;this.metas.length<=0&&x["a"].getActivatedTheme().then((function(e){var a=e.data.data.postMetaField;if(a&&a.length>0)for(var s=0,r=a.length;s<r;s++)t.selectedMetas.push({value:"",key:a[s]})}))},handleListCustomTpls:function(){var t=this;x["a"].customPostTpls().then((function(e){t.customTpls=e.data.data}))},handleSelectPostThumb:function(t){this.selectedPost.thumbnail=encodeURI(t.path),this.thumbDrawerVisible=!1},handlerCreateCategory:function(){var t=this;this.categoryToCreate.name?n["a"].create(this.categoryToCreate).then((function(){t.categoryToCreate={},t.categoryFormVisible=!1})).finally((function(){t.handleListCategories()})):this.$notification["error"]({message:"提示",description:"分类名称不能为空！"})},handleDraftClick:function(){this.selectedPost.status="DRAFT",this.createOrUpdatePost()},handlePublishClick:function(){this.selectedPost.status="PUBLISHED",this.createOrUpdatePost()},createOrUpdatePost:function(){var t=this;this.selectedPost.title?(this.selectedPost.categoryIds=this.selectedCategoryIds,this.selectedPost.tagIds=this.selectedTagIds,this.selectedPost.metas=this.selectedMetas,"DRAFT"===this.selectedPost.status?this.draftSaving=!0:this.saving=!0,this.selectedPost.id?S["a"].update(this.selectedPost.id,this.selectedPost,!1).catch((function(){"DRAFT"===t.selectedPost.status?t.draftSavedErrored=!0:t.savedErrored=!0})).finally((function(){setTimeout((function(){t.saving=!1,t.draftSaving=!1}),400)})):S["a"].create(this.selectedPost,!1).catch((function(){"DRAFT"===t.selectedPost.status?t.draftSavedErrored=!0:t.savedErrored=!0})).then((function(e){t.selectedPost=e.data.data})).finally((function(){setTimeout((function(){t.saving=!1,t.draftSaving=!1}),400)}))):this.$notification["error"]({message:"提示",description:"文章标题不能为空！"})},handleSavedCallback:function(){this.draftSavedErrored||this.savedErrored?(this.draftSavedErrored=!1,this.savedErrored=!1):(this.$emit("onSaved",!0),this.$router.push({name:"PostList"}))},onClose:function(){this.$emit("close",!1)},onPostDateChange:function(t){this.selectedPost.createTime=t.valueOf()},onPostDateOk:function(t){this.selectedPost.createTime=t.valueOf()},handleRemovePostMeta:function(t){var e=this.selectedMetas.indexOf(t);-1!==e&&this.selectedMetas.splice(e,1)},handleInsertPostMeta:function(){this.selectedMetas.push({value:"",key:""})},handleSetPinyinSlug:function(){if(this.selectedPost.title&&""!==this.selectedPost.title&&!this.selectedPost.id&&O.a.isSupported()){var t,e="",a=O.a.parse(this.selectedPost.title);a.forEach((function(a){if(2===a.type){var s=a.target?a.target.toLowerCase():"";e+=e&&!/\n|\s/.test(t.target)?"-"+s:s}else e+=(t&&2===t.type?"-":"")+a.target;t=a})),this.$set(this.selectedPost,"slug",e)}}}},A=$,M=Object(u["a"])(A,s,r,!1,null,null,null);e["a"]=M.exports},c405:function(t,e,a){"use strict";a("7f7f"),a("ac6a");var s=a("9efd"),r="/api/admin/categories",o={};function c(t,e){e.forEach((function(e){t.key===e.parentId&&(t.children||(t.children=[]),t.children.push({key:e.id,title:e.name,isLeaf:!1}))})),t.children?t.children.forEach((function(t){return c(t,e)})):t.isLeaf=!0}o.listAll=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Object(s["a"])({url:"".concat(r),params:{more:t},method:"get"})},o.listTree=function(){return Object(s["a"])({url:"".concat(r,"/tree_view"),method:"get"})},o.create=function(t){return Object(s["a"])({url:r,data:t,method:"post"})},o.delete=function(t){return Object(s["a"])({url:"".concat(r,"/").concat(t),method:"delete"})},o.get=function(t){return Object(s["a"])({url:"".concat(r,"/").concat(t),method:"get"})},o.update=function(t,e){return Object(s["a"])({url:"".concat(r,"/").concat(t),data:e,method:"put"})},o.concreteTree=function(t){var e={key:0,title:"top",children:[]};return c(e,t),e.children},e["a"]=o},caf6:function(t,e,a){"use strict";var s=a("9efd"),r="/api/admin/posts",o={listLatest:function(t){return Object(s["a"])({url:"".concat(r,"/latest"),params:{top:t},method:"get"})},query:function(t){return Object(s["a"])({url:r,params:t,method:"get"})},get:function(t){return Object(s["a"])({url:"".concat(r,"/").concat(t),method:"get"})},create:function(t,e){return Object(s["a"])({url:r,method:"post",data:t,params:{autoSave:e}})},update:function(t,e,a){return Object(s["a"])({url:"".concat(r,"/").concat(t),method:"put",data:e,params:{autoSave:a}})},updateDraft:function(t,e){return Object(s["a"])({url:"".concat(r,"/").concat(t,"/status/draft/content"),method:"put",data:{content:e}})},updateStatus:function(t,e){return Object(s["a"])({url:"".concat(r,"/").concat(t,"/status/").concat(e),method:"put"})},updateStatusInBatch:function(t,e){return Object(s["a"])({url:"".concat(r,"/status/").concat(e),data:t,method:"put"})},delete:function(t){return Object(s["a"])({url:"".concat(r,"/").concat(t),method:"delete"})},deleteInBatch:function(t){return Object(s["a"])({url:"".concat(r),data:t,method:"delete"})},preview:function(t){return Object(s["a"])({url:"".concat(r,"/preview/").concat(t),method:"get"})},postStatus:{PUBLISHED:{value:"PUBLISHED",color:"green",status:"success",text:"已发布"},DRAFT:{value:"DRAFT",color:"yellow",status:"warning",text:"草稿"},RECYCLE:{value:"RECYCLE",color:"red",status:"error",text:"回收站"},INTIMATE:{value:"INTIMATE",color:"blue",status:"success",text:"私密"}},permalinkType:{DEFAULT:{type:"DEFAULT",text:"默认"},YEAR:{type:"YEAR",text:"年份型"},DATE:{type:"DATE",text:"年月型"},DAY:{type:"DAY",text:"年月日型"},ID:{type:"ID",text:"ID 型"},ID_SLUG:{type:"ID_SLUG",text:"ID 别名型"}}};e["a"]=o},d28d:function(t,e,a){"use strict";var s=a("9efd"),r="/api/admin/tags",o={listAll:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Object(s["a"])({url:r,params:{more:t},method:"get"})},createWithName:function(t){return Object(s["a"])({url:r,data:{name:t},method:"post"})},create:function(t){return Object(s["a"])({url:r,data:t,method:"post"})},update:function(t,e){return Object(s["a"])({url:"".concat(r,"/").concat(t),data:e,method:"put"})},delete:function(t){return Object(s["a"])({url:"".concat(r,"/").concat(t),method:"delete"})}};e["a"]=o},fa25:function(t,e,a){"use strict";var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("a-tree-select",{attrs:{treeData:t.categoryTreeData,placeholder:"请选择上级目录，默认为顶级目录",treeDefaultExpandAll:"",treeDataSimpleMode:!0,allowClear:!0,value:t.categoryIdString},on:{change:t.handleSelectionChange}})},r=[],o=(a("6b54"),a("7f7f"),a("c5f6"),{name:"CategorySelectTree",model:{prop:"categoryId",event:"change"},props:{categoryId:{type:Number,required:!0,default:0},categories:{type:Array,required:!1,default:function(){return[]}}},computed:{categoryTreeData:function(){return this.categories.map((function(t){return{id:t.id,title:t.name,value:t.id.toString(),pId:t.parentId}}))},categoryIdString:function(){return this.categoryId.toString()}},methods:{handleSelectionChange:function(t,e,a){this.$log.debug("value: ",t),this.$log.debug("label: ",e),this.$log.debug("extra: ",a),this.$emit("change",t?parseInt(t):0)}}}),c=o,i=a("2877"),n=Object(i["a"])(c,s,r,!1,null,null,null);e["a"]=n.exports}}]);