Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Accustomed_
hello uni-app x
提交
04d7543a
H
hello uni-app x
项目概览
Accustomed_
/
hello uni-app x
与 Fork 源项目一致
Fork自
DCloud / hello uni-app x
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello uni-app x
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
04d7543a
编写于
10月 19, 2023
作者:
DCloud-yyl
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev' into alpha
上级
1308b04f
3c4ac57d
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
149 addition
and
63 deletion
+149
-63
jest-setup.js
jest-setup.js
+1
-1
manifest.json
manifest.json
+44
-36
pages.json
pages.json
+8
-0
pages/API/element-takesnapshot/element-takesnapshot.uvue
pages/API/element-takesnapshot/element-takesnapshot.uvue
+4
-19
pages/component/navigator/navigator.test.js
pages/component/navigator/navigator.test.js
+2
-2
pages/component/transition-event/transition-event.test.js
pages/component/transition-event/transition-event.test.js
+16
-0
pages/component/transition-event/transition-event.uvue
pages/component/transition-event/transition-event.uvue
+64
-0
pages/component/unicloud-db-contacts/add.uvue
pages/component/unicloud-db-contacts/add.uvue
+3
-3
pages/pages.test.js
pages/pages.test.js
+1
-0
pages/tabBar/component.uvue
pages/tabBar/component.uvue
+4
-0
pages/template/list-news/list-news.uvue
pages/template/list-news/list-news.uvue
+2
-2
未找到文件。
jest-setup.js
浏览文件 @
04d7543a
...
...
@@ -6,7 +6,7 @@ const {
const
hbuilderx_version
=
process
.
env
.
HX_Version
const
uniTestPlatformInfo
=
process
.
env
.
uniTestPlatformInfo
?
process
.
env
.
uniTestPlatformInfo
.
replace
(
/
\s
/g
,
'
_
'
)
:
''
const
folderName
=
`__image_snapshots__/
${
hbuilderx_version
}
/__
${
uniTestPlatformInfo
}
__`
const
baseFolderName
=
`__image_snapshots__/base`
const
baseFolderName
=
`__image_snapshots__/base
/__
${
uniTestPlatformInfo
}
__
`
expect
.
extend
({
toMatchImageSnapshot
:
configureToMatchImageSnapshot
({
...
...
manifest.json
浏览文件 @
04d7543a
{
"name"
:
"hello-uniapp x"
,
"appid"
:
"__UNI__3584C99"
,
"description"
:
""
,
"versionName"
:
"1.0.10"
,
"versionCode"
:
10010
,
"uni-app-x"
:
{},
/*
快应用特有相关
*/
"quickapp"
:
{},
/*
小程序特有相关
*/
"mp-weixin"
:
{
"appid"
:
""
,
"setting"
:
{
"urlCheck"
:
false
},
"usingComponents"
:
true
},
"mp-alipay"
:
{
"usingComponents"
:
true
},
"mp-baidu"
:
{
"usingComponents"
:
true
},
"mp-toutiao"
:
{
"usingComponents"
:
true
},
"uniStatistics"
:
{
"enable"
:
false
},
"app"
:
{
"duts"
:
[
"uni-facialRecognitionVerify"
]
},
"vueVersion"
:
"3"
}
{
"name"
:
"hello-uniapp x"
,
"appid"
:
"__UNI__3584C99"
,
"description"
:
""
,
"versionName"
:
"1.0.11"
,
"versionCode"
:
10011
,
"uni-app-x"
:
{
},
/*
快应用特有相关
*/
"quickapp"
:
{
},
/*
小程序特有相关
*/
"mp-weixin"
:
{
"appid"
:
""
,
"setting"
:
{
"urlCheck"
:
false
},
"usingComponents"
:
true
},
"mp-alipay"
:
{
"usingComponents"
:
true
},
"mp-baidu"
:
{
"usingComponents"
:
true
},
"mp-toutiao"
:
{
"usingComponents"
:
true
},
"uniStatistics"
:
{
"enable"
:
false
},
"app"
:
{
},
"vueVersion"
:
"3"
}
\ No newline at end of file
pages.json
浏览文件 @
04d7543a
...
...
@@ -1001,6 +1001,14 @@
"navigationBarTitleText"
:
"getDrawableContext"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/component/transition-event/transition-event"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
}
],
...
...
pages/API/element-takesnapshot/element-takesnapshot.uvue
浏览文件 @
04d7543a
<template>
<view>
<page-head id="page-head" title="
getElementById
"></page-head>
<view class="uni-padding-wrap"
id="snapshot-content"
>
<view
id="snapshot-content"
>
<page-head id="page-head" title="
对本页面根view截图
"></page-head>
<view class="uni-padding-wrap">
<text id="text">this is text</text>
<view id="view" class="uni-common-mt" style="border: 1px solid red">this is view</view>
</view>
<button class="uni-btn" @click="changeViewStyle">
修改 view 宽高及背景色
</button>
<button class="uni-btn btn-TakeSnapshot" type="primary" @tap="takeSnapshotClick">
点击截图
点击截图
并替换显示下方图片
</button>
<image style="margin-top: 20px;" :src="snapImage" mode="aspectFit" @longpress="saveToAlbum"></image>
</view>
...
...
@@ -24,16 +19,6 @@
}
},
methods: {
changeViewStyle() {
const text = uni.getElementById('text')!
text.style.setProperty('color', 'red')
const view = uni.getElementById('view')!
view.style.setProperty('width', '90%')
view.style.setProperty('height', '50px')
view.style.setProperty('backgroundColor', '#007AFF')
},
takeSnapshotClick() {
const view = uni.getElementById('snapshot-content')!
view.takeSnapshot({
...
...
pages/component/navigator/navigator.test.js
浏览文件 @
04d7543a
...
...
@@ -11,7 +11,7 @@ describe('navigator', () => {
const
btnNavigate
=
await
page
.
$
(
'
.navigate
'
)
await
btnNavigate
.
tap
()
await
page
.
waitFor
(
1
00
)
await
page
.
waitFor
(
3
00
)
const
currentPage
=
await
program
.
currentPage
()
expect
(
currentPage
.
path
).
toBe
(
PAGE_PATH_NAVIGATE
.
substring
(
1
))
...
...
@@ -22,7 +22,7 @@ describe('navigator', () => {
const
btnRedirect
=
await
page
.
$
(
'
.redirect
'
)
await
btnRedirect
.
tap
()
await
page
.
waitFor
(
1
00
)
await
page
.
waitFor
(
3
00
)
const
currentPage
=
await
program
.
currentPage
()
expect
(
currentPage
.
path
).
toBe
(
PAGE_PATH_REDIRECT
.
substring
(
1
))
...
...
pages/component/transition-event/transition-event.test.js
0 → 100644
浏览文件 @
04d7543a
// uni-app自动化测试教程: uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/
describe
(
'
transition event
'
,
()
=>
{
let
page
;
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
'
/pages/component/transition-event/transition-event
'
)
await
page
.
waitFor
(
3000
);
});
it
(
'
transitionend
'
,
async
()
=>
{
await
page
.
callMethod
(
'
switchBtn
'
)
await
page
.
waitFor
(
3000
)
expect
(
await
page
.
data
(
"
onTransitionEndTriggr
"
)).
toBe
(
true
)
});
});
pages/component/transition-event/transition-event.uvue
0 → 100644
浏览文件 @
04d7543a
<template>
<!-- #ifdef APP -->
<scroll-view style="flex:1">
<!-- #endif -->
<button @click="switchBtn">{{buttonValue}}</button>
<image class="transition-transform" id="transition-transform" @transitionend="onEnd" src="/static/uni.png"></image>
<!-- #ifdef APP -->
</scroll-view>
<!-- #endif -->
</template>
<script>
export default {
data() {
return {
times: 0,
element: null as Element | null,
isStart: false,
buttonValue: "开启图片旋转",
onTransitionEndTriggr: false
}
},
methods: {
switchBtn() {
if (!this.isStart) {
if (this.element == null) {
this.element = uni.getElementById('transition-transform')
}
this.buttonValue = "关闭图片旋转"
this.times = this.times + 1
this.element!.style.setProperty('transform', 'rotate(' + this.times * 360 + 'deg)')
this.element!.style.setProperty('transition-duration', '2000')
this.isStart = true
} else {
this.isStart = false
this.times = 0
this.buttonValue = "开启图片旋转"
this.element!.style.setProperty('transform', 'rotate(' + this.times * 360 + 'deg)')
this.element!.style.setProperty('transition-duration', '0')
}
},
onEnd() {
if (this.isStart) {
this.times = this.times + 1
this.element!.style.setProperty('transform', 'rotate(' + this.times * 360 + 'deg)')
this.onTransitionEndTriggr = true
}
}
}
}
</script>
<style>
.transition-transform {
width: 400rpx;
height: 400rpx;
margin: 50rpx auto;
border-radius: 200rpx;
transition-duration: 2000;
transition-property: transform;
transition-timing-function: linear;
transform: rotate(0deg);
}
</style>
pages/component/unicloud-db-contacts/add.uvue
浏览文件 @
04d7543a
<template>
<view class="page">
<unicloud-db ref="udb" v-slot:default="{
data, loading,
error}" :collection="collection" loadtime="manual">
<view v-if="error
" class="error">{{error
}}</view>
<unicloud-db ref="udb" v-slot:default="{error}" :collection="collection" loadtime="manual">
<view v-if="error
!=null" class="error">{{error.errMsg
}}</view>
</unicloud-db>
<view class="form-item">
<text class="form-item-label">姓名</text>
...
...
@@ -126,4 +126,4 @@
.btn-add {
margin-top: 50px;
}
</style>
\ No newline at end of file
</style>
pages/pages.test.js
浏览文件 @
04d7543a
...
...
@@ -37,6 +37,7 @@ const pages = [
'
/pages/component/view/view
'
,
// '/pages/component/web-view/web-view', // 动态内容
'
/pages/component/web-view-local/web-view-local
'
,
'
/pages/component/transition-event/transition-event
'
,
// CSS
'
/pages/CSS/background/background-color
'
,
...
...
pages/tabBar/component.uvue
浏览文件 @
04d7543a
...
...
@@ -254,6 +254,10 @@ export default {
name: '通用事件',
url: '/pages/component/general-event/general-event',
enable: true,
},{
name: 'Transition事件',
url: '/pages/component/transition-event/transition-event',
enable: true,
},
] as Page[],
}
...
...
pages/template/list-news/list-news.uvue
浏览文件 @
04d7543a
...
...
@@ -7,9 +7,9 @@
</list-item>
<sticky-header>
<view style="width: 100%;height:44px;background-color: #f5f5f5;flex-direction: row;justify-content:center;align-items:center;">
<
button style="height: 40px;font-size: 13px;" v-for="(name,index) in th_item" @click="clickTH(index)
">
<
text v-for="(name,index) in th_item" @click="clickTH(index)" style="margin-right: 20px;
">
{{name}}
</
button
>
</
text
>
</view>
</sticky-header>
<list-item v-for="(value, index) in listData" :key="index">
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录