提交 79251caf 编写于 作者: DCloud-yyl's avatar DCloud-yyl

Merge branch 'dev' into alpha

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="io.dcloud.hellouniappx">
<!-- 读取日历权限,用于演示权限申请监听API:uni.createRequestPermissionListener -->
<uses-permission android:name="android.permission.READ_CALENDAR"/>
<application>
</application>
......
......@@ -4,8 +4,8 @@
<!-- #endif -->
<page-head title="权限申请监听"></page-head>
<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="color: darkgray;">uni-app x正在申请日历权限,允许或拒绝均不会获取任何隐私信息。</text>
<text style="font-size: 20px;margin-bottom: 10px;margin-top: 5px;">访问日历权限申请说明:</text>
<text style="color: darkgray;">uni-app x正在申请访问日历权限用于演示,允许或拒绝均不会获取任何隐私信息。</text>
</view>
<button type="primary" style="margin: 10px;" @click="requestPermission">点击申请日历权限</button>
......
......@@ -21,7 +21,7 @@
export default {
data() {
return {
$elementMap: new Map<string, Element>(),
$elementMap: new Map<string, UniElement>(),
x: 0 as number,
y: 0 as number,
// 飘走的卡片计数
......@@ -88,7 +88,7 @@
} else {
// console.log('直接拿');
}
element?.style?.setProperty(propertyName, propertyStyle);
element.style.setProperty(propertyName, propertyStyle);
},
touchstart(e : TouchEvent) {
// console.log('touchstart')
......
......@@ -78,7 +78,9 @@
this.halfOffset = offset;
}
}
// #ifdef WEB
e.preventDefault();
// #endif
},
onHalfTouchEnd(_ : TouchEvent) {
this.halfScreenY = 0;
......
......@@ -38,7 +38,7 @@
export default {
data() {
return {
$elementMap: new Map<string, Element>()
$elementMap: new Map<string, UniElement>()
}
},
methods: {
......@@ -64,10 +64,10 @@
},
// 工具方法,用于快速设置 Element 的 style
setElementStyle(refName : string, propertyName : string, propertyStyle : any) : void {
let element : Element | null = (this.$data['$elementMap'] as Map<string, Element>).get(refName)
let element : UniElement | null = (this.$data['$elementMap'] as Map<string, UniElement>).get(refName)
if (element == null) {
element = this.$refs[refName] as UniElement;
(this.$data['$elementMap'] as Map<string, Element>).set(refName, element)
(this.$data['$elementMap'] as Map<string, UniElement>).set(refName, element)
}
element.style.setProperty(propertyName, propertyStyle);
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册