{"remainingRequest":"D:\\jenkins\\workspace\\artfess-module\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\artfess-module\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\artfess-module\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\artfess-module\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\artfess-module\\src\\views\\MdView.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\artfess-module\\src\\views\\MdView.vue","mtime":1675232038856},{"path":"D:\\jenkins\\workspace\\artfess-module\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\artfess-module\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\artfess-module\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\artfess-module\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\artfess-module\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.object.keys\";\n//\n//\n//\n//\n//\nimport utils from \"@/utils.js\";\nexport default {\n name: \"MdView\",\n props: {\n content: String,\n url: String\n },\n data: function data() {\n return {\n fileContent: null\n };\n },\n created: function created() {\n // 优先使用slot内容\n if (this.$slots && Object.keys(this.$slots).length > 0) {\n var slot = this.$slots.default ? this.$slots.default : this.$slots[Object.keys(this.$slots)[0]];\n\n if (slot && slot.length > 0 && slot[0].text) {\n // 因为md内容可能被格式化以后,每一行的开头有多个空格导致显示的格式错误,逐行去掉这些空格。\n this.fileContent = utils.trimEachLine(slot[0].text);\n }\n } else if (this.content) {\n // 其次,使用content属性\n this.fileContent = this.content;\n } else if (this.url) {\n // 再次,通过url属性来加载内容\n this.getContent();\n } else {\n this.fileContent = \"没有内容可以显示.\";\n }\n },\n methods: {\n getContent: function getContent() {\n var _this = this;\n\n this.fileContent = \"正在加载...\";\n this.$http.get(this.url).then(function (response) {\n _this.fileContent = response.body;\n }, function () {\n _this.fileContent = \"内容加载失败.\";\n });\n }\n }\n};",null]}