|
|
@@ -91,13 +91,17 @@ const open = () => {
|
|
|
// console.log(11, uni.getSystemInfoSync())
|
|
|
const { statusBarHeight, windowHeight, screenHeight } = uni.getSystemInfoSync()
|
|
|
pagesHeight.value = Number(windowHeight) - Number(statusBarHeight) + 'px'
|
|
|
- console.log(windowHeight,windowHeight,windowHeight - statusBarHeight)
|
|
|
+ let headerFootHeight = 44;
|
|
|
+ if(!props.showCloseBtn){
|
|
|
+ headerFootHeight = rpxToPx(220) + rpxToPx(170)
|
|
|
+ }
|
|
|
+
|
|
|
webview = plus.webview.create(
|
|
|
`${typeMapSrc[props.type]}${encodeURIComponent(props.value)}&safeBottom=${safeBottom.value}`,
|
|
|
'id',
|
|
|
{
|
|
|
- bottom: 0,
|
|
|
- height: windowHeight - statusBarHeight - 44,
|
|
|
+ bottom: !props.showCloseBtn?rpxToPx(170):0,
|
|
|
+ height: windowHeight - statusBarHeight - headerFootHeight,
|
|
|
},
|
|
|
|
|
|
);
|
|
|
@@ -109,7 +113,10 @@ const open = () => {
|
|
|
webview.show('id', 'slide-in-bottom')
|
|
|
// #endif
|
|
|
}
|
|
|
-
|
|
|
+const rpxToPx = (rpx)=> {
|
|
|
+ const sys = uni.getSystemInfoSync()
|
|
|
+ return rpx * sys.screenWidth / 750
|
|
|
+}
|
|
|
const close = () => {
|
|
|
|
|
|
pagesHeight.value = '0'
|
|
|
@@ -188,6 +195,13 @@ onMounted(() => {
|
|
|
position: static;
|
|
|
height: 100% !important;
|
|
|
}
|
|
|
+ .webview{
|
|
|
+ height: 100% !important;
|
|
|
+ }
|
|
|
+ .cjx-previewOffice-iframe{
|
|
|
+ top:0 !important;
|
|
|
+ height: 100% !important;
|
|
|
+ }
|
|
|
.cjx-previewOffice-mask{
|
|
|
display: none;
|
|
|
}
|