Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-app x
提交
657945fd
H
hello uni-app x
项目概览
DCloud
/
hello uni-app x
通知
6415
Star
112
Fork
189
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
25
列表
看板
标记
里程碑
合并请求
2
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello uni-app x
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
25
Issue
25
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
657945fd
编写于
1月 11, 2024
作者:
W
wanganxp
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
对页面入口进行条件编译
上级
61481937
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
478 addition
and
477 deletion
+478
-477
pages.json
pages.json
+176
-177
pages/tabBar/API.uvue
pages/tabBar/API.uvue
+25
-12
pages/tabBar/component.uvue
pages/tabBar/component.uvue
+270
-285
pages/tabBar/template.uvue
pages/tabBar/template.uvue
+7
-3
未找到文件。
pages.json
浏览文件 @
657945fd
...
...
@@ -19,7 +19,63 @@
"style"
:
{
"navigationBarTitleText"
:
"scroll-view"
}
},
},
{
"path"
:
"pages/component/scroll-view/scroll-view-refresher"
,
"style"
:
{
"navigationBarTitleText"
:
"scroll-view-refresher"
}
},
{
"path"
:
"pages/component/scroll-view/scroll-view-props"
,
"style"
:
{
"navigationBarTitleText"
:
"非下拉刷新的scroll-view属性示例"
}
},
{
"path"
:
"pages/component/scroll-view/scroll-view-refresher-props"
,
"style"
:
{
"navigationBarTitleText"
:
"下拉刷新的scroll-view属性示例"
}
},
{
"path"
:
"pages/component/scroll-view/scroll-view-custom-refresher-props"
,
"style"
:
{
"navigationBarTitleText"
:
"自定义下拉刷新的scroll-view属性示例"
}
},
{
"path"
:
"pages/component/swiper/swiper"
,
"style"
:
{
"navigationBarTitleText"
:
"swiper"
}
},
{
"path"
:
"pages/component/list-view/list-view"
,
"style"
:
{
"navigationBarTitleText"
:
"list-view"
}
},
{
"path"
:
"pages/component/list-view/list-view-multiplex"
,
"style"
:
{
"navigationBarTitleText"
:
"list-view-multiplex"
}
},
{
"path"
:
"pages/component/sticky-section/sticky-section"
,
"style"
:
{
"navigationBarTitleText"
:
"sticky-section"
}
},
{
"path"
:
"pages/component/sticky-header/sticky-header"
,
"style"
:
{
"navigationBarTitleText"
:
"sticky-header"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/component/text/text"
,
"style"
:
{
...
...
@@ -32,6 +88,24 @@
"navigationBarTitleText"
:
"text-props"
}
},
{
"path"
:
"pages/component/rich-text/rich-text"
,
"style"
:
{
"navigationBarTitleText"
:
"rich-text"
}
},
{
"path"
:
"pages/component/rich-text/rich-text-tags"
,
"style"
:
{
"navigationBarTitleText"
:
"rich-text-tags"
}
},
{
"path"
:
"pages/component/rich-text/rich-text-complex"
,
"style"
:
{
"navigationBarTitleText"
:
"rich-text-complex"
}
},
{
"path"
:
"pages/component/progress/progress"
,
"style"
:
{
...
...
@@ -50,38 +124,12 @@
"navigationBarTitleText"
:
"button"
}
},
//
#ifdef
WEB
{
"path"
:
"pages/component/canvas/canvas"
,
"style"
:
{
"navigationBarTitleText"
:
"canvas"
}
},
//
#endif
{
"path"
:
"pages/component/radio/radio"
,
"style"
:
{
"navigationBarTitleText"
:
"radio"
}
},
{
"path"
:
"pages/component/rich-text/rich-text"
,
"style"
:
{
"navigationBarTitleText"
:
"rich-text"
}
},
{
"path"
:
"pages/component/rich-text/rich-text-tags"
,
"style"
:
{
"navigationBarTitleText"
:
"rich-text-tags"
}
},
{
"path"
:
"pages/component/rich-text/rich-text-complex"
,
"style"
:
{
"navigationBarTitleText"
:
"rich-text-complex"
}
},
{
"path"
:
"pages/component/checkbox/checkbox"
,
"style"
:
{
...
...
@@ -124,12 +172,6 @@
"navigationBarTitleText"
:
"switch"
}
},
{
"path"
:
"pages/component/swiper/swiper"
,
"style"
:
{
"navigationBarTitleText"
:
"swiper"
}
},
{
"path"
:
"pages/component/image/image"
,
"style"
:
{
...
...
@@ -172,18 +214,6 @@
"navigationBarTitleText"
:
"video-format"
}
},
{
"path"
:
"pages/component/web-view/web-view"
,
"style"
:
{
"navigationBarTitleText"
:
"web-view"
}
},
{
"path"
:
"pages/component/web-view-local/web-view-local"
,
"style"
:
{
"navigationBarTitleText"
:
"web-view-local"
}
},
{
"path"
:
"pages/component/navigator/navigator"
,
"style"
:
{
...
...
@@ -201,6 +231,57 @@
"style"
:
{
"navigationBarTitleText"
:
"redirectPage"
}
},
//
#ifdef
WEB
{
"path"
:
"pages/component/canvas/canvas"
,
"style"
:
{
"navigationBarTitleText"
:
"canvas"
}
},
//
#endif
{
"path"
:
"pages/component/web-view/web-view"
,
"style"
:
{
"navigationBarTitleText"
:
"web-view"
}
},
{
"path"
:
"pages/component/web-view-local/web-view-local"
,
"style"
:
{
"navigationBarTitleText"
:
"web-view-local"
}
},
{
"path"
:
"pages/component/unicloud-db-contacts/list"
,
"style"
:
{
"navigationBarTitleText"
:
"联系人"
,
"enablePullDownRefresh"
:
true
}
},
{
"path"
:
"pages/component/unicloud-db-contacts/add"
,
"style"
:
{
"navigationBarTitleText"
:
"新增联系人"
}
},
{
"path"
:
"pages/component/unicloud-db-contacts/edit"
,
"style"
:
{
"navigationBarTitleText"
:
"编辑联系人"
}
},
{
"path"
:
"pages/component/unicloud-db-contacts/detail"
,
"style"
:
{
"navigationBarTitleText"
:
""
}
},
{
"path"
:
"pages/component/mixin-datacom/mixin-datacom"
,
"style"
:
{
"navigationBarTitleText"
:
"mixinDatacom"
}
},
{
"path"
:
"pages/component/general-attribute/general-attribute"
,
...
...
@@ -214,39 +295,18 @@
"navigationBarTitleText"
:
"general-event"
}
},
//
#ifdef
APP
{
"path"
:
"pages/component/unicloud-db-contacts/list"
,
"style"
:
{
"navigationBarTitleText"
:
"联系人"
,
"enablePullDownRefresh"
:
true
}
},
{
"path"
:
"pages/component/unicloud-db-contacts/add"
,
"style"
:
{
"navigationBarTitleText"
:
"新增联系人"
}
},
{
"path"
:
"pages/component/unicloud-db-contacts/edit"
,
"style"
:
{
"navigationBarTitleText"
:
"编辑联系人"
}
},
{
"path"
:
"pages/component/unicloud-db-contacts/detail"
,
"style"
:
{
"navigationBarTitleText"
:
""
}
},
{
"path"
:
"pages/component/mixin-datacom/mixin-datacom"
,
"style"
:
{
"navigationBarTitleText"
:
"mixinDatacom"
}
{
"path"
:
"pages/component/general-event/transition-event"
,
"style"
:
{
"navigationBarTitleText"
:
"transitionend事件"
}
},
{
"path"
:
"pages/component/general-event/touch-event"
,
"style"
:
{
"navigationBarTitleText"
:
"touch-event"
}
},
//
#endif
{
"path"
:
"pages/tabBar/API"
,
"style"
:
{
...
...
@@ -254,7 +314,7 @@
"backgroundColor"
:
"#F8F8F8"
}
},
//
#if
def
WEB
//
#if
ndef
APP
{
"path"
:
"pages/API/canvas/canvas"
,
"style"
:
{
...
...
@@ -267,13 +327,22 @@
"style"
:
{
"navigationBarTitleText"
:
"getApp"
}
},
},
//
#ifdef
APP
{
"path"
:
"pages/API/exit/exit"
,
"style"
:
{
"navigationBarTitleText"
:
"exit"
}
},
},
{
"path"
:
"pages/API/install-apk/install-apk"
,
"style"
:
{
"navigationBarTitleText"
:
"install-apk"
,
"enablePullDownRefresh"
:
false
}
},
//
#endif
{
"path"
:
"pages/API/get-current-pages/get-current-pages"
,
"style"
:
{
...
...
@@ -560,7 +629,7 @@
"navigationBarTitleText"
:
"get-window-info"
}
},
//
#if
ndef
WEB
//
#if
def
APP
{
"path"
:
"pages/API/facial-recognition-verify/facial-recognition-verify"
,
"style"
:
{
...
...
@@ -582,13 +651,6 @@
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/API/install-apk/install-apk"
,
"style"
:
{
"navigationBarTitleText"
:
"install-apk"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/API/get-univerify-manager/get-univerify-manager"
,
"style"
:
{
...
...
@@ -670,6 +732,12 @@
"navigationBarTitleText"
:
"border"
}
},
{
"path"
:
"pages/CSS/border/complex-border/complex-border"
,
"style"
:
{
"navigationBarTitleText"
:
"border属性组合示例"
}
},
{
"path"
:
"pages/CSS/box-shadow/box-shadow"
,
"style"
:
{
...
...
@@ -826,6 +894,12 @@
"navigationBarTitleText"
:
"margin"
}
},
{
"path"
:
"pages/CSS/overflow/overflow"
,
"style"
:
{
"navigationBarTitleText"
:
"overflow"
}
},
{
"path"
:
"pages/CSS/padding/padding-bottom"
,
"style"
:
{
...
...
@@ -939,12 +1013,12 @@
"style"
:
{
"navigationBarTitleText"
:
"Rotate"
}
},
{
"path"
:
"pages/
component/scroll-view/scroll-view-refresher"
,
"style"
:
{
"navigationBarTitleText"
:
"
scroll-view-refresher"
}
},
{
"path"
:
"pages/
tabBar/template"
,
"style"
:
{
"navigationBarTitleText"
:
"
模板"
}
},
{
"path"
:
"pages/template/list-news/list-news"
,
...
...
@@ -964,12 +1038,6 @@
"navigationBarTitleText"
:
"drop-card"
}
},
{
"path"
:
"pages/tabBar/template"
,
"style"
:
{
"navigationBarTitleText"
:
"模板"
}
},
{
"path"
:
"pages/template/swiper-list/swiper-list"
,
"style"
:
{
...
...
@@ -994,12 +1062,6 @@
"navigationBarTitleText"
:
"scroll-view自定义滚动吸顶"
}
},
{
"path"
:
"pages/CSS/border/complex-border/complex-border"
,
"style"
:
{
"navigationBarTitleText"
:
"border属性组合示例"
}
},
{
"path"
:
"pages/template/scroll-fold-nav/scroll-fold-nav"
,
"style"
:
{
...
...
@@ -1007,12 +1069,6 @@
"navigationBarTextStyle"
:
"black"
}
},
{
"path"
:
"pages/template/calendar/calendar"
,
"style"
:
{
"navigationBarTitleText"
:
"日历"
}
},
{
"path"
:
"pages/template/custom-refresher/custom-refresher"
,
"style"
:
{
...
...
@@ -1039,30 +1095,6 @@
"enablePullDownRefresh"
:
true
}
},
{
"path"
:
"pages/component/list-view/list-view"
,
"style"
:
{
"navigationBarTitleText"
:
"list-view"
}
},
{
"path"
:
"pages/component/scroll-view/scroll-view-props"
,
"style"
:
{
"navigationBarTitleText"
:
"非下拉刷新的scroll-view属性示例"
}
},
{
"path"
:
"pages/component/scroll-view/scroll-view-refresher-props"
,
"style"
:
{
"navigationBarTitleText"
:
"下拉刷新的scroll-view属性示例"
}
},
{
"path"
:
"pages/component/scroll-view/scroll-view-custom-refresher-props"
,
"style"
:
{
"navigationBarTitleText"
:
"自定义下拉刷新的scroll-view属性示例"
}
},
{
"path"
:
"pages/template/pull-zoom-image/pull-zoom-image"
,
"style"
:
{
...
...
@@ -1081,41 +1113,20 @@
"style"
:
{
"navigationBarTitleText"
:
"自定义TabBar"
}
},
{
"path"
:
"pages/component/sticky-header/sticky-header"
,
"style"
:
{
"navigationBarTitleText"
:
"sticky-header"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/component/general-event/transition-event"
,
"style"
:
{
"navigationBarTitleText"
:
"transitionend事件"
}
},
//
#ifndef
WEB
},
//
#ifdef
APP
{
"path"
:
"pages/template/calendar/calendar"
,
"style"
:
{
"navigationBarTitleText"
:
"日历"
}
},
{
"path"
:
"pages/template/schema/schema"
,
"style"
:
{
"navigationBarTitleText"
:
"打开schema示例"
}
},
//
#endif
{
"path"
:
"pages/component/sticky-section/sticky-section"
,
"style"
:
{
"navigationBarTitleText"
:
"sticky-section"
}
},
{
"path"
:
"pages/component/list-view/list-view-multiplex"
,
"style"
:
{
"navigationBarTitleText"
:
"list-view-multiplex"
}
},
//
#ifndef
WEB
{
"path"
:
"pages/template/share/share"
,
"style"
:
{
...
...
@@ -1124,18 +1135,6 @@
}
},
//
#endif
{
"path"
:
"pages/component/general-event/touch-event"
,
"style"
:
{
"navigationBarTitleText"
:
"touch-event"
}
},
{
"path"
:
"pages/CSS/overflow/overflow"
,
"style"
:
{
"navigationBarTitleText"
:
"overflow"
}
},
{
"path"
:
"pages/webview-screenshot-comparison/webview-screenshot-comparison"
,
"style"
:
{
...
...
pages/tabBar/API.uvue
浏览文件 @
657945fd
...
...
@@ -86,11 +86,13 @@
{
name: '获取启动参数',
url: 'get-launch-options-sync',
},
},
// #ifdef APP-ANDROID
{
name: '退出应用',
url: 'exit',
},
},
// #endif
] as Page[],
},
{
...
...
@@ -147,7 +149,8 @@
// name: "节点布局交互状态",
// url: "intersection-observer",
// enable: false
// },
// },
// #ifdef APP
{
name: 'element元素',
url: 'get-element-by-id',
...
...
@@ -161,7 +164,8 @@
name: 'element截图',
url: 'element-takesnapshot',
api: ["Element.takeSnapshot"]
},
},
// #endif
{
name: 'node节点',
url: 'nodes-info',
...
...
@@ -242,7 +246,8 @@
{
name: '获取APP基础信息',
url: 'get-app-base-info',
},
},
// #ifdef APP
{
name: '获取APP授权设置',
url: 'get-app-authorize-setting',
...
...
@@ -250,15 +255,18 @@
{
name: '获取系统设置',
url: 'get-system-setting',
},
},
// #endif
{
name: '电量',
url: 'get-battery-info',
},
},
// #ifdef APP-ANDROID
{
name: '安装Apk',
url: 'install-apk'
}
},
// #endif
/* {
name: "打电话",
url: "make-phone-call",
...
...
@@ -325,11 +333,13 @@
name: '图片预览',
url: 'preview-image',
api: ["previewImage", "closePreviewImage"]
},
},
// #ifdef APP
{
name: "保存图片到相册",
url: 'save-image-to-photos-album'
}
},
// #endif
/* {
name: "图片选择和拍照",
url: "image",
...
...
@@ -397,7 +407,9 @@
api: ["getStorageInfo", "getStorageInfoSync", "getStorage", "getStorageSync", "setStorage", "setStorageSync", "removeStorage", "removeStorageSync", "clearStorage", "clearStorageSync"]
}
] as Page[],
},{
},
// #ifdef APP-ANDROID
{
id: 'file',
name: '文件',
pages: [
...
...
@@ -406,7 +418,8 @@
url: 'get-file-system-manager'
},
] as Page[],
},
},
// #endif
{
id: 'unicloud',
name: 'uniCloud',
...
...
pages/tabBar/component.uvue
浏览文件 @
657945fd
<template>
<!-- #ifdef APP -->
<scroll-view style="flex: 1">
<!-- #endif -->
<!-- #endif -->
<view class="uni-container">
<view class="uni-header-logo">
<image
class="uni-header-image"
src="/static/componentIndex.png"
></image>
<image class="uni-header-image" src="/static/componentIndex.png"></image>
</view>
<view class="uni-text-box">
<text class="hello-text"
>uni-app内置组件,展示样式仅供参考,文档详见:</text
>
<u-link
:href="'https://uniapp.dcloud.io/uni-app-x/component/'"
:text="'https://uniapp.dcloud.io/uni-app-x/component/'"
:inWhiteList="true"
></u-link>
<text class="hello-text">uni-app内置组件,展示样式仅供参考,文档详见:</text>
<u-link :href="'https://uniapp.dcloud.io/uni-app-x/component/'"
:text="'https://uniapp.dcloud.io/uni-app-x/component/'" :inWhiteList="true"></u-link>
</view>
<uni-collapse>
<template v-for="item in list" :key="item.id">
<uni-collapse-item :title="item.name" class="item">
<view
class="uni-navigate-item"
:hover-class="page.enable == false ? '' : 'is--active'"
v-for="(page, key) in item.pages"
:key="key"
@click="goDetailPage(page)"
>
<text
class="uni-navigate-text"
:class="page.enable == false ? 'text-disabled' : ''"
>{{ page.name }}</text
>
<view class="uni-navigate-item" :hover-class="page.enable == false ? '' : 'is--active'"
v-for="(page, key) in item.pages" :key="key" @click="goDetailPage(page)">
<text class="uni-navigate-text"
:class="page.enable == false ? 'text-disabled' : ''">{{ page.name }}</text>
<image :src="arrowRightIcon" class="uni-icon"></image>
</view>
</uni-collapse-item>
...
...
@@ -44,172 +28,173 @@
<uni-upgrade-center-app ref="upgradePopup" @show="upgradePopupShow" @close="upgradePopupClose" />
<!-- #endif -->
</view>
<!-- #ifdef APP -->
<!-- #ifdef APP -->
</scroll-view>
<!-- #endif -->
</template>
<script lang="uts">
// #ifdef UNI-APP-X && APP
import checkUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update'
// #endif
// #ifdef UNI-APP-X && APP
import checkUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update'
// #endif
type Page = {
name : string
enable ?: boolean
url ?: string
}
type ListItem = {
id : string
name : string
pages : Page[]
url ?: string
enable ?: boolean
}
export default {
data() {
return {
list: [
{
id: 'view',
name: '视图容器',
pages: [
{
name: 'view',
},
{
name: 'scroll-view',
},
{
name: 'swiper',
},
/*
type Page = {
name : string
enable ?: boolean
url ?: string
}
type ListItem = {
id : string
name : string
pages : Page[]
url ?: string
enable ?: boolean
}
export default {
data() {
return {
list: [
{
id: 'view',
name: '视图容器',
pages: [
{
name: 'movable-view',
enable: false
name: 'view',
},
{
name: 'cover-view',
enable: false
name: 'scroll-view',
},
*/
// #ifdef APP
// TODO web 实现list-view
{
name: 'list-view',
},
// #endif
{
name: 'sticky-header',
},
{
name: 'sticky-section',
}
] as Page[],
},
{
id: 'content',
name: '基础内容',
pages: [
{
name: 'text',
},
{
name: 'rich-text',
enable: true,
},
{
name: 'progress',
},
] as Page[],
},
{
id: 'form',
name: '表单组件',
pages: [
{
name: 'button',
},
{
name: 'checkbox',
},
{
name: 'form',
},
{
name: 'input',
/* }, {
name: 'label',
{
name: 'swiper',
},
/*
{
name: 'movable-view',
enable: false
}, {
name: 'picker',
enable: false */
},
{
name: 'picker-view',
},
{
name: 'radio',
},
{
name: 'slider',
},
{
name: 'slider-100',
},
{
name: 'switch',
},
{
name: 'textarea',
},
/*
},
{
name: 'cover-view',
enable: false
},
*/
// #ifdef APP
// TODO web 实现list-view
{
name: 'list-view',
},
{
name: 'editor',
enable: false
name: 'sticky-header',
},
{
name: 'sticky-section',
},
// #endif
] as Page[],
},
{
id: 'content',
name: '基础内容',
pages: [
{
name: 'text',
},
{
name: 'rich-text',
enable: true,
},
{
name: 'progress',
},
] as Page[],
},
{
id: 'form',
name: '表单组件',
pages: [
{
name: 'button',
},
{
name: 'checkbox',
},
{
name: 'form',
},
{
name: 'input',
},
/*
{
name: 'label',
}, {
name: 'picker',
},
*/
] as Page[],
},
{
id: 'nav',
name: '导航',
pages: [{
name: 'navigator',
enable: true
}] as Page[],
},
{
id: 'media',
name: '媒体组件',
pages: [
{
name: 'image',
enable: true,
},
{
name: 'video',
enable: true,
},
{
name: 'animation-view',
enable: false,
},
] as Page[],
},
/*
{
name: 'picker-view',
},
{
name: 'radio',
},
{
name: 'slider',
},
{
name: 'slider-100',
},
{
name: 'switch',
},
{
name: 'textarea',
},
/*
{
name: 'editor',
enable: false
},
*/
] as Page[],
},
{
id: 'nav',
name: '导航',
pages: [{
name: 'navigator',
enable: true
}] as Page[],
},
{
id: 'm
ap
',
name: '
地图
',
id: 'm
edia
',
name: '
媒体组件
',
pages: [
{
name: 'map',
enable: false
}
] as Page[]
name: 'image',
enable: true,
},
{
name: 'video',
enable: true,
},
/* {
name: 'animation-view',
enable: false,
}, */
] as Page[],
},
*/
// #ifdef WEB
/*
{
id: 'map',
name: '地图',
pages: [
{
name: 'map',
enable: false
}
] as Page[]
},
*/
// #ifdef WEB
{
id: 'canvas',
name: '画布',
...
...
@@ -220,129 +205,129 @@ export default {
] as Page[]
},
// #endif
{
id: 'web-view',
name: '网页',
pages: [
{
name: '网络网页',
enable: true,
url: '/pages/component/web-view/web-view',
},
{
name: '本地网页',
enable: true,
url: '/pages/component/web-view-local/web-view-local',
},
] as Page[],
},
{
id: 'unicloud-db',
name: 'unicloud-db',
pages: [
{
name: '联系人',
enable: true,
url: '/pages/component/unicloud-db-contacts/list'
},
{
id: 'web-view',
name: '网页',
pages: [
{
name: '网络网页',
enable: true,
url: '/pages/component/web-view/web-view',
},
{
name: '本地网页',
enable: true,
url: '/pages/component/web-view-local/web-view-local',
},
] as Page[],
},
{
id: 'unicloud-db',
name: 'unicloud-db',
pages: [
{
name: '联系人',
enable: true,
url: '/pages/component/unicloud-db-contacts/list'
},
{
name: 'mixinDatacom',
enable: true,
url: '/pages/component/mixin-datacom/mixin-datacom'
}
] as Page[],
},
/*
{
name: 'mixinDatacom',
enable: true,
url: '/pages/component/mixin-datacom/mixin-datacom'
id: 'ad',
url: 'ad',
name: 'AD组件',
enable: false,
pages: [] as Page[]
}
] as Page[],
},
/*
*/
{
id: 'ad',
url: 'ad',
name: 'AD组件',
enable: false,
pages: [] as Page[]
id: 'general-attr-event',
name: '通用属性和事件',
pages: [
{
name: '通用属性',
url: '/pages/component/general-attribute/general-attribute',
enable: true,
},
{
name: '通用事件',
url: '/pages/component/general-event/general-event',
enable: true,
},
{
name: 'touch事件',
url: '/pages/component/general-event/touch-event',
enable: true,
},
{
name: 'Transition事件',
url: '/pages/component/general-event/transition-event',
enable: true,
},
] as Page[],
}
*/
{
id: 'general-attr-event',
name: '通用属性和事件',
pages: [
{
name: '通用属性',
url: '/pages/component/general-attribute/general-attribute',
enable: true,
},
{
name: '通用事件',
url: '/pages/component/general-event/general-event',
enable: true,
},
{
name: 'touch事件',
url: '/pages/component/general-event/touch-event',
enable: true,
},
{
name: 'Transition事件',
url: '/pages/component/general-event/transition-event',
enable: true,
},
] as Page[],
}
] as ListItem[],
arrowUpIcon: '/static/icons/arrow-up.png',
arrowDownIcon: '/static/icons/arrow-down.png',
arrowRightIcon: '/static/icons/arrow-right.png',
pageHiden: false
}
},
methods: {
goDetailPage(e : Page) {
if (e.enable == false) {
uni.showToast({
title: '暂不支持',
icon: 'none',
] as ListItem[],
arrowUpIcon: '/static/icons/arrow-up.png',
arrowDownIcon: '/static/icons/arrow-down.png',
arrowRightIcon: '/static/icons/arrow-right.png',
pageHiden: false
}
},
methods: {
goDetailPage(e : Page) {
if (e.enable == false) {
uni.showToast({
title: '暂不支持',
icon: 'none',
})
return
}
const url =
e.url != null ? e.url! : `/pages/component/${e.name}/${e.name}`
uni.navigateTo({
url,
})
return
}
const url =
e.url != null ? e.url! : `/pages/component/${e.name}/${e.name}`
uni.navigateTo({
url,
})
}
// #ifdef UNI-APP-X && APP
,upgradePopupShow() {
console.log('upgradePopup show');
if (!this.pageHiden) {
uni.hideTabBar()?.catch(_ => { })
// #ifdef UNI-APP-X && APP
, upgradePopupShow() {
console.log('upgradePopup show');
if (!this.pageHiden) {
uni.hideTabBar()?.catch(_ => { })
}
}
, upgradePopupClose() {
console.log('upgradePopup close');
uni.showTabBar()?.catch(_ => { })
}
// #endif
},
onReady() {
// #ifdef UNI-APP-X && APP
checkUpdate(this.$refs['upgradePopup'] as UniUpgradeCenterAppComponentPublicInstance)
// #endif
},
onShow() {
this.pageHiden = false
},
onHide() {
this.pageHiden = true
},
beforeUnmount() {
uni.showTabBar()?.catch(_ => { })
}
,upgradePopupClose() {
console.log('upgradePopup close');
uni.showTabBar()?.catch(_ => {})
}
// #endif
},
onReady() {
// #ifdef UNI-APP-X && APP
checkUpdate(this.$refs['upgradePopup'] as UniUpgradeCenterAppComponentPublicInstance)
// #endif
},
onShow() {
this.pageHiden = false
},
onHide() {
this.pageHiden = true
},
beforeUnmount() {
uni.showTabBar()?.catch(_ => {})
}
}
</script>
<style>
@import "../../common/uni-uvue.css";
@import "../../common/uni-uvue.css";
.item {
margin-bottom: 12px;
}
.item {
margin-bottom: 12px;
}
</style>
pages/tabBar/template.uvue
浏览文件 @
657945fd
...
...
@@ -102,13 +102,15 @@
},
] as Page[],
},
// #ifdef APP
{
id: 'custom-refresher',
url: 'custom-refresher',
name: '自定义下拉刷新',
open: false,
pages: [] as Page[],
},
},
// #endif
{
id: 'pull-zoom-image',
url: 'pull-zoom-image',
...
...
@@ -158,7 +160,8 @@
open: false,
enable: true,
pages: [] as Page[],
},
},
// #ifdef APP
{
id: 'calendar',
url: 'calendar',
...
...
@@ -177,7 +180,8 @@
name: '分享示例',
open: false,
pages: [] as Page[],
}
},
// #endif
] as ListItem[],
arrowUpIcon: '/static/icons/arrow-up.png',
arrowDownIcon: '/static/icons/arrow-down.png',
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录