<template>
  <div class="documentation-container" v-html="formData.content">
     
 </div>
</template>

<script>
import { getMethodCommon } from '../../api/common'

  export default {
    name: 'index',
    data(){
        return {
            formData:{
                content:"",
            },
        }
    },
    created(){
        this.getArticleDetail();
    },
    methods:{
        getArticleDetail(){
            getMethodCommon("/FireGrid/LoadManualInfo").then(res=>{
                if(res.code == 200){
                    if(res.data.length>0){
                        this.formData = res.data[res.data.length-1];
                        this.formData.content =  this.formData.content.replace(/[^>]*src=['"]([^'"]+)[^>]*/gi,function(match,capture){
                        　　//capture,返回每个匹配的字符串
                            capture = capture.substring(capture.indexOf('/C'),capture.length);
                        　　var newStr='<img src="'+BASE_IMAGE_API+capture+'" width="924px" alt="" />';
                        　　return newStr;
                        });
                    }
                }
            })
        },
    }
  }
</script>

<style scoped>
.documentation-container{
    width:1024px;
    margin:0px auto;
    padding:50px 0px;
}
</style>