提交 673c1ec0 编写于 作者: 雪洛's avatar 雪洛

fix: 修复类型警告

上级 3522b9d6
......@@ -40,7 +40,7 @@
remoteImagePath: "https://qiniu-web-assets.dcloud.net.cn/uni-app-x/static/img/building.jpg",
remoteImageInfo: "",
// 自动化测试
imageInfoForTest: null,
imageInfoForTest: null as UTSJSONObject | null,
}
},
methods: {
......
......@@ -26,7 +26,7 @@
absoluteVideoPath: "",
absoluteVideoInfo: "",
// 自动化测试
videoInfoForTest: null
videoInfoForTest: null as UTSJSONObject | null
}
},
methods: {
......
......@@ -35,8 +35,8 @@
autoTest: false,
setCookieImage: "",
verifyCookieImage: "",
eventLoad: null,
eventError: null
eventLoad: null as UTSJSONObject | null,
eventError: null as UTSJSONObject | null
}
},
methods: {
......
......@@ -175,16 +175,16 @@
isPause: false,
isError: false,
localSrc: 'https://qiniu-web-assets.dcloud.net.cn/video/sample/2minute-demo.mp4',
eventPlay: null,
eventPause: null,
eventEnded: null,
eventTimeupdate: null,
eventFullscreenchange: null,
eventWaiting: null,
eventError: null,
eventProgress: null,
eventFullscreenclick: null,
eventControlstoggle: null
eventPlay: null as UTSJSONObject | null,
eventPause: null as UTSJSONObject | null,
eventEnded: null as UTSJSONObject | null,
eventTimeupdate: null as UTSJSONObject | null,
eventFullscreenchange: null as UTSJSONObject | null,
eventWaiting: null as UTSJSONObject | null,
eventError: null as UTSJSONObject | null,
eventProgress: null as UTSJSONObject | null,
eventFullscreenclick: null as UTSJSONObject | null,
eventControlstoggle: null as UTSJSONObject | null
}
},
onLoad() {
......@@ -257,13 +257,13 @@
},
onInitialTimeComfirm: function (event : UniInputConfirmEvent) {
let value = parseInt(event.detail.value)
if (value == NaN) value = 0;
if (isNaN(value)) value = 0;
this.initialTime = value;
console.log("initialTime -> " + this.initialTime)
},
onDurationComfirm: function (event : UniInputConfirmEvent) {
let value = parseInt(event.detail.value)
if (value == NaN) value = 0;
if (isNaN(value)) value = 0;
this.duration = value;
console.log("duration -> " + this.duration)
},
......
......@@ -12,17 +12,17 @@
loadFinish: false,
// 自动化测试
autoTest: false,
eventMessage: null,
eventDownload: null
eventMessage: null as UTSJSONObject | null,
eventDownload: null as UTSJSONObject | null
}
},
methods: {
message(event : UniWebViewMessageEvent) {
console.log(JSON.stringify(event.detail));
let contentStr = JSON.stringify(event.detail);
<!-- #ifdef APP-IOS -->
contentStr = JSON.stringify(event.detail.data[0]);
<!-- #endif -->
// #ifdef APP-IOS
contentStr = JSON.stringify(event.detail.data[0]);
// #endif
uni.showModal({
content: contentStr,
showCancel: false
......
......@@ -53,9 +53,9 @@
verticalScrollBarAccess: true,
// 自动化测试
autoTest: false,
eventLoading: null,
eventLoad: null,
eventError: null
eventLoading: null as UTSJSONObject | null,
eventLoad: null as UTSJSONObject | null,
eventError: null as UTSJSONObject | null
}
},
onReady() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册