提交 a0cd00b0 编写于 作者: 辛宝Otto's avatar 辛宝Otto 🥊

fix: 修复安卓平台类型告警

上级 625c5890
......@@ -51,14 +51,13 @@
arr: [4, 5, 6]
})
const refElement = ref(null)
const refElement = ref<UniElement | null>(null)
const refElementIsSame = ref(false)
const refTest = () => {
console.log(instance.proxy);
const queryElementById1 = uni.getElementById('idRef')
const queryElementById2 = uni.getElementById('idRef')
const htmlRefElement = instance.$refs.htmlRef
const htmlRefElement = instance.$refs['htmlRef'] as UniElement | null;
refElement.value = htmlRefElement
if (queryElementById1 === queryElementById2
&& queryElementById1 === htmlRefElement
......
......@@ -59,7 +59,7 @@
refTest() {
const queryElementById1 = uni.getElementById('idRef')
const queryElementById2 = uni.getElementById('idRef')
const htmlRefElement = this.$refs.htmlRef
const htmlRefElement = this.$refs['htmlRef'] as UniElement;
this.refElement = htmlRefElement
if (queryElementById1 === queryElementById2
&& queryElementById1 === htmlRefElement
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册