{"version":3,"sources":["webpack:///./src/apps/open/views/fileCenter/components/FileContent.vue?1fc2","webpack:///./src/apps/open/views/fileCenter/components/FileContent.vue","webpack:///./src/apps/open/views/fileCenter/components/FileContent.vue?b6ef","webpack:///./src/apps/open/views/fileCenter/components/FileContent.vue?65f5"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","content","staticRenderFns","to","from","next","vm","path","window","open","$router","go","initFileContent","curRoute","mdfileUrl","isPrivate","isPriDocMiddle","meta","mdfilepath","a","get","then","response","data","setTimeout","initScrollPosition","location","hash","scrollId","toScrollDom","document","querySelector","scroll","scrollY","getBoundingClientRect","top","$store","getters","components","MarkDown","component"],"mappings":"yHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACA,EAAG,WAAW,CAACE,MAAM,CAAC,QAAUN,EAAIO,YAAY,IACtJC,EAAkB,G,qHCeD,EAArB,YALA,iD,+DAMI,EAAAD,QAAU,GANd,EAKA,oFAWsBE,EAASC,EAAWC,GACpCA,EAAK,SAACC,GACY,kCAAZH,EAAGI,MACLC,OAAOC,KAAK,iCAAkC,UAC9CH,EAAGI,QAAQC,IAAI,IAEfL,EAAGM,gBAAgBT,OAjB7B,sCAsBqBU,GAAa,WACxBC,EAAoB,kBAAWnB,KAAKoB,UAAYpB,KAAKqB,eAAiB,SAAW,iBAAmB,cAAiBH,EAASI,KAAKC,WACvI,EAAAC,EAAMC,IAAIN,GAAWO,KAAK,SAAAC,GACxB,EAAKrB,QAAUqB,EAASC,MACvB,EAAKR,WAAaS,WAAW,WAC5B,EAAKC,2BA3Bf,2CAiCM,GAAIC,SAASC,KAAM,CACjB,IAAMC,EAAmBF,SAASC,KAC5BE,EAA8BC,SAASC,cAAcH,GAC3DC,GAAerB,OAAOwB,OAAO,EAAGxB,OAAOyB,QAAUJ,EAAYK,wBAAwBC,IAAM,QApCnG,gCAIM,OAAOxC,KAAKyC,OAAOC,QAAQ,eAJjC,qCAQM,OAAO1C,KAAKyC,OAAOC,QAAQ,sBARjC,GAAyC,QAApB,EAAW,QAL/B,eAAU,CACTC,WAAY,CACVC,WAAA,eAGiB,WChByb,I,YCO1cC,EAAY,eACd,EACA/C,EACAS,GACA,EACA,KACA,KACA,MAIa,aAAAsC,E","file":"js/chunk-2d0d07e6.bde51d0d.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('MarkDown',{attrs:{\"content\":_vm.content}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\nimport { Component, Vue, Prop, Watch } from 'vue-property-decorator'\nimport MarkDown from '@/apps/open/views/fileCenter/components/MarkDown.vue'\n\nimport axios from 'axios'\n@Component({\n components: {\n MarkDown\n }\n})\nexport default class FileContent extends Vue {\n content = ''\n\n get isPrivate () {\n return this.$store.getters['isPrivate']\n }\n\n get isPriDocMiddle () {\n return this.$store.getters['isPriDocMiddle']\n }\n\n beforeRouteEnter (to: any, from: any, next: any) {\n next((vm: any) => {\n if (to.path === '/docs/wwo/access/jssdk-import') {\n window.open('https://wwo.wps.cn/docs-js-sdk', '_blank')\n vm.$router.go(-1)\n } else {\n vm.initFileContent(to)\n }\n })\n }\n\n initFileContent (curRoute: any) {\n let mdfileUrl: string = `/mdfile/${this.isPrivate ? this.isPriDocMiddle ? 'middle' : 'pri_filecenter' : 'filecenter'}` + curRoute.meta.mdfilepath\n axios.get(mdfileUrl).then(response => {\n this.content = response.data\n !this.isPrivate && setTimeout(() => {\n this.initScrollPosition()\n })\n })\n }\n\n initScrollPosition () {\n if (location.hash) {\n const scrollId: string = location.hash\n const toScrollDom: Element | null = document.querySelector(scrollId)\n toScrollDom && window.scroll(0, window.scrollY + toScrollDom.getBoundingClientRect().top - 200)\n }\n }\n}\n","import mod from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/ts-loader/index.js??ref--14-3!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FileContent.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/ts-loader/index.js??ref--14-3!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FileContent.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./FileContent.vue?vue&type=template&id=e3ef386e&\"\nimport script from \"./FileContent.vue?vue&type=script&lang=ts&\"\nexport * from \"./FileContent.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}