Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-app x
提交
efb58c69
H
hello uni-app x
项目概览
DCloud
/
hello uni-app x
通知
5996
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看板
提交
efb58c69
编写于
3月 04, 2024
作者:
DCloud-yyl
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev' into alpha
# Conflicts: # pages.json
上级
72cce2ce
f474b273
变更
11
显示空白变更内容
内联
并排
Showing
11 changed file
with
1387 addition
and
1197 deletion
+1387
-1197
manifest.json
manifest.json
+36
-36
pages.json
pages.json
+1058
-1052
pages/API/action-sheet/action-sheet.test.js
pages/API/action-sheet/action-sheet.test.js
+14
-15
pages/API/modal/modal.test.js
pages/API/modal/modal.test.js
+54
-24
pages/API/toast/toast.test.js
pages/API/toast/toast.test.js
+32
-0
pages/API/toast/toast.uvue
pages/API/toast/toast.uvue
+4
-0
pages/component/button/buttonstatus.uvue
pages/component/button/buttonstatus.uvue
+162
-0
pages/component/slider-100/slider-100.uvue
pages/component/slider-100/slider-100.uvue
+9
-35
pages/tabBar/API.uvue
pages/tabBar/API.uvue
+16
-28
pages/template/list-news/list-news.test.js
pages/template/list-news/list-news.test.js
+0
-6
pages/webview-screenshot-comparison/webview-screenshot-comparison.test.js
...reenshot-comparison/webview-screenshot-comparison.test.js
+2
-1
未找到文件。
manifest.json
浏览文件 @
efb58c69
{
"name"
:
"hello-uniapp x"
,
"appid"
:
"__UNI__3584C99"
,
"description"
:
""
,
"versionName"
:
"1.0.18"
,
"versionCode"
:
"10018"
,
"uni-app-x"
:
{},
"name"
:
"hello-uniapp x"
,
"appid"
:
"__UNI__3584C99"
,
"description"
:
""
,
"versionName"
:
"1.0.21"
,
"versionCode"
:
10021
,
"uni-app-x"
:
{},
/*
快应用特有相关
*/
"quickapp"
:
{},
"quickapp"
:
{},
/*
小程序特有相关
*/
"mp-weixin"
:
{
"appid"
:
""
,
"setting"
:
{
"urlCheck"
:
false
"mp-weixin"
:
{
"appid"
:
""
,
"setting"
:
{
"urlCheck"
:
false
},
"usingComponents"
:
true
"usingComponents"
:
true
},
"mp-alipay"
:
{
"usingComponents"
:
true
"mp-alipay"
:
{
"usingComponents"
:
true
},
"mp-baidu"
:
{
"usingComponents"
:
true
"mp-baidu"
:
{
"usingComponents"
:
true
},
"mp-toutiao"
:
{
"usingComponents"
:
true
"mp-toutiao"
:
{
"usingComponents"
:
true
},
"uniStatistics"
:
{
"enable"
:
false
"uniStatistics"
:
{
"enable"
:
false
},
"app"
:
{},
"vueVersion"
:
"3"
,
"h5"
:
{
"router"
:
{
"base"
:
"/web/"
"app"
:
{},
"vueVersion"
:
"3"
,
"h5"
:
{
"router"
:
{
"base"
:
"/web/"
}
}
}
pages.json
浏览文件 @
efb58c69
...
...
@@ -145,6 +145,12 @@
"navigationBarTitleText"
:
"button"
}
},
{
"path"
:
"pages/component/button/buttonstatus"
,
"style"
:
{
"navigationBarTitleText"
:
"buttonstatus"
}
},
{
"path"
:
"pages/component/radio/radio"
,
"style"
:
{
...
...
pages/API/action-sheet/action-sheet.test.js
浏览文件 @
efb58c69
...
...
@@ -7,8 +7,7 @@ describe('API-loading', () => {
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
'
/pages/API/action-sheet/action-sheet
'
)
await
page
.
waitFor
(
200
);
await
page
.
waitFor
(
500
);
});
...
...
@@ -23,7 +22,7 @@ describe('API-loading', () => {
area
:
{
x
:
0
,
y
:
200
,
height
:
windowHeight
,
height
:
windowHeight
-
100
,
width
:
windowWidth
},
});
...
...
@@ -64,7 +63,7 @@ describe('API-loading', () => {
area
:
{
x
:
0
,
y
:
200
,
height
:
windowHeight
,
height
:
windowHeight
-
100
,
width
:
windowWidth
},
});
...
...
@@ -106,7 +105,7 @@ describe('API-loading', () => {
area
:
{
x
:
0
,
y
:
200
,
height
:
windowHeight
,
height
:
windowHeight
-
100
,
width
:
windowWidth
},
});
...
...
@@ -147,7 +146,7 @@ describe('API-loading', () => {
area
:
{
x
:
0
,
y
:
200
,
height
:
windowHeight
,
height
:
windowHeight
-
100
,
width
:
windowWidth
},
});
...
...
@@ -188,7 +187,7 @@ describe('API-loading', () => {
area
:
{
x
:
0
,
y
:
200
,
height
:
windowHeight
,
height
:
windowHeight
-
100
,
width
:
windowWidth
},
});
...
...
@@ -229,7 +228,7 @@ describe('API-loading', () => {
area
:
{
x
:
0
,
y
:
200
,
height
:
windowHeight
,
height
:
windowHeight
-
100
,
width
:
windowWidth
},
});
...
...
@@ -273,7 +272,7 @@ describe('API-loading', () => {
area
:
{
x
:
0
,
y
:
200
,
height
:
windowHeight
,
height
:
windowHeight
-
100
,
width
:
windowWidth
},
});
...
...
@@ -314,7 +313,7 @@ describe('API-loading', () => {
area
:
{
x
:
0
,
y
:
200
,
height
:
windowHeight
,
height
:
windowHeight
-
100
,
width
:
windowWidth
},
});
...
...
@@ -355,7 +354,7 @@ describe('API-loading', () => {
area
:
{
x
:
0
,
y
:
200
,
height
:
windowHeight
,
height
:
windowHeight
-
100
,
width
:
windowWidth
},
});
...
...
@@ -396,7 +395,7 @@ describe('API-loading', () => {
area
:
{
x
:
0
,
y
:
200
,
height
:
windowHeight
,
height
:
windowHeight
-
100
,
width
:
windowWidth
},
});
...
...
@@ -438,7 +437,7 @@ describe('API-loading', () => {
area
:
{
x
:
0
,
y
:
200
,
height
:
windowHeight
,
height
:
windowHeight
-
100
,
width
:
windowWidth
},
});
...
...
@@ -479,7 +478,7 @@ describe('API-loading', () => {
area
:
{
x
:
0
,
y
:
200
,
height
:
windowHeight
,
height
:
windowHeight
-
100
,
width
:
windowWidth
},
});
...
...
@@ -520,7 +519,7 @@ describe('API-loading', () => {
area
:
{
x
:
0
,
y
:
200
,
height
:
windowHeight
,
height
:
windowHeight
-
100
,
width
:
windowWidth
},
});
...
...
pages/API/modal/modal.test.js
浏览文件 @
efb58c69
...
...
@@ -16,13 +16,15 @@ describe('API-loading', () => {
if
(
isAndroid
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
const
image
=
await
program
.
screenshot
({
adb
:
true
,
area
:
{
x
:
0
,
y
:
200
,
height
:
windowHeight
,
height
:
windowHeight
-
200
,
width
:
windowWidth
},
});
expect
(
image
).
toMatchImageSnapshot
();
...
...
@@ -54,13 +56,15 @@ describe('API-loading', () => {
if
(
isAndroid
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
const
image
=
await
program
.
screenshot
({
adb
:
true
,
area
:
{
x
:
0
,
y
:
200
,
height
:
windowHeight
,
height
:
windowHeight
-
200
,
width
:
windowWidth
},
});
expect
(
image
).
toMatchImageSnapshot
();
...
...
@@ -93,13 +97,15 @@ describe('API-loading', () => {
if
(
isAndroid
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
const
image
=
await
program
.
screenshot
({
adb
:
true
,
area
:
{
x
:
0
,
y
:
200
,
height
:
windowHeight
,
height
:
windowHeight
-
200
,
width
:
windowWidth
},
});
expect
(
image
).
toMatchImageSnapshot
();
...
...
@@ -132,13 +138,15 @@ describe('API-loading', () => {
if
(
isAndroid
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
const
image
=
await
program
.
screenshot
({
adb
:
true
,
area
:
{
x
:
0
,
y
:
200
,
height
:
windowHeight
,
height
:
windowHeight
-
200
,
width
:
windowWidth
},
});
expect
(
image
).
toMatchImageSnapshot
();
...
...
@@ -171,13 +179,15 @@ describe('API-loading', () => {
if
(
isAndroid
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
const
image
=
await
program
.
screenshot
({
adb
:
true
,
area
:
{
x
:
0
,
y
:
200
,
height
:
windowHeight
,
height
:
windowHeight
-
200
,
width
:
windowWidth
},
});
expect
(
image
).
toMatchImageSnapshot
();
...
...
@@ -210,13 +220,14 @@ describe('API-loading', () => {
if
(
isAndroid
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
const
image
=
await
program
.
screenshot
({
adb
:
true
,
area
:
{
x
:
0
,
y
:
200
,
height
:
windowHeight
,
height
:
windowHeight
-
200
,
width
:
windowWidth
},
});
expect
(
image
).
toMatchImageSnapshot
();
...
...
@@ -249,13 +260,14 @@ describe('API-loading', () => {
if
(
isAndroid
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
const
image
=
await
program
.
screenshot
({
adb
:
true
,
area
:
{
x
:
0
,
y
:
200
,
height
:
windowHeight
,
height
:
windowHeight
-
200
,
width
:
windowWidth
},
});
expect
(
image
).
toMatchImageSnapshot
();
...
...
@@ -288,13 +300,14 @@ describe('API-loading', () => {
if
(
isAndroid
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
const
image
=
await
program
.
screenshot
({
adb
:
true
,
area
:
{
x
:
0
,
y
:
200
,
height
:
windowHeight
,
height
:
windowHeight
-
200
,
width
:
windowWidth
},
});
expect
(
image
).
toMatchImageSnapshot
();
...
...
@@ -327,13 +340,14 @@ describe('API-loading', () => {
if
(
isAndroid
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
const
image
=
await
program
.
screenshot
({
adb
:
true
,
area
:
{
x
:
0
,
y
:
200
,
height
:
windowHeight
,
height
:
windowHeight
-
200
,
width
:
windowWidth
},
});
expect
(
image
).
toMatchImageSnapshot
();
...
...
@@ -366,13 +380,15 @@ describe('API-loading', () => {
if
(
isAndroid
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
const
image
=
await
program
.
screenshot
({
adb
:
true
,
area
:
{
x
:
0
,
y
:
200
,
height
:
windowHeight
,
height
:
windowHeight
-
200
,
width
:
windowWidth
},
});
expect
(
image
).
toMatchImageSnapshot
();
...
...
@@ -405,13 +421,15 @@ describe('API-loading', () => {
if
(
isAndroid
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
const
image
=
await
program
.
screenshot
({
adb
:
true
,
area
:
{
x
:
0
,
y
:
200
,
height
:
windowHeight
,
height
:
windowHeight
-
200
,
width
:
windowWidth
},
});
expect
(
image
).
toMatchImageSnapshot
();
...
...
@@ -444,13 +462,15 @@ describe('API-loading', () => {
if
(
isAndroid
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
const
image
=
await
program
.
screenshot
({
adb
:
true
,
area
:
{
x
:
0
,
y
:
200
,
height
:
windowHeight
,
height
:
windowHeight
-
200
,
width
:
windowWidth
},
});
expect
(
image
).
toMatchImageSnapshot
();
...
...
@@ -483,13 +503,15 @@ describe('API-loading', () => {
if
(
isAndroid
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
const
image
=
await
program
.
screenshot
({
adb
:
true
,
area
:
{
x
:
0
,
y
:
200
,
height
:
windowHeight
,
height
:
windowHeight
-
200
,
width
:
windowWidth
},
});
expect
(
image
).
toMatchImageSnapshot
();
...
...
@@ -522,13 +544,15 @@ describe('API-loading', () => {
if
(
isAndroid
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
const
image
=
await
program
.
screenshot
({
adb
:
true
,
area
:
{
x
:
0
,
y
:
200
,
height
:
windowHeight
,
height
:
windowHeight
-
200
,
width
:
windowWidth
},
});
expect
(
image
).
toMatchImageSnapshot
();
...
...
@@ -561,13 +585,15 @@ describe('API-loading', () => {
if
(
isAndroid
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
const
image
=
await
program
.
screenshot
({
adb
:
true
,
area
:
{
x
:
0
,
y
:
200
,
height
:
windowHeight
,
height
:
windowHeight
-
200
,
width
:
windowWidth
},
});
expect
(
image
).
toMatchImageSnapshot
();
...
...
@@ -601,13 +627,14 @@ describe('API-loading', () => {
if
(
isAndroid
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
const
image
=
await
program
.
screenshot
({
adb
:
true
,
area
:
{
x
:
0
,
y
:
200
,
height
:
windowHeight
,
height
:
windowHeight
-
200
,
width
:
windowWidth
},
});
expect
(
image
).
toMatchImageSnapshot
();
...
...
@@ -640,13 +667,15 @@ describe('API-loading', () => {
if
(
isAndroid
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
const
image
=
await
program
.
screenshot
({
adb
:
true
,
area
:
{
x
:
0
,
y
:
200
,
height
:
windowHeight
,
height
:
windowHeight
-
200
,
width
:
windowWidth
},
});
expect
(
image
).
toMatchImageSnapshot
();
...
...
@@ -679,13 +708,14 @@ describe('API-loading', () => {
if
(
isAndroid
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
const
image
=
await
program
.
screenshot
({
adb
:
true
,
area
:
{
x
:
0
,
y
:
200
,
height
:
windowHeight
,
height
:
windowHeight
-
200
,
width
:
windowWidth
},
});
expect
(
image
).
toMatchImageSnapshot
();
...
...
pages/API/toast/toast.test.js
浏览文件 @
efb58c69
...
...
@@ -5,6 +5,7 @@ describe('API-toast', () => {
let
page
;
const
isAndroid
=
process
.
env
.
UNI_OS_NAME
===
"
android
"
;
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
'
/pages/API/toast/toast
'
)
await
page
.
waitFor
(
600
);
...
...
@@ -13,12 +14,21 @@ describe('API-toast', () => {
it
(
"
onload-toast-test
"
,
async
()
=>
{
if
(
isAndroid
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
const
image
=
await
program
.
screenshot
({
adb
:
true
,
area
:
{
x
:
0
,
y
:
200
,
height
:
windowHeight
-
200
,
width
:
windowWidth
},
});
expect
(
image
).
toMatchImageSnapshot
();
...
...
@@ -38,11 +48,18 @@ describe('API-toast', () => {
await
btnToastDefaultButton
.
tap
()
await
page
.
waitFor
(
200
)
if
(
isAndroid
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
const
image
=
await
program
.
screenshot
({
adb
:
true
,
area
:
{
x
:
0
,
y
:
200
,
height
:
windowHeight
-
200
,
width
:
windowWidth
},
});
expect
(
image
).
toMatchImageSnapshot
();
...
...
@@ -62,11 +79,16 @@ describe('API-toast', () => {
await
btnToastDurationButton
.
tap
()
await
page
.
waitFor
(
2000
)
if
(
isAndroid
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
const
image
=
await
program
.
screenshot
({
adb
:
true
,
area
:
{
x
:
0
,
y
:
200
,
height
:
windowHeight
-
200
,
width
:
windowWidth
},
});
expect
(
image
).
toMatchImageSnapshot
();
...
...
@@ -84,11 +106,16 @@ describe('API-toast', () => {
await
btnToastErrorIconButton
.
tap
()
await
page
.
waitFor
(
200
)
if
(
isAndroid
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
const
image
=
await
program
.
screenshot
({
adb
:
true
,
area
:
{
x
:
0
,
y
:
200
,
height
:
windowHeight
-
200
,
width
:
windowWidth
},
});
expect
(
image
).
toMatchImageSnapshot
();
...
...
@@ -112,11 +139,16 @@ describe('API-toast', () => {
await
page
.
waitFor
(
1000
)
if
(
isAndroid
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
const
image
=
await
program
.
screenshot
({
adb
:
true
,
area
:
{
x
:
0
,
y
:
200
,
height
:
windowHeight
-
200
,
width
:
windowWidth
},
});
expect
(
image
).
toMatchImageSnapshot
();
...
...
pages/API/toast/toast.uvue
浏览文件 @
efb58c69
...
...
@@ -37,6 +37,10 @@
}, 2000);
},
methods: {
//自动化测试例专用
jest_getWindowInfo() : GetWindowInfoResult {
return uni.getWindowInfo();
},
toast1Tap: function () {
uni.showToast({
title: "默认",
...
...
pages/component/button/buttonstatus.uvue
0 → 100644
浏览文件 @
efb58c69
<script>
import { ItemType } from '@/components/enum-data/enum-data'
export default {
data() {
return {
plain_boolean: false,
disabled_boolean: false,
default_style: false,
size_enum: [{ "value": 0, "name": "default" }, { "value": 1, "name": "mini" }] as ItemType[],
size_enum_current: 0,
type_enum: [{ "value": 0, "name": "default" }, { "value": 1, "name": "primary" }, { "value": 2, "name": "warn" }] as ItemType[],
type_enum_current: 0,
count: 0,
text: 'uni-app-x'
}
},
methods: {
button_click() {
console.log("组件被点击时触发")
this.count++
},
button_touchstart() { console.log("手指触摸动作开始") },
button_touchmove() { console.log("手指触摸后移动") },
button_touchcancel() { console.log("手指触摸动作被打断,如来电提醒,弹窗") },
button_touchend() { console.log("手指触摸动作结束") },
button_tap() { console.log("手指触摸后马上离开") },
button_longpress() { console.log("如果一个组件被绑定了 longpress 事件,那么当用户长按这个组件时,该事件将会被触发。") },
change_plain_boolean(checked : boolean) { this.plain_boolean = checked },
change_disabled_boolean(checked : boolean) { this.disabled_boolean = checked },
change_default_style(checked : boolean) { this.default_style = checked },
radio_change_size_enum(checked : number) { this.size_enum_current = checked },
radio_change_type_enum(checked : number) { this.type_enum_current = checked },
confirm_text_input(value : string) { this.text = value }
}
}
</script>
<template>
<view class="main">
<!--type-->
<view class="container">
<button style="margin: 10px;" :disabled="disabled_boolean" :size="size_enum[size_enum_current].name"
:type="type_enum[0].name" :plain="plain_boolean" @click="button_click" @touchstart="button_touchstart"
@touchmove="button_touchmove" @touchcancel="button_touchcancel" @touchend="button_touchend" @tap="button_tap"
@longpress="button_longpress" class="btn" :class="default_style ? 'custom-btn' : ''"
:hover-class="default_style ? 'is-hover' : 'button-hover'">
{{ text }}
</button>
</view>
<view class="container">
<button style="margin: 10px;" :disabled="disabled_boolean" :size="size_enum[size_enum_current].name"
:type="type_enum[1].name" :plain="plain_boolean" @click="button_click" @touchstart="button_touchstart"
@touchmove="button_touchmove" @touchcancel="button_touchcancel" @touchend="button_touchend" @tap="button_tap"
@longpress="button_longpress" class="btn" :class="default_style ? 'custom-btn' : ''"
:hover-class="default_style ? 'is-hover' : 'button-hover'">
{{ text }}
</button>
</view>
<view class="container">
<button style="margin: 10px;" :disabled="disabled_boolean" :size="size_enum[size_enum_current].name"
:type="type_enum[2].name" :plain="plain_boolean" @click="button_click" @touchstart="button_touchstart"
@touchmove="button_touchmove" @touchcancel="button_touchcancel" @touchend="button_touchend" @tap="button_tap"
@longpress="button_longpress" class="btn" :class="default_style ? 'custom-btn' : ''"
:hover-class="default_style ? 'is-hover' : 'button-hover'">
{{ text }}
</button>
</view>
<!--size-->
<view class="container">
<button style="margin: 10px;" :disabled="disabled_boolean" :size="size_enum[0].name"
:type="type_enum[type_enum_current].name" :plain="plain_boolean" @click="button_click"
@touchstart="button_touchstart" @touchmove="button_touchmove" @touchcancel="button_touchcancel"
@touchend="button_touchend" @tap="button_tap" @longpress="button_longpress" class="btn"
:class="default_style ? 'custom-btn' : ''" :hover-class="default_style ? 'is-hover' : 'button-hover'">
{{ text }}
</button>
</view>
<view class="container">
<button style="margin: 10px;" :disabled="disabled_boolean" :size="size_enum[1].name"
:type="type_enum[type_enum_current].name" :plain="plain_boolean" @click="button_click"
@touchstart="button_touchstart" @touchmove="button_touchmove" @touchcancel="button_touchcancel"
@touchend="button_touchend" @tap="button_tap" @longpress="button_longpress" class="btn"
:class="default_style ? 'custom-btn' : ''" :hover-class="default_style ? 'is-hover' : 'button-hover'">
{{ text }}
</button>
</view>
<!--plain-->
<view class="container">
<button style="margin: 10px;" :disabled="disabled_boolean" :size="size_enum[size_enum_current].name"
:type="type_enum[type_enum_current].name" :plain="true" @click="button_click" @touchstart="button_touchstart"
@touchmove="button_touchmove" @touchcancel="button_touchcancel" @touchend="button_touchend" @tap="button_tap"
@longpress="button_longpress" class="btn" :class="default_style ? 'custom-btn' : ''"
:hover-class="default_style ? 'is-hover' : 'button-hover'">
{{ text }}
</button>
</view>
<view class="container">
<button style="margin: 10px;" :disabled="disabled_boolean" :size="size_enum[size_enum_current].name"
:type="type_enum[type_enum_current].name" :plain="false" @click="button_click" @touchstart="button_touchstart"
@touchmove="button_touchmove" @touchcancel="button_touchcancel" @touchend="button_touchend" @tap="button_tap"
@longpress="button_longpress" class="btn" :class="default_style ? 'custom-btn' : ''"
:hover-class="default_style ? 'is-hover' : 'button-hover'">
{{ text }}
</button>
</view>
<!--disable-->
<view class="container">
<button style="margin: 10px;" :disabled="false" :size="size_enum[size_enum_current].name"
:type="type_enum[type_enum_current].name" :plain="plain_boolean" @click="button_click"
@touchstart="button_touchstart" @touchmove="button_touchmove" @touchcancel="button_touchcancel"
@touchend="button_touchend" @tap="button_tap" @longpress="button_longpress" class="btn"
:class="default_style ? 'custom-btn' : ''" :hover-class="default_style ? 'is-hover' : 'button-hover'">
{{ text }}
</button>
</view>
<view class="container">
<button style="margin: 10px;" :disabled="true" :size="size_enum[size_enum_current].name"
:type="type_enum[type_enum_current].name" :plain="plain_boolean" @click="button_click"
@touchstart="button_touchstart" @touchmove="button_touchmove" @touchcancel="button_touchcancel"
@touchend="button_touchend" @tap="button_tap" @longpress="button_longpress" class="btn"
:class="default_style ? 'custom-btn' : ''" :hover-class="default_style ? 'is-hover' : 'button-hover'">
{{ text }}
</button>
</view>
</view>
</template>
<style>
.main {
padding: 5px 0;
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
flex-direction: column;
justify-content: center;
}
.main .list-item {
width: 100%;
height: 100px;
border: 1px solid #666;
}
.custom-btn {
color: #ffffff;
background-color: #1AAD19;
border-color: #1AAD19;
border-radius: 5px;
border-width: 0.5px;
height: 53px;
}
.is-hover {
color: rgba(255, 255, 255, 0.6);
background-color: #179b16;
border-color: #179b16;
}
.container {
width: 100%;
height: 60px;
/* background-color: orange; */
}
</style>
pages/component/slider-100/slider-100.uvue
浏览文件 @
efb58c69
<template>
<scroll-view class="page">
<page-head :title="title"></page-head>
<view class="flex-row">
<view class="flex-fill">
<slider ref="slider1" v-for="(_, index1) in 25" :key="index1" class="slider" @changing="sliderChanging"
<view class="grid-view">
<slider ref="slider" class="slider" v-for="(_, index) in 100" :key="index" @changing="sliderChanging"
@change="sliderChange" :value="sliderValue" :block-size="20" :show-value="true" />
</view>
<view class="flex-fill">
<slider ref="slider2" v-for="(_, index2) in 25" :key="index2" class="slider" @changing="sliderChanging"
@change="sliderChange" :value="sliderValue" :block-size="20" :show-value="true" />
</view>
<view class="flex-fill">
<slider ref="slider3" v-for="(_, index3) in 25" :key="index3" class="slider" @changing="sliderChanging"
@change="sliderChange" :value="sliderValue" :block-size="20" :show-value="true" />
</view>
<view class="flex-fill">
<slider ref="slider4" v-for="(_, index4) in 25" :key="index4" class="slider" @changing="sliderChanging"
@change="sliderChange" :value="sliderValue" :block-size="20" :show-value="true" />
</view>
</view>
</scroll-view>
</template>
...
...
@@ -38,19 +24,8 @@
this.updateSliderValue(e.detail.value)
},
updateSliderValue(value : number) {
// this.sliderValue = value
// TODO 跳过vue框架,直接修改原生组件
(this.$refs["slider1"] as UniSliderElement[]).forEach((item) => {
item.value = value
});
(this.$refs["slider2"] as UniSliderElement[]).forEach((item) => {
item.value = value
});
(this.$refs["slider3"] as UniSliderElement[]).forEach((item) => {
item.value = value
});
(this.$refs["slider4"] as UniSliderElement[]).forEach((item) => {
(this.$refs["slider"] as UniSliderElement[]).forEach((item) => {
item.value = value
});
}
...
...
@@ -63,15 +38,14 @@
flex: 1;
}
.
flex-ro
w {
.
grid-vie
w {
flex-direction: row;
}
.flex-fill {
flex: 1;
flex-wrap: wrap;
}
.slider {
margin: 1px 0.5px;
width: 25%;
margin-top: 1px;
margin-bottom: 1px;
}
</style>
pages/tabBar/API.uvue
浏览文件 @
efb58c69
...
...
@@ -169,6 +169,10 @@
name: '动态加载字体',
url: 'load-font-face',
},
{
name: 'rpx2px',
url: 'rpx2px'
},
{
name: 'actionSheet操作菜单',
url: 'action-sheet',
...
...
@@ -467,16 +471,6 @@
}
] as Page[],
},
{
id: 'permission-listener',
name: '权限申请监听',
pages: [
{
name: '权限申请监听',
url: 'create-request-permission-listener',
}
] as Page[]
},
{
id: "payment",
name: "支付",
...
...
@@ -486,15 +480,19 @@
url: "request-payment",
},
] as Page[],
},
{
id: 'permission-listener',
name: '权限申请监听',
pages: [
{
name: '权限申请监听',
url: 'create-request-permission-listener',
}
// #endif
/* {
id: "rewarded-video-ad",
url: "rewarded-video-ad",
name: "激励视频广告",
enable: false,
pages: [] as Page[]
] as Page[]
},
// #endif
/*
{
id: "full-screen-video-ad",
url: "full-screen-video-ad",
...
...
@@ -526,16 +524,6 @@
},
] as Page[],
},
{
id: "payment",
name: "支付",
pages: [
{
name: "发起支付",
url: "request-payment",
},
] as Page[],
},
*/
] as ListItem[],
arrowUpIcon: '/static/icons/arrow-up.png',
...
...
pages/template/list-news/list-news.test.js
浏览文件 @
efb58c69
// uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/
describe
(
'
template-list-news
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
web
'
))
{
it
(
'
dummyTest
'
,
async
()
=>
{
expect
(
1
).
toBe
(
1
)
})
return
}
let
page
;
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
'
/pages/template/list-news/list-news
'
);
...
...
pages/webview-screenshot-comparison/webview-screenshot-comparison.test.js
浏览文件 @
efb58c69
...
...
@@ -9,6 +9,7 @@ const pages = [
"
pages/component/progress/progress
"
,
"
pages/component/form/form
"
,
"
pages/component/button/button
"
,
"
pages/component/button/buttonstatus
"
,
"
pages/component/radio/radio
"
,
"
pages/component/rich-text/rich-text
"
,
"
pages/component/rich-text/rich-text-tags
"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录