You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sonic/resources/admin/js/265.363a630f.js

1 line
7.9 KiB
JavaScript

(self["webpackChunkhalo_admin"]=self["webpackChunkhalo_admin"]||[]).push([[265],{86763:function(e,t,n){var r="Expected a function",a=NaN,o="[object Symbol]",i=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,h=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,f="object"==typeof self&&self&&self.Object===Object&&self,d=l||f||Function("return this")(),g=Object.prototype,v=g.toString,p=Math.max,S=Math.min,m=function(){return d.Date.now()};function w(e,t,n){var a,o,i,s,u,c,h=0,l=!1,f=!1,d=!0;if("function"!=typeof e)throw new TypeError(r);function g(t){var n=a,r=o;return a=o=void 0,h=t,s=e.apply(r,n),s}function v(e){return h=e,u=setTimeout(y,t),l?g(e):s}function w(e){var n=e-c,r=e-h,a=t-n;return f?S(a,i-r):a}function T(e){var n=e-c,r=e-h;return void 0===c||n>=t||n<0||f&&r>=i}function y(){var e=m();if(T(e))return x(e);u=setTimeout(y,w(e))}function x(e){return u=void 0,d&&a?g(e):(a=o=void 0,s)}function C(){void 0!==u&&clearTimeout(u),h=0,a=c=o=u=void 0}function R(){return void 0===u?s:x(m())}function $(){var e=m(),n=T(e);if(a=arguments,o=this,c=e,n){if(void 0===u)return v(c);if(f)return u=setTimeout(y,t),g(c)}return void 0===u&&(u=setTimeout(y,t)),s}return t=k(t)||0,b(n)&&(l=!!n.leading,f="maxWait"in n,i=f?p(k(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d),$.cancel=C,$.flush=R,$}function b(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function T(e){return!!e&&"object"==typeof e}function y(e){return"symbol"==typeof e||T(e)&&v.call(e)==o}function k(e){if("number"==typeof e)return e;if(y(e))return a;if(b(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=b(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=u.test(e);return n||c.test(e)?h(e.slice(2),n?2:8):s.test(e)?a:+e}e.exports=w},25265:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return m}});var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("page-view",{attrs:{"sub-title":e.sheetToStage.inProgress?"当前内容已保存,但还未发布。":"",title:e.sheetToStage.title?e.sheetToStage.title:"新页面",affix:""}},[n("template",{slot:"extra"},[n("a-space",[n("a-button",{attrs:{loading:e.previewSaving},on:{click:e.handlePreviewClick}},[e._v("预览")]),n("a-button",{attrs:{type:"primary"},on:{click:function(t){e.sheetSettingVisible=!0}}},[e._v("发布")])],1)],1),n("a-row",{attrs:{gutter:12}},[n("a-col",{attrs:{span:24}},[n("div",{staticClass:"mb-4"},[n("a-input",{attrs:{placeholder:"请输入页面标题",size:"large"},model:{value:e.sheetToStage.title,callback:function(t){e.$set(e.sheetToStage,"title",t)},expression:"sheetToStage.title"}})],1),n("div",{style:{height:e.editorHeight},attrs:{id:"editor"}},[n("MarkdownEditor",{attrs:{originalContent:e.sheetToStage.originalContent},on:{"update:originalContent":function(t){return e.$set(e.sheetToStage,"originalContent",t)},"update:original-content":function(t){return e.$set(e.sheetToStage,"originalContent",t)},change:e.onContentChange,save:function(t){return e.handleSaveDraft()}}})],1)])],1),n("SheetSettingModal",{attrs:{sheet:e.sheetToStage,savedCallback:e.onSheetSavedCallback,visible:e.sheetSettingVisible},on:{"update:visible":function(t){e.sheetSettingVisible=t},onUpdate:e.onUpdateFromSetting}})],2)},a=[],o=n(54288),i=(n(70315),n(12566),n(30535),n(85018),n(96667)),s=n(65899),u=n(58799),c=n(94370),h=n(25572),l=n(36591),f=n(86763),d=n.n(f),g={components:{PageView:i.B4,SheetSettingModal:s.Z,MarkdownEditor:u.Z},mixins:[c.jB,c.KT,c.g3],data:function(){return{sheetSettingVisible:!1,sheetToStage:{},contentChanges:0,previewSaving:!1}},beforeRouteEnter:function(e,t,n){var r=e.query.sheetId;n(function(){var e=(0,o.Z)(regeneratorRuntime.mark((function e(t){var n,a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!r){e.next=6;break}return e.next=3,l.Z.sheet.get(Number(r));case 3:n=e.sent,a=n.data,t.sheetToStage=a;case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())},destroyed:function(){window.onbeforeunload&&(window.onbeforeunload=null)},beforeRoute