<template>
  <div style="background-color:white">
    <!-- <span>{{height}}</span> -->
    <div id="detail" v-html="datas.text" v-loading="datas.loading" style="padding:20px;min-height: 650px;">
    </div>
  </div>
</template>

<script setup lang="ts">
import { onMounted, reactive, ref, nextTick } from 'vue'
import { useRouter } from 'vue-router'
import { detail } from '/@/api/backend/enterprise/document'
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'

const router = useRouter()
const height = ref(0)
const datas = reactive({
    text: '',
    loading: false,
})

const getDetail = () => {
    NProgress.configure({ showSpinner: false })
    NProgress.start()
    let params = {
        id: router.currentRoute.value.query.id,
        operateType: router.currentRoute.value.query.operateType,
    }

    datas.loading = true

    detail(params)
        .then((res) => {
            datas.text = res.data
            datas.loading = false
            NProgress.done()
        })
        .catch((msg) => {
            datas.loading = false
            NProgress.done()
        })
}

onMounted(() => {
    getDetail()
})
</script>

<style  lang="scss">
img {
    display: inline-block;
    max-width: 100%;
}
video {
    width: 100%;
}
html,
body,
#app {
    overflow: auto !important;
    height: auto !important ;
}
body::-webkit-scrollbar {
    display: none;
}
#nprogress .bar {
    background: #0f0f0f !important; //自定义颜色
}
</style>
