Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-app x
提交
186d7b48
H
hello uni-app x
项目概览
DCloud
/
hello uni-app x
通知
5992
Star
90
Fork
162
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
18
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello uni-app x
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
18
Issue
18
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
186d7b48
编写于
8月 30, 2023
作者:
W
wanganxp
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
过滤无用的文件
上级
23ed403b
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
399 addition
and
371 deletion
+399
-371
pages.json
pages.json
+12
-22
pages/component/list-view/list-view.uvue
pages/component/list-view/list-view.uvue
+0
-0
pages/component/swiper/swiper.uvue
pages/component/swiper/swiper.uvue
+1
-1
pages/tabBar/API.uvue
pages/tabBar/API.uvue
+6
-6
pages/tabBar/CSS.uvue
pages/tabBar/CSS.uvue
+375
-337
pages/tabBar/component.uvue
pages/tabBar/component.uvue
+5
-5
未找到文件。
pages.json
浏览文件 @
186d7b48
...
...
@@ -777,8 +777,7 @@
{
"path"
:
"pages/CSS/border/complex-border/complex-border"
,
"style"
:
{
"navigationBarTitleText"
:
"border属性组合示例"
,
"enablePullDownRefresh"
:
false
"navigationBarTitleText"
:
"border属性组合示例"
}
},
{
...
...
@@ -791,64 +790,55 @@
{
"path"
:
"pages/template/calendar/calendar"
,
"style"
:
{
"navigationBarTitleText"
:
"日历"
,
"enablePullDownRefresh"
:
false
"navigationBarTitleText"
:
"日历"
}
},
{
"path"
:
"pages/template/custom-refresher/custom-refresher"
,
"style"
:
{
"navigationBarTitleText"
:
"自定义下拉刷新"
,
"enablePullDownRefresh"
:
false
"navigationBarTitleText"
:
"自定义下拉刷新"
}
},
{
"path"
:
"pages/API/get-window-info/get-window-info"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
"navigationBarTitleText"
:
""
}
},
{
"path"
:
"pages/template/half-screen/half-screen"
,
"style"
:
{
"navigationBarTitleText"
:
"半屏弹窗"
,
"enablePullDownRefresh"
:
false
"navigationBarTitleText"
:
"半屏弹窗"
}
},
{
"path"
:
"pages/template/long-list/long-list"
,
"style"
:
{
"navigationBarTitleText"
:
"复杂长列表"
,
"enablePullDownRefresh"
:
false
"navigationBarTitleText"
:
"复杂长列表"
}
},
{
"path"
:
"pages/component/list-view
-autotest/list-view-autotest
"
,
"path"
:
"pages/component/list-view
/list-view
"
,
"style"
:
{
"navigationBarTitleText"
:
"list-view-autotest"
,
"enablePullDownRefresh"
:
false
"navigationBarTitleText"
:
"list-view"
}
},
{
"path"
:
"pages/component/scroll-view/scroll-view-props"
,
"style"
:
{
"navigationBarTitleText"
:
"非下拉刷新的scroll-view属性示例"
,
"enablePullDownRefresh"
:
false
"navigationBarTitleText"
:
"非下拉刷新的scroll-view属性示例"
}
},
{
"path"
:
"pages/component/scroll-view/scroll-view-refresher-props"
,
"style"
:
{
"navigationBarTitleText"
:
"下拉刷新的scroll-view属性示例"
,
"enablePullDownRefresh"
:
false
"navigationBarTitleText"
:
"下拉刷新的scroll-view属性示例"
}
},
{
"path"
:
"pages/component/scroll-view/scroll-view-custom-refresher-props"
,
"style"
:
{
"navigationBarTitleText"
:
"自定义下拉刷新的scroll-view属性示例"
,
"enablePullDownRefresh"
:
false
"navigationBarTitleText"
:
"自定义下拉刷新的scroll-view属性示例"
}
}
],
...
...
@@ -904,4 +894,4 @@
}
]
}
}
\ No newline at end of file
}
pages/component/list-view
-autotest/list-view-autotest
.uvue
→
pages/component/list-view
/list-view
.uvue
浏览文件 @
186d7b48
文件已移动
pages/component/swiper/swiper.uvue
浏览文件 @
186d7b48
...
...
@@ -34,7 +34,7 @@
<view class="uni-list-cell-db">是否循环</view>
<switch :checked="circularSelect" @change="circularChange" />
</view>
<view class="uni-title">间隔时间</view>
<view class="uni-title">间隔时间
(毫秒)
</view>
<view>
<slider @change="sliderChange" :value="1000" :min="500" :max="5000" :show-value="true" />
</view>
...
...
pages/tabBar/API.uvue
浏览文件 @
186d7b48
...
...
@@ -78,7 +78,7 @@
name: '页面跳转',
url: 'navigator',
},
{
/*
{
name: '页面栈管理',
url: 'getCurrentPages',
enable: false,
...
...
@@ -87,7 +87,7 @@
name: '设置导航条标题',
url: 'set-navigation-bar-title',
enable: false,
},
},
*/
{
name: '设置导航条颜色',
url: 'set-navigation-bar-color',
...
...
@@ -98,9 +98,9 @@
enable: false,
},
{
name: '下拉刷新',
name: '
页面
下拉刷新',
url: 'pull-down-refresh',
enable:
fals
e,
enable:
tru
e,
},
{
name: '将页面滚动到指定位置',
...
...
@@ -307,7 +307,7 @@
{
name: "背景音频",
url: "background-audio",
},
},
{
name: "视频选择和拍照",
url: "video",
...
...
@@ -497,4 +497,4 @@
.item {
margin-bottom: 12px;
}
</style>
\ No newline at end of file
</style>
pages/tabBar/CSS.uvue
浏览文件 @
186d7b48
<template>
<!-- #ifdef APP -->
<scroll-view style="flex: 1">
<!-- #endif -->
<view class="uni-container">
<view class="uni-header-logo">
<image class="uni-header-image" src="/static/cssIndex.png"></image>
</view>
<view class="uni-hello-text">
<text class="hello-text">uni-app x目前已支持的CSS属性,展示样式仅供参考,文档详见:</text>
<u-link :href="'https://uniapp.dcloud.io/component/'" :text="'https://uniapp.dcloud.io/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>
<image :src="arrowRightIcon" class="uni-icon"></image>
</view>
</uni-collapse-item>
</template>
</uni-collapse>
</view>
<!-- #ifdef APP -->
</scroll-view>
<!-- #endif -->
<!-- #ifdef APP -->
<scroll-view style="flex: 1">
<!-- #endif -->
<view class="uni-container">
<view class="uni-header-logo">
<image class="uni-header-image" src="/static/cssIndex.png"></image>
</view>
<view class="uni-hello-text">
<text class="hello-text">uni-app x目前已支持的CSS属性,展示样式仅供参考,文档详见:</text>
<u-link :href="'https://uniapp.dcloud.io/component/'" :text="'https://uniapp.dcloud.io/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>
<image :src="arrowRightIcon" class="uni-icon"></image>
</view>
</uni-collapse-item>
</template>
</uni-collapse>
</view>
<!-- #ifdef APP -->
</scroll-view>
<!-- #endif -->
</template>
<script lang="uts">
type Page = {
name : string
enable ?: boolean
url ?: string
}
type ListItem = {
id : string
name : string
open : boolean
pages : Page[]
url ?: string
enable ?: boolean
}
export default {
data() {
return {
list: [
{
id: 'background',
name: 'background',
open: false,
pages: [
{
name: 'background-color',
url: '/pages/CSS/background/background-color',
},
{
name: 'background-image',
url: '/pages/CSS/background/background-image',
},
] as Page[],
},
{
id: 'border',
name: 'border',
open: false,
pages: [
{
name: 'border',
url: '/pages/CSS/border/border',
},
{
name: 'border-width',
url: '/pages/CSS/border/border-width',
},
{
name: 'border-style',
url: '/pages/CSS/border/border-style',
},
{
name: 'border-color',
url: '/pages/CSS/border/border-color',
},
{
name: 'border-radius',
url: '/pages/CSS/border/border-radius',
},
{
name: 'border属性复合示例',
url: '/pages/CSS/border/complex-border/complex-border',
},
] as Page[],
},
{
id: 'box-shadow',
name: 'box-shadow',
open: false,
pages: [
{
name: 'box-shadow',
url: '/pages/CSS/box-shadow/box-shadow',
},
] as Page[],
},
{
id: 'flex',
name: 'flex',
open: false,
pages: [
{
name: 'align-content',
url: '/pages/CSS/flex/align-content',
},
{
name: 'align-items',
url: '/pages/CSS/flex/align-items',
},
{
name: 'flex-basis',
url: '/pages/CSS/flex/flex-basis',
},
{
name: 'flex-direction',
url: '/pages/CSS/flex/flex-direction',
},
{
name: 'flex-flow',
url: '/pages/CSS/flex/flex-flow',
},
{
name: 'flex-grow',
url: '/pages/CSS/flex/flex-grow',
},
{
name: 'flex-shrink',
url: '/pages/CSS/flex/flex-shrink',
},
{
name: 'flex',
url: '/pages/CSS/flex/flex',
},
{
name: 'justify-content',
url: '/pages/CSS/flex/justify-content',
},
] as Page[],
},
{
id: 'layout',
name: 'layout',
open: false,
pages: [
{
name: 'height',
url: '/pages/CSS/layout/height',
},
{
name: 'max-height',
url: '/pages/CSS/layout/max-height',
},
{
name: 'max-width',
url: '/pages/CSS/layout/max-width',
},
{
name: 'min-height',
url: '/pages/CSS/layout/min-height',
},
{
name: 'min-width',
url: '/pages/CSS/layout/min-width',
},
{
name: 'position',
url: '/pages/CSS/layout/position',
},
{
name: 'width',
url: '/pages/CSS/layout/width',
},
{
name: 'visibility',
url: '/pages/CSS/layout/visibility',
},
] as Page[],
},
{
id: 'margin',
name: 'margin',
open: false,
pages: [
{
name: 'margin-bottom',
url: '/pages/CSS/margin/margin-bottom',
},
{
name: 'margin-left',
url: '/pages/CSS/margin/margin-left',
},
{
name: 'margin-right',
url: '/pages/CSS/margin/margin-right',
},
{
name: 'margin-top',
url: '/pages/CSS/margin/margin-top',
},
{
name: 'margin',
url: '/pages/CSS/margin/margin',
},
] as Page[],
},
{
id: 'padding',
name: 'padding',
open: false,
pages: [
{
name: 'padding-bottom',
url: '/pages/CSS/padding/padding-bottom',
},
{
name: 'padding-left',
url: '/pages/CSS/padding/padding-left',
},
{
name: 'padding-right',
url: '/pages/CSS/padding/padding-right',
},
{
name: 'padding-top',
url: '/pages/CSS/padding/padding-top',
},
{
name: 'padding',
url: '/pages/CSS/padding/padding',
},
] as Page[],
},
{
id: 'text',
name: 'text',
open: false,
pages: [
{
name: 'color',
url: '/pages/CSS/text/color',
},
{
name: 'font-family',
url: '/pages/CSS/text/font-family',
},
{
name: 'font-size',
url: '/pages/CSS/text/font-size',
},
{
name: 'font-style',
url: '/pages/CSS/text/font-style',
},
{
name: 'font-weight',
url: '/pages/CSS/text/font-weight',
},
{
name: 'line-height',
url: '/pages/CSS/text/line-height',
},
{
name: 'text-align',
url: '/pages/CSS/text/text-align',
},
{
name: 'text-overflow',
url: '/pages/CSS/text/text-overflow',
},
{
name: 'text-decoration-line',
url: '/pages/CSS/text/text-decoration-line',
},
] as Page[],
},
{
id: 'animate',
name: '动画',
open: false,
pages: [
{
name: 'transition',
url: '/pages/CSS/transition/transition',
},
{
name: 'transform',
url: '/pages/CSS/transform/transform',
},
] as Page[],
},
] as ListItem[],
arrowUpIcon: '/static/icons/arrow-up.png',
arrowDownIcon: '/static/icons/arrow-down.png',
arrowRightIcon: '/static/icons/arrow-right.png',
}
},
methods: {
triggerCollapse(index ?: number, item : ListItem) {
if (item.pages.length == 0) {
const page : Page = {
name: item.name,
enable: item.enable,
url: item.url,
}
this.goDetailPage(page)
return
}
for (var i = 0; i < this.list.length; ++i) {
if (index == i) {
this.list[i].open = !this.list[i].open
} else {
this.list[i].open = false
}
}
},
goDetailPage(e : Page) {
if (e.enable == false) {
uni.showToast({
icon: 'none',
title: '暂不支持',
})
return
}
const url = e.url != null ? e.url! : `/pages/CSS/${e.name}/${e.name}`
uni.navigateTo({
url,
})
},
},
}
type Page = {
name : string
enable ?: boolean
url ?: string
}
type ListItem = {
id : string
name : string
open : boolean
pages : Page[]
url ?: string
enable ?: boolean
}
export default {
data() {
return {
list: [
{
id: 'background',
name: 'background',
open: false,
pages: [
{
name: 'background-color',
url: '/pages/CSS/background/background-color',
},
{
name: 'background-image',
url: '/pages/CSS/background/background-image',
},
] as Page[],
},
{
id: 'border',
name: 'border',
open: false,
pages: [
{
name: 'border',
url: '/pages/CSS/border/border',
},
{
name: 'border-width',
url: '/pages/CSS/border/border-width',
},
{
name: 'border-style',
url: '/pages/CSS/border/border-style',
},
{
name: 'border-color',
url: '/pages/CSS/border/border-color',
},
{
name: 'border-radius',
url: '/pages/CSS/border/border-radius',
},
{
name: 'border属性复合示例',
url: '/pages/CSS/border/complex-border/complex-border',
},
] as Page[],
},
{
id: 'box-shadow',
name: 'box-shadow',
open: false,
pages: [
{
name: 'box-shadow',
url: '/pages/CSS/box-shadow/box-shadow',
},
] as Page[],
},
{
id: 'display',
name: 'display',
open: false,
pages: [
{
name: 'flex',
url: '/pages/CSS/display/flex',
},
{
name: 'none',
url: '/pages/CSS/display/none',
}
] as Page[],
},
{
id: 'flex',
name: 'flex',
open: false,
pages: [
{
name: 'align-content',
url: '/pages/CSS/flex/align-content',
},
{
name: 'align-items',
url: '/pages/CSS/flex/align-items',
},
{
name: 'flex-basis',
url: '/pages/CSS/flex/flex-basis',
},
{
name: 'flex-direction',
url: '/pages/CSS/flex/flex-direction',
},
{
name: 'flex-flow',
url: '/pages/CSS/flex/flex-flow',
},
{
name: 'flex-grow',
url: '/pages/CSS/flex/flex-grow',
},
{
name: 'flex-shrink',
url: '/pages/CSS/flex/flex-shrink',
},
{
name: 'flex',
url: '/pages/CSS/flex/flex',
},
{
name: 'justify-content',
url: '/pages/CSS/flex/justify-content',
},
] as Page[],
},
{
id: 'layout',
name: 'layout',
open: false,
pages: [
{
name: 'height',
url: '/pages/CSS/layout/height',
},
{
name: 'max-height',
url: '/pages/CSS/layout/max-height',
},
{
name: 'max-width',
url: '/pages/CSS/layout/max-width',
},
{
name: 'min-height',
url: '/pages/CSS/layout/min-height',
},
{
name: 'min-width',
url: '/pages/CSS/layout/min-width',
},
{
name: 'position',
url: '/pages/CSS/layout/position',
},
{
name: 'width',
url: '/pages/CSS/layout/width',
},
{
name: 'visibility',
url: '/pages/CSS/layout/visibility',
},
] as Page[],
},
{
id: 'margin',
name: 'margin',
open: false,
pages: [
{
name: 'margin-bottom',
url: '/pages/CSS/margin/margin-bottom',
},
{
name: 'margin-left',
url: '/pages/CSS/margin/margin-left',
},
{
name: 'margin-right',
url: '/pages/CSS/margin/margin-right',
},
{
name: 'margin-top',
url: '/pages/CSS/margin/margin-top',
},
{
name: 'margin',
url: '/pages/CSS/margin/margin',
},
] as Page[],
},
{
id: 'padding',
name: 'padding',
open: false,
pages: [
{
name: 'padding-bottom',
url: '/pages/CSS/padding/padding-bottom',
},
{
name: 'padding-left',
url: '/pages/CSS/padding/padding-left',
},
{
name: 'padding-right',
url: '/pages/CSS/padding/padding-right',
},
{
name: 'padding-top',
url: '/pages/CSS/padding/padding-top',
},
{
name: 'padding',
url: '/pages/CSS/padding/padding',
},
] as Page[],
},
{
id: 'text',
name: 'text',
open: false,
pages: [
{
name: 'color',
url: '/pages/CSS/text/color',
},
{
name: 'font-family',
url: '/pages/CSS/text/font-family',
},
{
name: 'font-size',
url: '/pages/CSS/text/font-size',
},
{
name: 'font-style',
url: '/pages/CSS/text/font-style',
},
{
name: 'font-weight',
url: '/pages/CSS/text/font-weight',
},
{
name: 'letter-spacing',
url: '/pages/CSS/text/letter-spacing',
},
{
name: 'line-height',
url: '/pages/CSS/text/line-height',
},
{
name: 'text-align',
url: '/pages/CSS/text/text-align',
},
{
name: 'text-overflow',
url: '/pages/CSS/text/text-overflow',
},
{
name: 'text-decoration-line',
url: '/pages/CSS/text/text-decoration-line',
},
] as Page[],
},
{
id: 'transform',
name: 'transform',
open: false,
pages: [
{
name: 'translate',
url: '/pages/CSS/transform/translate',
},
{
name: 'scale',
url: '/pages/CSS/transform/scale',
},
{
name: 'rotate',
url: '/pages/CSS/transform/rotate',
},
] as Page[],
},
{
id: 'transition',
name: 'transition',
open: false,
pages: [
{
name: 'transition',
url: '/pages/CSS/transition/transition',
},
] as Page[],
},
] as ListItem[],
arrowUpIcon: '/static/icons/arrow-up.png',
arrowDownIcon: '/static/icons/arrow-down.png',
arrowRightIcon: '/static/icons/arrow-right.png',
}
},
methods: {
triggerCollapse(index ?: number, item : ListItem) {
if (item.pages.length == 0) {
const page : Page = {
name: item.name,
enable: item.enable,
url: item.url,
}
this.goDetailPage(page)
return
}
for (var i = 0; i < this.list.length; ++i) {
if (index == i) {
this.list[i].open = !this.list[i].open
} else {
this.list[i].open = false
}
}
},
goDetailPage(e : Page) {
if (e.enable == false) {
uni.showToast({
icon: 'none',
title: '暂不支持',
})
return
}
const url = e.url != null ? e.url! : `/pages/CSS/${e.name}/${e.name}`
uni.navigateTo({
url,
})
},
},
}
</script>
<style>
@import '../../common/uni-uvue.css';
.item {
margin-bottom: 12px;
}
@import '../../common/uni-uvue.css';
.item {
margin-bottom: 12px;
}
</style>
\ No newline at end of file
pages/tabBar/component.uvue
浏览文件 @
186d7b48
...
...
@@ -91,12 +91,12 @@ export default {
name: 'list(新闻)',
url: '/pages/component/list-news/list',
},
// {
// name: 'list',
// url: '/pages/component/long-list/long-list',
// },
{
name: 'list',
url: '/pages/component/long-list/long-list',
},
{
name: 'list-view-autotest',
name: 'list-view',
},
] as Page[],
},
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录