Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-app x
提交
1190d92a
H
hello uni-app x
项目概览
DCloud
/
hello uni-app x
通知
6058
Star
93
Fork
166
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
19
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello uni-app x
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
19
Issue
19
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
1190d92a
编写于
7月 25, 2024
作者:
DCloud-WZF
💬
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: 调整 uni-push 示例位置
上级
e3e849c9
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
89 addition
and
89 deletion
+89
-89
pages.json
pages.json
+35
-35
pages/API/uni-push/uni-push.uvue
pages/API/uni-push/uni-push.uvue
+0
-0
pages/tabBar/API.uvue
pages/tabBar/API.uvue
+54
-54
未找到文件。
pages.json
浏览文件 @
1190d92a
...
...
@@ -470,14 +470,13 @@
"navigationBarTitleText"
:
"ball"
}
},
{
"path"
:
"pages/component/canvas/canvas/doodle"
,
"group"
:
"0,7"
,
"style"
:
{
"navigationBarTitleText"
:
"涂鸦"
}
},
{
"path"
:
"pages/component/canvas/canvas/doodle"
,
"group"
:
"0,7"
,
"style"
:
{
"navigationBarTitleText"
:
"涂鸦"
}
},
//
#ifndef
WEB
{
"path"
:
"pages/component/animation-view/animation-view"
,
...
...
@@ -608,7 +607,7 @@
},
{
"path"
:
"pages/API/storage/storage"
,
"group"
:
"1,
9
"
,
"group"
:
"1,
10
"
,
"style"
:
{
"navigationBarTitleText"
:
"storage | key-value本地数据存储"
}
...
...
@@ -616,7 +615,7 @@
//
#ifndef
WEB
{
"path"
:
"pages/API/get-file-system-manager/get-file-system-manager"
,
"group"
:
"1,1
0
,0"
,
"group"
:
"1,1
1
,0"
,
"style"
:
{
"navigationBarTitleText"
:
"getFileSystemManager | 获取文件管理器"
}
...
...
@@ -674,7 +673,7 @@
},
{
"path"
:
"pages/API/get-location/get-location"
,
"group"
:
"1,
8
,0"
,
"group"
:
"1,
9
,0"
,
"style"
:
{
"navigationBarTitleText"
:
"getLocation | 获取当前位置"
}
...
...
@@ -682,7 +681,7 @@
//
#ifdef
WEB
{
"path"
:
"pages/API/open-location/open-location"
,
"group"
:
"1,
8
,1"
,
"group"
:
"1,
9
,1"
,
"style"
:
{
"navigationBarTitleText"
:
"openLocation | 使用地图查看位置"
}
...
...
@@ -691,7 +690,7 @@
//
#ifdef
WEB
{
"path"
:
"pages/API/choose-location/choose-location"
,
"group"
:
"1,
8
,2"
,
"group"
:
"1,
9
,2"
,
"style"
:
{
"navigationBarTitleText"
:
"chooseLocation | 使用地图选择位置"
}
...
...
@@ -921,7 +920,7 @@
},
{
"path"
:
"pages/API/get-battery-info/get-battery-info"
,
"group"
:
"1,6,
8
"
,
"group"
:
"1,6,
7
"
,
"style"
:
{
"navigationBarTitleText"
:
"getBatteryInfo | 获取电池电量信息"
}
...
...
@@ -946,7 +945,7 @@
//
#ifndef
WEB
{
"path"
:
"pages/API/facial-recognition-meta-info/facial-recognition-meta-info"
,
"group"
:
"1,1
1
,1"
,
"group"
:
"1,1
2
,1"
,
"style"
:
{
"navigationBarTitleText"
:
"facialRecognitionMetaInfo | 金融级实人认证"
,
"enablePullDownRefresh"
:
false
...
...
@@ -956,7 +955,7 @@
//
#ifndef
WEB
{
"path"
:
"pages/API/get-univerify-manager/get-univerify-manager"
,
"group"
:
"1,1
1
,0"
,
"group"
:
"1,1
2
,0"
,
"style"
:
{
"navigationBarTitleText"
:
"getUniverifyManager | App一键登录"
,
"enablePullDownRefresh"
:
false
...
...
@@ -974,7 +973,7 @@
//
#ifdef
APP-ANDROID
{
"path"
:
"pages/API/create-request-permission-listener/create-request-permission-listener"
,
"group"
:
"1,6,1
6
"
,
"group"
:
"1,6,1
5
"
,
"style"
:
{
"navigationBarTitleText"
:
"createRequestPermissionListener | 监听权限申请"
,
"enablePullDownRefresh"
:
false
...
...
@@ -994,7 +993,7 @@
//
#ifndef
WEB
{
"path"
:
"pages/API/create-rewarded-video-ad/create-rewarded-video-ad"
,
"group"
:
"1,1
2
,0"
,
"group"
:
"1,1
3
,0"
,
"style"
:
{
"navigationBarTitleText"
:
"createRewardedVideoAd | 激励视频广告"
,
"enablePullDownRefresh"
:
false
...
...
@@ -1029,7 +1028,7 @@
//
#ifdef
WEB
{
"path"
:
"pages/API/make-phone-call/make-phone-call"
,
"group"
:
"1,6,
9
"
,
"group"
:
"1,6,
8
"
,
"style"
:
{
"navigationBarTitleText"
:
"makePhoneCall | 打电话"
}
...
...
@@ -1063,7 +1062,7 @@
//
#ifdef
WEB
{
"path"
:
"pages/API/clipboard/clipboard"
,
"group"
:
"1,6,
10
"
,
"group"
:
"1,6,
9
"
,
"style"
:
{
"navigationBarTitleText"
:
"clipboard | 剪切板"
}
...
...
@@ -1072,7 +1071,7 @@
//
#ifdef
WEB
{
"path"
:
"pages/API/compass/compass"
,
"group"
:
"1,6,1
1
"
,
"group"
:
"1,6,1
0
"
,
"style"
:
{
"navigationBarTitleText"
:
"compass | 罗盘"
}
...
...
@@ -1135,10 +1134,10 @@
//
#endif
//
#ifndef
WEB
{
"path"
:
"pages/API/
push/
push"
,
"group"
:
"1,
6,7
"
,
"path"
:
"pages/API/
uni-push/uni-
push"
,
"group"
:
"1,
15,0
"
,
"style"
:
{
"navigationBarTitleText"
:
"
push |
推送"
"navigationBarTitleText"
:
"推送"
}
},
//
#endif
...
...
@@ -2119,10 +2118,6 @@
{
"id"
:
"api.dom.createSelectorQuery"
,
"name"
:
"createSelectorQuery"
},
{
"id"
:
"api.dom.createCanvasContextAsync"
,
"name"
:
"createCanvasContextAsync"
}
]
},
...
...
@@ -2219,10 +2214,6 @@
"id"
:
"api.device.installApk"
,
"name"
:
"installApk"
},
{
"id"
:
"api.device.push"
,
"name"
:
"push"
},
{
"id"
:
"api.device.getBatteryInfo"
,
"name"
:
"getBatteryInfo"
...
...
@@ -2295,6 +2286,7 @@
}
]
},
null
,
{
"id"
:
"api.location"
,
"name"
:
"位置"
,
...
...
@@ -2351,7 +2343,6 @@
}
]
},
null
,
{
"id"
:
"api.payment"
,
"name"
:
"支付"
,
...
...
@@ -2366,7 +2357,16 @@
}
]
},
null
,
{
"id"
:
"api.push"
,
"name"
:
"推送"
,
"children"
:
[
{
"id"
:
"api.push.uni-push"
,
"name"
:
"push"
}
]
},
{
"id"
:
"api.component"
,
"name"
:
"组件上下文对象"
,
...
...
@@ -2732,4 +2732,4 @@
]
}
]
}
}
\ No newline at end of file
pages/API/
push/
push.uvue
→
pages/API/
uni-push/uni-
push.uvue
浏览文件 @
1190d92a
文件已移动
pages/tabBar/API.uvue
浏览文件 @
1190d92a
...
...
@@ -11,31 +11,31 @@
<u-link :href="'https://uniapp.dcloud.io/uni-app-x/api/'" :text="'https://uniapp.dcloud.io/uni-app-x/api/'"
:inWhiteList="true"></u-link>
</view>
<uni-collapse>
<uni-collapse-item ref="category" v-for="menuItem in menu" :key="menuItem!.id" :title="menuItem.name"
class="item">
<view v-for="page in menuItem.pages" :key="page!.path" class="uni-navigate-item" hover-class="is--active"
@click="goPage(`/${page.path}`)">
<text class="uni-navigate-text" :class="{'left-win-active': leftWinActive === page.path && hasLeftWin}">{{page.style["navigationBarTitleText"]}}</text>
<image :src="arrowRightIcon" class="uni-icon-size"></image>
</view>
<uni-collapse style="width: 100%" v-for="childMenu in menuItem.children" :key="childMenu!.id">
<uni-collapse-item :title="childMenu.name" class="item" style="margin-bottom: 0">
<view class="uni-navigate-item" hover-class="is--active" v-for="childPage in childMenu.pages"
:key="childPage!.path" @click="goPage(`/${childPage.path}`)">
<text class="uni-navigate-text">{{
childPage.style["navigationBarTitleText"]
}}</text>
<image :src="arrowRightIcon" class="uni-icon-size"></image>
</view>
</uni-collapse-item>
</uni-collapse>
</uni-collapse-item>
</uni-collapse>
<view v-if="!hasLeftWin" ref="pop" @click="hidePop()" class="popup">
<view style="width: 90%; background-color: white" @click="stopClickPop">
<api-set-tabbar></api-set-tabbar>
</view>
<uni-collapse>
<uni-collapse-item ref="category" v-for="menuItem in menu" :key="menuItem!.id" :title="menuItem.name"
class="item">
<view v-for="page in menuItem.pages" :key="page!.path" class="uni-navigate-item" hover-class="is--active"
@click="goPage(`/${page.path}`)">
<text class="uni-navigate-text" :class="{'left-win-active': leftWinActive === page.path && hasLeftWin}">{{page.style["navigationBarTitleText"]}}</text>
<image :src="arrowRightIcon" class="uni-icon-size"></image>
</view>
<uni-collapse style="width: 100%" v-for="childMenu in menuItem.children" :key="childMenu!.id">
<uni-collapse-item :title="childMenu.name" class="item" style="margin-bottom: 0">
<view class="uni-navigate-item" hover-class="is--active" v-for="childPage in childMenu.pages"
:key="childPage!.path" @click="goPage(`/${childPage.path}`)">
<text class="uni-navigate-text">{{
childPage.style["navigationBarTitleText"]
}}</text>
<image :src="arrowRightIcon" class="uni-icon-size"></image>
</view>
</uni-collapse-item>
</uni-collapse>
</uni-collapse-item>
</uni-collapse>
<view v-if="!hasLeftWin" ref="pop" @click="hidePop()" class="popup">
<view style="width: 90%; background-color: white" @click="stopClickPop">
<api-set-tabbar></api-set-tabbar>
</view>
</view>
</view>
<!-- #ifdef APP -->
...
...
@@ -44,9 +44,9 @@
</template>
<script lang="uts">
import { generateMenu } from './generateMenu.uts'
import { MenuItem } from './generateMenu.uts'
const menu = generateMenu('pages/API')
import { generateMenu } from './generateMenu.uts'
import { MenuItem } from './generateMenu.uts'
const menu = generateMenu('pages/API')
import { state } from '@/store/index.uts'
export default {
data() {
...
...
@@ -54,14 +54,14 @@
menu: menu as (MenuItem | null)[],
arrowRightIcon: '/static/icons/arrow-right.png',
}
},
computed: {
hasLeftWin():boolean{
return !state.noMatchLeftWindow
},
leftWinActive():string{
return state.leftWinActive.slice(1)
}
},
computed: {
hasLeftWin():boolean{
return !state.noMatchLeftWindow
},
leftWinActive():string{
return state.leftWinActive.slice(1)
}
},
methods: {
goPage(url : string) {
...
...
@@ -80,23 +80,23 @@
stopClickPop: function (e : PointerEvent) {
e.stopPropagation() //点击到pop的非灰色区域,拦截点击事件
}
},
// #ifdef WEB
watch:{
$route: {
immediate: true,
handler(newRoute) {
if (newRoute.matched.length) {
const activeCategoryIndex = this.menu.findIndex(menuItem => menuItem?.pages.some(page => this.leftWinActive && this.leftWinActive === page?.path))
if (activeCategoryIndex > -1) {
this.$nextTick(() => {
((this.$refs.category as ComponentPublicInstance[])[activeCategoryIndex])?.$callMethod('openCollapse', true)
})
}
}
}
}
},
},
// #ifdef WEB
watch:{
$route: {
immediate: true,
handler(newRoute) {
if (newRoute.matched.length) {
const activeCategoryIndex = this.menu.findIndex(menuItem => menuItem?.pages.some(page => this.leftWinActive && this.leftWinActive === page?.path))
if (activeCategoryIndex > -1) {
this.$nextTick(() => {
((this.$refs.category as ComponentPublicInstance[])[activeCategoryIndex])?.$callMethod('openCollapse', true)
})
}
}
}
}
},
// #endif
}
</script>
...
...
@@ -122,4 +122,4 @@
display: none;
background-color: rgba(16, 16, 16, 0.5);
}
</style>
</style>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录