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

fix: 修复类型警告

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