Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-app x
提交
55e62003
H
hello uni-app x
项目概览
DCloud
/
hello uni-app x
通知
5995
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看板
提交
55e62003
编写于
1月 25, 2024
作者:
DCloud-yyl
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev' into alpha
# Conflicts: # pages.json
上级
a8bcc70f
b5c380fd
变更
9
显示空白变更内容
内联
并排
Showing
9 changed file
with
1118 addition
and
1077 deletion
+1118
-1077
components/boolean-data/boolean-data.vue
components/boolean-data/boolean-data.vue
+1
-0
pages.json
pages.json
+1039
-1039
pages/API/create-request-permission-listener/create-request-permission-listener.uvue
...rmission-listener/create-request-permission-listener.uvue
+5
-5
pages/API/download-file/download-file.test.js
pages/API/download-file/download-file.test.js
+20
-8
pages/API/page-scroll-to/page-scroll-to.test.js
pages/API/page-scroll-to/page-scroll-to.test.js
+4
-4
pages/API/request/request.test.js
pages/API/request/request.test.js
+20
-8
pages/API/upload-file/upload-file.test.js
pages/API/upload-file/upload-file.test.js
+20
-8
pages/CSS/layout/position.uvue
pages/CSS/layout/position.uvue
+7
-3
pages/template/drop-card/card/card.uvue
pages/template/drop-card/card/card.uvue
+2
-2
未找到文件。
components/boolean-data/boolean-data.vue
浏览文件 @
55e62003
...
@@ -41,5 +41,6 @@
...
@@ -41,5 +41,6 @@
justify-content
:
space-between
;
justify-content
:
space-between
;
padding
:
10px
;
padding
:
10px
;
border-bottom
:
1px
solid
rgba
(
0
,
0
,
0
,
.06
);
border-bottom
:
1px
solid
rgba
(
0
,
0
,
0
,
.06
);
align-items
:
center
;
}
}
</
style
>
</
style
>
pages.json
浏览文件 @
55e62003
pages/API/create-request-permission-listener/create-request-permission-listener.uvue
浏览文件 @
55e62003
...
@@ -4,10 +4,10 @@
...
@@ -4,10 +4,10 @@
<!-- #endif -->
<!-- #endif -->
<page-head title="权限申请监听"></page-head>
<page-head title="权限申请监听"></page-head>
<view class="permission-alert" id="permission-alert" :style="{'transform':isPermissionAlertShow ? 'translateY(0)':'translateY(-110px)'}">
<view class="permission-alert" id="permission-alert" :style="{'transform':isPermissionAlertShow ? 'translateY(0)':'translateY(-110px)'}">
<text style="font-size: 20px;margin-bottom: 10px;margin-top: 5px;">
手机状态
权限申请说明:</text>
<text style="font-size: 20px;margin-bottom: 10px;margin-top: 5px;">
日历
权限申请说明:</text>
<text style="color: darkgray;">uni-app x正在申请
手机状态
权限,允许或拒绝均不会获取任何隐私信息。</text>
<text style="color: darkgray;">uni-app x正在申请
日历
权限,允许或拒绝均不会获取任何隐私信息。</text>
</view>
</view>
<button type="primary" style="margin: 10px;" @click="requestPermission">点击申请权限</button>
<button type="primary" style="margin: 10px;" @click="requestPermission">点击申请
日历
权限</button>
<!-- #ifdef APP -->
<!-- #ifdef APP -->
</scroll-view>
</scroll-view>
...
@@ -48,14 +48,14 @@
...
@@ -48,14 +48,14 @@
},
},
requestPermission() {
requestPermission() {
// #ifdef APP-ANDROID
// #ifdef APP-ANDROID
if (UTSAndroid.checkSystemPermissionGranted(UTSAndroid.getUniActivity()!, ["android.permission.READ_
PHONE_STATE
"])) {
if (UTSAndroid.checkSystemPermissionGranted(UTSAndroid.getUniActivity()!, ["android.permission.READ_
CALENDAR
"])) {
uni.showToast({
uni.showToast({
title: "权限已经同意了,不需要再申请",
title: "权限已经同意了,不需要再申请",
position: "bottom"
position: "bottom"
})
})
return
return
}
}
UTSAndroid.requestSystemPermission(UTSAndroid.getUniActivity()!, ["android.permission.READ_
PHONE_STATE
"], (_ : boolean, p : string[]) => {
UTSAndroid.requestSystemPermission(UTSAndroid.getUniActivity()!, ["android.permission.READ_
CALENDAR
"], (_ : boolean, p : string[]) => {
console.log(p)
console.log(p)
}, (_ : boolean, p : string[]) => {
}, (_ : boolean, p : string[]) => {
uni.showToast({
uni.showToast({
...
...
pages/API/download-file/download-file.test.js
浏览文件 @
55e62003
...
@@ -22,15 +22,27 @@ describe('ExtApi-DownloadFile', () => {
...
@@ -22,15 +22,27 @@ describe('ExtApi-DownloadFile', () => {
expect
(
res
).
toBe
(
true
);
expect
(
res
).
toBe
(
true
);
});
});
it
(
'
Check Set Cookie
'
,
async
()
=>
{
it
(
'
Check Set Cookie
'
,
async
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
let
version
=
process
.
env
.
uniTestPlatformInfo
version
=
version
.
split
(
"
"
)[
1
]
if
(
version
>
9
){
res
=
await
page
.
callMethod
(
'
jest_set_cookie
'
)
res
=
await
page
.
callMethod
(
'
jest_set_cookie
'
)
await
page
.
waitFor
(
1000
);
await
page
.
waitFor
(
1000
);
res
=
await
page
.
data
(
'
jest_result
'
);
res
=
await
page
.
data
(
'
jest_result
'
);
expect
(
res
).
toBe
(
true
)
expect
(
res
).
toBe
(
true
)
}
}
});
});
it
(
'
Check Delete Cookie
'
,
async
()
=>
{
it
(
'
Check Delete Cookie
'
,
async
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
let
version
=
process
.
env
.
uniTestPlatformInfo
version
=
version
.
split
(
"
"
)[
1
]
if
(
version
>
9
){
res
=
await
page
.
callMethod
(
'
jest_delete_cookie
'
)
res
=
await
page
.
callMethod
(
'
jest_delete_cookie
'
)
await
page
.
waitFor
(
1000
);
await
page
.
waitFor
(
1000
);
res
=
await
page
.
data
(
'
jest_result
'
);
res
=
await
page
.
data
(
'
jest_result
'
);
expect
(
res
).
toBe
(
true
)
expect
(
res
).
toBe
(
true
)
}
}
});
});
});
});
pages/API/page-scroll-to/page-scroll-to.test.js
浏览文件 @
55e62003
...
@@ -21,12 +21,12 @@ describe('page-scroll-to', () => {
...
@@ -21,12 +21,12 @@ describe('page-scroll-to', () => {
const
scrollToElement
=
await
page
.
$
(
'
.custom-element
'
)
const
scrollToElement
=
await
page
.
$
(
'
.custom-element
'
)
await
btnScrollTo
.
tap
()
await
btnScrollTo
.
tap
()
await
page
.
waitFor
(
6
00
)
await
page
.
waitFor
(
10
00
)
const
offset
=
await
scrollToElement
.
offset
()
const
offset
=
await
scrollToElement
.
offset
()
// android 6 分辨率为 720*1280,需要调整期望数值
// android 6 分辨率为 720*1280,需要调整期望数值
if
(
!
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android 6
'
))
{
if
(
!
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android 6
'
))
{
expect
(
offset
.
top
>=
118
8
).
toBe
(
true
)
expect
(
offset
.
top
>=
118
0
).
toBe
(
true
)
}
}
})
})
})
})
pages/API/request/request.test.js
浏览文件 @
55e62003
...
@@ -82,16 +82,28 @@ describe('ExtApi-Request', () => {
...
@@ -82,16 +82,28 @@ describe('ExtApi-Request', () => {
if
(
process
.
env
.
uniTestPlatformInfo
.
indexOf
(
'
web
'
)
===
-
1
)
{
if
(
process
.
env
.
uniTestPlatformInfo
.
indexOf
(
'
web
'
)
===
-
1
)
{
it
(
'
Check Set Cookie
'
,
async
()
=>
{
it
(
'
Check Set Cookie
'
,
async
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
let
version
=
process
.
env
.
uniTestPlatformInfo
version
=
version
.
split
(
"
"
)[
1
]
if
(
version
>
9
){
res
=
await
page
.
callMethod
(
'
jest_set_cookie
'
)
res
=
await
page
.
callMethod
(
'
jest_set_cookie
'
)
await
page
.
waitFor
(
500
);
await
page
.
waitFor
(
500
);
res
=
await
page
.
data
(
'
jest_result
'
);
res
=
await
page
.
data
(
'
jest_result
'
);
expect
(
res
).
toBe
(
true
)
expect
(
res
).
toBe
(
true
)
}
}
});
});
it
(
'
Check Delete Cookie
'
,
async
()
=>
{
it
(
'
Check Delete Cookie
'
,
async
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
let
version
=
process
.
env
.
uniTestPlatformInfo
version
=
version
.
split
(
"
"
)[
1
]
if
(
version
>
9
){
res
=
await
page
.
callMethod
(
'
jest_delete_cookie
'
)
res
=
await
page
.
callMethod
(
'
jest_delete_cookie
'
)
await
page
.
waitFor
(
1000
);
await
page
.
waitFor
(
1000
);
res
=
await
page
.
data
(
'
jest_result
'
);
res
=
await
page
.
data
(
'
jest_result
'
);
expect
(
res
).
toBe
(
true
)
expect
(
res
).
toBe
(
true
)
}
}
});
});
}
}
});
});
pages/API/upload-file/upload-file.test.js
浏览文件 @
55e62003
...
@@ -23,16 +23,28 @@ describe('ExtApi-UploadFile', () => {
...
@@ -23,16 +23,28 @@ describe('ExtApi-UploadFile', () => {
});
});
it
(
'
Check Set Cookie
'
,
async
()
=>
{
it
(
'
Check Set Cookie
'
,
async
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
let
version
=
process
.
env
.
uniTestPlatformInfo
version
=
version
.
split
(
"
"
)[
1
]
if
(
version
>
9
){
res
=
await
page
.
callMethod
(
'
jest_set_cookie
'
)
res
=
await
page
.
callMethod
(
'
jest_set_cookie
'
)
await
page
.
waitFor
(
1000
);
await
page
.
waitFor
(
1000
);
res
=
await
page
.
data
(
'
jest_result
'
);
res
=
await
page
.
data
(
'
jest_result
'
);
expect
(
res
).
toBe
(
true
)
expect
(
res
).
toBe
(
true
)
}
}
});
});
it
(
'
Check Delete Cookie
'
,
async
()
=>
{
it
(
'
Check Delete Cookie
'
,
async
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
let
version
=
process
.
env
.
uniTestPlatformInfo
version
=
version
.
split
(
"
"
)[
1
]
if
(
version
>
9
){
res
=
await
page
.
callMethod
(
'
jest_delete_cookie
'
)
res
=
await
page
.
callMethod
(
'
jest_delete_cookie
'
)
await
page
.
waitFor
(
1000
);
await
page
.
waitFor
(
1000
);
res
=
await
page
.
data
(
'
jest_result
'
);
res
=
await
page
.
data
(
'
jest_result
'
);
expect
(
res
).
toBe
(
true
)
expect
(
res
).
toBe
(
true
)
}
}
});
});
it
(
'
Check files upload
'
,
async
()
=>
{
it
(
'
Check files upload
'
,
async
()
=>
{
res
=
await
page
.
callMethod
(
'
jest_files_upload
'
)
res
=
await
page
.
callMethod
(
'
jest_files_upload
'
)
...
...
pages/CSS/layout/position.uvue
浏览文件 @
55e62003
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
style="width: 50px; height: 50px; background-color: red"
style="width: 50px; height: 50px; background-color: red"
></view>
></view>
<view class="common" style="position: relative">
<view class="common" style="position: relative">
<text>relative</text>
<text
class="text"
>relative</text>
</view>
</view>
<view
<view
style="width: 50px; height: 50px; background-color: blue"
style="width: 50px; height: 50px; background-color: blue"
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
style="width: 50px; height: 50px; background-color: red"
style="width: 50px; height: 50px; background-color: red"
></view>
></view>
<view class="common" style="position: absolute">
<view class="common" style="position: absolute">
<text>absolute</text>
<text
class="text"
>absolute</text>
</view>
</view>
<view
<view
style="width: 50px; height: 50px; background-color: blue"
style="width: 50px; height: 50px; background-color: blue"
...
@@ -82,7 +82,7 @@
...
@@ -82,7 +82,7 @@
style="width: 50px; height: 50px; background-color: red"
style="width: 50px; height: 50px; background-color: red"
></view>
></view>
<view class="common fixed" style="position: fixed">
<view class="common fixed" style="position: fixed">
<text>fixed</text>
<text
class="text"
>fixed</text>
</view>
</view>
<view
<view
style="width: 50px; height: 50px; background-color: blue"
style="width: 50px; height: 50px; background-color: blue"
...
@@ -131,4 +131,8 @@
...
@@ -131,4 +131,8 @@
/* #endif */
/* #endif */
}
}
.text {
white-space: nowrap;
width: 100%;
}
</style>
</style>
pages/template/drop-card/card/card.uvue
浏览文件 @
55e62003
...
@@ -80,8 +80,8 @@
...
@@ -80,8 +80,8 @@
},
},
// 工具方法,用于快速设置 Element 的 style
// 工具方法,用于快速设置 Element 的 style
setElementStyle(refName : string, propertyName : string, propertyStyle : any) : void {
setElementStyle(refName : string, propertyName : string, propertyStyle : any) : void {
const elementMap = this.$data['$elementMap'] as Map<string, Element>
const elementMap = this.$data['$elementMap'] as Map<string,
Uni
Element>
let element : Element | null = elementMap.get(refName)
let element :
Uni
Element | null = elementMap.get(refName)
if (element == null) {
if (element == null) {
element = this.$refs[refName] as UniElement;
element = this.$refs[refName] as UniElement;
elementMap.set(refName, element)
elementMap.set(refName, element)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录