hy_random
hy_random
  • 发布:2020-01-06 17:04
  • 更新:2020-05-23 10:02
  • 阅读:1062

如何查看APP的canvas节点信息

分类:uni-app

<template>
<view>
<canvas
type="webgl"
ref="mapDiv"
canvas-id="mapDiv"
id="mapDiv"
style="width: 100%; height: 350px;"

</canvas>
<button @tap="check">查看canvas节点</button>
</view>
</template>

<script>
export default {
data() {
return {

        }  
    },  
    methods: {  
        check:function(){  
            let view = uni.createSelectorQuery().in(this).select("#mapDiv");  
            view.node().exec(res => {  
                console.log(res);  
            });  
        }  
    }  
}  

</script>

<style>

</style>

上面是代码,点击查看canvas节点 按钮,小程序能正常返回节点,APP不行,有办法在APP中获取canvas节点吗?

2020-01-06 17:04 负责人:无 分享
已邀请:
DCloud_UNI_GSQ

DCloud_UNI_GSQ

app端确实未支持,github上提交文档相关pr的是你么,已合并,文档将自动更新。

  • hy_random (作者)

    github上提交文档相关pr不是我,app端有支持的计划么?现在卡在这里了

    2020-01-07 12:03

  • mingyigg

    你好,请问这个什么时候支持吗?这个特性等了好久

    2022-03-05 17:04

技术部一哥

技术部一哥 - 一个热爱前端开发的小菜鸟

同问,我也是卡这里了,有没有解决方案

该问题目前已经被锁定, 无法添加新回复