Commit 6d93ee70 by Sweet Zhang

切片

parent a7784bac
...@@ -49,7 +49,7 @@ const config = { ...@@ -49,7 +49,7 @@ const config = {
stage, stage,
prod prod
} }
let env = 'prod'; let env = 'dev';
let baseURL = config[env].base_url; let baseURL = config[env].base_url;
let apiURL = config[env].api_url; let apiURL = config[env].api_url;
......
...@@ -37,13 +37,17 @@ ...@@ -37,13 +37,17 @@
<!-- Tab对应的PDF内容(无权限时显示空状态) --> <!-- Tab对应的PDF内容(无权限时显示空状态) -->
<view class="pdf-tab-content" v-if="currentPdf.type==='showURL'"> <view class="pdf-tab-content" v-if="currentPdf.type==='showURL'">
<template v-if="filteredCurrentTabs.length > 0"> <template v-if="filteredCurrentTabs.length > 0">
<web-view <view class="pdfContainer">
<image :src="currentPdf.url" class="pdf-image"></image>
</view>
<!-- <web-view
:src="getPdfViewerUrl(currentPdf.url)" :src="getPdfViewerUrl(currentPdf.url)"
class="webview" class="webview"
@error="handlePdfError" @error="handlePdfError"
@load="handleWebViewLoad" @load="handleWebViewLoad"
:key="getPdfViewerUrl(currentPdf.url)" :key="getPdfViewerUrl(currentPdf.url)"
></web-view> ></web-view> -->
</template> </template>
<template v-else> <template v-else>
<view class="pdf-empty">暂无访问权限</view> <view class="pdf-empty">暂无访问权限</view>
...@@ -437,7 +441,21 @@ const handlePdfError = () => { ...@@ -437,7 +441,21 @@ const handlePdfError = () => {
bottom: 0; bottom: 0;
background-color: #ffffff; background-color: #ffffff;
} }
.pdfContainer{
display: flex;
width: 100%;
height: 100%;
align-items: center;
justify-content: center;
position: relative;
margin: 0 auto 8px auto;
}
.pdfContainer .pdf-image{
width: 100%;
height: 100%;
position: relative;
z-index:100
}
/* 无权限/无Tab时的空状态 */ /* 无权限/无Tab时的空状态 */
.pdf-empty { .pdf-empty {
width: 100%; width: 100%;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment