Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-app x
提交
9c917b5b
H
hello uni-app x
项目概览
DCloud
/
hello uni-app x
通知
6006
Star
91
Fork
164
代码
文件
提交
分支
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看板
提交
9c917b5b
编写于
1月 22, 2024
作者:
DCloud-WZF
💬
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(css): css 变量示例及测试
上级
bcb27c0d
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
97 addition
and
37 deletion
+97
-37
pages.json
pages.json
+11
-5
pages/CSS/variable/variable.test.js
pages/CSS/variable/variable.test.js
+14
-0
pages/CSS/variable/variable.uvue
pages/CSS/variable/variable.uvue
+30
-0
pages/tabBar/CSS.uvue
pages/tabBar/CSS.uvue
+42
-32
未找到文件。
pages.json
浏览文件 @
9c917b5b
...
@@ -993,11 +993,17 @@
...
@@ -993,11 +993,17 @@
"navigationBarTitleText"
:
"Scale"
"navigationBarTitleText"
:
"Scale"
}
}
},
},
{
{
"path"
:
"pages/CSS/transform/rotate"
,
"path"
:
"pages/CSS/transform/rotate"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"Rotate"
"navigationBarTitleText"
:
"Rotate"
}
}
},
{
"path"
:
"pages/CSS/variable/variable"
,
"style"
:
{
"navigationBarTitleText"
:
"css 变量"
}
},
},
{
{
"path"
:
"pages/tabBar/template"
,
"path"
:
"pages/tabBar/template"
,
...
...
pages/CSS/variable/variable.test.js
0 → 100644
浏览文件 @
9c917b5b
describe
(
'
css-variable
'
,
()
=>
{
let
page
;
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
'
/pages/CSS/variable/variable
'
);
await
page
.
waitFor
(
'
view
'
);
});
it
(
'
screenshot
'
,
async
()
=>
{
const
image
=
await
program
.
screenshot
({
fullPage
:
true
})
expect
(
image
).
toMatchImageSnapshot
()
});
});
pages/CSS/variable/variable.uvue
0 → 100644
浏览文件 @
9c917b5b
<template>
<view class="page">
<view class="status-bar-height">
<text>status bar height</text>
</view>
<view class="window-top">
<text>window top</text>
</view>
<view class="window-bottom">
<text>window bottom</text>
</view>
</view>
</template>
<style>
.status-bar-height {
height: var(--status-bar-height);
background-color: red;
}
.window-top {
height: var(--window-top);
background-color: green;
}
.window-bottom {
height: var(--window-bottom);
background-color: blue;
}
</style>
pages/tabBar/CSS.uvue
浏览文件 @
9c917b5b
<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/cssIndex.png"></image>
<image class="uni-header-image" src="/static/cssIndex.png"></image>
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
</template>
</template>
</uni-collapse>
</uni-collapse>
</view>
</view>
<!-- #ifdef APP -->
<!-- #ifdef APP -->
</scroll-view>
</scroll-view>
<!-- #endif -->
<!-- #endif -->
</template>
</template>
...
@@ -83,22 +83,22 @@
...
@@ -83,22 +83,22 @@
{
{
name: 'border-radius',
name: 'border-radius',
url: '/pages/CSS/border/border-radius',
url: '/pages/CSS/border/border-radius',
},
},
{
{
name: 'border-top',
name: 'border-top',
url: '/pages/CSS/border/border-top',
url: '/pages/CSS/border/border-top',
},
},
{
{
name: 'border-bottom',
name: 'border-bottom',
url: '/pages/CSS/border/border-bottom',
url: '/pages/CSS/border/border-bottom',
},
},
{
{
name: 'border-left',
name: 'border-left',
url: '/pages/CSS/border/border-left',
url: '/pages/CSS/border/border-left',
},
},
{
{
name: 'border-right',
name: 'border-right',
url: '/pages/CSS/border/border-right',
url: '/pages/CSS/border/border-right',
},
},
{
{
name: 'border属性复合示例',
name: 'border属性复合示例',
...
@@ -203,10 +203,10 @@
...
@@ -203,10 +203,10 @@
{
{
name: 'width',
name: 'width',
url: '/pages/CSS/layout/width',
url: '/pages/CSS/layout/width',
},
},
{
{
name: 'z-index',
name: 'z-index',
url: '/pages/CSS/layout/z-index',
url: '/pages/CSS/layout/z-index',
},
},
{
{
name: 'visibility',
name: 'visibility',
...
@@ -265,16 +265,16 @@
...
@@ -265,16 +265,16 @@
url: '/pages/CSS/padding/padding',
url: '/pages/CSS/padding/padding',
},
},
] as Page[],
] as Page[],
},
},
{
{
id: 'overflow',
id: 'overflow',
name: 'overflow',
name: 'overflow',
pages: [
pages: [
{
{
name: 'overflow',
name: 'overflow',
url: '/pages/CSS/overflow/overflow',
url: '/pages/CSS/overflow/overflow',
},
},
] as Page[],
] as Page[],
},
},
{
{
id: 'text',
id: 'text',
...
@@ -349,6 +349,16 @@
...
@@ -349,6 +349,16 @@
url: '/pages/CSS/transition/transition',
url: '/pages/CSS/transition/transition',
},
},
] as Page[],
] as Page[],
},
{
id: 'variable',
name: 'variable',
pages: [
{
name: 'variable',
url: '/pages/CSS/variable/variable',
},
] as Page[],
}
}
] as ListItem[],
] as ListItem[],
arrowUpIcon: '/static/icons/arrow-up.png',
arrowUpIcon: '/static/icons/arrow-up.png',
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录