Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-app x
提交
1190d92a
H
hello uni-app x
项目概览
DCloud
/
hello uni-app x
通知
6059
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 @@
...
@@ -470,14 +470,13 @@
"navigationBarTitleText"
:
"ball"
"navigationBarTitleText"
:
"ball"
}
}
},
},
{
{
"path"
:
"pages/component/canvas/canvas/doodle"
,
"path"
:
"pages/component/canvas/canvas/doodle"
,
"group"
:
"0,7"
,
"group"
:
"0,7"
,
"style"
:
"style"
:
{
{
"navigationBarTitleText"
:
"涂鸦"
"navigationBarTitleText"
:
"涂鸦"
}
}
},
},
//
#ifndef
WEB
//
#ifndef
WEB
{
{
"path"
:
"pages/component/animation-view/animation-view"
,
"path"
:
"pages/component/animation-view/animation-view"
,
...
@@ -608,7 +607,7 @@
...
@@ -608,7 +607,7 @@
},
},
{
{
"path"
:
"pages/API/storage/storage"
,
"path"
:
"pages/API/storage/storage"
,
"group"
:
"1,
9
"
,
"group"
:
"1,
10
"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"storage | key-value本地数据存储"
"navigationBarTitleText"
:
"storage | key-value本地数据存储"
}
}
...
@@ -616,7 +615,7 @@
...
@@ -616,7 +615,7 @@
//
#ifndef
WEB
//
#ifndef
WEB
{
{
"path"
:
"pages/API/get-file-system-manager/get-file-system-manager"
,
"path"
:
"pages/API/get-file-system-manager/get-file-system-manager"
,
"group"
:
"1,1
0
,0"
,
"group"
:
"1,1
1
,0"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"getFileSystemManager | 获取文件管理器"
"navigationBarTitleText"
:
"getFileSystemManager | 获取文件管理器"
}
}
...
@@ -674,7 +673,7 @@
...
@@ -674,7 +673,7 @@
},
},
{
{
"path"
:
"pages/API/get-location/get-location"
,
"path"
:
"pages/API/get-location/get-location"
,
"group"
:
"1,
8
,0"
,
"group"
:
"1,
9
,0"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"getLocation | 获取当前位置"
"navigationBarTitleText"
:
"getLocation | 获取当前位置"
}
}
...
@@ -682,7 +681,7 @@
...
@@ -682,7 +681,7 @@
//
#ifdef
WEB
//
#ifdef
WEB
{
{
"path"
:
"pages/API/open-location/open-location"
,
"path"
:
"pages/API/open-location/open-location"
,
"group"
:
"1,
8
,1"
,
"group"
:
"1,
9
,1"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"openLocation | 使用地图查看位置"
"navigationBarTitleText"
:
"openLocation | 使用地图查看位置"
}
}
...
@@ -691,7 +690,7 @@
...
@@ -691,7 +690,7 @@
//
#ifdef
WEB
//
#ifdef
WEB
{
{
"path"
:
"pages/API/choose-location/choose-location"
,
"path"
:
"pages/API/choose-location/choose-location"
,
"group"
:
"1,
8
,2"
,
"group"
:
"1,
9
,2"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"chooseLocation | 使用地图选择位置"
"navigationBarTitleText"
:
"chooseLocation | 使用地图选择位置"
}
}
...
@@ -921,7 +920,7 @@
...
@@ -921,7 +920,7 @@
},
},
{
{
"path"
:
"pages/API/get-battery-info/get-battery-info"
,
"path"
:
"pages/API/get-battery-info/get-battery-info"
,
"group"
:
"1,6,
8
"
,
"group"
:
"1,6,
7
"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"getBatteryInfo | 获取电池电量信息"
"navigationBarTitleText"
:
"getBatteryInfo | 获取电池电量信息"
}
}
...
@@ -946,7 +945,7 @@
...
@@ -946,7 +945,7 @@
//
#ifndef
WEB
//
#ifndef
WEB
{
{
"path"
:
"pages/API/facial-recognition-meta-info/facial-recognition-meta-info"
,
"path"
:
"pages/API/facial-recognition-meta-info/facial-recognition-meta-info"
,
"group"
:
"1,1
1
,1"
,
"group"
:
"1,1
2
,1"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"facialRecognitionMetaInfo | 金融级实人认证"
,
"navigationBarTitleText"
:
"facialRecognitionMetaInfo | 金融级实人认证"
,
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
...
@@ -956,7 +955,7 @@
...
@@ -956,7 +955,7 @@
//
#ifndef
WEB
//
#ifndef
WEB
{
{
"path"
:
"pages/API/get-univerify-manager/get-univerify-manager"
,
"path"
:
"pages/API/get-univerify-manager/get-univerify-manager"
,
"group"
:
"1,1
1
,0"
,
"group"
:
"1,1
2
,0"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"getUniverifyManager | App一键登录"
,
"navigationBarTitleText"
:
"getUniverifyManager | App一键登录"
,
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
...
@@ -974,7 +973,7 @@
...
@@ -974,7 +973,7 @@
//
#ifdef
APP-ANDROID
//
#ifdef
APP-ANDROID
{
{
"path"
:
"pages/API/create-request-permission-listener/create-request-permission-listener"
,
"path"
:
"pages/API/create-request-permission-listener/create-request-permission-listener"
,
"group"
:
"1,6,1
6
"
,
"group"
:
"1,6,1
5
"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"createRequestPermissionListener | 监听权限申请"
,
"navigationBarTitleText"
:
"createRequestPermissionListener | 监听权限申请"
,
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
...
@@ -994,7 +993,7 @@
...
@@ -994,7 +993,7 @@
//
#ifndef
WEB
//
#ifndef
WEB
{
{
"path"
:
"pages/API/create-rewarded-video-ad/create-rewarded-video-ad"
,
"path"
:
"pages/API/create-rewarded-video-ad/create-rewarded-video-ad"
,
"group"
:
"1,1
2
,0"
,
"group"
:
"1,1
3
,0"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"createRewardedVideoAd | 激励视频广告"
,
"navigationBarTitleText"
:
"createRewardedVideoAd | 激励视频广告"
,
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
...
@@ -1029,7 +1028,7 @@
...
@@ -1029,7 +1028,7 @@
//
#ifdef
WEB
//
#ifdef
WEB
{
{
"path"
:
"pages/API/make-phone-call/make-phone-call"
,
"path"
:
"pages/API/make-phone-call/make-phone-call"
,
"group"
:
"1,6,
9
"
,
"group"
:
"1,6,
8
"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"makePhoneCall | 打电话"
"navigationBarTitleText"
:
"makePhoneCall | 打电话"
}
}
...
@@ -1063,7 +1062,7 @@
...
@@ -1063,7 +1062,7 @@
//
#ifdef
WEB
//
#ifdef
WEB
{
{
"path"
:
"pages/API/clipboard/clipboard"
,
"path"
:
"pages/API/clipboard/clipboard"
,
"group"
:
"1,6,
10
"
,
"group"
:
"1,6,
9
"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"clipboard | 剪切板"
"navigationBarTitleText"
:
"clipboard | 剪切板"
}
}
...
@@ -1072,7 +1071,7 @@
...
@@ -1072,7 +1071,7 @@
//
#ifdef
WEB
//
#ifdef
WEB
{
{
"path"
:
"pages/API/compass/compass"
,
"path"
:
"pages/API/compass/compass"
,
"group"
:
"1,6,1
1
"
,
"group"
:
"1,6,1
0
"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"compass | 罗盘"
"navigationBarTitleText"
:
"compass | 罗盘"
}
}
...
@@ -1135,10 +1134,10 @@
...
@@ -1135,10 +1134,10 @@
//
#endif
//
#endif
//
#ifndef
WEB
//
#ifndef
WEB
{
{
"path"
:
"pages/API/
push/
push"
,
"path"
:
"pages/API/
uni-push/uni-
push"
,
"group"
:
"1,
6,7
"
,
"group"
:
"1,
15,0
"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"
push |
推送"
"navigationBarTitleText"
:
"推送"
}
}
},
},
//
#endif
//
#endif
...
@@ -2119,10 +2118,6 @@
...
@@ -2119,10 +2118,6 @@
{
{
"id"
:
"api.dom.createSelectorQuery"
,
"id"
:
"api.dom.createSelectorQuery"
,
"name"
:
"createSelectorQuery"
"name"
:
"createSelectorQuery"
},
{
"id"
:
"api.dom.createCanvasContextAsync"
,
"name"
:
"createCanvasContextAsync"
}
}
]
]
},
},
...
@@ -2219,10 +2214,6 @@
...
@@ -2219,10 +2214,6 @@
"id"
:
"api.device.installApk"
,
"id"
:
"api.device.installApk"
,
"name"
:
"installApk"
"name"
:
"installApk"
},
},
{
"id"
:
"api.device.push"
,
"name"
:
"push"
},
{
{
"id"
:
"api.device.getBatteryInfo"
,
"id"
:
"api.device.getBatteryInfo"
,
"name"
:
"getBatteryInfo"
"name"
:
"getBatteryInfo"
...
@@ -2295,6 +2286,7 @@
...
@@ -2295,6 +2286,7 @@
}
}
]
]
},
},
null
,
{
{
"id"
:
"api.location"
,
"id"
:
"api.location"
,
"name"
:
"位置"
,
"name"
:
"位置"
,
...
@@ -2351,7 +2343,6 @@
...
@@ -2351,7 +2343,6 @@
}
}
]
]
},
},
null
,
{
{
"id"
:
"api.payment"
,
"id"
:
"api.payment"
,
"name"
:
"支付"
,
"name"
:
"支付"
,
...
@@ -2366,7 +2357,16 @@
...
@@ -2366,7 +2357,16 @@
}
}
]
]
},
},
null
,
{
"id"
:
"api.push"
,
"name"
:
"推送"
,
"children"
:
[
{
"id"
:
"api.push.uni-push"
,
"name"
:
"push"
}
]
},
{
{
"id"
:
"api.component"
,
"id"
:
"api.component"
,
"name"
:
"组件上下文对象"
,
"name"
:
"组件上下文对象"
,
...
@@ -2732,4 +2732,4 @@
...
@@ -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 @@
...
@@ -11,31 +11,31 @@
<u-link :href="'https://uniapp.dcloud.io/uni-app-x/api/'" :text="'https://uniapp.dcloud.io/uni-app-x/api/'"
<u-link :href="'https://uniapp.dcloud.io/uni-app-x/api/'" :text="'https://uniapp.dcloud.io/uni-app-x/api/'"
:inWhiteList="true"></u-link>
:inWhiteList="true"></u-link>
</view>
</view>
<uni-collapse>
<uni-collapse>
<uni-collapse-item ref="category" v-for="menuItem in menu" :key="menuItem!.id" :title="menuItem.name"
<uni-collapse-item ref="category" v-for="menuItem in menu" :key="menuItem!.id" :title="menuItem.name"
class="item">
class="item">
<view v-for="page in menuItem.pages" :key="page!.path" class="uni-navigate-item" hover-class="is--active"
<view v-for="page in menuItem.pages" :key="page!.path" class="uni-navigate-item" hover-class="is--active"
@click="goPage(`/${page.path}`)">
@click="goPage(`/${page.path}`)">
<text class="uni-navigate-text" :class="{'left-win-active': leftWinActive === page.path && hasLeftWin}">{{page.style["navigationBarTitleText"]}}</text>
<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>
<image :src="arrowRightIcon" class="uni-icon-size"></image>
</view>
</view>
<uni-collapse style="width: 100%" v-for="childMenu in menuItem.children" :key="childMenu!.id">
<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">
<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"
<view class="uni-navigate-item" hover-class="is--active" v-for="childPage in childMenu.pages"
:key="childPage!.path" @click="goPage(`/${childPage.path}`)">
:key="childPage!.path" @click="goPage(`/${childPage.path}`)">
<text class="uni-navigate-text">{{
<text class="uni-navigate-text">{{
childPage.style["navigationBarTitleText"]
childPage.style["navigationBarTitleText"]
}}</text>
}}</text>
<image :src="arrowRightIcon" class="uni-icon-size"></image>
<image :src="arrowRightIcon" class="uni-icon-size"></image>
</view>
</view>
</uni-collapse-item>
</uni-collapse-item>
</uni-collapse>
</uni-collapse>
</uni-collapse-item>
</uni-collapse-item>
</uni-collapse>
</uni-collapse>
<view v-if="!hasLeftWin" ref="pop" @click="hidePop()" class="popup">
<view v-if="!hasLeftWin" ref="pop" @click="hidePop()" class="popup">
<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>
</view>
</view>
</view>
</view>
<!-- #ifdef APP -->
<!-- #ifdef APP -->
...
@@ -44,9 +44,9 @@
...
@@ -44,9 +44,9 @@
</template>
</template>
<script lang="uts">
<script lang="uts">
import { generateMenu } from './generateMenu.uts'
import { generateMenu } from './generateMenu.uts'
import { MenuItem } from './generateMenu.uts'
import { MenuItem } from './generateMenu.uts'
const menu = generateMenu('pages/API')
const menu = generateMenu('pages/API')
import { state } from '@/store/index.uts'
import { state } from '@/store/index.uts'
export default {
export default {
data() {
data() {
...
@@ -54,14 +54,14 @@
...
@@ -54,14 +54,14 @@
menu: menu as (MenuItem | null)[],
menu: menu as (MenuItem | null)[],
arrowRightIcon: '/static/icons/arrow-right.png',
arrowRightIcon: '/static/icons/arrow-right.png',
}
}
},
},
computed: {
computed: {
hasLeftWin():boolean{
hasLeftWin():boolean{
return !state.noMatchLeftWindow
return !state.noMatchLeftWindow
},
},
leftWinActive():string{
leftWinActive():string{
return state.leftWinActive.slice(1)
return state.leftWinActive.slice(1)
}
}
},
},
methods: {
methods: {
goPage(url : string) {
goPage(url : string) {
...
@@ -80,23 +80,23 @@
...
@@ -80,23 +80,23 @@
stopClickPop: function (e : PointerEvent) {
stopClickPop: function (e : PointerEvent) {
e.stopPropagation() //点击到pop的非灰色区域,拦截点击事件
e.stopPropagation() //点击到pop的非灰色区域,拦截点击事件
}
}
},
},
// #ifdef WEB
// #ifdef WEB
watch:{
watch:{
$route: {
$route: {
immediate: true,
immediate: true,
handler(newRoute) {
handler(newRoute) {
if (newRoute.matched.length) {
if (newRoute.matched.length) {
const activeCategoryIndex = this.menu.findIndex(menuItem => menuItem?.pages.some(page => this.leftWinActive && this.leftWinActive === page?.path))
const activeCategoryIndex = this.menu.findIndex(menuItem => menuItem?.pages.some(page => this.leftWinActive && this.leftWinActive === page?.path))
if (activeCategoryIndex > -1) {
if (activeCategoryIndex > -1) {
this.$nextTick(() => {
this.$nextTick(() => {
((this.$refs.category as ComponentPublicInstance[])[activeCategoryIndex])?.$callMethod('openCollapse', true)
((this.$refs.category as ComponentPublicInstance[])[activeCategoryIndex])?.$callMethod('openCollapse', true)
})
})
}
}
}
}
}
}
}
}
},
},
// #endif
// #endif
}
}
</script>
</script>
...
@@ -122,4 +122,4 @@
...
@@ -122,4 +122,4 @@
display: none;
display: none;
background-color: rgba(16, 16, 16, 0.5);
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录