提交 c2867eaa 编写于 作者: 雪洛's avatar 雪洛

fix: 修复弹窗位置随页面滚动的Bug

上级 5b4ec2a0
...@@ -1014,7 +1014,8 @@ ...@@ -1014,7 +1014,8 @@
"style": { "style": {
"navigationBarTitleText": "模板" "navigationBarTitleText": "模板"
} }
}, },
// #ifdef APP
{ {
"path": "pages/template/list-news/list-news", "path": "pages/template/list-news/list-news",
"style": { "style": {
...@@ -1026,7 +1027,8 @@ ...@@ -1026,7 +1027,8 @@
"style": { "style": {
"navigationBarTitleText": "详情示例" "navigationBarTitleText": "详情示例"
} }
}, },
// #endif
{ {
"path": "pages/template/drop-card/drop-card", "path": "pages/template/drop-card/drop-card",
"style": { "style": {
...@@ -1077,7 +1079,8 @@ ...@@ -1077,7 +1079,8 @@
"style": { "style": {
"navigationBarTitleText": "半屏弹窗" "navigationBarTitleText": "半屏弹窗"
} }
}, },
// #ifdef APP
{ {
"path": "pages/template/long-list/long-list", "path": "pages/template/long-list/long-list",
"style": { "style": {
...@@ -1091,7 +1094,8 @@ ...@@ -1091,7 +1094,8 @@
"navigationBarTitleText": "顶部banner长列表", "navigationBarTitleText": "顶部banner长列表",
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
}, },
// #endif
{ {
"path": "pages/template/pull-zoom-image/pull-zoom-image", "path": "pages/template/pull-zoom-image/pull-zoom-image",
"style": { "style": {
......
<template> <template>
<!-- #ifdef APP --> <!-- #ifdef APP -->
<scroll-view style="flex: 1"> <scroll-view style="flex: 1">
<!-- #endif --> <!-- #endif -->
<view class="uni-container"> <view class="uni-container">
<view class="uni-header-logo"> <view class="uni-header-logo">
<image class="uni-header-image" src="/static/apiIndex.png"></image> <image class="uni-header-image" src="/static/apiIndex.png"></image>
...@@ -26,11 +26,10 @@ ...@@ -26,11 +26,10 @@
</uni-collapse> </uni-collapse>
</view> </view>
<!-- #ifdef APP --> <!-- #ifdef APP -->
</scroll-view> </scroll-view>
<!-- #endif --> <!-- #endif -->
<view ref="pop" @click="hidePop()" <view ref="pop" @click="hidePop()" class="popup">
style="width: 100%; height: 100%; position: absolute;align-items: center;justify-content: center; display: none;background-color: rgba(16, 16, 16, 0.5);">
<view style="width: 90%;background-color: white;" @click="stopClickPop"> <view style="width: 90%;background-color: white;" @click="stopClickPop">
<api-set-tabbar></api-set-tabbar> <api-set-tabbar></api-set-tabbar>
</view> </view>
...@@ -86,12 +85,12 @@ ...@@ -86,12 +85,12 @@
{ {
name: '获取启动参数', name: '获取启动参数',
url: 'get-launch-options-sync', url: 'get-launch-options-sync',
}, },
// #ifdef APP-ANDROID // #ifdef APP-ANDROID
{ {
name: '退出应用', name: '退出应用',
url: 'exit', url: 'exit',
}, },
// #endif // #endif
] as Page[], ] as Page[],
}, },
...@@ -137,19 +136,19 @@ ...@@ -137,19 +136,19 @@
// name: "创建动画", // name: "创建动画",
// url: "animation", // url: "animation",
// enable: false // enable: false
// }, // },
// #ifdef WEB // #ifdef WEB
{ {
name: "创建绘画", name: "创建绘画",
url: "canvas", url: "canvas",
enable: true enable: true
}, },
// #endif // #endif
// { // {
// name: "节点布局交互状态", // name: "节点布局交互状态",
// url: "intersection-observer", // url: "intersection-observer",
// enable: false // enable: false
// }, // },
// #ifdef APP // #ifdef APP
{ {
name: 'element元素', name: 'element元素',
...@@ -160,11 +159,11 @@ ...@@ -160,11 +159,11 @@
name: 'element draw', name: 'element draw',
url: 'element-draw', url: 'element-draw',
api: ["Element.getDrawableContext"] api: ["Element.getDrawableContext"]
},{ }, {
name: 'element截图', name: 'element截图',
url: 'element-takesnapshot', url: 'element-takesnapshot',
api: ["Element.takeSnapshot"] api: ["Element.takeSnapshot"]
}, },
// #endif // #endif
{ {
name: 'node节点', name: 'node节点',
...@@ -246,7 +245,7 @@ ...@@ -246,7 +245,7 @@
{ {
name: '获取APP基础信息', name: '获取APP基础信息',
url: 'get-app-base-info', url: 'get-app-base-info',
}, },
// #ifdef APP // #ifdef APP
{ {
name: '获取APP授权设置', name: '获取APP授权设置',
...@@ -255,17 +254,17 @@ ...@@ -255,17 +254,17 @@
{ {
name: '获取系统设置', name: '获取系统设置',
url: 'get-system-setting', url: 'get-system-setting',
}, },
// #endif // #endif
{ {
name: '电量', name: '电量',
url: 'get-battery-info', url: 'get-battery-info',
}, },
// #ifdef APP-ANDROID // #ifdef APP-ANDROID
{ {
name: '安装Apk', name: '安装Apk',
url: 'install-apk' url: 'install-apk'
}, },
// #endif // #endif
/* { /* {
name: "打电话", name: "打电话",
...@@ -333,12 +332,12 @@ ...@@ -333,12 +332,12 @@
name: '图片预览', name: '图片预览',
url: 'preview-image', url: 'preview-image',
api: ["previewImage", "closePreviewImage"] api: ["previewImage", "closePreviewImage"]
}, },
// #ifdef APP // #ifdef APP
{ {
name: "保存图片到相册", name: "保存图片到相册",
url: 'save-image-to-photos-album' url: 'save-image-to-photos-album'
}, },
// #endif // #endif
/* { /* {
name: "图片选择和拍照", name: "图片选择和拍照",
...@@ -407,8 +406,8 @@ ...@@ -407,8 +406,8 @@
api: ["getStorageInfo", "getStorageInfoSync", "getStorage", "getStorageSync", "setStorage", "setStorageSync", "removeStorage", "removeStorageSync", "clearStorage", "clearStorageSync"] api: ["getStorageInfo", "getStorageInfoSync", "getStorage", "getStorageSync", "setStorage", "setStorageSync", "removeStorage", "removeStorageSync", "clearStorage", "clearStorageSync"]
} }
] as Page[], ] as Page[],
}, },
// #ifdef APP-ANDROID // #ifdef APP-ANDROID
{ {
id: 'file', id: 'file',
name: '文件', name: '文件',
...@@ -418,7 +417,7 @@ ...@@ -418,7 +417,7 @@
url: 'get-file-system-manager' url: 'get-file-system-manager'
}, },
] as Page[], ] as Page[],
}, },
// #endif // #endif
{ {
id: 'unicloud', id: 'unicloud',
...@@ -551,4 +550,20 @@ ...@@ -551,4 +550,20 @@
.item { .item {
margin-bottom: 12px; margin-bottom: 12px;
} }
</style>
.popup {
width: 100%;
/* #ifdef APP */
position: absolute;
height: 100%;
/* #else */
position: fixed;
top: var(--window-top);
bottom: var(--window-bottom);
/* #endif */
align-items: center;
justify-content: center;
display: none;
background-color: rgba(16, 16, 16, 0.5);
}
</style>
...@@ -54,7 +54,8 @@ ...@@ -54,7 +54,8 @@
export default { export default {
data() { data() {
return { return {
list: [ list: [
// #ifdef APP
{ {
id: 'long-list', id: 'long-list',
url: 'long-list', url: 'long-list',
...@@ -78,7 +79,8 @@ ...@@ -78,7 +79,8 @@
name: '列表到详情', name: '列表到详情',
open: false, open: false,
pages: [] as Page[], pages: [] as Page[],
}, },
// #endif
{ {
id: 'scroll-fold-nav', id: 'scroll-fold-nav',
url: 'scroll-fold-nav', url: 'scroll-fold-nav',
...@@ -124,14 +126,16 @@ ...@@ -124,14 +126,16 @@
name: '竖滑视频', name: '竖滑视频',
open: false, open: false,
pages: [] as Page[], pages: [] as Page[],
}, },
// #ifdef APP
{ {
id: 'scroll-sticky', id: 'scroll-sticky',
url: 'scroll-sticky', url: 'scroll-sticky',
name: 'scroll-view自定义滚动吸顶', name: 'scroll-view自定义滚动吸顶',
open: false, open: false,
pages: [] as Page[], pages: [] as Page[],
}, },
// #endif
{ {
id: 'half-screen', id: 'half-screen',
url: 'half-screen', url: 'half-screen',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册